---
title: "BitMart Spot Submit Order JavaScript SDK Example | Siebly"
description: "BitMart REST spot submit order JavaScript example for the Siebly BitMart SDK, covering exchange REST API and WebSocket integration, setup, and production SDK docs."
canonical: "https://siebly.io/examples/Bitmart/Rest/Spot/spot-submit-order"
robots: "index,follow"
---

# BitMart Spot Submit Order JavaScript SDK Example

BitMart REST spot submit order JavaScript example for the Siebly BitMart SDK, covering exchange REST API and WebSocket integration, setup, and production SDK docs.

**Path:** [Home](/) / [Examples](/examples) / [Bitmart](/examples/Bitmart) / [Rest](/examples/Bitmart/Rest) / [Spot](/examples/Bitmart/Rest/Spot) / [spot-submit-order.ts](/examples/Bitmart/Rest/Spot/spot-submit-order)

[View source on GitHub](https://github.com/sieblyio/crypto-api-examples/blob/master/examples/Bitmart/Rest/Spot/spot-submit-order.ts)

[Open the BitMart JavaScript SDK guide](/sdk/bitmart/javascript)

## spot-submit-order.ts

```typescript
import { RestClient } from 'bitmart-api';

const account = {
  key: process.env.API_KEY || 'apiKeyHere',
  secret: process.env.API_SECRET || 'apiSecretHere',
  memo: process.env.API_MEMO || 'apiMemoHere',
};

async function start() {
  const client = new RestClient({
    apiKey: account.key,
    apiSecret: account.secret,
    apiMemo: account.memo,
  });

  try {
    // const usdValue = 6;
    // const price = 52000;
    // const qty = usdValue / price;

    // const limitBuyOrder = {
    //   symbol: 'BTC_USDT',
    //   side: 'buy',
    //   type: 'limit',
    //   size: String(qty),
    //   price: String(price),
    // };

    // const res = await client.submitSpotOrder({
    //   symbol: 'BTC_USDT',
    //   side: 'buy',
    //   type: 'market',
    //   size: String(qty),
    // });

    const res = await client.submitSpotOrderV2({
      symbol: 'BTC_USDT',
      side: 'sell',
      type: 'market',
      size: String(0.00011),
    });
    console.log('res ', JSON.stringify(res, null, 2));
  } catch (e) {
    console.error('Req error: ', e);
  }
}

start();
```
