Binance TypeScript SDK
Installation and integration guidance for the Binance SDK in TypeScript.
TypeScript SDK Usage
Use typed requests, responses, and event flows in stricter TypeScript services and shared libraries.
In TypeScript, use the package types to check request shapes, response fields, WebSocket payloads, and refactors around exchange-specific code.
What This SDK Covers
- Complete Binance REST API integrations for exchange-specific workflows.
- Robust Binance WebSocket support for market and account stream handling.
- TypeScript-friendly usage patterns for production integration work.
- Adaptable TypeScript examples & guides under /examples for implementation reference.
- Type-rich examples that emphasize request and response shapes, editor hints, and safer refactors.
- Implementation patterns for larger TypeScript services, shared libraries, and stricter TypeScript application code.
Install Package
npm install binance
# or
pnpm install binance
yarn add binance
Quickstart REST API Walkthrough
Using Binance's USD-M Futures REST APIs in JavaScript is easy!
- Install the Binance JavaScript SDK via NPM:
npm install binance. - Import the
USDMClient(REST API wrapper for Binance USD-M Futures APIs). - If Spot or Margin is preferred, use the
MainClientinstead. - Create an instance with your API credentials.
- Call the desired REST API methods as functions and await the promise containing the response.
In this example, we:
- Create an authenticated USD-M Futures REST client.
- Submit a new market order for BTCUSDT using
submitNewOrder(). - Log the order response returned by Binance.
For a full map of available REST API methods, check out the endpoint reference below.
Quickstart REST API Example
404: Not Found
Quickstart WebSocket Walkthrough
Connecting to Binance's WebSocket streams is straightforward with the WebsocketClient.
- Import the WebsocketClient (General WebSocket wrapper for all available Binance WebSocket streams)
- Create an instance of the WebsocketClient (API credentials not required unless you want to consume private topics).
- Configure event handlers for the emitted events you are interested in. The minimum recommended handlers are 'exception', 'message' and 'reconnected'. The latter informs you if a connection dropped and was successfully re-established by the client.
- Call the subscribe method for the desired channels and handle incoming events.
In this example, we:
- Subscribe to the spot trades streams for 3 symbols.
- Log incoming messages to the console for demonstration purposes.
- Use the "formattedMessage" event handler to log a more readable version of the incoming trade data (available thanks to the "beautify: true" configuration).
This setup allows you to receive real-time updates on market activity, a much faster alternative to polling REST endpoints for the same data.
Quickstart WebSocket Example
import { DefaultLogger, isWsFormattedTrade, WebsocketClient } from 'binance';
(async () => {
const logger = {
...DefaultLogger,
// trace: () => {},
};
const wsClient = new WebsocketClient(
{
beautify: true,
},
logger,
);
wsClient.on('formattedMessage', (data) => {
if (isWsFormattedTrade(data)) {
console.log('trade event ', data);
return;
}
console.log('log formattedMessage: ', data);
});
wsClient.on('open', (data) => {
console.log('connection opened open:', data.wsKey, data.wsUrl);
});
wsClient.on('response', (data) => {
console.log('log response: ', JSON.stringify(data, null, 2));
});
wsClient.on('reconnecting', (data) => {
console.log('ws automatically reconnecting.... ', data?.wsKey);
});
wsClient.on('reconnected', (data) => {
console.log('ws has reconnected ', data?.wsKey);
});
// Request subscription to the following symbol trade events:
const symbols = ['BTCUSDT', 'ETHUSDT', 'BNBUSDT'];
// Loop through symbols
for (const symbol of symbols) {
console.log('subscribing to trades for: ', symbol);
wsClient.subscribeSpotTrades(symbol);
}
})();
Quickstart WebSocket API Walkthrough
Binance's WebSocket API (WS-API) is a powerful tool to send commands over a persisted and pre-authenticated WebSocket connection, allowing for lower latency interactions with the exchange compared to REST API calls.
The WS-API supports a wide range of commands, including order submission and cancellation, making it ideal for latency sensitive integrations.
To use the WebSocket API:
- Import the WebsocketAPIClient (a specialised wrapper around the WebsocketClient)
- Create an instance of the WebsocketAPIClient with credentials.
- Note: Ed25519 keys are required for the maximum speed benefit.
- HMAC & RSA credentials are supported, but will require each request to be individually signed.
- Call the dedicated functions to send WS-API commands and await the responses.
Authentication is automatic. Connectivity is persistent with automatic failover. All WS-API commands are wrapped in promises, allowing you to await individual Websocket API commands as if it were a REST API call.
Quickstart WebSocket API Example
/* eslint-disable @typescript-eslint/no-unused-vars */
// or
import { DefaultLogger, WebsocketAPIClient } from 'binance';
/**
* Note: the WebSocket API is fastest with Ed25519 keys. HMAC & RSA will
* require each command to be individually signed.
*
* Check the rest-private-ed25519.md in this folder for more guidance
* on preparing this Ed25519 API key.
*/
const publicKey = `-----BEGIN PUBLIC KEY-----
MCexampleQTxwLU9o=
-----END PUBLIC KEY-----
`;
const privateKey = `-----BEGIN PRIVATE KEY-----
MC4CAQAexamplewqj5CzUuTy1
-----END PRIVATE KEY-----
`;
const key = process.env.API_KEY_COM;
const secret = process.env.API_SECRET_COM;
// returned by binance, generated using the publicKey (above)
// const key = 'BVv39ATnIme5TTZRcC3I04C3FqLVM7vCw3Hf7mMT7uu61nEZK8xV1V5dmhf9kifm';
// Your Ed25519 private key is passed as the "secret"
// const secret = privateKey;
// function attachEventHandlers<TWSClient extends WebsocketClient>(
// wsClient: TWSClient,
// ): void {
// /**
// * General event handlers for monitoring the WebsocketClient
// */
// wsClient.on('message', (data) => {
// // console.log('raw message received ', JSON.stringify(data));
// });
// wsClient.on('response', (data) => {
// // console.log('ws response: ', JSON.stringify(data));
// });
// wsClient.on('open', (data) => {
// console.log('ws connected', data.wsKey);
// });
// wsClient.on('reconnecting', ({ wsKey }) => {
// console.log('ws automatically reconnecting.... ', wsKey);
// });
// wsClient.on('reconnected', (data) => {
// console.log('ws has reconnected ', data?.wsKey);
// });
// wsClient.on('authenticated', (data) => {
// console.log('ws has authenticated ', data?.wsKey);
// });
// wsClient.on('exception', (data) => {
// console.error('ws exception: ', JSON.stringify(data));
// });
// }
async function main() {
const customLogger = {
...DefaultLogger,
// For a more detailed view of the WebsocketClient, enable the `trace` level by uncommenting the below line:
// trace: (...params) => console.log(new Date(), 'trace', ...params),
};
const wsClient = new WebsocketAPIClient(
{
api_key: key,
api_secret: secret,
beautify: true,
// Enforce testnet ws connections, regardless of supplied wsKey
// testnet: true,
// Note: unless you set this to false, the SDK will automatically call
// the `subscribeUserDataStream()` method again if reconnected (if you called it before):
// resubscribeUserDataStreamAfterReconnect: true,
// If you want your own event handlers instead of the default ones with logs, disable this setting and see the `attachEventHandlers` example below:
// attachEventListeners: false
},
customLogger,
);
// Optional, attach basic event handlers, so nothing is left unhandled
// attachEventHandlers(wsClient.getWSClient());
// Optional, if you see RECV Window errors, you can use this to manage time issues.
// ! However, make sure you sync your system clock first!
// https://github.com/tiagosiebler/awesome-crypto-examples/wiki/Timestamp-for-this-request-is-outside-of-the-recvWindow
// wsClient.setTimeOffsetMs(-5000);
// Optional. Can be used to prepare a connection before sending commands.
// Can be done as part of a bootstrapping workflow, to reduce initial latency when sending the first command
// await wsClient.getWSClient().connectWSAPI(WS_KEY_MAP.mainWSAPI);
try {
const response = await wsClient.getSpotSessionStatus();
console.log('getSessionStatus response: ', response);
} catch (e) {
console.log('getSessionStatus error: ', e);
}
try {
const response = await wsClient.getSpotServerTime();
console.log('getSpotServerTime response: ', response);
} catch (e) {
console.log('getSpotServerTime error: ', e);
}
try {
const response = await wsClient.getSpotExchangeInfo();
console.log('getSpotExchangeInfo response: ', response);
} catch (e) {
console.log('getSpotExchangeInfo error: ', e);
}
try {
const response = await wsClient.getSpotOrderBook({ symbol: 'BTCUSDT' });
console.log('getSpotOrderBook response: ', response);
} catch (e) {
console.log('getSpotOrderBook error: ', e);
}
try {
const response = await wsClient.getSpotHistoricalTrades({
symbol: 'BTCUSDT',
fromId: 0,
limit: 1,
});
console.log('getSpotHistoricalTrades response: ', response);
} catch (e) {
console.log('getSpotHistoricalTrades error: ', e);
}
// SPOT - Market data requests
try {
const response = await wsClient.getSpotRecentTrades({
symbol: 'BTCUSDT',
limit: 1,
});
console.log('getSpotRecentTrades response: ', response);
} catch (e) {
console.log('getSpotRecentTrades error: ', e);
}
try {
const response = await wsClient.getSpotAggregateTrades({
symbol: 'BNBBTC',
fromId: 50000000,
limit: 1,
});
console.log('getSpotAggregateTrades response: ', response);
} catch (e) {
console.log('getSpotAggregateTrades error: ', e);
}
try {
const response = await wsClient.getSpotKlines({
symbol: 'BNBBTC',
interval: '1h',
startTime: 1655969280000,
limit: 1,
});
console.log('getSpotKlines response: ', response);
} catch (e) {
console.log('getSpotKlines error: ', e);
}
try {
const response = await wsClient.getSpotUIKlines({
symbol: 'BNBBTC',
interval: '1h',
startTime: 1655969280000,
limit: 1,
});
console.log('getSpotUIKlines response: ', response);
} catch (e) {
console.log('getSpotUIKlines error: ', e);
}
try {
const response = await wsClient.getSpotAveragePrice({
symbol: 'BTCUSDT',
});
console.log('getSpotAveragePrice response: ', response);
} catch (e) {
console.log('getSpotAveragePrice error: ', e);
}
try {
const response = await wsClient.getSpot24hrTicker({
symbol: 'BTCUSDT',
});
console.log('getSpot24hrTicker response: ', response);
} catch (e) {
console.log('getSpot24hrTicker error: ', e);
}
try {
const response = await wsClient.getSpotTradingDayTicker({
symbol: 'BTCUSDT',
});
console.log('getSpotTradingDayTicker response: ', response);
} catch (e) {
console.log('getSpotTradingDayTicker error: ', e);
}
try {
const response = await wsClient.getSpotTicker({
symbol: 'BTCUSDT',
});
console.log('getSpotTicker response: ', response);
} catch (e) {
console.log('getSpotTicker error: ', e);
}
try {
const response = await wsClient.getSpotSymbolPriceTicker({
symbol: 'BTCUSDT',
});
console.log('getSpotSymbolPriceTicker response: ', response);
} catch (e) {
console.log('getSpotSymbolPriceTicker error: ', e);
}
try {
const response = await wsClient.getSpotSymbolOrderBookTicker({
symbol: 'BTCUSDT',
});
console.log('getSpotSymbolOrderBookTicker response: ', response);
} catch (e) {
console.log('getSpotSymbolOrderBookTicker error: ', e);
}
// SPOT - Trading requests
try {
const response = await wsClient.submitNewSpotOrder({
symbol: 'BTCUSDT',
side: 'SELL',
type: 'LIMIT',
timeInForce: 'GTC',
price: '23416.10000000',
quantity: '0.00847000',
});
console.log('submitNewSpotOrder response: ', response);
} catch (e) {
console.log('submitNewSpotOrder error: ', e);
}
try {
const response = await wsClient.testSpotOrder({
symbol: 'BTCUSDT',
side: 'SELL',
type: 'LIMIT',
timeInForce: 'GTC',
price: '23416.1',
quantity: '0.001',
timestamp: Date.now(),
});
console.log('testSpotOrder response: ', response);
} catch (e) {
console.log('testSpotOrder error: ', e);
}
try {
const response = await wsClient.getSpotOrderStatus({
symbol: 'BTCUSDT',
orderId: 12345678,
timestamp: Date.now(),
});
console.log('getSpotOrderStatus response: ', response);
} catch (e) {
console.log('getSpotOrderStatus error: ', e);
}
try {
const response = await wsClient.cancelSpotOrder({
symbol: 'BTCUSDT',
orderId: 12345678,
timestamp: Date.now(),
});
console.log('cancelSpotOrder response: ', response);
} catch (e) {
console.log('cancelSpotOrder error: ', e);
}
try {
const response = await wsClient.cancelReplaceSpotOrder({
symbol: 'BTCUSDT',
cancelReplaceMode: 'ALLOW_FAILURE',
cancelOrigClientOrderId: '4d96324ff9d44481926157',
side: 'SELL',
type: 'LIMIT',
timeInForce: 'GTC',
price: '23416.10000000',
quantity: '0.00847000',
timestamp: Date.now(),
});
console.log('cancelReplaceSpotOrder response: ', response);
} catch (e) {
console.log('cancelReplaceSpotOrder error: ', e);
}
try {
const response = await wsClient.amendSpotOrderKeepPriority({
newQty: '5',
origClientOrderId: 'my_test_order1',
recvWindow: 5000,
symbol: 'BTCUSDT',
timestamp: Date.now(),
});
console.log('amendSpotOrderKeepPriority response: ', response);
} catch (e) {
console.log('amendSpotOrderKeepPriority error: ', e);
}
try {
const response = await wsClient.getSpotOpenOrders({
symbol: 'BTCUSDT',
timestamp: Date.now(),
});
console.log('getSpotOpenOrders response: ', response);
} catch (e) {
console.log('getSpotOpenOrders error: ', e);
}
try {
const response = await wsClient.cancelAllSpotOpenOrders({
symbol: 'BTCUSDT',
timestamp: Date.now(),
});
console.log('cancelAllSpotOpenOrders response: ', response);
} catch (e) {
console.log('cancelAllSpotOpenOrders error: ', e);
}
try {
const response = await wsClient.placeSpotOrderList({
symbol: 'BTCUSDT',
side: 'SELL',
price: '23420.00000000',
quantity: '0.00650000',
stopPrice: '23410.00000000',
stopLimitPrice: '23405.00000000',
stopLimitTimeInForce: 'GTC',
newOrderRespType: 'RESULT',
timestamp: Date.now(),
});
console.log('placeSpotOrderList response: ', response);
} catch (e) {
console.log('placeSpotOrderList error: ', e);
}
try {
const response = await wsClient.placeSpotOCOOrderList({
symbol: 'LTCBNB',
side: 'BUY',
quantity: 1,
timestamp: 1711062760647,
aboveType: 'STOP_LOSS_LIMIT',
abovePrice: '1.5',
aboveStopPrice: '1.50000001',
aboveTimeInForce: 'GTC',
belowType: 'LIMIT_MAKER',
belowPrice: '1.49999999',
});
console.log('placeSpotOCOOrderList response: ', response);
} catch (e) {
console.log('placeSpotOCOOrderList error: ', e);
}
try {
const response = await wsClient.placeSpotOTOOrderList({
pendingQuantity: 1,
pendingSide: 'BUY',
pendingType: 'MARKET',
symbol: 'LTCBNB',
recvWindow: 5000,
timestamp: 1712544395951,
workingPrice: 1,
workingQuantity: 1,
workingSide: 'SELL',
workingTimeInForce: 'GTC',
workingType: 'LIMIT',
});
console.log('placeSpotOTOOrderList response: ', response);
} catch (e) {
console.log('placeSpotOTOOrderList error: ', e);
}
try {
const response = await wsClient.placeSpotOTOCOOrderList({
pendingQuantity: 5,
pendingSide: 'SELL',
pendingBelowPrice: 5,
pendingBelowType: 'LIMIT_MAKER',
pendingAboveStopPrice: 0.5,
pendingAboveType: 'STOP_LOSS',
symbol: 'LTCBNB',
recvWindow: 5000,
timestamp: Date.now(),
workingPrice: 1.5,
workingQuantity: 1,
workingSide: 'BUY',
workingTimeInForce: 'GTC',
workingType: 'LIMIT',
});
console.log('placeSpotOTOCOOrderList response: ', response);
} catch (e) {
console.log('placeSpotOTOCOOrderList error: ', e);
}
try {
const response = await wsClient.getSpotOrderListStatus({
orderListId: 12345678,
timestamp: Date.now(),
});
console.log('getSpotOrderListStatus response: ', response);
} catch (e) {
console.log('getSpotOrderListStatus error: ', e);
}
try {
const response = await wsClient.cancelSpotOrderList({
symbol: 'BTCUSDT',
orderListId: 1274512,
timestamp: Date.now(),
});
console.log('cancelSpotOrderList response: ', response);
} catch (e) {
console.log('cancelSpotOrderList error: ', e);
}
try {
const response = await wsClient.getSpotOpenOrderLists({
timestamp: Date.now(),
});
console.log('getSpotOpenOrderLists response: ', response);
} catch (e) {
console.log('getSpotOpenOrderLists error: ', e);
}
try {
const response = await wsClient.placeSpotSOROrder({
symbol: 'BTCUSDT',
side: 'BUY',
type: 'LIMIT',
quantity: 0.5,
timeInForce: 'GTC',
price: 31000,
timestamp: Date.now(),
});
console.log('placeSpotSOROrder response: ', response);
} catch (e) {
console.log('placeSpotSOROrder error: ', e);
}
try {
const response = await wsClient.testSpotSOROrder({
symbol: 'BTCUSDT',
side: 'BUY',
type: 'LIMIT',
quantity: 0.1,
timeInForce: 'GTC',
price: 0.1,
timestamp: Date.now(),
});
console.log('testSpotSOROrder response: ', response);
} catch (e) {
console.log('testSpotSOROrder error: ', e);
}
// SPOT - Account requests
try {
const response = await wsClient.getSpotAccountInformation({
timestamp: Date.now(),
});
console.log('getSpotAccountInformation response: ', response);
} catch (e) {
console.log('getSpotAccountInformation error: ', e);
}
try {
const response = await wsClient.getSpotOrderRateLimits({
timestamp: Date.now(),
});
console.log('getSpotOrderRateLimits response: ', response);
} catch (e) {
console.log('getSpotOrderRateLimits error: ', e);
}
try {
const response = await wsClient.getSpotAllOrders({
symbol: 'BTCUSDT',
limit: 10,
});
console.log('getSpotAllOrders response: ', response);
} catch (e) {
console.log('getSpotAllOrders error: ', e);
}
try {
const response = await wsClient.getSpotAllOrderLists({
limit: 10,
});
console.log('getSpotAllOrderLists response: ', response);
} catch (e) {
console.log('getSpotAllOrderLists error: ', e);
}
try {
const response = await wsClient.getSpotMyTrades({
symbol: 'BTCUSDT',
limit: 10,
});
console.log('getSpotMyTrades response: ', response);
} catch (e) {
console.log('getSpotMyTrades error: ', e);
}
try {
const response = await wsClient.getSpotPreventedMatches({
symbol: 'BTCUSDT',
});
console.log('getSpotPreventedMatches response: ', response);
} catch (e) {
console.log('getSpotPreventedMatches error: ', e);
}
try {
const response = await wsClient.getSpotAllocations({
symbol: 'BTCUSDT',
orderId: 12345678,
});
console.log('getSpotAllocations response: ', response);
} catch (e) {
console.log('getSpotAllocations error: ', e);
}
try {
const response = await wsClient.getSpotAccountCommission({
symbol: 'BTCUSDT',
});
console.log('getSpotAccountCommission response: ', response);
} catch (e) {
console.log('getSpotAccountCommission error: ', e);
}
// FUTURES - Market data requests
try {
const response = await wsClient.getFuturesOrderBook({
symbol: 'BTCUSDT',
});
console.log('getFuturesOrderBook response: ', response);
} catch (e) {
console.log('getFuturesOrderBook error: ', e);
}
try {
const response = await wsClient.getFuturesSymbolPriceTicker({
symbol: 'BTCUSDT',
});
console.log('getFuturesSymbolPriceTicker response: ', response);
} catch (e) {
console.log('getFuturesSymbolPriceTicker error: ', e);
}
try {
const response = await wsClient.getFuturesSymbolOrderBookTicker({
symbol: 'BTCUSDT',
});
console.log('getFuturesSymbolOrderBookTicker response: ', response);
} catch (e) {
console.log('getFuturesSymbolOrderBookTicker error: ', e);
}
// FUTURES - Trading requests
try {
const response = await wsClient.submitNewFuturesOrder('usdm', {
positionSide: 'BOTH',
price: '43187.00',
quantity: 0.1,
side: 'BUY',
symbol: 'BTCUSDT',
timeInForce: 'GTC',
timestamp: Date.now(),
type: 'LIMIT',
});
console.log('submitNewFuturesOrder response: ', response);
} catch (e) {
console.log('submitNewFuturesOrder error: ', e);
}
try {
const response = await wsClient.modifyFuturesOrder('usdm', {
orderId: 328971409,
origType: 'LIMIT',
positionSide: 'SHORT',
price: '43769.1',
priceMatch: 'NONE',
quantity: '0.11',
side: 'SELL',
symbol: 'BTCUSDT',
timestamp: Date.now(),
});
console.log('modifyFuturesOrder response: ', response);
} catch (e) {
console.log('modifyFuturesOrder error: ', e);
}
try {
const response = await wsClient.cancelFuturesOrder('usdm', {
symbol: 'BTCUSDT',
orderId: 328971409,
timestamp: Date.now(),
});
console.log('cancelFuturesOrder response: ', response);
} catch (e) {
console.log('cancelFuturesOrder error: ', e);
}
try {
const response = await wsClient.getFuturesOrderStatus('usdm', {
orderId: 328999071,
symbol: 'BTCUSDT',
timestamp: Date.now(),
});
console.log('getFuturesOrderStatus response: ', response);
} catch (e) {
console.log('getFuturesOrderStatus error: ', e);
}
try {
const response = await wsClient.getFuturesPositionV2({
timestamp: Date.now(),
});
console.log('getFuturesPositionV2 response: ', response);
} catch (e) {
console.log('getFuturesPositionV2 error: ', e);
}
try {
const response = await wsClient.getFuturesPosition('usdm', {
timestamp: Date.now(),
});
console.log('getFuturesPosition response: ', response);
} catch (e) {
console.log('getFuturesPosition error: ', e);
}
// FUTURES - Account requests
try {
const response = await wsClient.getFuturesAccountBalanceV2({
timestamp: Date.now(),
});
console.log('getFuturesAccountBalanceV2 response: ', response);
} catch (e) {
console.log('getFuturesAccountBalanceV2 error: ', e);
}
try {
const response = await wsClient.getFuturesAccountBalance('usdm', {
timestamp: Date.now(),
});
console.log('getFuturesAccountBalance response: ', response);
} catch (e) {
console.log('getFuturesAccountBalance error: ', e);
}
try {
const response = await wsClient.getFuturesAccountStatusV2({
timestamp: Date.now(),
});
console.log('getFuturesAccountStatusV2 response: ', response);
} catch (e) {
console.log('getFuturesAccountStatusV2 error: ', e);
}
try {
const response = await wsClient.getFuturesAccountStatus('usdm', {
timestamp: Date.now(),
});
console.log('getFuturesAccountStatus response: ', response);
} catch (e) {
console.log('getFuturesAccountStatus error: ', e);
}
try {
const response = await wsClient.submitNewFuturesAlgoOrder({
algoType: 'CONDITIONAL',
symbol: 'BTCUSDT',
side: 'BUY',
type: 'STOP',
timeInForce: 'GTC',
price: '100000.10000000',
stopPrice: '100000.10000000',
quantity: '0.00847000',
timestamp: Date.now(),
});
console.log('submitNewFuturesAlgoOrder response: ', response);
} catch (e) {
console.log('submitNewFuturesAlgoOrder error: ', e);
}
try {
const response = await wsClient.cancelFuturesAlgoOrder({
algoid: 1028312903,
timestamp: Date.now(),
});
console.log('cancelFuturesAlgoOrder response: ', response);
} catch (e) {
console.log('cancelFuturesAlgoOrder error: ', e);
}
}
// Start executing the example workflow
main();
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.
main-client.ts
This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in main-client.ts.
| Function | AUTH | HTTP Method | Endpoint |
|---|---|---|---|
| testConnectivity() | GET | api/v3/ping | |
| getExchangeInfo() | GET | api/v3/exchangeInfo | |
| getOrderBook() | GET | api/v3/depth | |
| getRecentTrades() | GET | api/v3/trades | |
| getHistoricalTrades() | GET | api/v3/historicalTrades | |
| getAggregateTrades() | GET | api/v3/aggTrades | |
| getKlines() | GET | api/v3/klines | |
| getUIKlines() | GET | api/v3/uiKlines | |
| getAvgPrice() | GET | api/v3/avgPrice | |
| getExecutionRules() | GET | api/v3/executionRules?symbols= | |
| getReferencePrice() | GET | api/v3/referencePrice | |
| getReferencePriceCalculation() | GET | api/v3/referencePrice/calculation | |
| get24hrChangeStatistics() | GET | api/v3/ticker/24hr?symbols= | |
| getTradingDayTicker() | GET | api/v3/ticker/tradingDay?symbols= | |
| getSymbolPriceTicker() | GET | api/v3/ticker/price?symbols= | |
| getSymbolOrderBookTicker() | GET | api/v3/ticker/bookTicker?symbols= | |
| getRollingWindowTicker() | GET | api/v3/ticker?symbols= | |
| submitNewOrder() | 🔐 | POST | api/v3/order |
| testNewOrder() | 🔐 | POST | api/v3/order/test |
| getOrder() | 🔐 | GET | api/v3/order |
| cancelOrder() | 🔐 | DELETE | api/v3/order |
| cancelAllSymbolOrders() | 🔐 | DELETE | api/v3/openOrders |
| replaceOrder() | 🔐 | POST | api/v3/order/cancelReplace |
| amendOrderKeepPriority() | 🔐 | PUT | fapi/v1/order/amend/keepPriority |
| getOpenOrders() | 🔐 | GET | api/v3/openOrders |
| getAllOrders() | 🔐 | GET | api/v3/allOrders |
| submitNewOCO() | 🔐 | POST | api/v3/order/oco |
| submitNewOrderList() | 🔐 | POST | api/v3/orderList/oco |
| submitNewOrderListOTO() | 🔐 | POST | api/v3/orderList/oto |
| submitNewOrderListOTOCO() | 🔐 | POST | api/v3/orderList/otoco |
| submitNewOrderListOPO() | 🔐 | POST | api/v3/orderList/opo |
| submitNewOrderListOPOCO() | 🔐 | POST | api/v3/orderList/opoco |
| cancelOCO() | 🔐 | DELETE | api/v3/orderList |
| getOCO() | 🔐 | GET | api/v3/orderList |
| getAllOCO() | 🔐 | GET | api/v3/allOrderList |
| getAllOpenOCO() | 🔐 | GET | api/v3/openOrderList |
| submitNewSOROrder() | 🔐 | POST | api/v3/sor/order |
| testNewSOROrder() | 🔐 | POST | api/v3/sor/order/test |
| getAccountInformation() | 🔐 | GET | api/v3/account |
| getAccountTradeList() | 🔐 | GET | api/v3/myTrades |
| getOrderRateLimit() | 🔐 | GET | api/v3/rateLimit/order |
| getPreventedMatches() | 🔐 | GET | api/v3/myPreventedMatches |
| getAllocations() | 🔐 | GET | api/v3/myAllocations |
| getCommissionRates() | 🔐 | GET | api/v3/account/commission |
| getCrossMarginCollateralRatio() | 🔐 | GET | sapi/v1/margin/crossMarginCollateralRatio |
| getAllCrossMarginPairs() | GET | sapi/v1/margin/allPairs | |
| getIsolatedMarginAllSymbols() | 🔐 | GET | sapi/v1/margin/isolated/allPairs |
| getAllMarginAssets() | GET | sapi/v1/margin/allAssets | |
| getMarginDelistSchedule() | 🔐 | GET | sapi/v1/margin/delist-schedule |
| getIsolatedMarginTierData() | 🔐 | GET | sapi/v1/margin/isolatedMarginTier |
| queryMarginPriceIndex() | GET | sapi/v1/margin/priceIndex | |
| getMarginAvailableInventory() | 🔐 | GET | sapi/v1/margin/available-inventory |
| getLeverageBracket() | 🔐 | GET | sapi/v1/margin/leverageBracket |
| getNextHourlyInterestRate() | 🔐 | GET | sapi/v1/margin/next-hourly-interest-rate |
| getMarginInterestHistory() | 🔐 | GET | sapi/v1/margin/interestHistory |
| submitMarginAccountBorrowRepay() | 🔐 | POST | sapi/v1/margin/borrow-repay |
| getMarginAccountBorrowRepayRecords() | 🔐 | GET | sapi/v1/margin/borrow-repay |
| getMarginInterestRateHistory() | 🔐 | GET | sapi/v1/margin/interestRateHistory |
| queryMaxBorrow() | 🔐 | GET | sapi/v1/margin/maxBorrowable |
| getMarginForceLiquidationRecord() | 🔐 | GET | sapi/v1/margin/forceLiquidationRec |
| getSmallLiabilityExchangeCoins() | 🔐 | GET | sapi/v1/margin/exchange-small-liability |
| getSmallLiabilityExchangeHistory() | 🔐 | GET | sapi/v1/margin/exchange-small-liability-history |
| marginAccountCancelOpenOrders() | 🔐 | DELETE | sapi/v1/margin/openOrders |
| marginAccountCancelOCO() | 🔐 | DELETE | sapi/v1/margin/orderList |
| marginAccountCancelOrder() | 🔐 | DELETE | sapi/v1/margin/order |
| marginAccountNewOCO() | 🔐 | POST | sapi/v1/margin/order/oco |
| marginAccountNewOrder() | 🔐 | POST | sapi/v1/margin/order |
| getMarginOrderCountUsage() | 🔐 | GET | sapi/v1/margin/rateLimit/order |
| queryMarginAccountAllOCO() | 🔐 | GET | sapi/v1/margin/allOrderList |
| queryMarginAccountAllOrders() | 🔐 | GET | sapi/v1/margin/allOrders |
| queryMarginAccountOCO() | 🔐 | GET | sapi/v1/margin/orderList |
| queryMarginAccountOpenOCO() | 🔐 | GET | sapi/v1/margin/openOrderList |
| queryMarginAccountOpenOrders() | 🔐 | GET | sapi/v1/margin/openOrders |
| queryMarginAccountOrder() | 🔐 | GET | sapi/v1/margin/order |
| queryMarginAccountTradeList() | 🔐 | GET | sapi/v1/margin/myTrades |
| submitSmallLiabilityExchange() | 🔐 | POST | sapi/v1/margin/exchange-small-liability |
| submitManualLiquidation() | 🔐 | POST | sapi/v1/margin/manual-liquidation |
| submitMarginOTOOrder() | 🔐 | POST | sapi/v1/margin/order/oto |
| submitMarginOTOCOOrder() | 🔐 | POST | sapi/v1/margin/order/otoco |
| createMarginSpecialLowLatencyKey() | 🔐 | POST | sapi/v1/margin/apiKey |
| deleteMarginSpecialLowLatencyKey() | 🔐 | DELETE | sapi/v1/margin/apiKey |
| updateMarginIPForSpecialLowLatencyKey() | 🔐 | PUT | sapi/v1/margin/apiKey/ip |
| getMarginSpecialLowLatencyKeys() | 🔐 | GET | sapi/v1/margin/api-key-list |
| getMarginSpecialLowLatencyKey() | 🔐 | GET | sapi/v1/margin/apiKey |
| getCrossMarginTransferHistory() | 🔐 | GET | sapi/v1/margin/transfer |
| queryMaxTransferOutAmount() | 🔐 | GET | sapi/v1/margin/maxTransferable |
| updateCrossMarginMaxLeverage() | 🔐 | POST | sapi/v1/margin/max-leverage |
| disableIsolatedMarginAccount() | 🔐 | DELETE | sapi/v1/margin/isolated/account |
| enableIsolatedMarginAccount() | 🔐 | POST | sapi/v1/margin/isolated/account |
| getBNBBurn() | 🔐 | GET | sapi/v1/bnbBurn |
| getMarginSummary() | 🔐 | GET | sapi/v1/margin/tradeCoeff |
| queryCrossMarginAccountDetails() | 🔐 | GET | sapi/v1/margin/account |
| getCrossMarginFeeData() | 🔐 | GET | sapi/v1/margin/crossMarginData |
| getIsolatedMarginAccountLimit() | 🔐 | GET | sapi/v1/margin/isolated/accountLimit |
| getIsolatedMarginAccountInfo() | 🔐 | GET | sapi/v1/margin/isolated/account |
| getIsolatedMarginFeeData() | 🔐 | GET | sapi/v1/margin/isolatedMarginData |
| toggleBNBBurn() | 🔐 | POST | sapi/v1/bnbBurn |
| getMarginCapitalFlow() | 🔐 | GET | sapi/v1/margin/capital-flow |
| queryLoanRecord() | 🔐 | GET | sapi/v1/margin/loan |
| queryRepayRecord() | 🔐 | GET | sapi/v1/margin/repay |
| isolatedMarginAccountTransfer() | 🔐 | POST | sapi/v1/margin/isolated/transfer |
| getBalances() | 🔐 | GET | sapi/v1/capital/config/getall |
| withdraw() | 🔐 | POST | sapi/v1/capital/withdraw/apply |
| getWithdrawHistory() | 🔐 | GET | sapi/v1/capital/withdraw/history |
| getWithdrawAddresses() | 🔐 | GET | sapi/v1/capital/withdraw/address/list |
| getWithdrawQuota() | 🔐 | GET | sapi/v1/capital/withdraw/quota |
| getDepositHistory() | 🔐 | GET | sapi/v1/capital/deposit/hisrec |
| getDepositAddress() | 🔐 | GET | sapi/v1/capital/deposit/address |
| getDepositAddresses() | 🔐 | GET | sapi/v1/capital/deposit/address/list |
| submitDepositCredit() | 🔐 | POST | sapi/v1/capital/deposit/credit-apply |
| getAutoConvertStablecoins() | 🔐 | GET | sapi/v1/capital/contract/convertible-coins |
| setConvertibleCoins() | 🔐 | POST | sapi/v1/capital/contract/convertible-coins |
| getAssetDetail() | 🔐 | GET | sapi/v1/asset/assetDetail |
| getWalletBalances() | 🔐 | GET | sapi/v1/asset/wallet/balance |
| getUserAsset() | 🔐 | POST | sapi/v3/asset/getUserAsset |
| submitUniversalTransfer() | 🔐 | POST | sapi/v1/asset/transfer |
| getUniversalTransferHistory() | 🔐 | GET | sapi/v1/asset/transfer |
| getDust() | 🔐 | POST | sapi/v1/asset/dust-btc |
| convertDustToBnb() | 🔐 | POST | sapi/v1/asset/dust |
| getDustLog() | 🔐 | GET | sapi/v1/asset/dribblet |
| getAssetDividendRecord() | 🔐 | GET | sapi/v1/asset/assetDividend |
| getTradeFee() | 🔐 | GET | sapi/v1/asset/tradeFee |
| getFundingAsset() | 🔐 | POST | sapi/v1/asset/get-funding-asset |
| getCloudMiningHistory() | 🔐 | GET | sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage |
| getDelegationHistory() | 🔐 | GET | sapi/v1/asset/custody/transfer-history |
| submitNewFutureAccountTransfer() | 🔐 | POST | sapi/v1/futures/transfer |
| getFutureAccountTransferHistory() | 🔐 | GET | sapi/v1/futures/transfer |
| getCrossCollateralBorrowHistory() | 🔐 | GET | sapi/v1/futures/loan/borrow/history |
| getCrossCollateralRepaymentHistory() | 🔐 | GET | sapi/v1/futures/loan/repay/history |
| getCrossCollateralWalletV2() | 🔐 | GET | sapi/v2/futures/loan/wallet |
| getAdjustCrossCollateralLTVHistory() | 🔐 | GET | sapi/v1/futures/loan/adjustCollateral/history |
| getCrossCollateralLiquidationHistory() | 🔐 | GET | sapi/v1/futures/loan/liquidationHistory |
| getCrossCollateralInterestHistory() | 🔐 | GET | sapi/v1/futures/loan/interestHistory |
| getAccountInfo() | 🔐 | GET | sapi/v1/account/info |
| getDailyAccountSnapshot() | 🔐 | GET | sapi/v1/accountSnapshot |
| disableFastWithdrawSwitch() | 🔐 | POST | sapi/v1/account/disableFastWithdrawSwitch |
| enableFastWithdrawSwitch() | 🔐 | POST | sapi/v1/account/enableFastWithdrawSwitch |
| getAccountStatus() | 🔐 | GET | sapi/v1/account/status |
| getApiTradingStatus() | 🔐 | GET | sapi/v1/account/apiTradingStatus |
| getApiKeyPermissions() | 🔐 | GET | sapi/v1/account/apiRestrictions |
| withdrawTravelRule() | 🔐 | POST | sapi/v1/localentity/withdraw/apply |
| getTravelRuleWithdrawHistory() | 🔐 | GET | sapi/v1/localentity/withdraw/history |
| getTravelRuleWithdrawHistoryV2() | 🔐 | GET | sapi/v2/localentity/withdraw/history |
| submitTravelRuleDepositQuestionnaire() | 🔐 | PUT | sapi/v1/localentity/deposit/provide-info |
| getTravelRuleDepositHistory() | 🔐 | GET | sapi/v1/localentity/deposit/history |
| getOnboardedVASPList() | 🔐 | GET | sapi/v1/localentity/vasp |
| getSystemStatus() | GET | sapi/v1/system/status | |
| getDelistSchedule() | 🔐 | GET | sapi/v1/spot/delist-schedule |
| createVirtualSubAccount() | 🔐 | POST | sapi/v1/sub-account/virtualSubAccount |
| getSubAccountList() | 🔐 | GET | sapi/v1/sub-account/list |
| subAccountEnableFutures() | 🔐 | POST | sapi/v1/sub-account/futures/enable |
| subAccountEnableMargin() | 🔐 | POST | sapi/v1/sub-account/margin/enable |
| enableOptionsForSubAccount() | 🔐 | POST | sapi/v1/sub-account/eoptions/enable |
| subAccountEnableLeverageToken() | 🔐 | POST | sapi/v1/sub-account/blvt/enable |
| getSubAccountStatusOnMarginOrFutures() | 🔐 | GET | sapi/v1/sub-account/status |
| getSubAccountFuturesPositionRisk() | 🔐 | GET | sapi/v1/sub-account/futures/positionRisk |
| getSubAccountFuturesPositionRiskV2() | 🔐 | GET | sapi/v2/sub-account/futures/positionRisk |
| getSubAccountTransactionStatistics() | 🔐 | GET | sapi/v1/sub-account/transaction-statistics |
| getSubAccountIPRestriction() | 🔐 | GET | sapi/v1/sub-account/subAccountApi/ipRestriction |
| subAccountDeleteIPList() | 🔐 | DELETE | sapi/v1/sub-account/subAccountApi/ipRestriction/ipList |
| subAccountAddIPRestriction() | 🔐 | POST | sapi/v2/sub-account/subAccountApi/ipRestriction |
| subAccountAddIPList() | 🔐 | POST | sapi/v1/sub-account/subAccountApi/ipRestriction/ipList |
| subAccountEnableOrDisableIPRestriction() | 🔐 | POST | sapi/v1/sub-account/subAccountApi/ipRestriction |
| subAccountFuturesTransfer() | 🔐 | POST | sapi/v1/sub-account/futures/transfer |
| getSubAccountFuturesAccountDetail() | 🔐 | GET | sapi/v1/sub-account/futures/account |
| getSubAccountDetailOnFuturesAccountV2() | 🔐 | GET | sapi/v2/sub-account/futures/account |
| getSubAccountDetailOnMarginAccount() | 🔐 | GET | sapi/v1/sub-account/margin/account |
| getSubAccountDepositAddress() | 🔐 | GET | sapi/v1/capital/deposit/subAddress |
| getSubAccountDepositHistory() | 🔐 | GET | sapi/v1/capital/deposit/subHisrec |
| getSubAccountFuturesAccountSummary() | 🔐 | GET | sapi/v1/sub-account/futures/accountSummary |
| getSubAccountSummaryOnFuturesAccountV2() | 🔐 | GET | sapi/v2/sub-account/futures/accountSummary |
| getSubAccountsSummaryOfMarginAccount() | 🔐 | GET | sapi/v1/sub-account/margin/accountSummary |
| subAccountMarginTransfer() | 🔐 | POST | sapi/v1/sub-account/margin/transfer |
| getSubAccountAssets() | 🔐 | GET | sapi/v3/sub-account/assets |
| getSubAccountAssetsMaster() | 🔐 | GET | sapi/v4/sub-account/assets |
| getSubAccountFuturesAssetTransferHistory() | 🔐 | GET | sapi/v1/sub-account/futures/internalTransfer |
| getSubAccountSpotAssetTransferHistory() | 🔐 | GET | sapi/v1/sub-account/sub/transfer/history |
| getSubAccountSpotAssetsSummary() | 🔐 | GET | sapi/v1/sub-account/spotSummary |
| getSubAccountUniversalTransferHistory() | 🔐 | GET | sapi/v1/sub-account/universalTransfer |
| subAccountFuturesAssetTransfer() | 🔐 | POST | sapi/v1/sub-account/futures/internalTransfer |
| subAccountTransferHistory() | 🔐 | GET | sapi/v1/sub-account/transfer/subUserHistory |
| subAccountTransferToMaster() | 🔐 | POST | sapi/v1/sub-account/transfer/subToMaster |
| subAccountTransferToSameMaster() | 🔐 | POST | sapi/v1/sub-account/transfer/subToSub |
| subAccountUniversalTransfer() | 🔐 | POST | sapi/v1/sub-account/universalTransfer |
| subAccountMovePosition() | 🔐 | POST | sapi/v1/sub-account/futures/move-position |
| getSubAccountFuturesPositionMoveHistory() | 🔐 | GET | sapi/v1/sub-account/futures/move-position |
| depositAssetsIntoManagedSubAccount() | 🔐 | POST | sapi/v1/managed-subaccount/deposit |
| getManagedSubAccountDepositAddress() | 🔐 | GET | sapi/v1/managed-subaccount/deposit/address |
| withdrawAssetsFromManagedSubAccount() | 🔐 | POST | sapi/v1/managed-subaccount/withdraw |
| getManagedSubAccountTransfersParent() | 🔐 | GET | sapi/v1/managed-subaccount/queryTransLogForTradeParent |
| getManagedSubAccountTransferLog() | 🔐 | GET | sapi/v1/managed-subaccount/query-trans-log |
| getManagedSubAccountTransfersInvestor() | 🔐 | GET | sapi/v1/managed-subaccount/queryTransLogForInvestor |
| getManagedSubAccounts() | 🔐 | GET | sapi/v1/managed-subaccount/info |
| getManagedSubAccountSnapshot() | 🔐 | GET | sapi/v1/managed-subaccount/accountSnapshot |
| getManagedSubAccountAssetDetails() | 🔐 | GET | sapi/v1/managed-subaccount/asset |
| getManagedSubAccountMarginAssets() | 🔐 | GET | sapi/v1/managed-subaccount/marginAsset |
| getManagedSubAccountFuturesAssets() | 🔐 | GET | sapi/v1/managed-subaccount/fetch-future-asset |
| getAutoInvestAssets() | 🔐 | GET | sapi/v1/lending/auto-invest/all/asset |
| getAutoInvestSourceAssets() | 🔐 | GET | sapi/v1/lending/auto-invest/source-asset/list |
| getAutoInvestTargetAssets() | 🔐 | GET | sapi/v1/lending/auto-invest/target-asset/list |
| getAutoInvestTargetAssetsROI() | 🔐 | GET | sapi/v1/lending/auto-invest/target-asset/roi/list |
| getAutoInvestIndex() | 🔐 | GET | sapi/v1/lending/auto-invest/index/info |
| getAutoInvestPlans() | 🔐 | GET | sapi/v1/lending/auto-invest/plan/list |
| submitAutoInvestOneTimeTransaction() | 🔐 | POST | sapi/v1/lending/auto-invest/one-off |
| updateAutoInvestPlanStatus() | 🔐 | POST | sapi/v1/lending/auto-invest/plan/edit-status |
| updateAutoInvestmentPlan() | 🔐 | POST | sapi/v1/lending/auto-invest/plan/edit |
| submitAutoInvestRedemption() | 🔐 | POST | sapi/v1/lending/auto-invest/redeem |
| getAutoInvestSubscriptionTransactions() | 🔐 | GET | sapi/v1/lending/auto-invest/history/list |
| getOneTimeTransactionStatus() | 🔐 | GET | sapi/v1/lending/auto-invest/one-off/status |
| submitAutoInvestmentPlan() | 🔐 | POST | sapi/v1/lending/auto-invest/plan/add |
| getAutoInvestRedemptionHistory() | 🔐 | GET | sapi/v1/lending/auto-invest/redeem/history |
| getAutoInvestPlan() | 🔐 | GET | sapi/v1/lending/auto-invest/plan/id |
| getAutoInvestUserIndex() | 🔐 | GET | sapi/v1/lending/auto-invest/index/user-summary |
| getAutoInvestRebalanceHistory() | 🔐 | GET | sapi/v1/lending/auto-invest/rebalance/history |
| getConvertPairs() | 🔐 | GET | sapi/v1/convert/exchangeInfo |
| getConvertAssetInfo() | 🔐 | GET | sapi/v1/convert/assetInfo |
| convertQuoteRequest() | 🔐 | POST | sapi/v1/convert/getQuote |
| acceptQuoteRequest() | 🔐 | POST | sapi/v1/convert/acceptQuote |
| getConvertTradeHistory() | 🔐 | GET | sapi/v1/convert/tradeFlow |
| getOrderStatus() | 🔐 | GET | sapi/v1/convert/orderStatus |
| submitConvertLimitOrder() | 🔐 | POST | sapi/v1/convert/limit/placeOrder |
| cancelConvertLimitOrder() | 🔐 | POST | sapi/v1/convert/limit/cancelOrder |
| getConvertLimitOpenOrders() | 🔐 | GET | sapi/v1/convert/limit/queryOpenOrders |
| getEthStakingAccount() | 🔐 | GET | sapi/v1/eth-staking/account |
| getEthStakingAccountV2() | 🔐 | GET | sapi/v2/eth-staking/account |
| getEthStakingQuota() | 🔐 | GET | sapi/v1/eth-staking/eth/quota |
| subscribeEthStakingV1() | 🔐 | POST | sapi/v1/eth-staking/eth/stake |
| subscribeEthStakingV2() | 🔐 | POST | sapi/v2/eth-staking/eth/stake |
| redeemEth() | 🔐 | POST | sapi/v1/eth-staking/eth/redeem |
| wrapBeth() | 🔐 | POST | sapi/v1/eth-staking/wbeth/wrap |
| getEthStakingHistory() | 🔐 | GET | sapi/v1/eth-staking/eth/history/stakingHistory |
| getEthRedemptionHistory() | 🔐 | GET | sapi/v1/eth-staking/eth/history/redemptionHistory |
| getBethRewardsHistory() | 🔐 | GET | sapi/v1/eth-staking/eth/history/rewardsHistory |
| getWbethRewardsHistory() | 🔐 | GET | sapi/v1/eth-staking/eth/history/wbethRewardsHistory |
| getEthRateHistory() | 🔐 | GET | sapi/v1/eth-staking/eth/history/rateHistory |
| getBethWrapHistory() | 🔐 | GET | sapi/v1/eth-staking/wbeth/history/wrapHistory |
| getBethUnwrapHistory() | 🔐 | GET | sapi/v1/eth-staking/wbeth/history/unwrapHistory |
| getBfusdAccount() | 🔐 | GET | sapi/v1/bfusd/account |
| getBfusdQuota() | 🔐 | GET | sapi/v1/bfusd/quota |
| subscribeBfusd() | 🔐 | POST | sapi/v1/bfusd/subscribe |
| redeemBfusd() | 🔐 | POST | sapi/v1/bfusd/redeem |
| getBfusdSubscriptionHistory() | 🔐 | GET | sapi/v1/bfusd/history/subscriptionHistory |
| getBfusdRedemptionHistory() | 🔐 | GET | sapi/v1/bfusd/history/redemptionHistory |
| getBfusdRewardsHistory() | 🔐 | GET | sapi/v1/bfusd/history/rewardsHistory |
| getBfusdRateHistory() | 🔐 | GET | sapi/v1/bfusd/history/rateHistory |
| getRwusdAccount() | 🔐 | GET | sapi/v1/rwusd/account |
| getRwusdQuota() | 🔐 | GET | sapi/v1/rwusd/quota |
| subscribeRwusd() | 🔐 | POST | sapi/v1/rwusd/subscribe |
| redeemRwusd() | 🔐 | POST | sapi/v1/rwusd/redeem |
| getRwusdSubscriptionHistory() | 🔐 | GET | sapi/v1/rwusd/history/subscriptionHistory |
| getRwusdRedemptionHistory() | 🔐 | GET | sapi/v1/rwusd/history/redemptionHistory |
| getRwusdRewardsHistory() | 🔐 | GET | sapi/v1/rwusd/history/rewardsHistory |
| getRwusdRateHistory() | 🔐 | GET | sapi/v1/rwusd/history/rateHistory |
| getStakingProducts() | 🔐 | GET | sapi/v1/staking/productList |
| getStakingProductPosition() | 🔐 | GET | sapi/v1/staking/position |
| getStakingHistory() | 🔐 | GET | sapi/v1/staking/stakingRecord |
| getPersonalLeftQuotaOfStakingProduct() | 🔐 | GET | sapi/v1/staking/personalLeftQuota |
| getSolStakingAccount() | 🔐 | GET | sapi/v1/sol-staking/account |
| getSolStakingQuota() | 🔐 | GET | sapi/v1/sol-staking/sol/quota |
| subscribeSolStaking() | 🔐 | POST | sapi/v1/sol-staking/sol/stake |
| redeemSol() | 🔐 | POST | sapi/v1/sol-staking/sol/redeem |
| claimSolBoostRewards() | 🔐 | POST | sapi/v1/sol-staking/sol/claim |
| getSolStakingHistory() | 🔐 | GET | sapi/v1/sol-staking/sol/history/stakingHistory |
| getSolRedemptionHistory() | 🔐 | GET | sapi/v1/sol-staking/sol/history/redemptionHistory |
| getBnsolRewardsHistory() | 🔐 | GET | sapi/v1/sol-staking/sol/history/bnsolRewardsHistory |
| getBnsolRateHistory() | 🔐 | GET | sapi/v1/sol-staking/sol/history/rateHistory |
| getSolBoostRewardsHistory() | 🔐 | GET | sapi/v1/sol-staking/sol/history/boostRewardsHistory |
| getSolUnclaimedRewards() | 🔐 | GET | sapi/v1/sol-staking/sol/history/unclaimedRewards |
| getOnchainYieldsLockedProducts() | 🔐 | GET | sapi/v1/onchain-yields/locked/list |
| getOnchainYieldsLockedPersonalLeftQuota() | 🔐 | GET | sapi/v1/onchain-yields/locked/personalLeftQuota |
| getOnchainYieldsLockedPosition() | 🔐 | GET | sapi/v1/onchain-yields/locked/position |
| getOnchainYieldsAccount() | 🔐 | GET | sapi/v1/onchain-yields/account |
| getOnchainYieldsLockedSubscriptionPreview() | 🔐 | GET | sapi/v1/onchain-yields/locked/subscriptionPreview |
| subscribeOnchainYieldsLockedProduct() | 🔐 | POST | sapi/v1/onchain-yields/locked/subscribe |
| setOnchainYieldsLockedAutoSubscribe() | 🔐 | POST | sapi/v1/onchain-yields/locked/setAutoSubscribe |
| setOnchainYieldsLockedRedeemOption() | 🔐 | POST | sapi/v1/onchain-yields/locked/setRedeemOption |
| redeemOnchainYieldsLockedProduct() | 🔐 | POST | sapi/v1/onchain-yields/locked/redeem |
| getOnchainYieldsLockedSubscriptionRecord() | 🔐 | GET | sapi/v1/onchain-yields/locked/history/subscriptionRecord |
| getOnchainYieldsLockedRewardsHistory() | 🔐 | GET | sapi/v1/onchain-yields/locked/history/rewardsRecord |
| getOnchainYieldsLockedRedemptionRecord() | 🔐 | GET | sapi/v1/onchain-yields/locked/history/redemptionRecord |
| getSoftStakingProductList() | 🔐 | GET | sapi/v1/soft-staking/list |
| setSoftStaking() | 🔐 | GET | sapi/v1/soft-staking/set |
| getSoftStakingRewardsHistory() | 🔐 | GET | sapi/v1/soft-staking/history/rewardsRecord |
| getFuturesLeadTraderStatus() | 🔐 | GET | sapi/v1/copyTrading/futures/userStatus |
| getFuturesLeadTradingSymbolWhitelist() | 🔐 | GET | sapi/v1/copyTrading/futures/leadSymbol |
| getMiningAlgos() | GET | sapi/v1/mining/pub/algoList | |
| getMiningCoins() | GET | sapi/v1/mining/pub/coinList | |
| getHashrateResales() | 🔐 | GET | sapi/v1/mining/hash-transfer/config/details/list |
| getMiners() | 🔐 | GET | sapi/v1/mining/worker/list |
| getMinerDetails() | 🔐 | GET | sapi/v1/mining/worker/detail |
| getExtraBonuses() | 🔐 | GET | sapi/v1/mining/payment/other |
| getMiningEarnings() | 🔐 | GET | sapi/v1/mining/payment/list |
| cancelHashrateResaleConfig() | 🔐 | POST | sapi/v1/mining/hash-transfer/config/cancel |
| getHashrateResale() | 🔐 | GET | sapi/v1/mining/hash-transfer/profit/details |
| getMiningAccountEarnings() | 🔐 | GET | sapi/v1/mining/payment/uid |
| getMiningStatistics() | 🔐 | GET | sapi/v1/mining/statistics/user/status |
| submitHashrateResale() | 🔐 | POST | sapi/v1/mining/hash-transfer/config |
| getMiningAccounts() | 🔐 | GET | sapi/v1/mining/statistics/user/list |
| submitVpNewOrder() | 🔐 | POST | sapi/v1/algo/futures/newOrderVp |
| submitTwapNewOrder() | 🔐 | POST | sapi/v1/algo/futures/newOrderTwap |
| cancelAlgoOrder() | 🔐 | DELETE | sapi/v1/algo/futures/order |
| getAlgoSubOrders() | 🔐 | GET | sapi/v1/algo/futures/subOrders |
| getAlgoOpenOrders() | 🔐 | GET | sapi/v1/algo/futures/openOrders |
| getAlgoHistoricalOrders() | 🔐 | GET | sapi/v1/algo/futures/historicalOrders |
| submitSpotAlgoTwapOrder() | 🔐 | POST | sapi/v1/algo/spot/newOrderTwap |
| cancelSpotAlgoOrder() | 🔐 | DELETE | sapi/v1/algo/spot/order |
| getSpotAlgoSubOrders() | 🔐 | GET | sapi/v1/algo/spot/subOrders |
| getSpotAlgoOpenOrders() | 🔐 | GET | sapi/v1/algo/spot/openOrders |
| getSpotAlgoHistoricalOrders() | 🔐 | GET | sapi/v1/algo/spot/historicalOrders |
| getCryptoLoanFlexibleCollateralAssets() | 🔐 | GET | sapi/v2/loan/flexible/collateral/data |
| getCryptoLoanFlexibleAssets() | 🔐 | GET | sapi/v2/loan/flexible/loanable/data |
| borrowCryptoLoanFlexible() | 🔐 | POST | sapi/v2/loan/flexible/borrow |
| repayCryptoLoanFlexible() | 🔐 | POST | sapi/v2/loan/flexible/repay |
| repayCryptoLoanFlexibleWithCollateral() | 🔐 | POST | sapi/v2/loan/flexible/repay/collateral |
| adjustCryptoLoanFlexibleLTV() | 🔐 | POST | sapi/v2/loan/flexible/adjust/ltv |
| getCryptoLoanFlexibleLTVAdjustmentHistory() | 🔐 | GET | sapi/v2/loan/flexible/ltv/adjustment/history |
| getFlexibleLoanCollateralRepayRate() | 🔐 | GET | sapi/v2/loan/flexible/repay/rate |
| getLoanFlexibleBorrowHistory() | 🔐 | GET | sapi/v2/loan/flexible/borrow/history |
| getCryptoLoanFlexibleOngoingOrders() | 🔐 | GET | sapi/v2/loan/flexible/ongoing/orders |
| getFlexibleLoanLiquidationHistory() | 🔐 | GET | sapi/v2/loan/flexible/liquidation/history |
| getLoanFlexibleRepaymentHistory() | 🔐 | GET | sapi/v2/loan/flexible/repay/history |
| getCryptoLoanLoanableAssets() | 🔐 | GET | sapi/v1/loan/loanable/data |
| getCryptoLoanCollateralRepayRate() | 🔐 | GET | sapi/v1/loan/repay/collateral/rate |
| getCryptoLoanCollateralAssetsData() | 🔐 | GET | sapi/v1/loan/collateral/data |
| getCryptoLoansIncomeHistory() | 🔐 | GET | sapi/v1/loan/income |
| borrowCryptoLoan() | 🔐 | POST | sapi/v1/loan/borrow |
| repayCryptoLoan() | 🔐 | POST | sapi/v1/loan/repay |
| adjustCryptoLoanLTV() | 🔐 | POST | sapi/v1/loan/adjust/ltv |
| customizeCryptoLoanMarginCall() | 🔐 | POST | sapi/v1/loan/customize/margin_call |
| getCryptoLoanOngoingOrders() | 🔐 | GET | sapi/v1/loan/ongoing/orders |
| getCryptoLoanBorrowHistory() | 🔐 | GET | sapi/v1/loan/borrow/history |
| getCryptoLoanLTVAdjustmentHistory() | 🔐 | GET | sapi/v1/loan/ltv/adjustment/history |
| getCryptoLoanRepaymentHistory() | 🔐 | GET | sapi/v1/loan/repay/history |
| getSimpleEarnAccount() | 🔐 | GET | sapi/v1/simple-earn/account |
| getFlexibleSavingProducts() | 🔐 | GET | sapi/v1/simple-earn/flexible/list |
| getSimpleEarnLockedProductList() | 🔐 | GET | sapi/v1/simple-earn/locked/list |
| getFlexibleProductPosition() | 🔐 | GET | sapi/v1/simple-earn/flexible/position |
| getLockedProductPosition() | 🔐 | GET | sapi/v1/simple-earn/locked/position |
| getFlexiblePersonalLeftQuota() | 🔐 | GET | sapi/v1/simple-earn/flexible/personalLeftQuota |
| getLockedPersonalLeftQuota() | 🔐 | GET | sapi/v1/simple-earn/locked/personalLeftQuota |
| purchaseFlexibleProduct() | 🔐 | POST | sapi/v1/simple-earn/flexible/subscribe |
| subscribeSimpleEarnLockedProduct() | 🔐 | POST | sapi/v1/simple-earn/locked/subscribe |
| redeemFlexibleProduct() | 🔐 | POST | sapi/v1/simple-earn/flexible/redeem |
| redeemLockedProduct() | 🔐 | POST | sapi/v1/simple-earn/locked/redeem |
| setFlexibleAutoSubscribe() | 🔐 | POST | sapi/v1/simple-earn/flexible/setAutoSubscribe |
| setLockedAutoSubscribe() | 🔐 | POST | sapi/v1/simple-earn/locked/setAutoSubscribe |
| getFlexibleSubscriptionPreview() | 🔐 | GET | sapi/v1/simple-earn/flexible/subscriptionPreview |
| getLockedSubscriptionPreview() | 🔐 | GET | sapi/v1/simple-earn/locked/subscriptionPreview |
| setLockedProductRedeemOption() | 🔐 | POST | sapi/v1/simple-earn/locked/setRedeemOption |
| getFlexibleSubscriptionRecord() | 🔐 | GET | sapi/v1/simple-earn/flexible/history/subscriptionRecord |
| getLockedSubscriptionRecord() | 🔐 | GET | sapi/v1/simple-earn/locked/history/subscriptionRecord |
| getFlexibleRedemptionRecord() | 🔐 | GET | sapi/v1/simple-earn/flexible/history/redemptionRecord |
| getLockedRedemptionRecord() | 🔐 | GET | sapi/v1/simple-earn/locked/history/redemptionRecord |
| getFlexibleRewardsHistory() | 🔐 | GET | sapi/v1/simple-earn/flexible/history/rewardsRecord |
| getLockedRewardsHistory() | 🔐 | GET | sapi/v1/simple-earn/locked/history/rewardsRecord |
| getCollateralRecord() | 🔐 | GET | sapi/v1/simple-earn/flexible/history/collateralRecord |
| getRateHistory() | 🔐 | GET | sapi/v1/simple-earn/flexible/history/rateHistory |
| getVipBorrowInterestRate() | 🔐 | GET | sapi/v1/loan/vip/request/interestRate |
| getVipLoanInterestRateHistory() | 🔐 | GET | sapi/v1/loan/vip/interestRateHistory |
| getVipLoanableAssets() | 🔐 | GET | sapi/v1/loan/vip/loanable/data |
| getVipCollateralAssets() | 🔐 | GET | sapi/v1/loan/vip/collateral/data |
| getVipLoanOpenOrders() | 🔐 | GET | sapi/v1/loan/vip/ongoing/orders |
| getVipLoanRepaymentHistory() | 🔐 | GET | sapi/v1/loan/vip/repay/history |
| checkVipCollateralAccount() | 🔐 | GET | sapi/v1/loan/vip/collateral/account |
| getVipApplicationStatus() | 🔐 | GET | sapi/v1/loan/vip/request/data |
| renewVipLoan() | 🔐 | POST | sapi/v1/loan/vip/renew |
| repayVipLoan() | 🔐 | POST | sapi/v1/loan/vip/repay |
| borrowVipLoan() | 🔐 | POST | sapi/v1/loan/vip/borrow |
| getDualInvestmentProducts() | 🔐 | GET | sapi/v1/dci/product/list |
| subscribeDualInvestmentProduct() | 🔐 | POST | sapi/v1/dci/product/subscribe |
| getDualInvestmentPositions() | 🔐 | GET | sapi/v1/dci/product/positions |
| getDualInvestmentAccounts() | 🔐 | GET | sapi/v1/dci/product/accounts |
| getVipLoanAccruedInterest() | 🔐 | GET | sapi/v1/loan/vip/accruedInterest |
| updateAutoCompoundStatus() | 🔐 | POST | sapi/v1/dci/product/auto_compound/edit-status |
| createGiftCard() | 🔐 | POST | sapi/v1/giftcard/createCode |
| createDualTokenGiftCard() | 🔐 | POST | sapi/v1/giftcard/buyCode |
| redeemGiftCard() | 🔐 | POST | sapi/v1/giftcard/redeemCode |
| verifyGiftCard() | 🔐 | GET | sapi/v1/giftcard/verify |
| getTokenLimit() | 🔐 | GET | sapi/v1/giftcard/buyCode/token-limit |
| getRsaPublicKey() | 🔐 | GET | sapi/v1/giftcard/cryptography/rsa-public-key |
| getNftTransactionHistory() | 🔐 | GET | sapi/v1/nft/history/transactions |
| getNftDepositHistory() | 🔐 | GET | sapi/v1/nft/history/deposit |
| getNftWithdrawHistory() | 🔐 | GET | sapi/v1/nft/history/withdraw |
| getNftAsset() | 🔐 | GET | sapi/v1/nft/user/getAsset |
| getC2CTradeHistory() | 🔐 | GET | sapi/v1/c2c/orderMatch/listUserOrderHistory |
| getFiatOrderHistory() | 🔐 | GET | sapi/v1/fiat/orders |
| getFiatPaymentsHistory() | 🔐 | GET | sapi/v1/fiat/payments |
| fiatWithdraw() | 🔐 | POST | /sapi/v2/fiat/withdraw |
| fiatDeposit() | 🔐 | POST | sapi/v1/fiat/deposit |
| getFiatOrderDetail() | 🔐 | GET | sapi/v1/fiat/get-order-detail |
| getSpotRebateHistoryRecords() | 🔐 | GET | sapi/v1/rebate/taxQuery |
| getPortfolioMarginIndexPrice() | GET | sapi/v1/portfolio/asset-index-price | |
| getPortfolioMarginAssetLeverage() | 🔐 | GET | sapi/v1/portfolio/margin-asset-leverage |
| getPortfolioMarginProCollateralRate() | GET | sapi/v1/portfolio/collateralRate | |
| getPortfolioMarginProTieredCollateralRate() | GET | sapi/v2/portfolio/collateralRate | |
| getPortfolioMarginProAccountInfo() | 🔐 | GET | sapi/v1/portfolio/account |
| setPortfolioMarginMarginCallLevel() | 🔐 | POST | sapi/v1/portfolio/margin-call-level |
| getPortfolioMarginMarginCallLevel() | 🔐 | GET | sapi/v1/portfolio/margin-call-level |
| deletePortfolioMarginMarginCallLevel() | 🔐 | DELETE | sapi/v1/portfolio/margin-call-level |
| bnbTransfer() | 🔐 | POST | sapi/v1/portfolio/bnb-transfer |
| submitPortfolioMarginProFullTransfer() | 🔐 | POST | sapi/v1/portfolio/auto-collection |
| submitPortfolioMarginProSpecificTransfer() | 🔐 | POST | sapi/v1/portfolio/asset-collection |
| repayPortfolioMarginProBankruptcyLoan() | 🔐 | POST | sapi/v1/portfolio/repay |
| getPortfolioMarginProBankruptcyLoanAmount() | 🔐 | GET | sapi/v1/portfolio/pmLoan |
| repayFuturesNegativeBalance() | 🔐 | POST | sapi/v1/portfolio/repay-futures-negative-balance |
| updateAutoRepayFuturesStatus() | 🔐 | POST | sapi/v1/portfolio/repay-futures-switch |
| getAutoRepayFuturesStatus() | 🔐 | GET | sapi/v1/portfolio/repay-futures-switch |
| getPortfolioMarginProInterestHistory() | 🔐 | GET | sapi/v1/portfolio/interest-history |
| getPortfolioMarginProSpanAccountInfo() | 🔐 | GET | sapi/v2/portfolio/account |
| getPortfolioMarginProAccountBalance() | 🔐 | GET | sapi/v1/portfolio/balance |
| mintPortfolioMarginBFUSD() | 🔐 | POST | sapi/v1/portfolio/mint |
| redeemPortfolioMarginBFUSD() | 🔐 | POST | sapi/v1/portfolio/redeem |
| getPortfolioMarginBankruptcyLoanRepayHistory() | 🔐 | GET | sapi/v1/portfolio/pmLoan-history |
| transferLDUSDTPortfolioMargin() | 🔐 | POST | sapi/v1/portfolio/earn-asset-transfer |
| getTransferableEarnAssetBalanceForPortfolioMargin() | 🔐 | GET | sapi/v1/portfolio/earn-asset-balance |
| getFuturesTickLevelOrderbookDataLink() | 🔐 | GET | sapi/v1/futures/histDataLink |
| getBlvtInfo() | GET | sapi/v1/blvt/tokenInfo | |
| subscribeBlvt() | 🔐 | POST | sapi/v1/blvt/subscribe |
| getBlvtSubscriptionRecord() | 🔐 | GET | sapi/v1/blvt/subscribe/record |
| redeemBlvt() | 🔐 | POST | sapi/v1/blvt/redeem |
| getBlvtRedemptionRecord() | 🔐 | GET | sapi/v1/blvt/redeem/record |
| getBlvtUserLimitInfo() | 🔐 | GET | sapi/v1/blvt/userLimit |
| getPayTransactions() | 🔐 | GET | sapi/v1/pay/transactions |
| getInstLoanRiskUnit() | 🔐 | GET | sapi/v1/margin/loan-group/ltv-details |
| closeInstLoanRiskUnit() | 🔐 | DELETE | sapi/v1/margin/loan-group |
| addInstLoanCollateralAccount() | 🔐 | POST | sapi/v1/margin/loan-group/edit-member |
| getActiveInstLoanRiskUnits() | 🔐 | GET | sapi/v1/margin/loan-groups/activated |
| getClosedInstLoanRiskUnits() | 🔐 | GET | sapi/v1/margin/loan-groups/closed |
| getInstLoanForceLiquidationRecord() | 🔐 | GET | sapi/v1/margin/loan-group/force-liquidation |
| transferInstLoanRiskUnit() | 🔐 | POST | sapi/v1/margin/loan-group/transfer-out |
| borrowInstitutionalLoan() | 🔐 | POST | sapi/v1/margin/loan-group/borrow |
| getInstLoanInterestHistory() | 🔐 | GET | sapi/v1/margin/loan-group/interest-history |
| repayInstitutionalLoan() | 🔐 | POST | sapi/v1/margin/loan-group/repay |
| getInstLoanBorrowRepayRecords() | 🔐 | GET | sapi/v1/margin/loan-group/borrow-repay |
| getMarginInterestRebateBalance() | 🔐 | GET | sapi/v1/margin/loan-group/interest-rebate-balance |
| getMarginInterestRebateBalanceRecords() | 🔐 | GET | sapi/v1/margin/loan-group/interest-rebate-balance/records |
| getAlphaTokenList() | GET | bapi/defi/v1/public/wallet-direct/buw/wallet/cex/alpha/all/token/list | |
| getAlphaExchangeInfo() | GET | bapi/defi/v1/public/alpha-trade/get-exchange-info | |
| getAlphaAggTrades() | GET | bapi/defi/v1/public/alpha-trade/agg-trades | |
| getAlphaKlines() | GET | bapi/defi/v1/public/alpha-trade/klines | |
| getAlphaTicker() | GET | bapi/defi/v1/public/alpha-trade/ticker | |
| getAlphaFullDepth() | GET | bapi/defi/v1/public/alpha-trade/fullDepth | |
| createBrokerSubAccount() | 🔐 | POST | sapi/v1/broker/subAccount |
| getBrokerSubAccount() | 🔐 | GET | sapi/v1/broker/subAccount |
| enableMarginBrokerSubAccount() | 🔐 | POST | sapi/v1/broker/subAccount/futures |
| createApiKeyBrokerSubAccount() | 🔐 | POST | sapi/v1/broker/subAccountApi |
| changePermissionApiKeyBrokerSubAccount() | 🔐 | POST | sapi/v1/broker/subAccountApi/permission |
| changeComissionBrokerSubAccount() | 🔐 | POST | sapi/v1/broker/subAccountApi/permission |
| enableUniversalTransferApiKeyBrokerSubAccount() | 🔐 | POST | sapi/v1/broker/subAccountApi/permission/universalTransfer |
| updateIpRestrictionForSubAccountApiKey() | 🔐 | POST | sapi/v2/broker/subAccountApi/ipRestriction |
| deleteIPRestrictionForSubAccountApiKey() | 🔐 | DELETE | sapi/v1/broker/subAccountApi/ipRestriction/ipList |
| deleteApiKeyBrokerSubAccount() | 🔐 | DELETE | sapi/v1/broker/subAccountApi |
| getSubAccountBrokerIpRestriction() | 🔐 | GET | sapi/v1/broker/subAccountApi/ipRestriction |
| getApiKeyBrokerSubAccount() | 🔐 | GET | sapi/v1/broker/subAccountApi |
| getBrokerInfo() | 🔐 | GET | sapi/v1/broker/info |
| updateSubAccountBNBBurn() | 🔐 | POST | sapi/v1/broker/subAccount/bnbBurn/spot |
| updateSubAccountMarginInterestBNBBurn() | 🔐 | POST | sapi/v1/broker/subAccount/bnbBurn/marginInterest |
| getSubAccountBNBBurnStatus() | 🔐 | GET | sapi/v1/broker/subAccount/bnbBurn/status |
| deleteBrokerSubAccount() | 🔐 | DELETE | /sapi/v1/broker/subAccount |
| transferBrokerSubAccount() | 🔐 | POST | sapi/v1/broker/transfer |
| getBrokerSubAccountHistory() | 🔐 | GET | sapi/v1/broker/transfer |
| submitBrokerSubFuturesTransfer() | 🔐 | POST | sapi/v1/broker/transfer/futures |
| getSubAccountFuturesTransferHistory() | 🔐 | GET | sapi/v1/broker/transfer/futures |
| getBrokerSubDepositHistory() | 🔐 | GET | sapi/v1/broker/subAccount/depositHist |
| getBrokerSubAccountSpotAssets() | 🔐 | GET | sapi/v1/broker/subAccount/spotSummary |
| getSubAccountMarginAssetInfo() | 🔐 | GET | sapi/v1/broker/subAccount/marginSummary |
| querySubAccountFuturesAssetInfo() | 🔐 | GET | sapi/v3/broker/subAccount/futuresSummary |
| universalTransferBroker() | 🔐 | POST | sapi/v1/broker/universalTransfer |
| getUniversalTransferBroker() | 🔐 | GET | sapi/v1/broker/universalTransfer |
| updateBrokerSubAccountCommission() | 🔐 | POST | sapi/v1/broker/subAccountApi/commission |
| updateBrokerSubAccountFuturesCommission() | 🔐 | POST | sapi/v1/broker/subAccountApi/commission/futures |
| getBrokerSubAccountFuturesCommission() | 🔐 | GET | sapi/v1/broker/subAccountApi/commission/futures |
| updateBrokerSubAccountCoinFuturesCommission() | 🔐 | POST | sapi/v1/broker/subAccountApi/commission/coinFutures |
| getBrokerSubAccountCoinFuturesCommission() | 🔐 | GET | sapi/v1/broker/subAccountApi/commission/coinFutures |
| getBrokerSpotCommissionRebate() | 🔐 | GET | sapi/v1/broker/rebate/recentRecord |
| getBrokerFuturesCommissionRebate() | 🔐 | GET | sapi/v1/broker/rebate/futures/recentRecord |
| getBrokerIfNewSpotUser() | 🔐 | GET | sapi/v1/apiReferral/ifNewUser |
| getBrokerSubAccountDepositHistory() | 🔐 | GET | sapi/v1/bv1/apiReferral/ifNewUser |
| enableFuturesBrokerSubAccount() | 🔐 | POST | sapi/v1/broker/subAccount |
| enableMarginApiKeyBrokerSubAccount() | 🔐 | POST | sapi/v1/broker/subAccount/margin |
| getSpotUserDataListenKey() | POST | api/v3/userDataStream | |
| keepAliveSpotUserDataListenKey() | PUT | api/v3/userDataStream?listenKey=${listenKey} | |
| closeSpotUserDataListenKey() | DELETE | api/v3/userDataStream?listenKey=${listenKey} | |
| getMarginUserDataListenKey() | POST | sapi/v1/userDataStream | |
| keepAliveMarginUserDataListenKey() | PUT | sapi/v1/userDataStream?listenKey=${listenKey} | |
| closeMarginUserDataListenKey() | DELETE | sapi/v1/userDataStream?listenKey=${listenKey} | |
| getIsolatedMarginUserDataListenKey() | POST | sapi/v1/userDataStream/isolated?${serialiseParams(params | |
| keepAliveIsolatedMarginUserDataListenKey() | PUT | sapi/v1/userDataStream/isolated?${serialiseParams(params | |
| closeIsolatedMarginUserDataListenKey() | DELETE | sapi/v1/userDataStream/isolated?${serialiseParams(params | |
| getMarginRiskUserDataListenKey() | POST | sapi/v1/margin/listen-key | |
| keepAliveMarginRiskUserDataListenKey() | PUT | sapi/v1/margin/listen-key?listenKey=${listenKey} | |
| closeMarginRiskUserDataListenKey() | DELETE | sapi/v1/margin/listen-key | |
| getMarginListenToken() | 🔐 | POST | sapi/v1/userListenToken |
| getBSwapLiquidity() | 🔐 | GET | sapi/v1/bswap/liquidity |
| addBSwapLiquidity() | 🔐 | POST | sapi/v1/bswap/liquidityAdd |
| removeBSwapLiquidity() | 🔐 | POST | sapi/v1/bswap/liquidityRemove |
| getBSwapOperations() | 🔐 | GET | sapi/v1/bswap/liquidityOps |
| getLeftDailyPurchaseQuotaFlexibleProduct() | 🔐 | GET | sapi/v1/lending/daily/userLeftQuota |
| getLeftDailyRedemptionQuotaFlexibleProduct() | 🔐 | GET | sapi/v1/lending/daily/userRedemptionQuota |
| purchaseFixedAndActivityProject() | 🔐 | POST | sapi/v1/lending/customizedFixed/purchase |
| getFixedAndActivityProjects() | 🔐 | GET | sapi/v1/lending/project/list |
| getFixedAndActivityProductPosition() | 🔐 | GET | sapi/v1/lending/project/position/list |
| getLendingAccount() | 🔐 | GET | sapi/v1/lending/union/account |
| getPurchaseRecord() | 🔐 | GET | sapi/v1/lending/union/purchaseRecord |
| getRedemptionRecord() | 🔐 | GET | sapi/v1/lending/union/redemptionRecord |
| getInterestHistory() | 🔐 | GET | sapi/v1/lending/union/interestHistory |
| changeFixedAndActivityPositionToDailyPosition() | 🔐 | POST | sapi/v1/lending/positionChanged |
| enableConvertSubAccount() | 🔐 | POST | sapi/v1/broker/subAccount/convert |
| convertBUSD() | 🔐 | POST | sapi/v1/asset/convert-transfer |
| getConvertBUSDHistory() | 🔐 | GET | sapi/v1/asset/convert-transfer/queryByPage |
usdm-client.ts
This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in usdm-client.ts.
| Function | AUTH | HTTP Method | Endpoint |
|---|---|---|---|
| testConnectivity() | GET | fapi/v1/ping | |
| getExchangeInfo() | GET | fapi/v1/exchangeInfo | |
| getOrderBook() | GET | fapi/v1/depth | |
| getRpiOrderBook() | GET | fapi/v1/rpiDepth | |
| getRecentTrades() | GET | fapi/v1/trades | |
| getHistoricalTrades() | GET | fapi/v1/historicalTrades | |
| getAggregateTrades() | GET | fapi/v1/aggTrades | |
| getKlines() | GET | fapi/v1/klines | |
| getContinuousContractKlines() | GET | fapi/v1/continuousKlines | |
| getIndexPriceKlines() | GET | fapi/v1/indexPriceKlines | |
| getMarkPriceKlines() | GET | fapi/v1/markPriceKlines | |
| getPremiumIndexKlines() | GET | fapi/v1/premiumIndexKlines | |
| getMarkPrice() | GET | fapi/v1/premiumIndex | |
| getFundingRateHistory() | GET | fapi/v1/fundingRate | |
| getFundingRates() | GET | fapi/v1/fundingInfo | |
| get24hrChangeStatistics() | GET | fapi/v1/ticker/24hr | |
| getSymbolPriceTicker() | GET | fapi/v1/ticker/price | |
| getSymbolPriceTickerV2() | GET | fapi/v2/ticker/price | |
| getSymbolOrderBookTicker() | GET | fapi/v1/ticker/bookTicker | |
| getQuarterlyContractSettlementPrices() | GET | futures/data/delivery-price | |
| getOpenInterest() | GET | fapi/v1/openInterest | |
| getOpenInterestStatistics() | GET | futures/data/openInterestHist | |
| getTopTradersLongShortPositionRatio() | GET | futures/data/topLongShortPositionRatio | |
| getTopTradersLongShortAccountRatio() | GET | futures/data/topLongShortAccountRatio | |
| getGlobalLongShortAccountRatio() | GET | futures/data/globalLongShortAccountRatio | |
| getTakerBuySellVolume() | GET | futures/data/takerlongshortRatio | |
| getHistoricalBlvtNavKlines() | GET | fapi/v1/lvtKlines | |
| getCompositeSymbolIndex() | GET | fapi/v1/indexInfo | |
| getMultiAssetsModeAssetIndex() | GET | fapi/v1/assetIndex | |
| getBasis() | GET | futures/data/basis | |
| getIndexPriceConstituents() | GET | fapi/v1/constituents | |
| getInsuranceFundBalance() | GET | fapi/v1/insuranceBalance | |
| getTradingSchedule() | GET | fapi/v1/tradingSchedule | |
| submitNewOrder() | 🔐 | POST | fapi/v1/order |
| submitMultipleOrders() | 🔐 | POST | fapi/v1/batchOrders |
| modifyOrder() | 🔐 | PUT | fapi/v1/order |
| modifyMultipleOrders() | 🔐 | PUT | fapi/v1/batchOrders |
| getOrderModifyHistory() | 🔐 | GET | fapi/v1/orderAmendment |
| cancelOrder() | 🔐 | DELETE | fapi/v1/order |
| cancelMultipleOrders() | 🔐 | DELETE | fapi/v1/batchOrders |
| cancelAllOpenOrders() | 🔐 | DELETE | fapi/v1/allOpenOrders |
| setCancelOrdersOnTimeout() | 🔐 | POST | fapi/v1/countdownCancelAll |
| getOrder() | 🔐 | GET | fapi/v1/order |
| getAllOrders() | 🔐 | GET | fapi/v1/allOrders |
| getAllOpenOrders() | 🔐 | GET | fapi/v1/openOrders |
| getCurrentOpenOrder() | 🔐 | GET | fapi/v1/openOrder |
| getForceOrders() | 🔐 | GET | fapi/v1/forceOrders |
| getAccountTrades() | 🔐 | GET | fapi/v1/userTrades |
| setMarginType() | 🔐 | POST | fapi/v1/marginType |
| setPositionMode() | 🔐 | POST | fapi/v1/positionSide/dual |
| setLeverage() | 🔐 | POST | fapi/v1/leverage |
| setMultiAssetsMode() | 🔐 | POST | fapi/v1/multiAssetsMargin |
| setIsolatedPositionMargin() | 🔐 | POST | fapi/v1/positionMargin |
| getPositions() | 🔐 | GET | fapi/v2/positionRisk |
| getPositionsV3() | 🔐 | GET | fapi/v3/positionRisk |
| getADLQuantileEstimation() | 🔐 | GET | fapi/v1/adlQuantile |
| getSymbolAdlRisk() | GET | fapi/v1/symbolAdlRisk | |
| getPositionMarginChangeHistory() | 🔐 | GET | fapi/v1/positionMargin/history |
| getBalanceV3() | 🔐 | GET | fapi/v3/balance |
| getBalance() | 🔐 | GET | fapi/v2/balance |
| getAccountInformationV3() | 🔐 | GET | fapi/v3/account |
| getAccountInformation() | 🔐 | GET | fapi/v2/account |
| getAccountCommissionRate() | 🔐 | GET | fapi/v1/commissionRate |
| getFuturesAccountConfig() | 🔐 | GET | fapi/v1/accountConfig |
| getFuturesSymbolConfig() | 🔐 | GET | fapi/v1/symbolConfig |
| getUserForceOrders() | 🔐 | GET | fapi/v1/rateLimit/order |
| getNotionalAndLeverageBrackets() | 🔐 | GET | fapi/v1/leverageBracket |
| getMultiAssetsMode() | 🔐 | GET | fapi/v1/multiAssetsMargin |
| getCurrentPositionMode() | 🔐 | GET | fapi/v1/positionSide/dual |
| getIncomeHistory() | 🔐 | GET | fapi/v1/income |
| getApiQuantitativeRulesIndicators() | 🔐 | GET | fapi/v1/apiTradingStatus |
| getFuturesTransactionHistoryDownloadId() | 🔐 | GET | fapi/v1/income/asyn |
| getFuturesTransactionHistoryDownloadLink() | 🔐 | GET | fapi/v1/income/asyn/id |
| getFuturesOrderHistoryDownloadId() | 🔐 | GET | fapi/v1/order/asyn |
| getFuturesOrderHistoryDownloadLink() | 🔐 | GET | fapi/v1/order/asyn/id |
| getFuturesTradeHistoryDownloadId() | 🔐 | GET | fapi/v1/trade/asyn |
| getFuturesTradeDownloadLink() | 🔐 | GET | fapi/v1/trade/asyn/id |
| setBNBBurnEnabled() | 🔐 | POST | fapi/v1/feeBurn |
| getBNBBurnStatus() | 🔐 | GET | fapi/v1/feeBurn |
| signTradFiPerpsAgreement() | 🔐 | POST | fapi/v1/stock/contract |
| testOrder() | 🔐 | POST | fapi/v1/order/test |
| submitNewAlgoOrder() | 🔐 | POST | fapi/v1/algoOrder |
| cancelAlgoOrder() | 🔐 | DELETE | fapi/v1/algoOrder |
| cancelAllAlgoOpenOrders() | 🔐 | DELETE | fapi/v1/algoOpenOrders |
| getAlgoOrder() | 🔐 | GET | fapi/v1/algoOrder |
| getOpenAlgoOrders() | 🔐 | GET | fapi/v1/openAlgoOrders |
| getAllAlgoOrders() | 🔐 | GET | fapi/v1/allAlgoOrders |
| getAllConvertPairs() | GET | fapi/v1/convert/exchangeInfo | |
| submitConvertQuoteRequest() | 🔐 | POST | fapi/v1/convert/getQuote |
| acceptConvertQuote() | 🔐 | POST | fapi/v1/convert/acceptQuote |
| getConvertOrderStatus() | 🔐 | GET | fapi/v1/convert/orderStatus |
| getPortfolioMarginProAccountInfo() | 🔐 | GET | fapi/v1/pmAccountInfo |
| getBrokerIfNewFuturesUser() | 🔐 | GET | fapi/v1/apiReferral/ifNewUser |
| setBrokerCustomIdForClient() | 🔐 | POST | fapi/v1/apiReferral/customization |
| getBrokerClientCustomIds() | 🔐 | GET | fapi/v1/apiReferral/customization |
| getBrokerUserCustomId() | 🔐 | GET | fapi/v1/apiReferral/userCustomization |
| getBrokerRebateDataOverview() | 🔐 | GET | fapi/v1/apiReferral/overview |
| getBrokerUserTradeVolume() | 🔐 | GET | fapi/v1/apiReferral/tradeVol |
| getBrokerRebateVolume() | 🔐 | GET | fapi/v1/apiReferral/rebateVol |
| getBrokerTradeDetail() | 🔐 | GET | fapi/v1/apiReferral/traderSummary |
| getFuturesUserDataListenKey() | POST | fapi/v1/listenKey | |
| keepAliveFuturesUserDataListenKey() | PUT | fapi/v1/listenKey | |
| closeFuturesUserDataListenKey() | DELETE | fapi/v1/listenKey |
coinm-client.ts
This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in coinm-client.ts.
| Function | AUTH | HTTP Method | Endpoint |
|---|---|---|---|
| testConnectivity() | GET | dapi/v1/ping | |
| getExchangeInfo() | GET | dapi/v1/exchangeInfo | |
| getOrderBook() | GET | dapi/v1/depth | |
| getRecentTrades() | GET | dapi/v1/trades | |
| getHistoricalTrades() | GET | dapi/v1/historicalTrades | |
| getAggregateTrades() | GET | dapi/v1/aggTrades | |
| getMarkPrice() | GET | dapi/v1/premiumIndex | |
| getFundingRateHistory() | GET | dapi/v1/fundingRate | |
| getFundingRate() | GET | dapi/v1/fundingInfo | |
| getKlines() | GET | dapi/v1/klines | |
| getContinuousContractKlines() | GET | dapi/v1/continuousKlines | |
| getIndexPriceKlines() | GET | dapi/v1/indexPriceKlines | |
| getMarkPriceKlines() | GET | dapi/v1/markPriceKlines | |
| getPremiumIndexKlines() | GET | dapi/v1/premiumIndexKlines | |
| get24hrChangeStatistics() | GET | dapi/v1/ticker/24hr | |
| getSymbolPriceTicker() | GET | dapi/v1/ticker/price | |
| getSymbolOrderBookTicker() | GET | dapi/v1/ticker/bookTicker | |
| getOpenInterest() | GET | dapi/v1/openInterest | |
| getOpenInterestStatistics() | GET | futures/data/openInterestHist | |
| getTopTradersLongShortAccountRatio() | GET | futures/data/topLongShortAccountRatio | |
| getTopTradersLongShortPositionRatio() | GET | futures/data/topLongShortPositionRatio | |
| getGlobalLongShortAccountRatio() | GET | futures/data/globalLongShortAccountRatio | |
| getTakerBuySellVolume() | GET | futures/data/takerBuySellVol | |
| getCompositeSymbolIndex() | GET | futures/data/basis | |
| getIndexPriceConstituents() | GET | dapi/v1/constituents | |
| getQuarterlyContractSettlementPrices() | GET | futures/data/delivery-price | |
| submitNewOrder() | 🔐 | POST | dapi/v1/order |
| submitMultipleOrders() | 🔐 | POST | dapi/v1/batchOrders |
| modifyOrder() | 🔐 | PUT | dapi/v1/order |
| modifyMultipleOrders() | 🔐 | PUT | dapi/v1/batchOrders |
| getOrderModifyHistory() | 🔐 | GET | dapi/v1/orderAmendment |
| cancelOrder() | 🔐 | DELETE | dapi/v1/order |
| cancelMultipleOrders() | 🔐 | DELETE | dapi/v1/batchOrders |
| cancelAllOpenOrders() | 🔐 | DELETE | dapi/v1/allOpenOrders |
| setCancelOrdersOnTimeout() | 🔐 | POST | dapi/v1/countdownCancelAll |
| getOrder() | 🔐 | GET | dapi/v1/order |
| getAllOrders() | 🔐 | GET | dapi/v1/allOrders |
| getAllOpenOrders() | 🔐 | GET | dapi/v1/openOrders |
| getCurrentOpenOrder() | 🔐 | GET | dapi/v1/openOrder |
| getForceOrders() | 🔐 | GET | dapi/v1/forceOrders |
| getAccountTrades() | 🔐 | GET | dapi/v1/userTrades |
| getPositions() | 🔐 | GET | dapi/v1/positionRisk |
| setPositionMode() | 🔐 | POST | dapi/v1/positionSide/dual |
| setMarginType() | 🔐 | POST | dapi/v1/marginType |
| setLeverage() | 🔐 | POST | dapi/v1/leverage |
| getADLQuantileEstimation() | 🔐 | GET | dapi/v1/adlQuantile |
| setIsolatedPositionMargin() | 🔐 | POST | dapi/v1/positionMargin |
| getPositionMarginChangeHistory() | 🔐 | GET | dapi/v1/positionMargin/history |
| getBalance() | 🔐 | GET | dapi/v1/balance |
| getAccountCommissionRate() | 🔐 | GET | dapi/v1/commissionRate |
| getAccountInformation() | 🔐 | GET | dapi/v1/account |
| getNotionalAndLeverageBrackets() | 🔐 | GET | dapi/v2/leverageBracket |
| getCurrentPositionMode() | 🔐 | GET | dapi/v1/positionSide/dual |
| getIncomeHistory() | 🔐 | GET | dapi/v1/income |
| getDownloadIdForFuturesTransactionHistory() | 🔐 | GET | dapi/v1/income/asyn |
| getFuturesTransactionHistoryDownloadLink() | 🔐 | GET | dapi/v1/income/asyn/id |
| getDownloadIdForFuturesOrderHistory() | 🔐 | GET | dapi/v1/order/asyn |
| getFuturesOrderHistoryDownloadLink() | 🔐 | GET | dapi/v1/order/asyn/id |
| getDownloadIdForFuturesTradeHistory() | 🔐 | GET | dapi/v1/trade/asyn |
| getFuturesTradeHistoryDownloadLink() | 🔐 | GET | dapi/v1/trade/asyn/id |
| getClassicPortfolioMarginAccount() | 🔐 | GET | dapi/v1/pmAccountInfo |
| getClassicPortfolioMarginNotionalLimits() | 🔐 | GET | dapi/v1/pmExchangeInfo |
| getBrokerIfNewFuturesUser() | 🔐 | GET | dapi/v1/apiReferral/ifNewUser |
| setBrokerCustomIdForClient() | 🔐 | POST | dapi/v1/apiReferral/customization |
| getBrokerClientCustomIds() | 🔐 | GET | dapi/v1/apiReferral/customization |
| getBrokerUserCustomId() | 🔐 | GET | dapi/v1/apiReferral/userCustomization |
| getBrokerRebateDataOverview() | 🔐 | GET | dapi/v1/apiReferral/overview |
| getBrokerUserTradeVolume() | 🔐 | GET | dapi/v1/apiReferral/tradeVol |
| getBrokerRebateVolume() | 🔐 | GET | dapi/v1/apiReferral/rebateVol |
| getBrokerTradeDetail() | 🔐 | GET | dapi/v1/apiReferral/traderSummary |
| getFuturesUserDataListenKey() | POST | dapi/v1/listenKey | |
| keepAliveFuturesUserDataListenKey() | PUT | dapi/v1/listenKey | |
| closeFuturesUserDataListenKey() | DELETE | dapi/v1/listenKey |
portfolio-client.ts
This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in portfolio-client.ts.
| Function | AUTH | HTTP Method | Endpoint |
|---|---|---|---|
| testConnectivity() | GET | papi/v1/ping | |
| signTradFiPerpsContract() | 🔐 | POST | papi/v1/um/stock/contract |
| submitNewUMOrder() | 🔐 | POST | papi/v1/um/order |
| submitNewUMConditionalOrder() | 🔐 | POST | papi/v1/um/conditional/order |
| submitNewUMAlgoOrder() | 🔐 | POST | papi/v1/um/algo/order |
| submitNewCMOrder() | 🔐 | POST | papi/v1/cm/order |
| submitNewCMConditionalOrder() | 🔐 | POST | papi/v1/cm/conditional/order |
| submitNewMarginOrder() | 🔐 | POST | papi/v1/margin/order |
| submitMarginLoan() | 🔐 | POST | papi/v1/marginLoan |
| submitMarginRepay() | 🔐 | POST | papi/v1/repayLoan |
| submitNewMarginOCO() | 🔐 | POST | papi/v1/margin/order/oco |
| cancelUMOrder() | 🔐 | DELETE | papi/v1/um/order |
| cancelAllUMOrders() | 🔐 | DELETE | papi/v1/um/allOpenOrders |
| cancelUMConditionalOrder() | 🔐 | DELETE | papi/v1/um/conditional/order |
| cancelUMAlgoOrder() | 🔐 | DELETE | papi/v1/um/algo/order |
| cancelAllUMConditionalOrders() | 🔐 | DELETE | papi/v1/um/conditional/allOpenOrders |
| cancelAllUMAlgoOpenOrders() | 🔐 | DELETE | papi/v1/um/algo/allOpenOrders |
| cancelCMOrder() | 🔐 | DELETE | papi/v1/cm/order |
| cancelAllCMOrders() | 🔐 | DELETE | papi/v1/cm/allOpenOrders |
| cancelCMConditionalOrder() | 🔐 | DELETE | papi/v1/cm/conditional/order |
| cancelAllCMConditionalOrders() | 🔐 | DELETE | papi/v1/cm/conditional/allOpenOrders |
| cancelMarginOrder() | 🔐 | DELETE | papi/v1/margin/order |
| cancelMarginOCO() | 🔐 | DELETE | papi/v1/margin/orderList |
| cancelAllMarginOrders() | 🔐 | DELETE | papi/v1/margin/allOpenOrders |
| modifyUMOrder() | 🔐 | PUT | papi/v1/um/order |
| modifyCMOrder() | 🔐 | PUT | papi/v1/cm/order |
| getUMOrder() | 🔐 | GET | papi/v1/um/order |
| getAllUMOrders() | 🔐 | GET | papi/v1/um/allOrders |
| getUMOpenOrder() | 🔐 | GET | papi/v1/um/openOrder |
| getAllUMOpenOrders() | 🔐 | GET | papi/v1/um/openOrders |
| getAllUMConditionalOrders() | 🔐 | GET | papi/v1/um/conditional/allOrders |
| getAllUMAlgoOrders() | 🔐 | GET | papi/v1/um/algo/allAlgoOrders |
| getUMOpenConditionalOrders() | 🔐 | GET | papi/v1/um/conditional/openOrders |
| getUMAlgoOpenOrders() | 🔐 | GET | papi/v1/um/algo/openAlgoOrders |
| getUMOpenConditionalOrder() | 🔐 | GET | papi/v1/um/conditional/openOrder |
| getUMAlgoOrder() | 🔐 | GET | papi/v1/um/algo/algoOrder |
| getUMConditionalOrderHistory() | 🔐 | GET | papi/v1/um/conditional/orderHistory |
| getCMOrder() | 🔐 | GET | papi/v1/cm/order |
| getAllCMOrders() | 🔐 | GET | papi/v1/cm/allOrders |
| getCMOpenOrder() | 🔐 | GET | papi/v1/cm/openOrder |
| getAllCMOpenOrders() | 🔐 | GET | papi/v1/cm/openOrders |
| getCMOpenConditionalOrders() | 🔐 | GET | papi/v1/cm/conditional/openOrders |
| getCMOpenConditionalOrder() | 🔐 | GET | papi/v1/cm/conditional/openOrder |
| getAllCMConditionalOrders() | 🔐 | GET | papi/v1/cm/conditional/allOrders |
| getCMConditionalOrderHistory() | 🔐 | GET | papi/v1/cm/conditional/orderHistory |
| getUMForceOrders() | 🔐 | GET | papi/v1/um/forceOrders |
| getCMForceOrders() | 🔐 | GET | papi/v1/cm/forceOrders |
| getUMOrderModificationHistory() | 🔐 | GET | papi/v1/um/orderAmendment |
| getCMOrderModificationHistory() | 🔐 | GET | papi/v1/cm/orderAmendment |
| getMarginForceOrders() | 🔐 | GET | papi/v1/margin/forceOrders |
| getUMTrades() | 🔐 | GET | papi/v1/um/userTrades |
| getCMTrades() | 🔐 | GET | papi/v1/cm/userTrades |
| getUMADLQuantile() | 🔐 | GET | papi/v1/um/adlQuantile |
| getCMADLQuantile() | 🔐 | GET | papi/v1/cm/adlQuantile |
| toggleUMFeeBurn() | 🔐 | POST | papi/v1/um/feeBurn |
| getUMFeeBurnStatus() | 🔐 | GET | papi/v1/um/feeBurn |
| getMarginOrder() | 🔐 | GET | papi/v1/margin/order |
| getMarginOpenOrders() | 🔐 | GET | papi/v1/margin/openOrders |
| getAllMarginOrders() | 🔐 | GET | papi/v1/margin/allOrders |
| getMarginOCO() | 🔐 | GET | papi/v1/margin/orderList |
| getAllMarginOCO() | 🔐 | GET | papi/v1/margin/allOrderList |
| getMarginOpenOCO() | 🔐 | GET | papi/v1/margin/openOrderList |
| getMarginTrades() | 🔐 | GET | papi/v1/margin/myTrades |
| repayMarginDebt() | 🔐 | POST | papi/v1/margin/repay-debt |
| getBalance() | 🔐 | GET | papi/v1/balance |
| getAccountInfo() | 🔐 | GET | papi/v1/account |
| getMarginMaxBorrow() | 🔐 | GET | papi/v1/margin/maxBorrowable |
| getMarginMaxWithdraw() | 🔐 | GET | papi/v1/margin/maxWithdraw |
| getUMPosition() | 🔐 | GET | papi/v1/um/positionRisk |
| getCMPosition() | 🔐 | GET | papi/v1/cm/positionRisk |
| updateUMLeverage() | 🔐 | POST | papi/v1/um/leverage |
| updateCMLeverage() | 🔐 | POST | papi/v1/cm/leverage |
| updateUMPositionMode() | 🔐 | POST | papi/v1/um/positionSide/dual |
| updateCMPositionMode() | 🔐 | POST | papi/v1/cm/positionSide/dual |
| getUMPositionMode() | 🔐 | GET | papi/v1/um/positionSide/dual |
| getCMPositionMode() | 🔐 | GET | papi/v1/cm/positionSide/dual |
| getUMLeverageBrackets() | 🔐 | GET | papi/v1/um/leverageBracket |
| getCMLeverageBrackets() | 🔐 | GET | papi/v1/cm/leverageBracket |
| getUMTradingStatus() | 🔐 | GET | papi/v1/um/apiTradingStatus |
| getUMCommissionRate() | 🔐 | GET | papi/v1/um/commissionRate |
| getCMCommissionRate() | 🔐 | GET | papi/v1/cm/commissionRate |
| getMarginLoanRecords() | 🔐 | GET | papi/v1/margin/marginLoan |
| getMarginRepayRecords() | 🔐 | GET | papi/v1/margin/repayLoan |
| getAutoRepayFuturesStatus() | 🔐 | GET | papi/v1/repay-futures-switch |
| updateAutoRepayFuturesStatus() | 🔐 | POST | papi/v1/repay-futures-switch |
| getMarginInterestHistory() | 🔐 | GET | papi/v1/margin/marginInterestHistory |
| repayFuturesNegativeBalance() | 🔐 | POST | papi/v1/repay-futures-negative-balance |
| getPortfolioNegativeBalanceInterestHistory() | 🔐 | GET | papi/v1/portfolio/interest-history |
| autoCollectFunds() | 🔐 | POST | papi/v1/auto-collection |
| transferAssetFuturesMargin() | 🔐 | POST | papi/v1/asset-collection |
| transferBNB() | 🔐 | POST | papi/v1/bnb-transfer |
| getUMIncomeHistory() | 🔐 | GET | papi/v1/um/income |
| getCMIncomeHistory() | 🔐 | GET | papi/v1/cm/income |
| getUMAccount() | 🔐 | GET | papi/v1/um/account |
| getCMAccount() | 🔐 | GET | papi/v1/cm/account |
| getUMAccountConfig() | 🔐 | GET | papi/v1/um/accountConfig |
| getUMSymbolConfig() | 🔐 | GET | papi/v1/um/symbolConfig |
| getUMAccountV2() | 🔐 | GET | papi/v2/um/account |
| getUMTradeHistoryDownloadId() | 🔐 | GET | papi/v1/um/trade/asyn |
| getUMTradeDownloadLink() | 🔐 | GET | papi/v1/um/trade/asyn/id |
| getUMOrderHistoryDownloadId() | 🔐 | GET | papi/v1/um/order/asyn |
| getUMOrderDownloadLink() | 🔐 | GET | papi/v1/um/order/asyn/id |
| getUMTransactionHistoryDownloadId() | 🔐 | GET | papi/v1/um/income/asyn |
| getUMTransactionDownloadLink() | 🔐 | GET | papi/v1/um/income/asyn/id |
| getPMUserDataListenKey() | POST | papi/v1/listenKey | |
| keepAlivePMUserDataListenKey() | PUT | papi/v1/listenKey | |
| closePMUserDataListenKey() | DELETE | papi/v1/listenKey |
websocket-api-client.ts
This table includes all endpoints from the official Exchange API docs and corresponding SDK functions for each endpoint that are found in websocket-api-client.ts.
This client provides WebSocket API endpoints which allow for faster interactions with the Binance API via a WebSocket connection.
Source: View endpoint map source
Binance TypeScript FAQ
What does the Binance TypeScript SDK cover?
Binance supports Spot, Futures, Margin, WebSockets, and WebSocket API workflows. The TypeScript guide covers the main REST and WebSocket integration patterns.
How do I authenticate private Binance API calls in TypeScript?
Install binance from npm & pass API credentials into the SDK client options, as shown in the Binance TypeScript examples above. The SDK handles the exchange-specific signing requirements for private requests.
Does the Binance TypeScript 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.
When should I use the Binance WebSocket API instead of REST?
Use REST for standard request and response workflows such as account queries and order management. Use the WebSocket API flow when you want persistent low-latency interactions over a connected session.
Direct Example Files
Open the example files for typed patterns that translate well into shared interfaces, services, and stricter application code.
- Binance REST API example file (Binance/Rest/Futures/rest-usdm-order.ts)
- Binance WebSocket example file (Binance/WebSockets/Public/ws-public-spot-trades.ts)
- Binance WebSocket API example file (Binance/WebSockets/WS-API/ws-api-client.ts)