---
title: "Binance REST Usdm Testnet JavaScript SDK Example | Siebly"
description: "Binance Futures REST usdm testnet 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-testnet"
robots: "index,follow"
---

# Binance REST Usdm Testnet JavaScript SDK Example

Binance Futures REST usdm testnet 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-testnet.ts](/examples/Binance/Rest/Futures/rest-usdm-testnet)

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

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

## rest-usdm-testnet.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,
  /**
   * Note: testnet is NOT a good place to test strategy performance.
   *
   * For more information and guidance, refer to:
   * https://github.com/tiagosiebler/awesome-crypto-examples/wiki/CEX-Testnets
   */
  testnet: true,
});

async function start() {
  try {
    // To open a short position - if you don't have a position yet, and your account is set to one-way mode, just place a sell order to open a short position
    const result = await client.submitNewOrder({
      side: 'SELL',
      symbol: 'BTCUSDT',
      type: 'MARKET',
      quantity: 0.001,
      // newOrderRespType: 'FULL',
    });

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

start();
```
