---
title: "Binance REST Usdm Demo JavaScript SDK Example | Siebly"
description: "Binance Futures REST usdm demo JavaScript example. Read the source code, review its SDK calls, and browse related exchange integration examples."
canonical: "https://siebly.io/examples/Binance/Rest/Futures/rest-usdm-demo"
robots: "index,follow"
---

# Binance REST Usdm Demo JavaScript SDK Example

Binance Futures REST usdm demo JavaScript example. Read the source code, review its SDK calls, and browse related exchange integration examples.

**Path:** [Home](/) / [Examples](/examples) / [Binance](/examples/Binance) / [REST](/examples/Binance/Rest) / [Futures](/examples/Binance/Rest/Futures) / [rest-usdm-demo.ts](/examples/Binance/Rest/Futures/rest-usdm-demo)

[View source on GitHub](https://github.com/sieblyio/crypto-api-examples/blob/master/examples/Binance/REST/Futures/rest-usdm-demo.ts)

[Open the Binance JavaScript SDK guide](/sdk/binance/javascript)

## rest-usdm-demo.ts

```typescript
import { USDMClient } from 'binance';

const key = process.env.API_KEY_COM || 'APIKEY';
const secret = process.env.API_SECRET_COM || 'APISECRET';

const client = new USDMClient({
  api_secret: secret,
  api_key: key,
  beautifyResponses: true,
  /**
   * Demo trading uses real market data with simulated trading.
   * Perfect for testing strategies without risk.
   */
  demoTrading: true,
});

async function start() {
  try {
    // Get account information on demo trading
    const accountInfo = await client.getAccountInformation();
    console.log('Demo account info: ', accountInfo);

    // Place a test order on demo trading
    const result = await client.submitNewOrder({
      side: 'SELL',
      symbol: 'BTCUSDT',
      type: 'MARKET',
      quantity: 0.001,
    });

    console.log('Demo market sell result: ', result);
  } catch (e) {
    console.error('Demo trading request failed: ', e);
  }
}

start();
```
