BitMart JavaScript SDK
Build with the BitMart REST API & WebSockets with our JavaScript SDK, TypeScript-first package declarations, and Node.js-compatible runtime patterns. Discover installation, common examples, a detailed endpoint-to-function map, and the REST API/WebSocket patterns shared across our Siebly SDK family.
Use the same TypeScript-first REST API and WebSocket clients from plain JavaScript or TypeScript in Node.js-compatible runtimes.
Package surfaces
Explore the following API capabilities are covered by our BitMart SDK:
- Spot
- Margin
- Futures
- WebSockets
- WebSocket clients with:
- Built-in heartbeats.
- Automatic reconnection.
- Automatic reauthentication and resubscribe where the exchange supports it.
- Typed requests and responses for Node.js, JavaScript, and TypeScript IDEs.
- Framework-neutral JavaScript snippets that stay approachable in Node.js-compatible runtimes.
- TypeScript-first package declarations for stricter services, shared libraries, and editor-assisted integrations.
Install BitMart SDK
# Via your favourite package manager, e.g. npm:
npm install bitmart-api
# or pnpm:
pnpm install bitmart-api
# or yarn:
yarn add bitmart-apiQuickstart Examples with the BitMart JavaScript SDK
Get started with just a few lines of JavaScript. TypeScript, while not required, is absolutely recommended. TypeScript declarations are included with all our SDKs and provide convenient definitions on request & response fields, WebSocket payloads, and generally safer integrations.
WebSocket API is not currently available for BitMart.
REST walkthrough
Easily start calling Bitmart's spot REST APIs in JavaScript.
- Install the Bitmart JavaScript SDK via NPM:
npm install bitmart-api. - Import the RestClient class (REST API wrapper for Bitmart APIs).
- Create an authenticated RestClient instance with your API credentials (
apiKey,apiSecret,apiMemo). - Call REST API methods as functions and await the promise containing the response.
In this example, we:
- Prepare an authenticated REST client using environment variables.
- Submit a spot market sell order on
BTC_USDTusingsubmitSpotOrderV2. - Log the full API response to the console.
Commented examples are also included in the script to show how to prepare market and limit buy order payloads.
For a full map of available REST API methods, check out the endpoint reference below.
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();WebSocket walkthrough
Connecting to Bitmart's private spot WebSocket streams is straightforward with the WebsocketClient.
- Install the Bitmart JavaScript SDK via NPM:
npm install bitmart-api. - Import the WebsocketClient and (optionally) a custom logger.
- Create an authenticated WebsocketClient instance with your API credentials (
apiKey,apiSecret,apiMemo). - Configure event handlers for key events such as
open,update,response,reconnect,reconnected,close,authenticated, andexception. - Subscribe to private spot topics and process incoming updates in real time.
In this example, we:
- Open an authenticated private WebSocket connection for spot.
- Subscribe to order progress updates for
BTC_USDT. - Demonstrate an additional (commented) private balance update topic.
This setup allows you to consume live account-level trading events without polling REST endpoints.
import { LogParams, WebsocketClient } from 'bitmart-api'; const account = { key: process.env.API_KEY || 'apiKeyHere', secret: process.env.API_SECRET || 'apiSecretHere', memo: process.env.API_MEMO || 'apiMemoHere',}; const customLogger = { // eslint-disable-next-line @typescript-eslint/no-unused-vars trace: (...params: LogParams): void => { console.log('trace', ...params); }, info: (...params: LogParams): void => { console.log('info', ...params); }, error: (...params: LogParams): void => { console.error('error', ...params); },}; async function start() { const client = new WebsocketClient( { apiKey: account.key, apiSecret: account.secret, apiMemo: account.memo, }, customLogger, ); client.on('open', (data) => { console.log('connected ', data?.wsKey); }); // Data received client.on('update', (data) => { console.info('data received: ', JSON.stringify(data)); }); // Something happened, attempting to reconnect client.on('reconnect', (data) => { console.log('reconnect: ', data); }); // Reconnect successful client.on('reconnected', (data) => { console.log('reconnected: ', data); }); // Connection closed. If unexpected, expect reconnect -> reconnected. client.on('close', (data) => { console.error('close: ', data); }); // Reply to a request, e.g. "subscribe"/"unsubscribe"/"authenticate" client.on('response', (data) => { console.info('response: ', data); }); client.on('exception', (data) => { console.error('exception: ', data); }); client.on('authenticated', (data) => { console.error('authenticated: ', data); }); try { // order progress client.subscribe('spot/user/order:BTC_USDT', 'spot'); // balance updates // client.subscribe('spot/user/balance:BALANCE_UPDATE', 'spot'); } catch (e) { console.error('Req error: ', e); }} start();Common BitMart implementation tasks
Start from the behavior you need, not just from REST or WebSocket as a transport. Market-data driven systems should be event driven. Backfill via the REST API once and let WebSockets passively stream new data to you, as it becomes available.
REST API hydration or backfill
Start from the REST API quickstart and endpoint reference, then normalize exchange-specific IDs, timestamps, symbols, and product scope.
Open endpoint referenceWebSocket consumer
Start from the WebSocket quickstart that matches the task boundary, verify subscription acknowledgement semantics, and keep reconnect handling explicit.
Open WebSocket quickstartAgent prompt recipe
Use the AI prompt generator when the task combines REST API hydration, live streams, in-memory state, operational outputs, or strategy code.
Build an agent promptFor coding agents
Give these files to an agent before implementation so it can find the package, examples, task guidance, and safety rules from the normal SDK-page flow.
AI prompt framework
Prompt generator and task recipes for exchange API projects.
llms.txt
Compact discovery file for agents choosing where to start.
llms-full.txt
Full route and implementation guidance index for machine readers.
SDK catalog
Machine-readable package, docs, examples, and task guidance.
Agent skill
Reusable workflow rules for coding agents using exchange APIs.
Endpoint Function Reference
Endpoint maps
Each REST client is a JavaScript class, which provides functions individually mapped to each endpoint available in the exchange's API offering.
The following table shows all methods available in each REST client, whether the method requires authentication (automatically handled if API keys are provided), as well as the exact endpoint each method is connected to.
This can be used to easily find which method to call, once you have found which endpoint you're looking to use.
All REST clients are in the src folder. For usage examples, make sure to check the examples folder.
List of clients:
If anything is missing or wrong, please open an issue or let us know in our Node.js Traders telegram group!
How to use table
Table consists of 4 parts:
- Function name
- AUTH
- HTTP Method
- Endpoint
Function name is the name of the function that can be called through the SDK. Check examples folder in the repo for more help on how to use them!
AUTH is a boolean value that indicates if the function requires authentication - which means you need to pass your API key and secret to the SDK.
HTTP Method shows HTTP method that the function uses to call the endpoint. Sometimes endpoints can have same URL, but different HTTP method so you can use this column to differentiate between them.
Endpoint is the URL that the function uses to call the endpoint. Best way to find exact function you need for the endpoint is to search for URL in this table and find corresponding function name.
RestClient.ts
This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in RestClient.ts.
| Function | AUTH | HTTP Method | Endpoint |
|---|---|---|---|
| getSystemTime() | GET | system/time | |
| getSystemStatus() | GET | system/service | |
| getSpotCurrenciesV1() | GET | spot/v1/currencies | |
| getSpotTradingPairsV1() | GET | spot/v1/symbols | |
| getSpotTradingPairDetailsV1() | GET | spot/v1/symbols/details | |
| getSpotTickersV3() | GET | spot/quotation/v3/tickers | |
| getSpotTickerV3() | GET | spot/quotation/v3/ticker | |
| getSpotLatestKlineV3() | GET | spot/quotation/v3/lite-klines | |
| getSpotHistoryKlineV3() | GET | spot/quotation/v3/klines | |
| getSpotOrderBookDepthV3() | GET | spot/quotation/v3/books | |
| getSpotRecentTrades() | GET | spot/quotation/v3/trades | |
| getSpotTickersV2() | GET | spot/v2/ticker | |
| getSpotTickerV1() | GET | spot/v1/ticker_detail | |
| getSpotKLineStepsV1() | GET | spot/v1/steps | |
| getSpotKlinesV1() | GET | spot/v1/symbols/kline | |
| getSpotOrderBookDepthV1() | GET | spot/v1/symbols/book | |
| getAccountBalancesV1() | 🔐 | GET | account/v1/wallet |
| getAccountInfoV1() | 🔐 | GET | uapi-key/v1/account/info |
| submitAccountTransferV1() | 🔐 | POST | account/v1/transfer |
| getAccountCurrenciesV1() | GET | account/v1/currencies | |
| getSpotWalletBalanceV1() | 🔐 | GET | spot/v1/wallet |
| getAccountDepositAddressV1() | 🔐 | GET | account/v1/deposit/address |
| getAccountWithdrawQuotaV1() | 🔐 | GET | account/v1/withdraw/charge |
| submitWithdrawalV1() | 🔐 | POST | account/v1/withdraw/apply |
| getWithdrawAddressList() | 🔐 | GET | account/v1/withdraw/address/list |
| getDepositWithdrawHistoryV2() | 🔐 | GET | account/v2/deposit-withdraw/history |
| getDepositWithdrawDetailV1() | 🔐 | GET | account/v1/deposit-withdraw/detail |
| getMarginAccountDetailsV1() | 🔐 | GET | spot/v1/margin/isolated/account |
| submitMarginAssetTransferV1() | 🔐 | POST | spot/v1/margin/isolated/transfer |
| getBasicSpotFeeRateV1() | 🔐 | GET | spot/v1/user_fee |
| getActualSpotTradeFeeRateV1() | 🔐 | GET | spot/v1/trade_fee |
| submitSpotOrderV2() | 🔐 | POST | spot/v2/submit_order |
| submitMarginOrderV1() | 🔐 | POST | spot/v1/margin/submit_order |
| submitSpotBatchOrdersV2() | 🔐 | POST | spot/v2/batch_orders |
| cancelSpotOrderV3() | 🔐 | POST | spot/v3/cancel_order |
| submitSpotBatchOrdersV4() | 🔐 | POST | spot/v4/batch_orders |
| cancelSpotBatchOrdersV4() | 🔐 | POST | spot/v4/cancel_orders |
| cancelAllSpotOrders() | 🔐 | POST | spot/v4/cancel_all |
| cancelSpotOrdersV1() | 🔐 | POST | spot/v1/cancel_orders |
| getSpotOrderByIdV4() | 🔐 | POST | spot/v4/query/order |
| getSpotOrderByClientOrderIdV4() | 🔐 | POST | spot/v4/query/client-order |
| getSpotOpenOrdersV4() | 🔐 | POST | spot/v4/query/open-orders |
| getSpotHistoricOrdersV4() | 🔐 | POST | spot/v4/query/history-orders |
| getSpotAccountTradesV4() | 🔐 | POST | spot/v4/query/trades |
| getSpotAccountOrderTradesV4() | 🔐 | POST | spot/v4/query/order-trades |
| submitSpotAlgoOrderV4() | 🔐 | POST | spot/v4/algo/submit_order |
| cancelSpotAlgoOrderV4() | 🔐 | POST | spot/v4/algo/cancel_order |
| cancelAllSpotAlgoOrdersV4() | 🔐 | POST | spot/v4/algo/cancel_all |
| getSpotAlgoOrderByIdV4() | 🔐 | POST | spot/v4/query/algo/order |
| getSpotAlgoOrderByClientOrderIdV4() | 🔐 | POST | spot/v4/query/algo/client-order |
| getSpotAlgoOpenOrdersV4() | 🔐 | POST | spot/v4/query/algo/open-orders |
| getSpotAlgoHistoryOrdersV4() | 🔐 | POST | spot/v4/query/algo/history-orders |
| marginBorrowV1() | 🔐 | POST | spot/v1/margin/isolated/borrow |
| marginRepayV1() | 🔐 | POST | spot/v1/margin/isolated/repay |
| getMarginBorrowRecordV1() | 🔐 | GET | spot/v1/margin/isolated/borrow_record |
| getMarginRepayRecordV1() | 🔐 | GET | spot/v1/margin/isolated/repay_record |
| getMarginBorrowingRatesV1() | 🔐 | GET | spot/v1/margin/isolated/pairs |
| submitMainTransferSubToMainV1() | 🔐 | POST | account/sub-account/main/v1/sub-to-main |
| submitSubTransferSubToMainV1() | 🔐 | POST | account/sub-account/sub/v1/sub-to-main |
| submitMainTransferMainToSubV1() | 🔐 | POST | account/sub-account/main/v1/main-to-sub |
| submitMainTransferSubToSubV1() | 🔐 | POST | account/sub-account/main/v1/sub-to-sub |
| submitSubTransferSubToSubV1() | 🔐 | POST | account/sub-account/sub/v1/sub-to-sub |
| getSubTransfersV1() | 🔐 | GET | account/sub-account/main/v1/transfer-list |
| getAccountSubTransfersV1() | 🔐 | GET | account/sub-account/v1/transfer-history |
| getSubSpotWalletBalancesV1() | 🔐 | GET | account/sub-account/main/v1/wallet |
| getSubAccountsV1() | 🔐 | GET | account/sub-account/main/v1/subaccount-list |
| getFuturesContractDetails() | GET | contract/public/details | |
| getFuturesContractDepth() | GET | contract/public/depth | |
| getFuturesOpenInterest() | GET | contract/public/open-interest | |
| getFuturesFundingRate() | GET | contract/public/funding-rate | |
| getFuturesKlines() | GET | contract/public/kline | |
| getFuturesAccountAssets() | 🔐 | GET | contract/private/assets-detail |
| getFuturesAccountOrder() | 🔐 | GET | contract/private/order |
| getFuturesAccountOrderHistory() | 🔐 | GET | contract/private/order-history |
| getFuturesAccountOpenOrders() | 🔐 | GET | contract/private/get-open-orders |
| getFuturesAccountPlanOrders() | 🔐 | GET | contract/private/current-plan-order |
| getFuturesAccountPositions() | 🔐 | GET | contract/private/position |
| getPositionRiskDetails() | 🔐 | GET | contract/private/position-risk |
| getFuturesAccountTrades() | 🔐 | GET | contract/private/trades |
| getFuturesTransfers() | 🔐 | GET | account/v1/transfer-contract-list |
| submitFuturesOrder() | 🔐 | POST | contract/private/submit-order |
| cancelFuturesOrder() | 🔐 | POST | contract/private/cancel-order |
| cancelAllFuturesOrders() | 🔐 | POST | contract/private/cancel-orders |
| submitFuturesPlanOrder() | 🔐 | POST | contract/private/submit-plan-order |
| cancelFuturesPlanOrder() | 🔐 | POST | contract/private/cancel-plan-order |
| submitFuturesTransfer() | 🔐 | POST | account/v1/transfer-contract |
| setFuturesLeverage() | 🔐 | POST | contract/private/submit-leverage |
| submitFuturesSubToMainTransferFromMain() | 🔐 | POST | account/contract/sub-account/main/v1/sub-to-main |
| submitFuturesMainToSubTransferFromMain() | 🔐 | POST | account/contract/sub-account/main/v1/main-to-sub |
| submitFuturesSubToMainSubFromSub() | 🔐 | POST | account/contract/sub-account/sub/v1/sub-to-main |
| getFuturesSubWallet() | 🔐 | GET | account/contract/sub-account/main/v1/wallet |
| getFuturesSubTransfers() | 🔐 | GET | account/contract/sub-account/main/v1/transfer-list |
| getFuturesSubTransferHistory() | 🔐 | GET | account/contract/sub-account/v1/transfer-history |
| getFuturesAffiliateRebates() | 🔐 | GET | contract/private/affiliate/rebate-list |
| getFuturesAffiliateTrades() | 🔐 | GET | contract/private/affiliate/trade-list |
| getEarnAccountPosition() | 🔐 | GET | newearn/cloud/v1/earn |
| getFlexibleSavingProducts() | 🔐 | GET | newearn/cloud/v1/saving/product |
| subscribeFlexibleSaving() | 🔐 | POST | newearn/cloud/v1/saving/subscribe |
| redeemFlexibleSaving() | 🔐 | POST | newearn/cloud/v1/saving/redeem |
| getFlexibleSavingPositions() | 🔐 | GET | newearn/cloud/v1/saving/earn |
| getFlexibleSavingHistory() | 🔐 | GET | newearn/cloud/v1/saving/record |
| getFixedSavingProducts() | 🔐 | GET | newearn/cloud/v1/saving/fixed/product |
| subscribeFixedSaving() | 🔐 | POST | newearn/cloud/v1/saving/fixed/subscribe |
| getFixedSavingPositions() | 🔐 | GET | newearn/cloud/v1/saving/fixed/earn |
| getFixedSavingHistory() | 🔐 | GET | newearn/cloud/v1/saving/fixed/record |
| redeemFixedSavingEarly() | 🔐 | POST | newearn/cloud/v1/saving/fixed/redeem |
| updateFixedSavingAutoReinvest() | 🔐 | POST | newearn/cloud/v1/saving/fixed/subscribe/operate |
| setAutoSavingBatch() | 🔐 | POST | newearn/cloud/v1/saving/subscribe/batch/operate |
| getAutoSavingBatchStatus() | 🔐 | GET | newearn/cloud/v1/saving/subscribe/batch |
| setFlexibleSavingAutoSubscribe() | 🔐 | POST | newearn/cloud/v1/saving/subscribe/operate |
| getFlexibleSavingAutoSubscribeStatus() | 🔐 | GET | newearn/cloud/v1/saving/subscribe/status |
| getBrokerRebate() | 🔐 | GET | spot/v1/broker/rebate |
FuturesClientV2.ts
This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in FuturesClientV2.ts.
| Function | AUTH | HTTP Method | Endpoint |
|---|---|---|---|
| getSystemTime() | GET | system/time | |
| getSystemStatus() | GET | system/service | |
| getFuturesContractDetails() | GET | contract/public/details | |
| getFuturesContractDepth() | GET | contract/public/depth | |
| getFuturesMarketTrade() | GET | contract/public/market-trade | |
| getFuturesOpenInterest() | GET | contract/public/open-interest | |
| getFuturesFundingRate() | GET | contract/public/funding-rate | |
| getFuturesFundingRateV2() | GET | contract/public/funding-rate-v2 | |
| getFuturesKlines() | GET | contract/public/kline | |
| getFuturesMarkPriceKlines() | GET | contract/public/markprice-kline | |
| getFuturesFundingRateHistory() | GET | contract/public/funding-rate-history | |
| getFuturesLeverageBracket() | GET | contract/public/leverage-bracket | |
| getFuturesAccountAssets() | 🔐 | GET | contract/private/assets-detail |
| getFuturesTradeFeeRate() | 🔐 | GET | contract/private/trade-fee-rate |
| getFuturesAccountOrder() | 🔐 | GET | contract/private/order |
| getFuturesAccountOrderHistory() | 🔐 | GET | contract/private/order-history |
| getFuturesAccountOpenOrders() | 🔐 | GET | contract/private/get-open-orders |
| getFuturesAccountPlanOrders() | 🔐 | GET | contract/private/current-plan-order |
| getFuturesAccountPositions() | 🔐 | GET | contract/private/position |
| getFuturesAccountPositionsV2() | 🔐 | GET | contract/private/position-v2 |
| getPositionRiskDetails() | 🔐 | GET | contract/private/position-risk |
| getFuturesAccountTrades() | 🔐 | GET | contract/private/trades |
| getFuturesAccountTransactionHistory() | 🔐 | GET | contract/private/transaction-history |
| getFuturesAutoRepayment() | 🔐 | GET | contract/private/auto_repayment |
| getFuturesCrossCollateralInterestLog() | 🔐 | GET | contract/private/cross_collateral/interest_log |
| getFuturesTransfers() | 🔐 | GET | account/v1/transfer-contract-list |
| submitFuturesOrder() | 🔐 | POST | contract/private/submit-order |
| updateFuturesLimitOrder() | 🔐 | POST | contract/private/modify-limit-order |
| cancelFuturesOrder() | 🔐 | POST | contract/private/cancel-order |
| cancelAllFuturesOrders() | 🔐 | POST | contract/private/cancel-orders |
| cancelAllFuturesOrdersAfter() | 🔐 | POST | contract/private/cancel-all-after |
| closeAllFuturesPositions() | 🔐 | POST | contract/private/close-all-position |
| submitFuturesPlanOrder() | 🔐 | POST | contract/private/submit-plan-order |
| cancelFuturesPlanOrder() | 🔐 | POST | contract/private/cancel-plan-order |
| submitFuturesTransfer() | 🔐 | POST | account/v1/transfer-contract |
| submitFuturesFundingAccountTransfer() | 🔐 | POST | contract/private/account/v1/transfer |
| setFuturesLeverage() | 🔐 | POST | contract/private/submit-leverage |
| submitFuturesTPSLOrder() | 🔐 | POST | contract/private/submit-tp-sl-order |
| updateFuturesPlanOrder() | 🔐 | POST | contract/private/modify-plan-order |
| updateFuturesPresetPlanOrder() | 🔐 | POST | contract/private/modify-preset-plan-order |
| updateFuturesTPSLOrder() | 🔐 | POST | contract/private/modify-tp-sl-order |
| submitFuturesTrailOrder() | 🔐 | POST | contract/private/submit-trail-order |
| cancelFuturesTrailOrder() | 🔐 | POST | contract/private/cancel-trail-order |
| setPositionMode() | 🔐 | POST | contract/private/set-position-mode |
| getPositionMode() | 🔐 | GET | contract/private/get-position-mode |
| submitFuturesSubToMainTransferFromMain() | 🔐 | POST | account/contract/sub-account/main/v1/sub-to-main |
| submitFuturesMainToSubTransferFromMain() | 🔐 | POST | account/contract/sub-account/main/v1/main-to-sub |
| submitFuturesSubToMainSubFromSub() | 🔐 | POST | account/contract/sub-account/sub/v1/sub-to-main |
| getFuturesSubWallet() | 🔐 | GET | account/contract/sub-account/main/v1/wallet |
| getFuturesSubTransfers() | 🔐 | GET | account/contract/sub-account/main/v1/transfer-list |
| getFuturesSubTransferHistory() | 🔐 | GET | account/contract/sub-account/v1/transfer-history |
| getFuturesAffiliateRebates() | 🔐 | GET | contract/private/affiliate/rebate-list |
| getFuturesAffiliateTrades() | 🔐 | GET | contract/private/affiliate/trade-list |
| getFuturesAffiliateRebateUser() | 🔐 | GET | contract/private/affiliate/rebate-user |
| getFuturesAffiliateInviteCheck() | 🔐 | GET | contract/private/affiliate/invite-check |
| getFuturesAffiliateCustomerInfo() | 🔐 | GET | contract/private/affiliate/aff-customer-info |
| getFuturesAffiliateRebateInviteUser() | 🔐 | GET | contract/private/affiliate/rebate-inviteUser |
| getFuturesAffiliateRebateApi() | 🔐 | GET | contract/private/affiliate/rebate-api |
| getFuturesAffiliateDepositWithdrawalList() | 🔐 | GET | contract/private/affiliate/deposit-withdrawal-list |
| submitFuturesSimulatedClaim() | 🔐 | POST | contract/private/claim |
BitMart JavaScript FAQ
What does the BitMart JavaScript SDK cover?
BitMart supports Spot, Margin, Futures, and WebSockets workflows. The JavaScript guide covers the main REST and WebSocket integration patterns.
How do I authenticate private BitMart API calls in JavaScript?
Install bitmart-api from npm & pass API credentials into the SDK client options, as shown in the BitMart JavaScript examples above. The SDK handles the exchange-specific signing requirements for private requests.
Does the BitMart JavaScript SDK help with WebSocket connection management?
Yes. Use the SDK WebSocket client for subscriptions, reconnect handling, and stream lifecycle management instead of building raw socket flows yourself.
Where should I start on the BitMart JavaScript page: REST or WebSocket?
Start with the REST quick start for installation, authentication, and request and response flows. Move to the WebSocket example when you need streaming market or account updates.
Direct Example Files
Open the example files below for JavaScript and TypeScript-compatible request, authentication, WebSocket, and Node.js service patterns.