Gathering detailed insights and metrics for binance-api-node
Gathering detailed insights and metrics for binance-api-node
Gathering detailed insights and metrics for binance-api-node
Gathering detailed insights and metrics for binance-api-node
💹 A complete and heavily tested wrapper with typings for the Binance API.
npm install binance-api-node
Typescript
Module System
Node Version
NPM Version
81.5
Supply Chain
98.6
Quality
77.3
Maintenance
100
Vulnerability
99.3
License
JavaScript (75.52%)
TypeScript (24.48%)
Total Downloads
1,636,880
Last Day
489
Last Week
5,094
Last Month
21,104
Last Year
213,677
694 Stars
521 Commits
509 Forks
22 Watchers
1 Branches
103 Contributors
Updated on Jul 23, 2025
Latest Version
0.12.9
Package Id
binance-api-node@0.12.9
Unpacked Size
275.41 kB
Size
49.76 kB
File Count
7
NPM Version
9.5.1
Node Version
18.16.0
Published on
Nov 09, 2024
Cumulative downloads
Total Downloads
Last Day
36.2%
489
Compared to previous day
Last Week
29.8%
5,094
Compared to previous week
Last Month
11.8%
21,104
Compared to previous month
Last Year
-34.8%
213,677
Compared to previous year
7
A complete API wrapper for the Binance API.
Note: This wrapper uses Promises, if they are not supported in your environment, you might want to add a polyfill for them.
For PRs or issues, head over to the source repository.
yarn add binance-api-node
Import the module and create a new client. Passing api keys is optional only if you don't plan on doing authenticated calls. You can create an api key here.
1import Binance from 'binance-api-node' 2 3const client = Binance() 4 5// Authenticated client, can make signed calls 6const client2 = Binance({ 7 apiKey: 'xxx', 8 apiSecret: 'xxx', 9 getTime: xxx, 10}) 11 12client.time().then(time => console.log(time))
If you do not have an appropriate babel config, you will need to use the basic commonjs requires.
1const Binance = require('binance-api-node').default
Every REST method returns a Promise, making this library async await ready.
Following examples will use the await
form, which requires some configuration you will have to lookup.
Param | Type | Required | Info |
---|---|---|---|
apiKey | String | false | Required when making private calls |
apiSecret | String | false | Required when making private calls |
getTime | Function | false | Time generator, defaults to () => Date.now() |
httpBase | String | false | Changes the default endpoint |
httpFutures | String | false | Changes the default endpoint |
wsBase | String | false | Changes the default endpoint |
wsFutures | String | false | Changes the default endpoint |
Test connectivity to the API.
1console.log(await client.ping())
Test connectivity to the Rest API and get the current server time.
1console.log(await client.time())
11508478457643
Get the current exchange trading rules and symbol information. You can optionally pass a symbol to only retrieve info of this specific one.
1console.log(await client.exchangeInfo())
Param | Type | Required | Default |
---|---|---|---|
symbol | String | false |
1{ 2 "timezone": "UTC", 3 "serverTime": 1508631584636, 4 "rateLimits": [ 5 { 6 "rateLimitType": "REQUEST_WEIGHT", 7 "interval": "MINUTE", 8 "intervalNum": 1, 9 "limit": 1200 10 }, 11 { 12 "rateLimitType": "ORDERS", 13 "interval": "SECOND", 14 "intervalNum": 1, 15 "limit": 10 16 }, 17 { 18 "rateLimitType": "ORDERS", 19 "interval": "DAY", 20 "intervalNum": 1, 21 "limit": 100000 22 } 23 ], 24 "exchangeFilters": [], 25 "symbols": [{ 26 "symbol": "ETHBTC", 27 "status": "TRADING", 28 "baseAsset": "ETH", 29 "baseAssetPrecision": 8, 30 "quoteAsset": "BTC", 31 "quotePrecision": 8, 32 "orderTypes": ["LIMIT", "MARKET"], 33 "icebergAllowed": false, 34 "filters": [{ 35 "filterType": "PRICE_FILTER", 36 "minPrice": "0.00000100", 37 "maxPrice": "100000.00000000", 38 "tickSize": "0.00000100" 39 }, { 40 "filterType": "LOT_SIZE", 41 "minQty": "0.00100000", 42 "maxQty": "100000.00000000", 43 "stepSize": "0.00100000" 44 }, { 45 "filterType": "MIN_NOTIONAL", 46 "minNotional": "0.00100000" 47 }] 48 }] 49}
Get the order book for a symbol.
1console.log(await client.book({ symbol: 'ETHBTC' }))
Param | Type | Required | Default |
---|---|---|---|
symbol | String | true | |
limit | Number | false | 100 |
1{ 2 lastUpdateId: 17647759, 3 asks: 4 [ 5 { price: '0.05411500', quantity: '5.55000000' }, 6 { price: '0.05416700', quantity: '11.80100000' } 7 ], 8 bids: 9 [ 10 { price: '0.05395500', quantity: '2.70000000' }, 11 { price: '0.05395100', quantity: '11.84100000' } 12 ] 13}
Retrieves Candlestick for a symbol. Candlesticks are uniquely identified by their open time.
1console.log(await client.candles({ symbol: 'ETHBTC' }))
Param | Type | Required | Default | Description |
---|---|---|---|---|
symbol | String | true | ||
interval | String | false | 5m | 1m , 3m , 5m , 15m , 30m , 1h , 2h ,4h , 6h , 8h , 12h , 1d , 3d , 1w , 1M |
limit | Number | false | 500 | Max 1000 |
startTime | Number | false | ||
endTime | Number | false |
1;[ 2 { 3 openTime: 1508328900000, 4 open: '0.05655000', 5 high: '0.05656500', 6 low: '0.05613200', 7 close: '0.05632400', 8 volume: '68.88800000', 9 closeTime: 1508329199999, 10 quoteAssetVolume: '2.29500857', 11 trades: 85, 12 baseAssetVolume: '40.61900000', 13 }, 14]
Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated.
1console.log(await client.aggTrades({ symbol: 'ETHBTC' }))
Param | Type | Required | Default | Description |
---|---|---|---|---|
symbol | String | true | ||
fromId | String | false | ID to get aggregate trades from INCLUSIVE. | |
startTime | Number | false | Timestamp in ms to get aggregate trades from INCLUSIVE. | |
endTime | Number | false | Timestamp in ms to get aggregate trades until INCLUSIVE. | |
limit | Number | false | 500 | Max 500 |
Note: If both startTime
and endTime
are sent, limit
should not be sent AND the distance between startTime
and endTime
must be less than 1 hour.
Note: If frondId
, startTime
, and endTime
are not sent, the most recent aggregate trades will be returned.
1;[ 2 { 3 aggId: 2107132, 4 symbol: 'ETHBTC', 5 price: '0.05390400', 6 quantity: '1.31000000', 7 firstId: 2215345, 8 lastId: 2215345, 9 timestamp: 1508478599481, 10 isBuyerMaker: true, 11 wasBestPrice: true, 12 }, 13]
Get recent trades of a symbol.
1console.log(await client.trades({ symbol: 'ETHBTC' }))
Param | Type | Required | Default | Description |
---|---|---|---|---|
symbol | String | true | ||
limit | Number | false | 500 | Max 500 |
1;[ 2 { 3 id: 28457, 4 price: '4.00000100', 5 qty: '12.00000000', 6 time: 1499865549590, 7 isBuyerMaker: true, 8 isBestMatch: true, 9 }, 10]
24 hour price change statistics, not providing a symbol will return all tickers and is resource-expensive.
1console.log(await client.dailyStats({ symbol: 'ETHBTC' }))
Param | Type | Required |
---|---|---|
symbol | String | false |
1{ 2 symbol: 'ETHBTC', 3 priceChange: '-0.00112000', 4 priceChangePercent: '-1.751', 5 weightedAvgPrice: '0.06324784', 6 prevClosePrice: '0.06397400', 7 lastPrice: '0.06285500', 8 lastQty: '0.63500000', 9 bidPrice: '0.06285500', 10 bidQty: '0.81900000', 11 askPrice: '0.06291900', 12 askQty: '2.93800000', 13 openPrice: '0.06397500', 14 highPrice: '0.06419100', 15 lowPrice: '0.06205300', 16 volume: '126240.37200000', 17 quoteVolume: '7984.43091340', 18 openTime: 1521622289427, 19 closeTime: 1521708689427, 20 firstId: 45409308, // First tradeId 21 lastId: 45724293, // Last tradeId 22 count: 314986 // Trade count 23}
Current average price for a symbol.
1console.log(await client.avgPrice({ symbol: 'ETHBTC' }))
Param | Type | Required |
---|---|---|
symbol | String | true |
1{ 2 "mins": 5, 3 "price": "9.35751834" 4}
Latest price for a symbol, not providing the symbol will return prices for all symbols.
1console.log(await client.prices())
Param | Type | Required |
---|---|---|
symbol | String | false |
1{ 2 ETHBTC: '0.05392500', 3 LTCBTC: '0.01041100', 4 ... 5}
Best price/qty on the order book for all symbols.
1console.log(await client.allBookTickers())
1{ 2 DASHBTC: { 3 symbol: 'DASHBTC', 4 bidPrice: '0.04890400', 5 bidQty: '0.74100000', 6 askPrice: '0.05230000', 7 askQty: '0.79900000' 8 }, 9 DASHETH: { 10 symbol: 'DASHETH', 11 bidPrice: '0.89582000', 12 bidQty: '0.63300000', 13 askPrice: '1.02328000', 14 askQty: '0.99900000' 15 } 16 ... 17}
Test connectivity to the API.
1console.log(await client.futuresPing())
Test connectivity to the Rest API and get the current server time.
1console.log(await client.futuresTime())
11508478457643
Get the current exchange trading rules and symbol information.
1console.log(await client.futuresExchangeInfo())
1{ 2 "timezone": "UTC", 3 "serverTime": 1508631584636, 4 "rateLimits": [ 5 { 6 "rateLimitType": "REQUEST_WEIGHT", 7 "interval": "MINUTE", 8 "intervalNum": 1, 9 "limit": 1200 10 }, 11 { 12 "rateLimitType": "ORDERS", 13 "interval": "SECOND", 14 "intervalNum": 1, 15 "limit": 10 16 }, 17 { 18 "rateLimitType": "ORDERS", 19 "interval": "DAY", 20 "intervalNum": 1, 21 "limit": 100000 22 } 23 ], 24 "exchangeFilters": [], 25 "symbols": [...] 26}
Get the order book for a symbol.
1console.log(await client.futuresBook({ symbol: 'BTCUSDT' }))
Param | Type | Required | Default |
---|---|---|---|
symbol | String | true | |
limit | Number | false | 100 |
1{ 2 lastUpdateId: 17647759, 3 asks: 4 [ 5 { price: '8000.05411500', quantity: '54.55000000' }, 6 { price: '8000.05416700', quantity: '1111.80100000' } 7 ], 8 bids: 9 [ 10 { price: '8000.05395500', quantity: '223.70000000' }, 11 { price: '8000.05395100', quantity: '1134.84100000' } 12 ] 13}
Retrieves Candlestick for a symbol. Candlesticks are uniquely identified by their open time.
1console.log(await client.futuresCandles({ symbol: 'BTCUSDT' }))
Param | Type | Required | Default | Description |
---|---|---|---|---|
symbol | String | true | ||
interval | String | false | 5m | 1m , 3m , 5m , 15m , 30m , 1h , 2h ,4h , 6h , 8h , 12h , 1d , 3d , 1w , 1M |
limit | Number | false | 500 | Max 1000 |
startTime | Number | false | ||
endTime | Number | false |
1;[ 2 { 3 openTime: 1508328900000, 4 open: '0.05655000', 5 high: '0.05656500', 6 low: '0.05613200', 7 close: '0.05632400', 8 volume: '68.88800000', 9 closeTime: 1508329199999, 10 quoteAssetVolume: '2.29500857', 11 trades: 85, 12 baseAssetVolume: '40.61900000', 13 }, 14]
Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated.
1console.log(await client.futuresAggTrades({ symbol: 'ETHBTC' }))
Param | Type | Required | Default | Description |
---|---|---|---|---|
symbol | String | true | ||
fromId | String | false | ID to get aggregate trades from INCLUSIVE. | |
startTime | Number | false | Timestamp in ms to get aggregate trades from INCLUSIVE. | |
endTime | Number | false | Timestamp in ms to get aggregate trades until INCLUSIVE. | |
limit | Number | false | 500 | Max 500 |
Note: If both startTime
and endTime
are sent, limit
should not be sent AND the distance between startTime
and endTime
must be less than 24 hours.
Note: If frondId
, startTime
, and endTime
are not sent, the most recent aggregate trades will be returned.
1;[ 2 { 3 aggId: 2107132, 4 price: '0.05390400', 5 quantity: '1.31000000', 6 firstId: 2215345, 7 lastId: 2215345, 8 timestamp: 1508478599481, 9 isBuyerMaker: true, 10 wasBestPrice: true, 11 }, 12]
Get recent trades of a symbol.
1console.log(await client.futuresTrades({ symbol: 'ETHBTC' }))
Param | Type | Required | Default | Description |
---|---|---|---|---|
symbol | String | true | ||
limit | Number | false | 500 | Max 500 |
1;[ 2 { 3 id: 28457, 4 price: '4.00000100', 5 qty: '12.00000000', 6 time: 1499865549590, 7 isBuyerMaker: true, 8 isBestMatch: true, 9 }, 10]
24 hour price change statistics, not providing a symbol will return all tickers and is resource-expensive.
1console.log(await client.futuresDailyStats({ symbol: 'ETHBTC' }))
Param | Type | Required |
---|---|---|
symbol | String | false |
1{ 2 symbol: 'BTCUSDT', 3 priceChange: '-0.00112000', 4 priceChangePercent: '-1.751', 5 weightedAvgPrice: '0.06324784', 6 prevClosePrice: '0.06397400', 7 lastPrice: '0.06285500', 8 lastQty: '0.63500000', 9 bidPrice: '0.06285500', 10 bidQty: '0.81900000', 11 askPrice: '0.06291900', 12 askQty: '2.93800000', 13 openPrice: '0.06397500', 14 highPrice: '0.06419100', 15 lowPrice: '0.06205300', 16 volume: '126240.37200000', 17 quoteVolume: '7984.43091340', 18 openTime: 1521622289427, 19 closeTime: 1521708689427, 20 firstId: 45409308, // First tradeId 21 lastId: 45724293, // Last tradeId 22 count: 314986 // Trade count 23}
Latest price for symbol, not providing a symbol will return latest price for all symbols and is resource-expensive.
1console.log(await client.futuresPrices())
Param | Type | Required |
---|---|---|
symbol | String | false |
1{ 2 BTCUSDT: '8590.05392500', 3 ETHUSDT: '154.1100', 4 ... 5}
Best price/qty on the order book for all symbols.
1console.log(await client.futuresAllBookTickers())
1{ 2 BTCUSDT: { 3 symbol: 'BTCUSDT', 4 bidPrice: '0.04890400', 5 bidQty: '0.74100000', 6 askPrice: '0.05230000', 7 askQty: '0.79900000' 8 }, 9 ETHUSDT: { 10 symbol: 'ETHUSDT', 11 bidPrice: '0.89582000', 12 bidQty: '0.63300000', 13 askPrice: '1.02328000', 14 askQty: '0.99900000' 15 } 16 ... 17}
Mark Price and Funding Rate.
1console.log(await client.futuresMarkPrice())
1{ 2 "symbol": "BTCUSDT", 3 "markPrice": "11012.80409769", 4 "lastFundingRate": "-0.03750000", 5 "nextFundingTime": 1562569200000, 6 "time": 1562566020000 7}
Get all Liquidation Orders.
1console.log(await client.futuresAllForceOrders())
Param | Type | Required |
---|---|---|
symbol | String | false |
startTime | Long | false |
endTime | Long | false |
limit | Long | false |
1;[ 2 { 3 symbol: 'BTCUSDT', // SYMBOL 4 price: '7918.33', // ORDER_PRICE 5 origQty: '0.014', // ORDER_AMOUNT 6 executedQty: '0.014', // FILLED_AMOUNT 7 avragePrice: '7918.33', // AVG_PRICE 8 status: 'FILLED', // STATUS 9 timeInForce: 'IOC', // TIME_IN_FORCE 10 type: 'LIMIT', 11 side: 'SELL', // DIRECTION 12 time: 1568014460893, 13 }, 14]
Test connectivity to the API.
1console.log(await client.deliveryPing())
Test connectivity to the Rest API and get the current server time.
1console.log(await client.deliveryTime())
11508478457643
Get the current exchange trading rules and symbol information.
1console.log(await client.deliveryExchangeInfo())
1{ 2 timezone: 'UTC', 3 serverTime: 1663099219744, 4 rateLimits: [ 5 { 6 rateLimitType: 'REQUEST_WEIGHT', 7 interval: 'MINUTE', 8 intervalNum: 1, 9 limit: 2400 10 }, 11 { 12 rateLimitType: 'ORDERS', 13 interval: 'MINUTE', 14 intervalNum: 1, 15 limit: 1200 16 } 17 ], 18 exchangeFilters: [], 19 symbols: [...] 20}
Get the order book for a symbol.
1console.log(await client.deliveryBook({ symbol: 'TRXUSD_PERP' }))
Param | Type | Required | Default |
---|---|---|---|
symbol | String | true | |
limit | Number | false | 500 |
1{ 2 lastUpdateId: 17647759, 3 asks: 4 [ 5 { price: '8000.05411500', quantity: '54.55000000' }, 6 { price: '8000.05416700', quantity: '1111.80100000' } 7 ], 8 bids: 9 [ 10 { price: '8000.05395500', quantity: '223.70000000' }, 11 { price: '8000.05395100', quantity: '1134.84100000' } 12 ] 13}
Retrieves Candlestick for a symbol. Candlesticks are uniquely identified by their open time.
1console.log(await client.deliveryCandles({ symbol: 'TRXUSD_PERP' }))
Param | Type | Required | Default | Description |
---|---|---|---|---|
symbol | String | true | ||
interval | String | false | 5m | 1m , 3m , 5m , 15m , 30m , 1h , 2h ,4h , 6h , 8h , 12h , 1d , 3d , 1w , 1M |
limit | Number | false | 500 | Max 1000 |
startTime | Number | false | ||
endTime | Number | false |
1[ 2 { 3 openTime: 1663104600000, 4 open: '0.06091', 5 high: '0.06091', 6 low: '0.06086', 7 close: '0.06090', 8 volume: '7927', 9 closeTime: 1663104899999, 10 baseVolume: '1302212.12820796', 11 trades: 75, 12 quoteAssetVolume: '386', 13 baseAssetVolume: '63382.78318786' 14 } 15]
Get compressed, aggregate trades. Trades that fill at the time, from the same order, with the same price will have the quantity aggregated.
1console.log(await client.deliveryAggTrades({ symbol: 'TRXUSD_PERP' }))
Param | Type | Required | Default | Description |
---|---|---|---|---|
symbol | String | true | ||
fromId | String | false | ID to get aggregate trades from INCLUSIVE. | |
startTime | Number | false | Timestamp in ms to get aggregate trades from INCLUSIVE. | |
endTime | Number | false | Timestamp in ms to get aggregate trades until INCLUSIVE. | |
limit | Number | false | 500 | Max 1000 |
Note: If both startTime
and endTime
are sent, limit
should not be sent AND the distance between startTime
and endTime
must be less than 24 hours.
Note: If fromId
, startTime
, and endTime
are not sent, the most recent aggregate trades will be returned.
Note : Only market trades will be aggregated and returned, which means the insurance fund trades and ADL trades won't be aggregated.
1[ 2 { 3 aggId: 14642023, 4 symbol: 'TRXUSD_PERP', 5 price: '0.06087', 6 quantity: '50', 7 firstId: 26319898, 8 lastId: 26319898, 9 timestamp: 1663105187120, 10 isBuyerMaker: false, 11 } 12]
Get recent trades of a symbol.
1console.log(await client.deliveryTrades({ symbol: 'TRXUSD_PERP' }))
Param | Type | Required | Default | Description |
---|---|---|---|---|
symbol | String | true | ||
limit | Number | false | 500 | Max 1000 |
1;[ 2 { 3 id: 26319660, 4 price: '0.06097', 5 qty: '28', 6 baseQty: '4592.42250287', 7 time: 1663103746267, 8 isBuyerMaker: true 9 }, 10]
24 hour price change statistics, not providing a symbol will return all tickers and is resource-expensive.
1console.log(await client.deliveryDailyStats({ symbol: 'TRXUSD_PERP' }))
Param | Type | Required |
---|---|---|
symbol | String | false |
pair | String | false |
1{ 2 symbol: 'TRXUSD_PERP', 3 pair: 'TRXUSD', 4 priceChange: '-0.00277', 5 priceChangePercent: '-4.353', 6 weightedAvgPrice: '0.06248010', 7 lastPrice: '0.06087', 8 lastQty: '4', 9 openPrice: '0.06364', 10 highPrice: '0.06395', 11 lowPrice: '0.06069', 12 volume: '545316', 13 baseVolume: '87278342.48218514', 14 openTime: 1663019640000, 15 closeTime: 1663106045576, 16 firstId: 26308774, 17 lastId: 26320065, 18 count: 11292 19}
Latest price for all symbols.
1console.log(await client.futuresPrices())
1{ 2 BTCUSDT: '8590.05392500', 3 ETHUSDT: '154.1100', 4 ... 5}
Best price/qty on the order book for all symbols.
1console.log(await client.deliveryAllBookTickers())
1{ 2 BTCUSD_PERP: { 3 symbol: 'BTCUSD_PERP', 4 pair: 'BTCUSD', 5 bidPrice: '20120.9', 6 bidQty: '13673', 7 askPrice: '20121.0', 8 askQty: '2628', 9 time: 1663106372658 10 }, 11 ETHUSD_PERP: { 12 symbol: 'ETHUSD_PERP', 13 pair: 'ETHUSD', 14 bidPrice: '1593.63', 15 bidQty: '7210', 16 askPrice: '1593.64', 17 askQty: '27547', 18 time: 1663106372667 19 } 20 ... 21}
Mark Price and Funding Rate.
1console.log(await client.deliveryMarkPrice())
1[ 2 { 3 symbol: 'BTCUSD_221230', 4 pair: 'BTCUSD', 5 markPrice: '20158.81560758', 6 indexPrice: '20152.05327273', 7 estimatedSettlePrice: '20147.96717735', 8 lastFundingRate: '', 9 interestRate: '', 10 nextFundingTime: 0, 11 time: 1663106459005 12 }, 13 { 14 symbol: 'FILUSD_PERP', 15 pair: 'FILUSD', 16 markPrice: '5.88720470', 17 indexPrice: '5.89106242', 18 estimatedSettlePrice: '5.89377086', 19 lastFundingRate: '0.00010000', 20 interestRate: '0.00010000', 21 nextFundingTime: 1663113600000, 22 time: 1663106459005 23 } 24 ... 25]
Note that for all authenticated endpoints, you can pass an extra parameter
useServerTime
set to true
in order to fetch the server time before making
the request.
Creates a new order.
1console.log( 2 await client.order({ 3 symbol: 'XLMETH', 4 side: 'BUY', 5 quantity: '100', 6 price: '0.0002', 7 }), 8)
Param | Type | Required | Default | Description |
---|---|---|---|---|
symbol | String | true | ||
side | String | true | BUY ,SELL | |
type | String | false | LIMIT | LIMIT , MARKET |
quantity | String | true | ||
price | String | true | Optional for MARKET orders | |
timeInForce | String | false | GTC | FOK , GTC , IOC |
newClientOrderId | String | false | A unique id for the order. Automatically generated if not sent. | |
stopPrice | Number | false | Used with stop orders | |
activationPrice | Number | false | Used with TRAILING_STOP_MARKET | |
callbackRate | Number | false | Used with TRAILING_STOP_MARKET | |
newOrderRespType | String | false | RESULT | Returns more complete info of the order. ACK , RESULT , or FULL |
icebergQty | Number | false | Used with iceberg orders | |
recvWindow | Number | false |
Additional mandatory parameters based on type
:
Type | Additional mandatory parameters |
---|---|
LIMIT | timeInForce , quantity , price |
MARKET | quantity |
STOP | quantity , price , stopPrice |
STOP_LOSS_LIMIT | timeInForce , quantity , price , stopPrice |
STOP_LOSS_MARKET | stopPrice |
TAKE_PROFIT | quantity , price , stopPrice |
TAKE_PROFIT_MARKET | stopPrice |
STOP_PROFIT_LIMIT | timeInForce , quantity , price , stopPrice |
LIMIT_MAKER | quantity , price |
TRAILING_STOP_MARKET | callbackRate , activationPrice |
LIMIT_MAKER
are LIMIT
orders that will be rejected if they would immediately match and trade as a taker.STOP
and TAKE_PROFIT
will execute a MARKET
order when the stopPrice
is reached.LIMIT
or LIMIT_MAKER
type order can be made an iceberg order by sending an icebergQty
.icebergQty
MUST have timeInForce
set to GTC
.1{ 2 symbol: 'XLMETH', 3 orderId: 1740797, 4 clientOrderId: '1XZTVBTGS4K1e', 5 transactTime: 1514418413947, 6 price: '0.00020000', 7 origQty: '100.00000000', 8 executedQty: '0.00000000', 9 status: 'NEW', 10 timeInForce: 'GTC', 11 type: 'LIMIT', 12 side: 'BUY' 13}
Test new order creation and signature/recvWindow. Creates and validates a new order but does not send it into the matching engine.
Same API as above, but does not return any output on success.
Creates a new OCO order.
1console.log( 2 await client.orderOco({ 3 symbol: 'XLMETH', 4 side: 'SELL', 5 quantity: 100, 6 price: 0.0002, 7 stopPrice: 0.0001, 8 stopLimitPrice: 0.0001, 9 }), 10)
Param | Type | Required | Description |
---|---|---|---|
symbol | String | true | |
listClientOrderId | String | false | A unique Id for the entire orderList |
side | String | true | BUY ,SELL |
quantity | Number | true | |
limitClientOrderId | String | false | A unique Id for the limit order |
price | Number | true | |
limitIcebergQty | Number | false | Used to make the LIMIT_MAKER leg an iceberg order. |
stopClientOrderId | String | false | A unique Id for the stop loss/stop loss limit leg |
stopPrice | Number | true | |
stopLimitPrice | Number | false | If provided, stopLimitTimeInForce is required. |
stopIcebergQty | Number | false | Used with STOP_LOSS_LIMIT leg to make an iceberg order. |
stopLimitTimeInForce | String | false | FOK , GTC , IOC |
newOrderRespType | String | false | Returns more complete info of the order. ACK , RESULT , or FULL |
recvWindow | Number | false | The value cannot be greater than 60000 |
Additional Info:
SELL
: Limit Price > Last Price > Stop PriceBUY
: Limit Price < Last Price < Stop PriceICEBERG
quantities however do not have to be the same1{ 2 "orderListId": 0, 3 "contingencyType": "OCO", 4 "listStatusType": "EXEC_STARTED", 5 "listOrderStatus": "EXECUTING", 6 "listClientOrderId": "JYVpp3F0f5CAG15DhtrqLp", 7 "transactionTime": 1514418413947, 8 "symbol": "XLMETH", 9 "orders": [ 10 { 11 "symbol": "XLMETH", 12 "orderId": 1740797, 13 "clientOrderId": "1XZTVBTGS4K1e" 14 }, 15 { 16 "symbol": "XLMETH", 17 "orderId": 1740798, 18 "clientOrderId": "1XZTVBTGS4K1f" 19 } 20 ], 21 "orderReports": [ 22 { 23 "symbol": "XLMETH", 24 "orderId": 1740797, 25 "orderListId": 0, 26 "clientOrderId": "1XZTVBTGS4K1e", 27 "transactTime": 1514418413947, 28 "price": "0.000000", 29 "origQty": "100", 30 "executedQty": "0.000000", 31 "cummulativeQuoteQty": "0.000000", 32 "status": "NEW", 33 "timeInForce": "GTC", 34 "type": "STOP_LOSS", 35 "side": "SELL", 36 "stopPrice": "0.0001" 37 }, 38 { 39 "symbol": "XLMETH", 40 "orderId": 1740798, 41 "orderListId": 0, 42 "clientOrderId": "1XZTVBTGS4K1f", 43 "transactTime": 1514418413947, 44 "price": "0.0002", 45 "origQty": "100", 46 "executedQty": "0.000000", 47 "cummulativeQuoteQty": "0.000000", 48 "status": "NEW", 49 "timeInForce": "GTC", 50 "type": "LIMIT_MAKER", 51 "side": "SELL" 52 } 53 ] 54}
Check an order's status.
1console.log( 2 await client.getOrder({ 3 symbol: 'BNBETH', 4 orderId: 50167927, 5 }), 6)
Param | Type | Required | Description |
---|---|---|---|
symbol | String | true | |
orderId | Number | true | Not required if origClientOrderId is used |
origClientOrderId | String | false | |
recvWindow | Number | false |
1{ 2 clientOrderId: 'NkQnNkdBV1RGjUALLhAzNy', 3 cummulativeQuoteQty: '0.16961580', 4 executedQty: '3.91000000', 5 icebergQty: '0.00000000', 6 isWorking: true, 7 orderId: 50167927, 8 origQty: '3.91000000', 9 price: '0.04338000', 10 side: 'SELL', 11 status: 'FILLED', 12 stopPrice: '0.00000000', 13 symbol: 'BNBETH', 14 time: 1547075007821, 15 timeInForce: 'GTC', 16 type: 'LIMIT', 17 updateTime: 1547075016737 18} 19
Retrieves a specific OCO based on provided optional parameters
1console.log( 2 await client.getOrderOco({ 3 orderListId: 27, 4 }), 5)
Param | Type | Required | Description |
---|---|---|---|
orderListId | Number | true | Not required if listClientOrderId is used |
listClientOrderId | String | false | |
recvWindow | Number | false |
1{ 2 orderListId: 27, 3 contingencyType: 'OCO', 4 listStatusType: 'EXEC_STARTED', 5 listOrderStatus: 'EXECUTING', 6 listClientOrderId: 'h2USkA5YQpaXHPIrkd96xE', 7 transactionTime: 1565245656253, 8 symbol: 'LTCBTC', 9 orders: [ 10 { 11 symbol: 'LTCBTC', 12 orderId: 4, 13 clientOrderId: 'qD1gy3kc3Gx0rihm9Y3xwS' 14 }, 15 { 16 symbol: 'LTCBTC', 17 orderId: 5, 18 clientOrderId: 'ARzZ9I00CPM8i3NhmU9Ega' 19 } 20 ] 21}
Cancels an active order.
1console.log( 2 await client.cancelOrder({ 3 symbol: 'ETHBTC', 4 orderId: 1, 5 }), 6)
Param | Type | Required | Description |
---|---|---|---|
symbol | String | true | |
orderId | Number | true | Not required if origClientOrderId is used |
origClientOrderId | String | false | |
newClientOrderId | String | false | Used to uniquely identify this cancel. Automatically generated by default. |
recvWindow | Number | false |
1{ 2 symbol: 'ETHBTC', 3 origClientOrderId: 'bnAoRHgI18gRD80FJmsfNP', 4 orderId: 1, 5 clientOrderId: 'RViSsQPTp1v3WmLYpeKT11' 6}
Cancel an entire Order List.
1console.log( 2 await client.cancelOrderOco({ 3 symbol: 'ETHBTC', 4 orderListId: 0, 5 }), 6)
Param | Type | Required | Description |
---|---|---|---|
symbol | String | true | |
orderListId | Number | true | Not required if listClientOrderId is used |
listClientOrderId | String | false | |
newClientOrderId | String | false | Used to uniquely identify this cancel. Automatically generated by default. |
recvWindow | Number | false |
1{ 2 orderListId: 0, 3 contingencyType: 'OCO', 4 listStatusType: 'ALL_DONE', 5 listOrderStatus: 'ALL_DONE', 6 listClientOrderId: 'C3wyj4WVEktd7u9aVBRXcN', 7 transactionTime: 1574040868128, 8 symbol: 'LTCBTC', 9 orders: [ 10 { 11 symbol: 'LTCBTC', 12 orderId: 2, 13 clientOrderId: 'pO9ufTiFGg3nw2fOdgeOXa' 14 }, 15 { 16 symbol: 'LTCBTC', 17 orderId: 3, 18 clientOrderId: 'TXOvglzXuaubXAaENpaRCB' 19 } 20 ], 21 orderReports: [ 22 { 23 symbol: 'LTCBTC', 24 origClientOrderId: 'pO9ufTiFGg3nw2fOdgeOXa', 25 orderId: 2, 26 orderListId: 0, 27 clientOrderId: 'unfWT8ig8i0uj6lPuYLez6', 28 price: '1.00000000', 29 origQty: '10.00000000', 30 executedQty: '0.00000000', 31 cummulativeQuoteQty: '0.00000000', 32 status: 'CANCELED', 33 timeInForce: 'GTC', 34 type: 'STOP_LOSS_LIMIT', 35 side: 'SELL', 36 stopPrice: '1.00000000' 37 }, 38 { 39 symbol: 'LTCBTC', 40 origClientOrderId: 'TXOvglzXuaubXAaENpaRCB', 41 orderId: 3, 42 orderListId: 0, 43 clientOrderId: 'unfWT8ig8i0uj6lPuYLez6', 44 price: '3.00000000', 45 origQty: '10.00000000', 46 executedQty: '0.00000000', 47 cummulativeQuoteQty: '0.00000000', 48 status: 'CANCELED', 49 timeInForce: 'GTC', 50 type: 'LIMIT_MAKER', 51 side: 'SELL' 52 } 53 ] 54}
Cancels all active orders on a symbol. This includes OCO orders.
1console.log( 2 await client.cancelOpenOrders({ 3 symbol: 'ETHBTC' 4 }), 5)
Param | Type | Required |
---|---|---|
symbol | String | true |
1[ 2 { 3 symbol: 'ETHBTC', 4 origClientOrderId: 'bnAoRHgI18gRD80FJmsfNP', 5 orderId: 1, 6 clientOrderId: 'RViSsQPTp1v3WmLYpeKT11' 7 }, 8 { 9 symbol: 'ETHBTC', 10 origClientOrderId: 'IDbzcGmfwSCKihxILK1snu', 11 orderId: 2, 12 clientOrderId: 'HKFcuWAm9euMgRuwVGR8CL' 13 } 14]
Get all open orders on a symbol.
1console.log( 2 await client.openOrders({ 3 symbol: 'XLMBTC', 4 }), 5)
Param | Type | Required |
---|---|---|
symbol | String | true |
recvWindow | Number | false |
1;[ 2 { 3 symbol: 'XLMBTC', 4 orderId: 11271740, 5 clientOrderId: 'ekHkROfW98gBN80LTfufQZ', 6 price: '0.00001081', 7 origQty: '1331.00000000', 8 executedQty: '0.00000000', 9 status: 'NEW', 10 timeInForce: 'GTC', 11 type: 'LIMIT', 12 side: 'BUY', 13 stopPrice: '0.00000000', 14 icebergQty: '0.00000000', 15 time: 1522682290485, 16 isWorking: true, 17 }, 18]
Get all account orders on a symbol; active, canceled, or filled.
1console.log( 2 await client.allOrders({ 3 symbol: 'ETHBTC', 4 }), 5)
Param | Type | Required | Default | Description |
---|---|---|---|---|
symbol | String | true | ||
orderId | Number | false | If set, it will get orders >= that orderId. Otherwise most recent orders are returned. | |
limit | Number | false | 500 | Max 500 |
recvWindow | Number | false |
1;[ 2 { 3 symbol: 'ENGETH', 4 orderId: 191938, 5 clientOrderId: '1XZTVBTGS4K1e', 6 price: '0.00138000', 7 origQty: '1.00000000', 8 executedQty: '1.00000000', 9 status: 'FILLED', 10 timeInForce: 'GTC', 11 type: 'LIMIT', 12 side: 'SELL', 13 stopPrice: '0.00000000', 14 icebergQty: '0.00000000', 15 time: 1508611114735, 16 isWorking: true, 17 }, 18]
Retrieves all OCO based on provided optional parameters
1console.log( 2 await client.allOrdersOCO({ 3 timestamp: 1565245913483, 4 }), 5)
Param | Type | Required | Default | Description |
---|---|---|---|---|
timestamp | Number | true | ||
startTime | Number | false | ||
endTime | Number | false | ||
limit | Integer | false | 500 | Max 1000 |
recvWindow | Number | false | The value cannot be greater than 60000 | |
formId | Number | false | If supplied, neither startTime or endTime can be provided |
1;[ 2 { 3 "orderListId": 29, 4 "contingencyType": "OCO", 5 "listStatusType": "EXEC_STARTED", 6 "listOrderStatus": "EXECUTING", 7 "listClientOrderId": "amEEAXryFzFwYF1FeRpUoZ", 8 "transactionTime": 1565245913483, 9 "symbol": "LTCBTC", 10 "orders": [ 11 { 12 "symbol": "LTCBTC", 13 "orderId": 4, 14 "clientOrderId": "oD7aesZqjEGlZrbtRpy5zB" 15 }, 16 { 17 "symbol": "LTCBTC", 18 "orderId": 5, 19 "clientOrderId": "Jr1h6xirOxgeJOUuYQS7V3" 20 } 21 ] 22 }, 23 { 24 "orderListId": 28, 25 "contingencyType": "OCO", 26 "listStatusType": "EXEC_STARTED", 27 "listOrderStatus": "EXECUTING", 28 "listClientOrderId": "hG7hFNxJV6cZy3Ze4AUT4d", 29 "transactionTime": 1565245913407, 30 "symbol": "LTCBTC", 31 "orders": [ 32 { 33 "symbol": "LTCBTC", 34 "orderId": 2, 35 "clientOrderId": "j6lFOfbmFMRjTYA7rRJ0LP" 36 }, 37 { 38 "symbol": "LTCBTC", 39 "orderId": 3, 40 "clientOrderId": "z0KCjOdditiLS5ekAFtK81" 41 } 42 ] 43 } 44]
Get current account information.
1console.log(await client.accountInfo())
Param | Type | Required |
---|---|---|
recvWindow | Number | false |
1{ 2 makerCommission: 10, 3 takerCommission: 10, 4 buyerCommission: 0, 5 sellerCommission: 0, 6 canTrade: true, 7 canWithdraw: true, 8 canDeposit: true, 9 balances: [ 10 { asset: 'BTC', free: '0.00000000', locked: '0.00000000' }, 11 { asset: 'LTC', free: '0.00000000', locked: '0.00000000' }, 12 ] 13}
Get trades for the current authenticated account and symbol.
1console.log( 2 await client.myTrades({ 3 symbol: 'ETHBTC', 4 }), 5)
Param | Type | Required | Default | Description |
---|---|---|---|---|
symbol | String | true | ||
limit | Number | false | 500 | Max 1000 |
fromId | Number | false | TradeId to fetch from. Default gets most recent trades. | |
orderId | Number | false | This can only be used in combination with symbol. | |
startTime | Number | false | ||
endTime | Number | false | ||
recvWindow | Number | false | 5000 | The value cannot be greater than 60000 . |
1;[ 2 { 3 id: 9960, 4 orderId: 191939, 5 price: '0.00138000', 6 qty: '10.00000000', 7 commission: '0.00001380', 8 commissionAsset: 'ETH', 9 time: 1508611114735, 10 isBuyer: false, 11 isMaker: false, 12 isBestMatch: true, 13 }, 14]
Get asset snapshot for the current authenticated account.
1console.log( 2 await client.accountSnapshot({ 3 "type": "SPOT" 4 }); 5)
Param | Type | Required | Default | Description |
---|---|---|---|---|
type | String | true | ||
startTime | Number | false | ||
endTime | Number | false | ||
limit | Number | false | 5 | min 5 , max 30 , default 5 |
recvWindow | Number | false |
1{ 2 "code":200, // 200 for success; others are error codes 3 "msg":"", // error message 4 "snapshotVos":[ 5 { 6 "data":{ 7 "balances":[ 8 { 9 "asset":"BTC", 10 "free":"0.09905021", 11 "locked":"0.00000000" 12 }, 13 { 14 "asset":"USDT", 15 "free":"1.89109409", 16 "locked":"0.00000000" 17 } 18 ], 19 "totalAssetOfBtc":"0.09942700" 20 }, 21 "type":"spot", 22 "updateTime":1576281599000 23 } 24 ] 25}
Lookup symbol trades history.
1console.log(await client.tradesHistory({ symbol: 'ETHBTC' }))
Param | Type | Required | Default | Description |
---|---|---|---|---|
symbol | String | true | ||
limit | Number | false | 500 | Max 500 |
fromId | Number | false | null | TradeId to fetch from. Default gets most recent trades. |
1;[ 2 { 3 id: 28457, 4 price: '4.00000100', 5 qty: '12.00000000', 6 time: 1499865549590, 7 isBuyerMaker: true, 8 isBestMatch: true, 9 }, 10]
Get the account withdraw history.
1console.log(await client.withdrawHistory())
Param | Type | Required | Description |
---|---|---|---|
asset | String | false | |
status | Number | false | 0 (0: Email Sent, 1: Cancelled 2: Awaiting Approval, 3: Rejected, 4: Processing, 5: Failure, 6: Completed) |
offset | Number | false | |
limit | Number | false | |
startTime | Number | false | |
endTime | Number | false | |
recvWindow | Number | false |
1[ 2 { 3 "address": "0x94df8b352de7f46f64b01d3666bf6e936e44ce60", 4 "amount": "8.91000000", 5 "applyTime": "2019-10-12 11:12:02", 6 "coin": "USDT", 7 "id": "b6ae22b3aa844210a7041aee7589627c", 8 "withdrawOrderId": "WITHDRAWtest123", // will not be returned if there's no withdrawOrderId for this withdraw. 9 "network": "ETH", 10 "transferType": 0, // 1 for internal transfer, 0 for external transfer 11 "status": 6, 12 "txId": "0xb5ef8c13b968a406cc62a93a8bd80f9e9a906ef1b3fcf20a2e48573c17659268" 13 }, 14 { 15 "address": "1FZdVHtiBqMrWdjPyRPULCUceZPJ2WLCsB", 16 "amount": "0.00150000", 17 "applyTime": "2019-09-24 12:43:45", 18 "coin": "BTC", 19 "id": "156ec387f49b41df8724fa744fa82719", 20 "network": "BTC", 21 "status": 6, 22 "txId": "60fd9007ebfddc753455f95fafa808c4302c836e4d1eebc5a132c36c1d8ac354" 23 } 24]
Triggers the withdraw process (untested for now).
1console.log( 2 await client.withdraw({ 3 asset: 'ETH', 4 address: '0xfa97c22a03d8522988c709c24283c0918a59c795', 5 amount: 100, 6 }), 7)
Param | Type | Required | Description |
---|---|---|---|
asset | String | true | |
address | String | true | |
amount | Number | true | |
name | String | false | Description of the address |
recvWindow | Number | false |
1{ 2 "id":"7213fea8e94b4a5593d507237e5a555b" 3}
Fetch deposit address with network.
1console.log(await client.depositAddress({ coin: 'NEO' }))
Param | Type | Required | Description |
---|---|---|---|
coin | String | true | The coin name |
network | String | false | The network name |
1{ 2 address: 'AM6ytPW78KYxQCmU2pHYGcee7GypZ7Yhhc', 3 coin: 'NEO', 4 tag: '', 5 url: 'https://neoscan.io/address/AM6ytPW78KYxQCmU2pHYGcee7GypZ7Yhhc' 6}
Fetch deposit address with network.
1console.log(await client.depositHistory())
Param | Type | Required | Description |
---|---|---|---|
coin | String | false | The coin name |
status | Number | false | 0 (0:pending, 6: credited but cannot withdraw, 1:success) |
startTime | Number | false | Default: 90 days from current timestamp |
endTime | Number | false | Default: present timestamp |
offset | Number | false | default: 0 |
limit | Number | false | |
recvWindow | Number | false |
1[ 2 { 3 "amount": "0.00999800", 4 "coin": "PAXG", 5 "network": "ETH", 6 "status": 1, 7 "address": "0x788cabe9236ce061e5a892e1a59395a81fc8d62c", 8 "addressTag": "", 9 "txId": "0xaad4654a3234aa6118af9b4b335f5ae81c360b2394721c019b5d1e75328b09f3", 10 "insertTime": 1599621997000, 11 "transferType": 0, 12 "confirmTimes": "12/12" 13 }, 14 { 15 "amount": "0.50000000", 16 "coin": "IOTA", 17 "network": "IOTA", 18 "status": 1, 19 "address": "SIZ9VLMHWATXKV99LH99CIGFJFUMLEHGWVZVNNZXRJJVWBPHYWPPBOSDORZ9EQSHCZAMPVAPGFYQAUUV9DROOXJLNW", 20 "addressTag": "", 21 "txId": "ESBFVQUTPIWQNJSPXFNHNYHSQNTGKRVKPRABQWTAXCDWOAKDKYWPTVG9BGXNVNKTLEJGESAVXIKIZ9999", 22 "insertTime": 1599620082000, 23 "transferType": 0, 24 "confirmTimes": "1/1" 25 } 26]
Retrieve the account trade Fee per asset.
1console.log(await client.tradeFee())
1[ 2 { 3 "symbol": "ADABNB", 4 "makerCommission": 0.9000, 5 "takerCommission": 1.0000 6 }, 7 { 8 "symbol": "BNBBTC", 9 "makerCommission": 0.3000, 10 "takerCommission": 0.3000 11 } 12] 13
Get information of coins (available for deposit and withdraw) for user.
1console.log(await client.capitalConfigs())
1[ 2 { 3 'coin': 'CTR', 4 'depositAllEnable': false, 5 'free': '0.00000000', 6 'freeze': '0.00000000', 7 'ipoable': '0.00000000', 8 'ipoing': '0.00000000', 9 'isLegalMoney': false, 10 'locked': '0.00000000', 11 'name': 'Centra', 12 'networkList': [ 13 { 14 'addressRegex': '^(0x)[0-9A-Fa-f]{40}$', 15 'coin': 'CTR', 16 'depositDesc': 'Delisted, Deposit Suspended', 17 'depositEnable': false, 18 'isDefault': true, 19 'memoRegex': '', 20 'minConfirm': 12, 21 'name': 'ERC20', 22 'network': 'ETH', 23 'resetAddressStatus': false, 24 'specialTips': '', 25 'unLockConfirm': 0, 26 'withdrawDesc': '', 27 'withdrawEnable': true, 28 'withdrawFee': '35.00000000', 29 'withdrawIntegerMultiple': '0.00000001', 30 'withdrawMax': '0.00000000', 31 'withdrawMin': '70.00000000' 32 } 33 ], 34 'storage': '0.00000000', 35 'trading': false, 36 'withdrawAllEnable': true, 37 'withdrawing': '0.00000000' 38 } 39]
You need to enable Permits Universal Transfer option for the api key which requests this endpoint.
1console.log(await client.universalTransfer({ type: 'MAIN_C2C', asset: 'USDT', amount: '1000' }))
Param | Type | Required | Description |
---|---|---|---|
type | String | true | |
asset | String | true | |
amount | String | true | |
recvWindow | Number | false |
1{ 2 tranId:13526853623 3}
1console.log(await client.universalTransferHistory({ type: 'MAIN_C2C' }))
Param | Type | Required | Description |
---|---|---|---|
type | String | true | |
startTime | Number | false | |
endTime | Number | false | |
current | Number | false | Default 1 |
size | Number | false | Default 10, Max 100 |
recvWindow | Number | false |
1{ 2 "total": 2, 3 "rows": [ 4 { 5 "asset":"USDT", 6 "amount":"1", 7 "type":"MAIN_C2C" 8 "status": "CONFIRMED", 9 "tranId": 11415955596, 10 "timestamp":1544433328000 11 }, 12 { 13 "asset":"USDT", 14 "amount":"2", 15 "type":"MAIN_C2C", 16 "status": "CONFIRMED", 17 "tranId": 11366865406, 18 "timestamp":1544433328000 19 } 20 ] 21}
1console.log(await client.assetDetail())
Param | Type | Required | Description |
---|---|---|---|
recvWindow | Number | false |
1{ 2 "CTR": { 3 "minWithdrawAmount": "70.00000000", //min withdraw amount 4 "depositStatus": false,//deposit status (false if ALL of networks' are false) 5 "withdrawFee": 35, // withdraw fee 6 "withdrawStatus": true, //withdraw status (false if ALL of networks' are false) 7 "depositTip": "Delisted, Deposit Suspended" //reason 8 }, 9 "SKY": { 10 "minWithdrawAmount": "0.02000000", 11 "depositStatus": true, 12 "withdrawFee": 0.01, 13 "withdrawStatus": true 14 } 15}
1console.log(await client.getBnbBurn())
Param | Type | Required | Description |
---|---|---|---|
recvWindow | Number | false | No more than 60000 |
1{ 2 "spotBNBBurn":true, 3 "interestBNBBurn": false 4}
1console.log(await client.setBnbBurn({ spotBNBBurn: "true" }))
Param | Type | Required | Description |
---|---|---|---|
spotBNBBurn | String | false | "true" or "false"; Determines whether to use BNB to pay for trading fees on SPOT |
interestBNBBurn | String | false | "true" or "false"; Determines whether to use BNB to pay for margin loan's interest |
recvWindow | Number | false | No more than 60000 |
1{ 2 "spotBNBBurn":true, 3 "interestBNBBurn": false 4}
1console.log(await client.dustLog())
Param | Type | Required | Description |
---|---|---|---|
startTime | Number | false | |
endTime | Number | false | |
recvWindow | Number | false |
1{ 2 "total": 8, //Total counts of exchange 3 "userAssetDribblets": [ 4 { 5 "operateTime": 1615985535000, 6 "totalTransferedAmount": "0.00132256", 7 "totalServiceChargeAmount": "0.00002699", 8 "transId": 45178372831, 9 "userAssetDribbletDetails": [ 10 { 11 "transId": 4359321, 12 "serviceChargeAmount": "0.000009", 13 "amount": "0.0009", 14 "operateTime": 1615985535000, 15 "transferedAmount": "0.000441", 16 "fromAsset": "USDT" 17 }, 18 { 19 "transId": 4359321, 20 "serviceChargeAmount": "0.00001799", 21 "amount": "0.0009", 22 "operateTime": 1615985535000, 23 "transferedAmount": "0.00088156", 24 "fromAsset": "ETH" 25 } 26 ] 27 }, 28 { 29 "operateTime":1616203180000, 30 "totalTransferedAmount": "0.00058795", 31 "totalServiceChargeAmount": "0.000012", 32 "transId": 4357015, 33 "userAssetDribbletDetails": [ 34 { 35 "transId": 4357015, 36 "serviceChargeAmount": "0.00001", 37 "amount": "0.001", 38 "operateTime": 1616203180000, 39 "transferedAmount": "0.00049", 40 "fromAsset": "USDT" 41 }, 42 { 43 "transId": 4357015, 44 "serviceChargeAmount": "0.000002", 45 "amount": "0.0001", 46 "operateTime": 1616203180000, 47 "transferedAmount": "0.00009795", 48 "fromAsset": "ETH" 49 } 50 ] 51 } 52 ] 53 } 54}
1console.log(await client.dustTransfer({ asset: ['ETH', 'LTC', 'TRX'] }))
Param | Type | Required | Description |
---|---|---|---|
asset | [String] | true | |
recvWindow | Number | false |
1{ 2 "totalServiceCharge":"0.02102542", 3 "totalTransfered":"1.05127099", 4 "transferResult":[ 5 { 6 "amount":"0.03000000", 7 "fromAsset":"ETH", 8 "operateTime":1563368549307, 9 "serviceChargeAmount":"0.00500000", 10 "tranId":2970932918, 11 "transferedAmount":"0.25000000" 12 }, 13 { 14 "amount":"0.09000000", 15 "fromAsset":"LTC", 16 "operateTime":1563368549404, 17 "service
No vulnerabilities found.
node-binance-api
Binance API for node https://github.com/ccxt/node-binance-api
binance
Professional Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & end-to-end tests.
@liesauer/node-binance-api
Binance API for node https://github.com/jaggedsoft/node-binance-api
open-binance-api
Binance API Client