- Testnet
- What is the testnet good for?
- How to get Testnet Fund
- HTTP API
- /api/v1/time
- /api/v1/node-info
- /api/v1/validators
- /api/v1/peers
- /api/v1/account/ GET Summary: Get an account. Description: Gets account metadata for an address. Destination: Witness node. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address path The account address to query Yes string Responses Code Description Schema 200 Success Account 400 Bad Request Error 404 Not Found Error default Generic error response Error /api/v1/account/ /sequence GET Summary: Get an account sequence. Description: Gets an account sequence for an address. Destination: Validator node. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address path The account address to query Yes string Responses Code Description Schema 200 Success AccountSequence 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/tx/ GET Summary: Get a transaction. Description: Gets transaction metadata by transaction ID. By default, transactions are returned in a raw format. You may add ?format=json to the end of the path to obtain a more readable response. Destination: Seed node. Rate Limit: 10 requests per IP per second. Example: Below is an example response of a send transaction when ?format=json is used. Parameters Name Located in Description Required Schema hash path The transaction hash to query Yes string format query Response format ( json or amino) No string Responses Code Description Schema 0 Success Transaction 404 Not Found 500 Bad Request Error default Generic error response Error /api/v1/tokens GET Summary: Get tokens list. Description: Gets a list of tokens that have been issued. Destination: Witness node. Rate Limit: 1 request per IP per second. Parameters Name Located in Description Required Schema limit query default 100. No integer offset query start with 0; default 0. No integer Responses Code Description Schema 200 Success [ Token ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/markets GET Summary: Get market pairs. Description: Gets the list of market pairs that have been listed. Destination: Witness node. Rate Limit: 1 request per IP per second. Parameters Name Located in Description Required Schema limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer Responses Code Description Schema 200 Success [ Market ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/fees GET Summary: Obtain trading fees information. Description: Gets the current trading fees settings. Destination: Witness node. Rate Limit: 1 request per IP per second. Responses Code Description Schema 200 Success [ Fee ] default Generic error response Error /api/v1/depth GET Summary: Get the order book. Description: Gets the order book depth data for a given pair symbol. The given limit must be one of the allowed limits below. Destination: Validator node. Rate Limit: 10 requests per IP per second. Parameters Name Located in Description Required Schema symbol query Market pair symbol, e.g. NNB-0AD_BNB Yes string limit query The limit of results. Allowed limits: [5, 10, 20, 50, 100, 500, 1000] No integer Responses Code Description Schema 200 Success MarketDepth 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/broadcast POST Summary: Broadcast a transaction. Description: Broadcasts a signed transaction. A single transaction must be sent hex-encoded with a content-type of text/plain . Destination: Witness node. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema sync query Synchronous broadcast (wait for DeliverTx)? No boolean body body Yes binary Responses Code Description Schema 200 Success [ Transaction ] 400 Bad Request Error 401 Bad Signature Error 404 Not Found default Generic error response Error /api/v1/klines GET Summary: Get candlestick bars. Description: Gets candlestick/kline bars for a symbol. Bars are uniquely identified by their open time. If the time window is larger than limits, only the first n klines will return. In this case, please either shrink the window or increase the limit to get proper amount of klines. Rate Limit: 10 requests per IP per second. Example Parameters Name Located in Description Required Schema symbol query symbol Yes string interval query interval. Allowed value: [1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] Yes enum string limit query default 300; max 1000. No integer startTime query start time in Milliseconds No long endTime query end time in Milliseconds No long Responses Code Description Schema 200 OK [ Candlestick ] /api/v1/orders/closed GET Summary: Get closed orders. Description: Gets closed (filled and cancelled) orders for a given address. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string end query end time in Milliseconds No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long status query order status list. Allowed value: [Ack, IocExpire, IocNoFill, FullyFill, Canceled, Expired, FailedBlocking, FailedMatching] No enum string symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList /api/v1/orders/open GET Summary: Get open orders. Description: Gets open orders for a given address. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/orders/ GET Summary: Get an order. Description: Gets metadata for an individual order by its ID. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema id path order id Yes string Responses Code Description Schema 200 OK Order 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/ticker/24hr GET Summary: Get a market ticker. Description: Gets 24 hour price change statistics for a market pair symbol. Updated every second. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema symbol query symbol No string Responses Code Description Schema 200 OK [ TickerStatistics ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/trades GET Summary: Get market trades. Description: Gets a list of historical trades. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the buyer/seller address No string buyerOrderId query buyer order id No string end query end time in Milliseconds No long height query block height No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer quoteAsset query quote asset No string sellerOrderId query seller order id No string side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK TradePage 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/block-exchange-fee GET Summary: Trading fee of the address grouped by block Description: Get historical trading fees of the address, including fees of trade/canceled order/expired order. Transfer and other transaction fees are not included. Order by block height DESC. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the seller/buyer address No string end query end time No long limit query default 50; max 1000. No integer offset query start with 0; default 0. No integer start query start time in Milliseconds No long total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK BlockExchangeFeePage /api/v1/transactions GET Summary: Get transactions. Description: Gets a list of transactions. Multisend transaction is not available in this API. Currently ‘confirmBlocks’ and ‘txAge’ are not supported. Query Window: Default query window is latest 24 hours; The maximum start — end query window is 3 months. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema address query address Yes string blockHeight query blockHeight No long endTime query endTime in Milliseconds No long limit query limit No integer offset query offset No integer side query transaction side. Allowed value: [ RECEIVE, SEND] No enum string startTime query start time in Milliseconds No long txAsset query txAsset No string txType query transaction type. Allowed value: [ NEW_ORDER,ISSUE_TOKEN,BURN_TOKEN,LIST_TOKEN,CANCEL_ORDER,FREEZE_TOKEN,UN_FREEZE_TOKEN,TRANSFER,PROPOSAL,VOTE,MINT,DEPOSIT,CREATE_VALIDATOR,REMOVE_VALIDATOR,TIME_LOCK,TIME_UNLOCK,TIME_RELOCK,SET_ACCOUNT_FLAG,HTL_TRANSFER,CLAIM_HTL,DEPOSIT_HTL,REFUND_HTL] No enum string Responses Code Description Schema 200 OK TxPage 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/transactions-in-block/ GET Summary: Get transactions in the specific block. Description: Get transactions in the block. Multi-send and multi-coin transactions are flattened as transactions. This API is deprecated. Rate Limit: 5 requests per IP per second. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema blockHeight path block height Yes string Responses Code Description Schema 200 OK BlockTx 400 Bad Request. The block to query is higher than current highest block. Error 404 Not Found default Generic error response Error /api/v2/transactions-in-block/ GET Summary: transactions in Block Description: Get transactions in the block. Multi-send and multi-coin transactions are included as sub-transactions. Rate Limit: 5 request per IP per second. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema blockHeight path blockHeight Yes long Responses Code Description Schema 200 OK BlockTxV2 400 Bad Request. The block to query is higher than current highest block. Error /api/v1/atomic-swaps GET Summary: AtomicSwap Description: Get atomic swaps by address. Rate Limit: 5 request per IP per second. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema endTime query end time of blockTimestamp No long fromAddress query At least one of toAddress and fromAddress should be provided as parameter No string limit query default 25; max 1000. No integer offset query start with 0; default 0. No integer startTime query start time of blockTimestamp in Milliseconds; The maximum start — end query window is 3 months; Default query window is the latest 30 days. No long toAddress query At least one of toAddress and fromAddress should be provided as parameter No string Responses Code Description Schema 200 OK AtomicSwapPage /api/v1/atomic-swaps/ GET Summary: AtomicSwap Description: Get an AtomicSwap by swap id Rate Limit: 5 request per IP per second. Rate Limit: 60 request per IP per minute. Parameters Name Located in Description Required Schema id path swap id Yes string Responses Code Description Schema 200 OK AtomicSwap /api/v1/timelocks/ GET Summary: Gets time lock records given an address Parameters Name Located in Description Required Schema address path The account address to query Yes string id query the record id of timelock to query No long Responses Code Description Schema 200 Success TimeLocks 400 Bad Request Error 500 internal server error Error /api/v1/timelock/?(id=) GET Summary: Get timelock records of an address. Description: Get the timelock history of an address. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema address path The account address to query Yes string id query the record id of timelock to query No long Responses Code Description Schema 200 Success TimeLocks 400 Bad Request Error 404 Not Found 500 internal server error Error /api/v1/mini/tokens GET Summary: Gets a list of available mini tokens. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success MiniTokens 400 Bad Request Error 500 internal server error Error /api/v1/mini/markets GET Summary: Gets a list of mini market pairs. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success Markets 400 Bad Request Error /api/v1/mini/klines GET Summary: Get mini-token candlestick bars. Description: Gets candlestick/kline bars for a mini-token symbol pair. Bars are uniquely identified by their open time. If the time window is larger than limits, only the first n klines will return. In this case, please either shrink the window or increase the limit to get proper amount of klines. Rate Limit: 10 requests per IP per second. Example Parameters Name Located in Description Required Schema symbol query symbol Yes string interval query interval. Allowed value: [1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] Yes enum string limit query default 300; max 1000. No integer startTime query start time in Milliseconds No long endTime query end time in Milliseconds No long Responses Code Description Schema 200 OK [ Candlestick ] /api/v1/mini/orders/closed GET Summary: Get closed orders of mini-token pairs. Description: Gets closed (filled and cancelled) orders for a given address. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string end query end time in Milliseconds No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long status query order status list. Allowed value: [Ack, IocExpire, IocNoFill, FullyFill, Canceled, Expired, FailedBlocking, FailedMatching] No enum string symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList /api/v1/mini/orders/open GET Summary: Get open orders of mini-token pairs. Description: Gets open orders for a given address. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/orders/ GET Summary: Get an order of mini-token pairs. Description: Gets metadata for an individual order by its ID. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema id path order id Yes string Responses Code Description Schema 200 OK Order 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/ticker/24hr GET Summary: Get a market ticker of mini-token pairs. Description: Gets 24 hour price change statistics for a market pair symbol. Updated every second. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema symbol query symbol No string Responses Code Description Schema 200 OK [ TickerStatistics ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/trades GET Summary: Get market trades of mini-token pairs. Description: Gets a list of historical trades. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the buyer/seller address No string buyerOrderId query buyer order id No string end query end time in Milliseconds No long height query block height No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer quoteAsset query quote asset No string sellerOrderId query seller order id No string side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK TradePage 400 Bad Request Error 404 Not Found default Generic error response Error Models Error Name Type Description Example code long error code 400 message string error message Times Name Type Description Example ap_time string event time e.g. 2019-01-21T10:30:00Z block_time string the time of latest block e.g. 2019-01-21T10:30:00Z Validators Name Type Description Example block_height long Current block height 12345 validators [ Validator ] Validator Name Type Description Example address string (hex address) Address pub_key [ integer ] Public key bytes voting_power integer validator’s voting power accum integer validator’s accumulated voting power Name Type Description Example id string Authenticated identifier 8c379d4d3b9995c712665dc9a9414dbde5b30483 original_listen_addr string (RemoteAddr) Original listen address before PeersService changed it listen_addr string (RemoteAddr) Listen address access_addr string (RemoteAddr) Access address (HTTP) stream_addr string (RemoteAddr) Stream address (WS) network string Chain ID Binance-Chain-Ganges version string Version 0.30.1 moniker string Moniker (Name) data-seed-1 capabilities [ string ] Array of capability tags: node, qs, ap, ws node,ap accelerated boolean Is an accelerated path to a validator node Transaction Name Type Description Example hash string (hex) Hash of transaction, it returned as bytes before, and now it returns as hex string log string Log of transaction data string Data of transaction height string Height of transaction code integer Result code of transaction ok boolean tx object Detail of transaction, like transaction type, messages and signature For example, below is the detail of a send transaction. Most of the fields are fixed, but the detail of msg varies with msg type, if you query with —format=json. Источник
- /api/v1/account/ /sequence
- /api/v1/tx/ GET Summary: Get a transaction. Description: Gets transaction metadata by transaction ID. By default, transactions are returned in a raw format. You may add ?format=json to the end of the path to obtain a more readable response. Destination: Seed node. Rate Limit: 10 requests per IP per second. Example: Below is an example response of a send transaction when ?format=json is used. Parameters Name Located in Description Required Schema hash path The transaction hash to query Yes string format query Response format ( json or amino) No string Responses Code Description Schema 0 Success Transaction 404 Not Found 500 Bad Request Error default Generic error response Error /api/v1/tokens GET Summary: Get tokens list. Description: Gets a list of tokens that have been issued. Destination: Witness node. Rate Limit: 1 request per IP per second. Parameters Name Located in Description Required Schema limit query default 100. No integer offset query start with 0; default 0. No integer Responses Code Description Schema 200 Success [ Token ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/markets GET Summary: Get market pairs. Description: Gets the list of market pairs that have been listed. Destination: Witness node. Rate Limit: 1 request per IP per second. Parameters Name Located in Description Required Schema limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer Responses Code Description Schema 200 Success [ Market ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/fees GET Summary: Obtain trading fees information. Description: Gets the current trading fees settings. Destination: Witness node. Rate Limit: 1 request per IP per second. Responses Code Description Schema 200 Success [ Fee ] default Generic error response Error /api/v1/depth GET Summary: Get the order book. Description: Gets the order book depth data for a given pair symbol. The given limit must be one of the allowed limits below. Destination: Validator node. Rate Limit: 10 requests per IP per second. Parameters Name Located in Description Required Schema symbol query Market pair symbol, e.g. NNB-0AD_BNB Yes string limit query The limit of results. Allowed limits: [5, 10, 20, 50, 100, 500, 1000] No integer Responses Code Description Schema 200 Success MarketDepth 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/broadcast POST Summary: Broadcast a transaction. Description: Broadcasts a signed transaction. A single transaction must be sent hex-encoded with a content-type of text/plain . Destination: Witness node. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema sync query Synchronous broadcast (wait for DeliverTx)? No boolean body body Yes binary Responses Code Description Schema 200 Success [ Transaction ] 400 Bad Request Error 401 Bad Signature Error 404 Not Found default Generic error response Error /api/v1/klines GET Summary: Get candlestick bars. Description: Gets candlestick/kline bars for a symbol. Bars are uniquely identified by their open time. If the time window is larger than limits, only the first n klines will return. In this case, please either shrink the window or increase the limit to get proper amount of klines. Rate Limit: 10 requests per IP per second. Example Parameters Name Located in Description Required Schema symbol query symbol Yes string interval query interval. Allowed value: [1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] Yes enum string limit query default 300; max 1000. No integer startTime query start time in Milliseconds No long endTime query end time in Milliseconds No long Responses Code Description Schema 200 OK [ Candlestick ] /api/v1/orders/closed GET Summary: Get closed orders. Description: Gets closed (filled and cancelled) orders for a given address. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string end query end time in Milliseconds No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long status query order status list. Allowed value: [Ack, IocExpire, IocNoFill, FullyFill, Canceled, Expired, FailedBlocking, FailedMatching] No enum string symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList /api/v1/orders/open GET Summary: Get open orders. Description: Gets open orders for a given address. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/orders/ GET Summary: Get an order. Description: Gets metadata for an individual order by its ID. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema id path order id Yes string Responses Code Description Schema 200 OK Order 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/ticker/24hr GET Summary: Get a market ticker. Description: Gets 24 hour price change statistics for a market pair symbol. Updated every second. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema symbol query symbol No string Responses Code Description Schema 200 OK [ TickerStatistics ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/trades GET Summary: Get market trades. Description: Gets a list of historical trades. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the buyer/seller address No string buyerOrderId query buyer order id No string end query end time in Milliseconds No long height query block height No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer quoteAsset query quote asset No string sellerOrderId query seller order id No string side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK TradePage 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/block-exchange-fee GET Summary: Trading fee of the address grouped by block Description: Get historical trading fees of the address, including fees of trade/canceled order/expired order. Transfer and other transaction fees are not included. Order by block height DESC. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the seller/buyer address No string end query end time No long limit query default 50; max 1000. No integer offset query start with 0; default 0. No integer start query start time in Milliseconds No long total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK BlockExchangeFeePage /api/v1/transactions GET Summary: Get transactions. Description: Gets a list of transactions. Multisend transaction is not available in this API. Currently ‘confirmBlocks’ and ‘txAge’ are not supported. Query Window: Default query window is latest 24 hours; The maximum start — end query window is 3 months. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema address query address Yes string blockHeight query blockHeight No long endTime query endTime in Milliseconds No long limit query limit No integer offset query offset No integer side query transaction side. Allowed value: [ RECEIVE, SEND] No enum string startTime query start time in Milliseconds No long txAsset query txAsset No string txType query transaction type. Allowed value: [ NEW_ORDER,ISSUE_TOKEN,BURN_TOKEN,LIST_TOKEN,CANCEL_ORDER,FREEZE_TOKEN,UN_FREEZE_TOKEN,TRANSFER,PROPOSAL,VOTE,MINT,DEPOSIT,CREATE_VALIDATOR,REMOVE_VALIDATOR,TIME_LOCK,TIME_UNLOCK,TIME_RELOCK,SET_ACCOUNT_FLAG,HTL_TRANSFER,CLAIM_HTL,DEPOSIT_HTL,REFUND_HTL] No enum string Responses Code Description Schema 200 OK TxPage 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/transactions-in-block/ GET Summary: Get transactions in the specific block. Description: Get transactions in the block. Multi-send and multi-coin transactions are flattened as transactions. This API is deprecated. Rate Limit: 5 requests per IP per second. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema blockHeight path block height Yes string Responses Code Description Schema 200 OK BlockTx 400 Bad Request. The block to query is higher than current highest block. Error 404 Not Found default Generic error response Error /api/v2/transactions-in-block/ GET Summary: transactions in Block Description: Get transactions in the block. Multi-send and multi-coin transactions are included as sub-transactions. Rate Limit: 5 request per IP per second. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema blockHeight path blockHeight Yes long Responses Code Description Schema 200 OK BlockTxV2 400 Bad Request. The block to query is higher than current highest block. Error /api/v1/atomic-swaps GET Summary: AtomicSwap Description: Get atomic swaps by address. Rate Limit: 5 request per IP per second. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema endTime query end time of blockTimestamp No long fromAddress query At least one of toAddress and fromAddress should be provided as parameter No string limit query default 25; max 1000. No integer offset query start with 0; default 0. No integer startTime query start time of blockTimestamp in Milliseconds; The maximum start — end query window is 3 months; Default query window is the latest 30 days. No long toAddress query At least one of toAddress and fromAddress should be provided as parameter No string Responses Code Description Schema 200 OK AtomicSwapPage /api/v1/atomic-swaps/ GET Summary: AtomicSwap Description: Get an AtomicSwap by swap id Rate Limit: 5 request per IP per second. Rate Limit: 60 request per IP per minute. Parameters Name Located in Description Required Schema id path swap id Yes string Responses Code Description Schema 200 OK AtomicSwap /api/v1/timelocks/ GET Summary: Gets time lock records given an address Parameters Name Located in Description Required Schema address path The account address to query Yes string id query the record id of timelock to query No long Responses Code Description Schema 200 Success TimeLocks 400 Bad Request Error 500 internal server error Error /api/v1/timelock/?(id=) GET Summary: Get timelock records of an address. Description: Get the timelock history of an address. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema address path The account address to query Yes string id query the record id of timelock to query No long Responses Code Description Schema 200 Success TimeLocks 400 Bad Request Error 404 Not Found 500 internal server error Error /api/v1/mini/tokens GET Summary: Gets a list of available mini tokens. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success MiniTokens 400 Bad Request Error 500 internal server error Error /api/v1/mini/markets GET Summary: Gets a list of mini market pairs. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success Markets 400 Bad Request Error /api/v1/mini/klines GET Summary: Get mini-token candlestick bars. Description: Gets candlestick/kline bars for a mini-token symbol pair. Bars are uniquely identified by their open time. If the time window is larger than limits, only the first n klines will return. In this case, please either shrink the window or increase the limit to get proper amount of klines. Rate Limit: 10 requests per IP per second. Example Parameters Name Located in Description Required Schema symbol query symbol Yes string interval query interval. Allowed value: [1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] Yes enum string limit query default 300; max 1000. No integer startTime query start time in Milliseconds No long endTime query end time in Milliseconds No long Responses Code Description Schema 200 OK [ Candlestick ] /api/v1/mini/orders/closed GET Summary: Get closed orders of mini-token pairs. Description: Gets closed (filled and cancelled) orders for a given address. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string end query end time in Milliseconds No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long status query order status list. Allowed value: [Ack, IocExpire, IocNoFill, FullyFill, Canceled, Expired, FailedBlocking, FailedMatching] No enum string symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList /api/v1/mini/orders/open GET Summary: Get open orders of mini-token pairs. Description: Gets open orders for a given address. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/orders/ GET Summary: Get an order of mini-token pairs. Description: Gets metadata for an individual order by its ID. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema id path order id Yes string Responses Code Description Schema 200 OK Order 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/ticker/24hr GET Summary: Get a market ticker of mini-token pairs. Description: Gets 24 hour price change statistics for a market pair symbol. Updated every second. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema symbol query symbol No string Responses Code Description Schema 200 OK [ TickerStatistics ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/trades GET Summary: Get market trades of mini-token pairs. Description: Gets a list of historical trades. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the buyer/seller address No string buyerOrderId query buyer order id No string end query end time in Milliseconds No long height query block height No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer quoteAsset query quote asset No string sellerOrderId query seller order id No string side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK TradePage 400 Bad Request Error 404 Not Found default Generic error response Error Models Error Name Type Description Example code long error code 400 message string error message Times Name Type Description Example ap_time string event time e.g. 2019-01-21T10:30:00Z block_time string the time of latest block e.g. 2019-01-21T10:30:00Z Validators Name Type Description Example block_height long Current block height 12345 validators [ Validator ] Validator Name Type Description Example address string (hex address) Address pub_key [ integer ] Public key bytes voting_power integer validator’s voting power accum integer validator’s accumulated voting power Name Type Description Example id string Authenticated identifier 8c379d4d3b9995c712665dc9a9414dbde5b30483 original_listen_addr string (RemoteAddr) Original listen address before PeersService changed it listen_addr string (RemoteAddr) Listen address access_addr string (RemoteAddr) Access address (HTTP) stream_addr string (RemoteAddr) Stream address (WS) network string Chain ID Binance-Chain-Ganges version string Version 0.30.1 moniker string Moniker (Name) data-seed-1 capabilities [ string ] Array of capability tags: node, qs, ap, ws node,ap accelerated boolean Is an accelerated path to a validator node Transaction Name Type Description Example hash string (hex) Hash of transaction, it returned as bytes before, and now it returns as hex string log string Log of transaction data string Data of transaction height string Height of transaction code integer Result code of transaction ok boolean tx object Detail of transaction, like transaction type, messages and signature For example, below is the detail of a send transaction. Most of the fields are fixed, but the detail of msg varies with msg type, if you query with —format=json. Источник
- /api/v1/tokens
- /api/v1/markets
- /api/v1/fees
- /api/v1/depth
- /api/v1/broadcast
- /api/v1/klines
- /api/v1/orders/closed
- /api/v1/orders/open
- /api/v1/orders/ GET Summary: Get an order. Description: Gets metadata for an individual order by its ID. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema id path order id Yes string Responses Code Description Schema 200 OK Order 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/ticker/24hr GET Summary: Get a market ticker. Description: Gets 24 hour price change statistics for a market pair symbol. Updated every second. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema symbol query symbol No string Responses Code Description Schema 200 OK [ TickerStatistics ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/trades GET Summary: Get market trades. Description: Gets a list of historical trades. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the buyer/seller address No string buyerOrderId query buyer order id No string end query end time in Milliseconds No long height query block height No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer quoteAsset query quote asset No string sellerOrderId query seller order id No string side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK TradePage 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/block-exchange-fee GET Summary: Trading fee of the address grouped by block Description: Get historical trading fees of the address, including fees of trade/canceled order/expired order. Transfer and other transaction fees are not included. Order by block height DESC. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the seller/buyer address No string end query end time No long limit query default 50; max 1000. No integer offset query start with 0; default 0. No integer start query start time in Milliseconds No long total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK BlockExchangeFeePage /api/v1/transactions GET Summary: Get transactions. Description: Gets a list of transactions. Multisend transaction is not available in this API. Currently ‘confirmBlocks’ and ‘txAge’ are not supported. Query Window: Default query window is latest 24 hours; The maximum start — end query window is 3 months. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema address query address Yes string blockHeight query blockHeight No long endTime query endTime in Milliseconds No long limit query limit No integer offset query offset No integer side query transaction side. Allowed value: [ RECEIVE, SEND] No enum string startTime query start time in Milliseconds No long txAsset query txAsset No string txType query transaction type. Allowed value: [ NEW_ORDER,ISSUE_TOKEN,BURN_TOKEN,LIST_TOKEN,CANCEL_ORDER,FREEZE_TOKEN,UN_FREEZE_TOKEN,TRANSFER,PROPOSAL,VOTE,MINT,DEPOSIT,CREATE_VALIDATOR,REMOVE_VALIDATOR,TIME_LOCK,TIME_UNLOCK,TIME_RELOCK,SET_ACCOUNT_FLAG,HTL_TRANSFER,CLAIM_HTL,DEPOSIT_HTL,REFUND_HTL] No enum string Responses Code Description Schema 200 OK TxPage 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/transactions-in-block/ GET Summary: Get transactions in the specific block. Description: Get transactions in the block. Multi-send and multi-coin transactions are flattened as transactions. This API is deprecated. Rate Limit: 5 requests per IP per second. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema blockHeight path block height Yes string Responses Code Description Schema 200 OK BlockTx 400 Bad Request. The block to query is higher than current highest block. Error 404 Not Found default Generic error response Error /api/v2/transactions-in-block/ GET Summary: transactions in Block Description: Get transactions in the block. Multi-send and multi-coin transactions are included as sub-transactions. Rate Limit: 5 request per IP per second. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema blockHeight path blockHeight Yes long Responses Code Description Schema 200 OK BlockTxV2 400 Bad Request. The block to query is higher than current highest block. Error /api/v1/atomic-swaps GET Summary: AtomicSwap Description: Get atomic swaps by address. Rate Limit: 5 request per IP per second. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema endTime query end time of blockTimestamp No long fromAddress query At least one of toAddress and fromAddress should be provided as parameter No string limit query default 25; max 1000. No integer offset query start with 0; default 0. No integer startTime query start time of blockTimestamp in Milliseconds; The maximum start — end query window is 3 months; Default query window is the latest 30 days. No long toAddress query At least one of toAddress and fromAddress should be provided as parameter No string Responses Code Description Schema 200 OK AtomicSwapPage /api/v1/atomic-swaps/ GET Summary: AtomicSwap Description: Get an AtomicSwap by swap id Rate Limit: 5 request per IP per second. Rate Limit: 60 request per IP per minute. Parameters Name Located in Description Required Schema id path swap id Yes string Responses Code Description Schema 200 OK AtomicSwap /api/v1/timelocks/ GET Summary: Gets time lock records given an address Parameters Name Located in Description Required Schema address path The account address to query Yes string id query the record id of timelock to query No long Responses Code Description Schema 200 Success TimeLocks 400 Bad Request Error 500 internal server error Error /api/v1/timelock/?(id=) GET Summary: Get timelock records of an address. Description: Get the timelock history of an address. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema address path The account address to query Yes string id query the record id of timelock to query No long Responses Code Description Schema 200 Success TimeLocks 400 Bad Request Error 404 Not Found 500 internal server error Error /api/v1/mini/tokens GET Summary: Gets a list of available mini tokens. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success MiniTokens 400 Bad Request Error 500 internal server error Error /api/v1/mini/markets GET Summary: Gets a list of mini market pairs. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success Markets 400 Bad Request Error /api/v1/mini/klines GET Summary: Get mini-token candlestick bars. Description: Gets candlestick/kline bars for a mini-token symbol pair. Bars are uniquely identified by their open time. If the time window is larger than limits, only the first n klines will return. In this case, please either shrink the window or increase the limit to get proper amount of klines. Rate Limit: 10 requests per IP per second. Example Parameters Name Located in Description Required Schema symbol query symbol Yes string interval query interval. Allowed value: [1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] Yes enum string limit query default 300; max 1000. No integer startTime query start time in Milliseconds No long endTime query end time in Milliseconds No long Responses Code Description Schema 200 OK [ Candlestick ] /api/v1/mini/orders/closed GET Summary: Get closed orders of mini-token pairs. Description: Gets closed (filled and cancelled) orders for a given address. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string end query end time in Milliseconds No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long status query order status list. Allowed value: [Ack, IocExpire, IocNoFill, FullyFill, Canceled, Expired, FailedBlocking, FailedMatching] No enum string symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList /api/v1/mini/orders/open GET Summary: Get open orders of mini-token pairs. Description: Gets open orders for a given address. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/orders/ GET Summary: Get an order of mini-token pairs. Description: Gets metadata for an individual order by its ID. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema id path order id Yes string Responses Code Description Schema 200 OK Order 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/ticker/24hr GET Summary: Get a market ticker of mini-token pairs. Description: Gets 24 hour price change statistics for a market pair symbol. Updated every second. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema symbol query symbol No string Responses Code Description Schema 200 OK [ TickerStatistics ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/trades GET Summary: Get market trades of mini-token pairs. Description: Gets a list of historical trades. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the buyer/seller address No string buyerOrderId query buyer order id No string end query end time in Milliseconds No long height query block height No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer quoteAsset query quote asset No string sellerOrderId query seller order id No string side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK TradePage 400 Bad Request Error 404 Not Found default Generic error response Error Models Error Name Type Description Example code long error code 400 message string error message Times Name Type Description Example ap_time string event time e.g. 2019-01-21T10:30:00Z block_time string the time of latest block e.g. 2019-01-21T10:30:00Z Validators Name Type Description Example block_height long Current block height 12345 validators [ Validator ] Validator Name Type Description Example address string (hex address) Address pub_key [ integer ] Public key bytes voting_power integer validator’s voting power accum integer validator’s accumulated voting power Name Type Description Example id string Authenticated identifier 8c379d4d3b9995c712665dc9a9414dbde5b30483 original_listen_addr string (RemoteAddr) Original listen address before PeersService changed it listen_addr string (RemoteAddr) Listen address access_addr string (RemoteAddr) Access address (HTTP) stream_addr string (RemoteAddr) Stream address (WS) network string Chain ID Binance-Chain-Ganges version string Version 0.30.1 moniker string Moniker (Name) data-seed-1 capabilities [ string ] Array of capability tags: node, qs, ap, ws node,ap accelerated boolean Is an accelerated path to a validator node Transaction Name Type Description Example hash string (hex) Hash of transaction, it returned as bytes before, and now it returns as hex string log string Log of transaction data string Data of transaction height string Height of transaction code integer Result code of transaction ok boolean tx object Detail of transaction, like transaction type, messages and signature For example, below is the detail of a send transaction. Most of the fields are fixed, but the detail of msg varies with msg type, if you query with —format=json. Источник
- /api/v1/ticker/24hr
- /api/v1/trades
- /api/v1/block-exchange-fee
- /api/v1/transactions
- /api/v1/transactions-in-block/ GET Summary: Get transactions in the specific block. Description: Get transactions in the block. Multi-send and multi-coin transactions are flattened as transactions. This API is deprecated. Rate Limit: 5 requests per IP per second. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema blockHeight path block height Yes string Responses Code Description Schema 200 OK BlockTx 400 Bad Request. The block to query is higher than current highest block. Error 404 Not Found default Generic error response Error /api/v2/transactions-in-block/ GET Summary: transactions in Block Description: Get transactions in the block. Multi-send and multi-coin transactions are included as sub-transactions. Rate Limit: 5 request per IP per second. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema blockHeight path blockHeight Yes long Responses Code Description Schema 200 OK BlockTxV2 400 Bad Request. The block to query is higher than current highest block. Error /api/v1/atomic-swaps GET Summary: AtomicSwap Description: Get atomic swaps by address. Rate Limit: 5 request per IP per second. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema endTime query end time of blockTimestamp No long fromAddress query At least one of toAddress and fromAddress should be provided as parameter No string limit query default 25; max 1000. No integer offset query start with 0; default 0. No integer startTime query start time of blockTimestamp in Milliseconds; The maximum start — end query window is 3 months; Default query window is the latest 30 days. No long toAddress query At least one of toAddress and fromAddress should be provided as parameter No string Responses Code Description Schema 200 OK AtomicSwapPage /api/v1/atomic-swaps/ GET Summary: AtomicSwap Description: Get an AtomicSwap by swap id Rate Limit: 5 request per IP per second. Rate Limit: 60 request per IP per minute. Parameters Name Located in Description Required Schema id path swap id Yes string Responses Code Description Schema 200 OK AtomicSwap /api/v1/timelocks/ GET Summary: Gets time lock records given an address Parameters Name Located in Description Required Schema address path The account address to query Yes string id query the record id of timelock to query No long Responses Code Description Schema 200 Success TimeLocks 400 Bad Request Error 500 internal server error Error /api/v1/timelock/?(id=) GET Summary: Get timelock records of an address. Description: Get the timelock history of an address. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema address path The account address to query Yes string id query the record id of timelock to query No long Responses Code Description Schema 200 Success TimeLocks 400 Bad Request Error 404 Not Found 500 internal server error Error /api/v1/mini/tokens GET Summary: Gets a list of available mini tokens. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success MiniTokens 400 Bad Request Error 500 internal server error Error /api/v1/mini/markets GET Summary: Gets a list of mini market pairs. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success Markets 400 Bad Request Error /api/v1/mini/klines GET Summary: Get mini-token candlestick bars. Description: Gets candlestick/kline bars for a mini-token symbol pair. Bars are uniquely identified by their open time. If the time window is larger than limits, only the first n klines will return. In this case, please either shrink the window or increase the limit to get proper amount of klines. Rate Limit: 10 requests per IP per second. Example Parameters Name Located in Description Required Schema symbol query symbol Yes string interval query interval. Allowed value: [1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] Yes enum string limit query default 300; max 1000. No integer startTime query start time in Milliseconds No long endTime query end time in Milliseconds No long Responses Code Description Schema 200 OK [ Candlestick ] /api/v1/mini/orders/closed GET Summary: Get closed orders of mini-token pairs. Description: Gets closed (filled and cancelled) orders for a given address. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string end query end time in Milliseconds No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long status query order status list. Allowed value: [Ack, IocExpire, IocNoFill, FullyFill, Canceled, Expired, FailedBlocking, FailedMatching] No enum string symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList /api/v1/mini/orders/open GET Summary: Get open orders of mini-token pairs. Description: Gets open orders for a given address. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/orders/ GET Summary: Get an order of mini-token pairs. Description: Gets metadata for an individual order by its ID. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema id path order id Yes string Responses Code Description Schema 200 OK Order 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/ticker/24hr GET Summary: Get a market ticker of mini-token pairs. Description: Gets 24 hour price change statistics for a market pair symbol. Updated every second. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema symbol query symbol No string Responses Code Description Schema 200 OK [ TickerStatistics ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/trades GET Summary: Get market trades of mini-token pairs. Description: Gets a list of historical trades. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the buyer/seller address No string buyerOrderId query buyer order id No string end query end time in Milliseconds No long height query block height No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer quoteAsset query quote asset No string sellerOrderId query seller order id No string side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK TradePage 400 Bad Request Error 404 Not Found default Generic error response Error Models Error Name Type Description Example code long error code 400 message string error message Times Name Type Description Example ap_time string event time e.g. 2019-01-21T10:30:00Z block_time string the time of latest block e.g. 2019-01-21T10:30:00Z Validators Name Type Description Example block_height long Current block height 12345 validators [ Validator ] Validator Name Type Description Example address string (hex address) Address pub_key [ integer ] Public key bytes voting_power integer validator’s voting power accum integer validator’s accumulated voting power Name Type Description Example id string Authenticated identifier 8c379d4d3b9995c712665dc9a9414dbde5b30483 original_listen_addr string (RemoteAddr) Original listen address before PeersService changed it listen_addr string (RemoteAddr) Listen address access_addr string (RemoteAddr) Access address (HTTP) stream_addr string (RemoteAddr) Stream address (WS) network string Chain ID Binance-Chain-Ganges version string Version 0.30.1 moniker string Moniker (Name) data-seed-1 capabilities [ string ] Array of capability tags: node, qs, ap, ws node,ap accelerated boolean Is an accelerated path to a validator node Transaction Name Type Description Example hash string (hex) Hash of transaction, it returned as bytes before, and now it returns as hex string log string Log of transaction data string Data of transaction height string Height of transaction code integer Result code of transaction ok boolean tx object Detail of transaction, like transaction type, messages and signature For example, below is the detail of a send transaction. Most of the fields are fixed, but the detail of msg varies with msg type, if you query with —format=json. Источник
- /api/v2/transactions-in-block/ GET Summary: transactions in Block Description: Get transactions in the block. Multi-send and multi-coin transactions are included as sub-transactions. Rate Limit: 5 request per IP per second. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema blockHeight path blockHeight Yes long Responses Code Description Schema 200 OK BlockTxV2 400 Bad Request. The block to query is higher than current highest block. Error /api/v1/atomic-swaps GET Summary: AtomicSwap Description: Get atomic swaps by address. Rate Limit: 5 request per IP per second. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema endTime query end time of blockTimestamp No long fromAddress query At least one of toAddress and fromAddress should be provided as parameter No string limit query default 25; max 1000. No integer offset query start with 0; default 0. No integer startTime query start time of blockTimestamp in Milliseconds; The maximum start — end query window is 3 months; Default query window is the latest 30 days. No long toAddress query At least one of toAddress and fromAddress should be provided as parameter No string Responses Code Description Schema 200 OK AtomicSwapPage /api/v1/atomic-swaps/ GET Summary: AtomicSwap Description: Get an AtomicSwap by swap id Rate Limit: 5 request per IP per second. Rate Limit: 60 request per IP per minute. Parameters Name Located in Description Required Schema id path swap id Yes string Responses Code Description Schema 200 OK AtomicSwap /api/v1/timelocks/ GET Summary: Gets time lock records given an address Parameters Name Located in Description Required Schema address path The account address to query Yes string id query the record id of timelock to query No long Responses Code Description Schema 200 Success TimeLocks 400 Bad Request Error 500 internal server error Error /api/v1/timelock/?(id=) GET Summary: Get timelock records of an address. Description: Get the timelock history of an address. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema address path The account address to query Yes string id query the record id of timelock to query No long Responses Code Description Schema 200 Success TimeLocks 400 Bad Request Error 404 Not Found 500 internal server error Error /api/v1/mini/tokens GET Summary: Gets a list of available mini tokens. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success MiniTokens 400 Bad Request Error 500 internal server error Error /api/v1/mini/markets GET Summary: Gets a list of mini market pairs. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success Markets 400 Bad Request Error /api/v1/mini/klines GET Summary: Get mini-token candlestick bars. Description: Gets candlestick/kline bars for a mini-token symbol pair. Bars are uniquely identified by their open time. If the time window is larger than limits, only the first n klines will return. In this case, please either shrink the window or increase the limit to get proper amount of klines. Rate Limit: 10 requests per IP per second. Example Parameters Name Located in Description Required Schema symbol query symbol Yes string interval query interval. Allowed value: [1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] Yes enum string limit query default 300; max 1000. No integer startTime query start time in Milliseconds No long endTime query end time in Milliseconds No long Responses Code Description Schema 200 OK [ Candlestick ] /api/v1/mini/orders/closed GET Summary: Get closed orders of mini-token pairs. Description: Gets closed (filled and cancelled) orders for a given address. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string end query end time in Milliseconds No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long status query order status list. Allowed value: [Ack, IocExpire, IocNoFill, FullyFill, Canceled, Expired, FailedBlocking, FailedMatching] No enum string symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList /api/v1/mini/orders/open GET Summary: Get open orders of mini-token pairs. Description: Gets open orders for a given address. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/orders/ GET Summary: Get an order of mini-token pairs. Description: Gets metadata for an individual order by its ID. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema id path order id Yes string Responses Code Description Schema 200 OK Order 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/ticker/24hr GET Summary: Get a market ticker of mini-token pairs. Description: Gets 24 hour price change statistics for a market pair symbol. Updated every second. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema symbol query symbol No string Responses Code Description Schema 200 OK [ TickerStatistics ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/trades GET Summary: Get market trades of mini-token pairs. Description: Gets a list of historical trades. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the buyer/seller address No string buyerOrderId query buyer order id No string end query end time in Milliseconds No long height query block height No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer quoteAsset query quote asset No string sellerOrderId query seller order id No string side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK TradePage 400 Bad Request Error 404 Not Found default Generic error response Error Models Error Name Type Description Example code long error code 400 message string error message Times Name Type Description Example ap_time string event time e.g. 2019-01-21T10:30:00Z block_time string the time of latest block e.g. 2019-01-21T10:30:00Z Validators Name Type Description Example block_height long Current block height 12345 validators [ Validator ] Validator Name Type Description Example address string (hex address) Address pub_key [ integer ] Public key bytes voting_power integer validator’s voting power accum integer validator’s accumulated voting power Name Type Description Example id string Authenticated identifier 8c379d4d3b9995c712665dc9a9414dbde5b30483 original_listen_addr string (RemoteAddr) Original listen address before PeersService changed it listen_addr string (RemoteAddr) Listen address access_addr string (RemoteAddr) Access address (HTTP) stream_addr string (RemoteAddr) Stream address (WS) network string Chain ID Binance-Chain-Ganges version string Version 0.30.1 moniker string Moniker (Name) data-seed-1 capabilities [ string ] Array of capability tags: node, qs, ap, ws node,ap accelerated boolean Is an accelerated path to a validator node Transaction Name Type Description Example hash string (hex) Hash of transaction, it returned as bytes before, and now it returns as hex string log string Log of transaction data string Data of transaction height string Height of transaction code integer Result code of transaction ok boolean tx object Detail of transaction, like transaction type, messages and signature For example, below is the detail of a send transaction. Most of the fields are fixed, but the detail of msg varies with msg type, if you query with —format=json. Источник
- /api/v1/atomic-swaps
- /api/v1/atomic-swaps/ GET Summary: AtomicSwap Description: Get an AtomicSwap by swap id Rate Limit: 5 request per IP per second. Rate Limit: 60 request per IP per minute. Parameters Name Located in Description Required Schema id path swap id Yes string Responses Code Description Schema 200 OK AtomicSwap /api/v1/timelocks/ GET Summary: Gets time lock records given an address Parameters Name Located in Description Required Schema address path The account address to query Yes string id query the record id of timelock to query No long Responses Code Description Schema 200 Success TimeLocks 400 Bad Request Error 500 internal server error Error /api/v1/timelock/?(id=) GET Summary: Get timelock records of an address. Description: Get the timelock history of an address. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema address path The account address to query Yes string id query the record id of timelock to query No long Responses Code Description Schema 200 Success TimeLocks 400 Bad Request Error 404 Not Found 500 internal server error Error /api/v1/mini/tokens GET Summary: Gets a list of available mini tokens. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success MiniTokens 400 Bad Request Error 500 internal server error Error /api/v1/mini/markets GET Summary: Gets a list of mini market pairs. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success Markets 400 Bad Request Error /api/v1/mini/klines GET Summary: Get mini-token candlestick bars. Description: Gets candlestick/kline bars for a mini-token symbol pair. Bars are uniquely identified by their open time. If the time window is larger than limits, only the first n klines will return. In this case, please either shrink the window or increase the limit to get proper amount of klines. Rate Limit: 10 requests per IP per second. Example Parameters Name Located in Description Required Schema symbol query symbol Yes string interval query interval. Allowed value: [1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] Yes enum string limit query default 300; max 1000. No integer startTime query start time in Milliseconds No long endTime query end time in Milliseconds No long Responses Code Description Schema 200 OK [ Candlestick ] /api/v1/mini/orders/closed GET Summary: Get closed orders of mini-token pairs. Description: Gets closed (filled and cancelled) orders for a given address. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string end query end time in Milliseconds No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long status query order status list. Allowed value: [Ack, IocExpire, IocNoFill, FullyFill, Canceled, Expired, FailedBlocking, FailedMatching] No enum string symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList /api/v1/mini/orders/open GET Summary: Get open orders of mini-token pairs. Description: Gets open orders for a given address. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/orders/ GET Summary: Get an order of mini-token pairs. Description: Gets metadata for an individual order by its ID. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema id path order id Yes string Responses Code Description Schema 200 OK Order 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/ticker/24hr GET Summary: Get a market ticker of mini-token pairs. Description: Gets 24 hour price change statistics for a market pair symbol. Updated every second. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema symbol query symbol No string Responses Code Description Schema 200 OK [ TickerStatistics ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/trades GET Summary: Get market trades of mini-token pairs. Description: Gets a list of historical trades. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the buyer/seller address No string buyerOrderId query buyer order id No string end query end time in Milliseconds No long height query block height No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer quoteAsset query quote asset No string sellerOrderId query seller order id No string side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK TradePage 400 Bad Request Error 404 Not Found default Generic error response Error Models Error Name Type Description Example code long error code 400 message string error message Times Name Type Description Example ap_time string event time e.g. 2019-01-21T10:30:00Z block_time string the time of latest block e.g. 2019-01-21T10:30:00Z Validators Name Type Description Example block_height long Current block height 12345 validators [ Validator ] Validator Name Type Description Example address string (hex address) Address pub_key [ integer ] Public key bytes voting_power integer validator’s voting power accum integer validator’s accumulated voting power Name Type Description Example id string Authenticated identifier 8c379d4d3b9995c712665dc9a9414dbde5b30483 original_listen_addr string (RemoteAddr) Original listen address before PeersService changed it listen_addr string (RemoteAddr) Listen address access_addr string (RemoteAddr) Access address (HTTP) stream_addr string (RemoteAddr) Stream address (WS) network string Chain ID Binance-Chain-Ganges version string Version 0.30.1 moniker string Moniker (Name) data-seed-1 capabilities [ string ] Array of capability tags: node, qs, ap, ws node,ap accelerated boolean Is an accelerated path to a validator node Transaction Name Type Description Example hash string (hex) Hash of transaction, it returned as bytes before, and now it returns as hex string log string Log of transaction data string Data of transaction height string Height of transaction code integer Result code of transaction ok boolean tx object Detail of transaction, like transaction type, messages and signature For example, below is the detail of a send transaction. Most of the fields are fixed, but the detail of msg varies with msg type, if you query with —format=json. Источник
- /api/v1/timelocks/ GET Summary: Gets time lock records given an address Parameters Name Located in Description Required Schema address path The account address to query Yes string id query the record id of timelock to query No long Responses Code Description Schema 200 Success TimeLocks 400 Bad Request Error 500 internal server error Error /api/v1/timelock/?(id=) GET Summary: Get timelock records of an address. Description: Get the timelock history of an address. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema address path The account address to query Yes string id query the record id of timelock to query No long Responses Code Description Schema 200 Success TimeLocks 400 Bad Request Error 404 Not Found 500 internal server error Error /api/v1/mini/tokens GET Summary: Gets a list of available mini tokens. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success MiniTokens 400 Bad Request Error 500 internal server error Error /api/v1/mini/markets GET Summary: Gets a list of mini market pairs. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success Markets 400 Bad Request Error /api/v1/mini/klines GET Summary: Get mini-token candlestick bars. Description: Gets candlestick/kline bars for a mini-token symbol pair. Bars are uniquely identified by their open time. If the time window is larger than limits, only the first n klines will return. In this case, please either shrink the window or increase the limit to get proper amount of klines. Rate Limit: 10 requests per IP per second. Example Parameters Name Located in Description Required Schema symbol query symbol Yes string interval query interval. Allowed value: [1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] Yes enum string limit query default 300; max 1000. No integer startTime query start time in Milliseconds No long endTime query end time in Milliseconds No long Responses Code Description Schema 200 OK [ Candlestick ] /api/v1/mini/orders/closed GET Summary: Get closed orders of mini-token pairs. Description: Gets closed (filled and cancelled) orders for a given address. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string end query end time in Milliseconds No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long status query order status list. Allowed value: [Ack, IocExpire, IocNoFill, FullyFill, Canceled, Expired, FailedBlocking, FailedMatching] No enum string symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList /api/v1/mini/orders/open GET Summary: Get open orders of mini-token pairs. Description: Gets open orders for a given address. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/orders/ GET Summary: Get an order of mini-token pairs. Description: Gets metadata for an individual order by its ID. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema id path order id Yes string Responses Code Description Schema 200 OK Order 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/ticker/24hr GET Summary: Get a market ticker of mini-token pairs. Description: Gets 24 hour price change statistics for a market pair symbol. Updated every second. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema symbol query symbol No string Responses Code Description Schema 200 OK [ TickerStatistics ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/trades GET Summary: Get market trades of mini-token pairs. Description: Gets a list of historical trades. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the buyer/seller address No string buyerOrderId query buyer order id No string end query end time in Milliseconds No long height query block height No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer quoteAsset query quote asset No string sellerOrderId query seller order id No string side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK TradePage 400 Bad Request Error 404 Not Found default Generic error response Error Models Error Name Type Description Example code long error code 400 message string error message Times Name Type Description Example ap_time string event time e.g. 2019-01-21T10:30:00Z block_time string the time of latest block e.g. 2019-01-21T10:30:00Z Validators Name Type Description Example block_height long Current block height 12345 validators [ Validator ] Validator Name Type Description Example address string (hex address) Address pub_key [ integer ] Public key bytes voting_power integer validator’s voting power accum integer validator’s accumulated voting power Name Type Description Example id string Authenticated identifier 8c379d4d3b9995c712665dc9a9414dbde5b30483 original_listen_addr string (RemoteAddr) Original listen address before PeersService changed it listen_addr string (RemoteAddr) Listen address access_addr string (RemoteAddr) Access address (HTTP) stream_addr string (RemoteAddr) Stream address (WS) network string Chain ID Binance-Chain-Ganges version string Version 0.30.1 moniker string Moniker (Name) data-seed-1 capabilities [ string ] Array of capability tags: node, qs, ap, ws node,ap accelerated boolean Is an accelerated path to a validator node Transaction Name Type Description Example hash string (hex) Hash of transaction, it returned as bytes before, and now it returns as hex string log string Log of transaction data string Data of transaction height string Height of transaction code integer Result code of transaction ok boolean tx object Detail of transaction, like transaction type, messages and signature For example, below is the detail of a send transaction. Most of the fields are fixed, but the detail of msg varies with msg type, if you query with —format=json. Источник
- /api/v1/timelock/?(id=) GET Summary: Get timelock records of an address. Description: Get the timelock history of an address. Rate Limit: 60 requests per IP per minute. Parameters Name Located in Description Required Schema address path The account address to query Yes string id query the record id of timelock to query No long Responses Code Description Schema 200 Success TimeLocks 400 Bad Request Error 404 Not Found 500 internal server error Error /api/v1/mini/tokens GET Summary: Gets a list of available mini tokens. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success MiniTokens 400 Bad Request Error 500 internal server error Error /api/v1/mini/markets GET Summary: Gets a list of mini market pairs. Parameters Name Located in Description Required Schema offset query offset No integer limit query limit No integer Responses Code Description Schema 200 Success Markets 400 Bad Request Error /api/v1/mini/klines GET Summary: Get mini-token candlestick bars. Description: Gets candlestick/kline bars for a mini-token symbol pair. Bars are uniquely identified by their open time. If the time window is larger than limits, only the first n klines will return. In this case, please either shrink the window or increase the limit to get proper amount of klines. Rate Limit: 10 requests per IP per second. Example Parameters Name Located in Description Required Schema symbol query symbol Yes string interval query interval. Allowed value: [1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] Yes enum string limit query default 300; max 1000. No integer startTime query start time in Milliseconds No long endTime query end time in Milliseconds No long Responses Code Description Schema 200 OK [ Candlestick ] /api/v1/mini/orders/closed GET Summary: Get closed orders of mini-token pairs. Description: Gets closed (filled and cancelled) orders for a given address. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string end query end time in Milliseconds No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long status query order status list. Allowed value: [Ack, IocExpire, IocNoFill, FullyFill, Canceled, Expired, FailedBlocking, FailedMatching] No enum string symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList /api/v1/mini/orders/open GET Summary: Get open orders of mini-token pairs. Description: Gets open orders for a given address. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the owner address Yes string limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK OrderList 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/orders/ GET Summary: Get an order of mini-token pairs. Description: Gets metadata for an individual order by its ID. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema id path order id Yes string Responses Code Description Schema 200 OK Order 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/ticker/24hr GET Summary: Get a market ticker of mini-token pairs. Description: Gets 24 hour price change statistics for a market pair symbol. Updated every second. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema symbol query symbol No string Responses Code Description Schema 200 OK [ TickerStatistics ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/trades GET Summary: Get market trades of mini-token pairs. Description: Gets a list of historical trades. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the buyer/seller address No string buyerOrderId query buyer order id No string end query end time in Milliseconds No long height query block height No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer quoteAsset query quote asset No string sellerOrderId query seller order id No string side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK TradePage 400 Bad Request Error 404 Not Found default Generic error response Error Models Error Name Type Description Example code long error code 400 message string error message Times Name Type Description Example ap_time string event time e.g. 2019-01-21T10:30:00Z block_time string the time of latest block e.g. 2019-01-21T10:30:00Z Validators Name Type Description Example block_height long Current block height 12345 validators [ Validator ] Validator Name Type Description Example address string (hex address) Address pub_key [ integer ] Public key bytes voting_power integer validator’s voting power accum integer validator’s accumulated voting power Name Type Description Example id string Authenticated identifier 8c379d4d3b9995c712665dc9a9414dbde5b30483 original_listen_addr string (RemoteAddr) Original listen address before PeersService changed it listen_addr string (RemoteAddr) Listen address access_addr string (RemoteAddr) Access address (HTTP) stream_addr string (RemoteAddr) Stream address (WS) network string Chain ID Binance-Chain-Ganges version string Version 0.30.1 moniker string Moniker (Name) data-seed-1 capabilities [ string ] Array of capability tags: node, qs, ap, ws node,ap accelerated boolean Is an accelerated path to a validator node Transaction Name Type Description Example hash string (hex) Hash of transaction, it returned as bytes before, and now it returns as hex string log string Log of transaction data string Data of transaction height string Height of transaction code integer Result code of transaction ok boolean tx object Detail of transaction, like transaction type, messages and signature For example, below is the detail of a send transaction. Most of the fields are fixed, but the detail of msg varies with msg type, if you query with —format=json. Источник
- /api/v1/mini/tokens
- /api/v1/mini/markets
- /api/v1/mini/klines
- /api/v1/mini/orders/closed
- /api/v1/mini/orders/open
- /api/v1/mini/orders/ GET Summary: Get an order of mini-token pairs. Description: Gets metadata for an individual order by its ID. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema id path order id Yes string Responses Code Description Schema 200 OK Order 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/ticker/24hr GET Summary: Get a market ticker of mini-token pairs. Description: Gets 24 hour price change statistics for a market pair symbol. Updated every second. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema symbol query symbol No string Responses Code Description Schema 200 OK [ TickerStatistics ] 400 Bad Request Error 404 Not Found default Generic error response Error /api/v1/mini/trades GET Summary: Get market trades of mini-token pairs. Description: Gets a list of historical trades. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second. Parameters Name Located in Description Required Schema address query the buyer/seller address No string buyerOrderId query buyer order id No string end query end time in Milliseconds No long height query block height No long limit query default 500; max 1000. No integer offset query start with 0; default 0. No integer quoteAsset query quote asset No string sellerOrderId query seller order id No string side query order side. 1 for buy and 2 for sell. No integer start query start time in Milliseconds No long symbol query symbol No string total query total number required, 0 for not required and 1 for required; default not required, return total=-1 in response No integer Responses Code Description Schema 200 OK TradePage 400 Bad Request Error 404 Not Found default Generic error response Error Models Error Name Type Description Example code long error code 400 message string error message Times Name Type Description Example ap_time string event time e.g. 2019-01-21T10:30:00Z block_time string the time of latest block e.g. 2019-01-21T10:30:00Z Validators Name Type Description Example block_height long Current block height 12345 validators [ Validator ] Validator Name Type Description Example address string (hex address) Address pub_key [ integer ] Public key bytes voting_power integer validator’s voting power accum integer validator’s accumulated voting power Name Type Description Example id string Authenticated identifier 8c379d4d3b9995c712665dc9a9414dbde5b30483 original_listen_addr string (RemoteAddr) Original listen address before PeersService changed it listen_addr string (RemoteAddr) Listen address access_addr string (RemoteAddr) Access address (HTTP) stream_addr string (RemoteAddr) Stream address (WS) network string Chain ID Binance-Chain-Ganges version string Version 0.30.1 moniker string Moniker (Name) data-seed-1 capabilities [ string ] Array of capability tags: node, qs, ap, ws node,ap accelerated boolean Is an accelerated path to a validator node Transaction Name Type Description Example hash string (hex) Hash of transaction, it returned as bytes before, and now it returns as hex string log string Log of transaction data string Data of transaction height string Height of transaction code integer Result code of transaction ok boolean tx object Detail of transaction, like transaction type, messages and signature For example, below is the detail of a send transaction. Most of the fields are fixed, but the detail of msg varies with msg type, if you query with —format=json. Источник
- /api/v1/mini/ticker/24hr
- /api/v1/mini/trades
- Models
- Error
- Times
- Validators
- Validator
- Transaction
Testnet
The testnet is a test environment for Binance Chain network, run by the Binance Chain development community, which is open to developers.
The validators on the testnet are from development team.
You can connect a node to the testnet by downloading the node binary to use this configuration.
There is also a web wallet that can directly interact with the DEX. testnet.
What is the testnet good for?
- Create your test address and get your testnet funds.
- Develop applications and try tutorials on Binance Chain without the potential to lose your own assets.
- Test your applications against new versions of Binance Chain.
- Analyze blockchain data on a smaller, non-trivial data set compared to the public network.
How to get Testnet Fund
Note: The previous Binance Chain Testnet Faucet is retired at 2020/08/11 at 1:00 PM (UTC). The testnet faucet has migrated to this page: https://testnet.binance.org/faucet-smart
Steps to claim testnet BNB:
- Create a new Wallet of Binance Smart Chain testnet with MetaMask or MathWallet
- Get Testnet Fund: https://testnet.binance.org/faucet-smart
To request funds, please make a tweet with your Binance Smart Chain address pasted into the contents. Then, copy-paste the tweets URL! BNB will be sent to your BSC wallet right away.
- Transfer From Binance Smart Chain to Binance Chain
You can use Binance Extension Wallet for cross-chain transfer.
Источник
HTTP API
Within the ecosystem of Binance Chain, there are several accelerated nodes which provides more secure and faster lines to access Binance Chain and DEX data service including HTTP API.
For testnet, there are 2 accelerated nodes setup as below. API users should try to use them directly.
Version: 1.0.0
License: Apache 2.0
/api/v1/time
GET
Summary: Get the block time.
Description: Gets the latest block time and the current time according to the HTTP service.
Destination: Validator node.
Rate Limit: 1 request per IP per second.
Responses
Code | Description | Schema |
---|---|---|
200 | Success | Times |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/node-info
GET
Summary: Get node information.
Description: Gets runtime information about the node.
Destination: Validator node.
Rate Limit: 1 request per IP per second.
Responses
Code | Description | Schema |
---|---|---|
200 | Success | ResultStatus |
/api/v1/validators
GET
Summary: Get validators.
Description: Gets the list of validators used in consensus.
Destination: Witness node.
Rate Limit: 10 requests per IP per second.
Responses
Code | Description | Schema |
---|---|---|
200 | Success | [ Validators ] |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/peers
GET
Summary: Get network peers.
Description: Gets the list of network peers.
Destination: Witness node.
Rate Limit: 1 request per IP per second.
Responses
Code | Description | Schema |
---|---|---|
200 | Success | [ Peer ] |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/account/ GET
Summary: Get an account.
Description: Gets account metadata for an address.
Destination: Witness node.
Rate Limit: 5 requests per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | path | The account address to query | Yes | string |
Responses
Code | Description | Schema |
---|---|---|
200 | Success | Account |
400 | Bad Request | Error |
404 | Not Found | Error |
default | Generic error response | Error |
/api/v1/account/ /sequence
GET
Summary: Get an account sequence.
Description: Gets an account sequence for an address.
Destination: Validator node.
Rate Limit: 5 requests per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | path | The account address to query | Yes | string |
Responses
Code | Description | Schema |
---|---|---|
200 | Success | AccountSequence |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/tx/ GET
Summary: Get a transaction.
Description: Gets transaction metadata by transaction ID. By default, transactions are returned in a raw format. You may add ?format=json to the end of the path to obtain a more readable response.
Destination: Seed node.
Rate Limit: 10 requests per IP per second.
Example:
Below is an example response of a send transaction when ?format=json is used.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
hash | path | The transaction hash to query | Yes | string |
format | query | Response format ( json or amino) | No | string |
Responses
Code | Description | Schema |
---|---|---|
0 | Success | Transaction |
404 | Not Found | |
500 | Bad Request | Error |
default | Generic error response | Error |
/api/v1/tokens
GET
Summary: Get tokens list.
Description: Gets a list of tokens that have been issued.
Destination: Witness node.
Rate Limit: 1 request per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
limit | query | default 100. | No | integer |
offset | query | start with 0; default 0. | No | integer |
Responses
Code | Description | Schema |
---|---|---|
200 | Success | [ Token ] |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/markets
GET
Summary: Get market pairs.
Description: Gets the list of market pairs that have been listed.
Destination: Witness node.
Rate Limit: 1 request per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
limit | query | default 500; max 1000. | No | integer |
offset | query | start with 0; default 0. | No | integer |
Responses
Code | Description | Schema |
---|---|---|
200 | Success | [ Market ] |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/fees
GET
Summary: Obtain trading fees information.
Description: Gets the current trading fees settings.
Destination: Witness node.
Rate Limit: 1 request per IP per second.
Responses
Code | Description | Schema |
---|---|---|
200 | Success | [ Fee ] |
default | Generic error response | Error |
/api/v1/depth
GET
Summary: Get the order book.
Description: Gets the order book depth data for a given pair symbol.
The given limit must be one of the allowed limits below.
Destination: Validator node.
Rate Limit: 10 requests per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
symbol | query | Market pair symbol, e.g. NNB-0AD_BNB | Yes | string |
limit | query | The limit of results. Allowed limits: [5, 10, 20, 50, 100, 500, 1000] | No | integer |
Responses
Code | Description | Schema |
---|---|---|
200 | Success | MarketDepth |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/broadcast
POST
Summary: Broadcast a transaction.
Description: Broadcasts a signed transaction. A single transaction must be sent hex-encoded with a content-type of text/plain .
Destination: Witness node.
Rate Limit: 5 requests per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
sync | query | Synchronous broadcast (wait for DeliverTx)? | No | boolean |
body | body | Yes | binary |
Responses
Code | Description | Schema |
---|---|---|
200 | Success | [ Transaction ] |
400 | Bad Request | Error |
401 | Bad Signature | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/klines
GET
Summary: Get candlestick bars.
Description: Gets candlestick/kline bars for a symbol. Bars are uniquely identified by their open time.
If the time window is larger than limits, only the first n klines will return. In this case, please either shrink the window or increase the limit to get proper amount of klines.
Rate Limit: 10 requests per IP per second.
Example
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
symbol | query | symbol | Yes | string |
interval | query | interval. Allowed value: [1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] | Yes | enum string |
limit | query | default 300; max 1000. | No | integer |
startTime | query | start time in Milliseconds | No | long |
endTime | query | end time in Milliseconds | No | long |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | [ Candlestick ] |
/api/v1/orders/closed
GET
Summary: Get closed orders.
Description: Gets closed (filled and cancelled) orders for a given address.
Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months.
Rate Limit: 5 requests per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | query | the owner address | Yes | string |
end | query | end time in Milliseconds | No | long |
limit | query | default 500; max 1000. | No | integer |
offset | query | start with 0; default 0. | No | integer |
side | query | order side. 1 for buy and 2 for sell. | No | integer |
start | query | start time in Milliseconds | No | long |
status | query | order status list. Allowed value: [Ack, IocExpire, IocNoFill, FullyFill, Canceled, Expired, FailedBlocking, FailedMatching] | No | enum string |
symbol | query | symbol | No | string |
total | query | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response | No | integer |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | OrderList |
/api/v1/orders/open
GET
Summary: Get open orders.
Description: Gets open orders for a given address.
Rate Limit: 5 requests per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | query | the owner address | Yes | string |
limit | query | default 500; max 1000. | No | integer |
offset | query | start with 0; default 0. | No | integer |
symbol | query | symbol | No | string |
total | query | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response | No | integer |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | OrderList |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/orders/ GET
Summary: Get an order.
Description: Gets metadata for an individual order by its ID.
Rate Limit: 5 requests per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | path | order id | Yes | string |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | Order |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/ticker/24hr
GET
Summary: Get a market ticker.
Description: Gets 24 hour price change statistics for a market pair symbol. Updated every second.
Rate Limit: 5 requests per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
symbol | query | symbol | No | string |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | [ TickerStatistics ] |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/trades
GET
Summary: Get market trades.
Description: Gets a list of historical trades.
Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months.
Rate Limit: 5 requests per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | query | the buyer/seller address | No | string |
buyerOrderId | query | buyer order id | No | string |
end | query | end time in Milliseconds | No | long |
height | query | block height | No | long |
limit | query | default 500; max 1000. | No | integer |
offset | query | start with 0; default 0. | No | integer |
quoteAsset | query | quote asset | No | string |
sellerOrderId | query | seller order id | No | string |
side | query | order side. 1 for buy and 2 for sell. | No | integer |
start | query | start time in Milliseconds | No | long |
symbol | query | symbol | No | string |
total | query | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response | No | integer |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | TradePage |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/block-exchange-fee
GET
Summary: Trading fee of the address grouped by block
Description: Get historical trading fees of the address, including fees of trade/canceled order/expired order. Transfer and other transaction fees are not included. Order by block height DESC. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | query | the seller/buyer address | No | string |
end | query | end time | No | long |
limit | query | default 50; max 1000. | No | integer |
offset | query | start with 0; default 0. | No | integer |
start | query | start time in Milliseconds | No | long |
total | query | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response | No | integer |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | BlockExchangeFeePage |
/api/v1/transactions
GET
Summary: Get transactions.
Description: Gets a list of transactions. Multisend transaction is not available in this API. Currently ‘confirmBlocks’ and ‘txAge’ are not supported.
Query Window: Default query window is latest 24 hours; The maximum start — end query window is 3 months.
Rate Limit: 60 requests per IP per minute.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | query | address | Yes | string |
blockHeight | query | blockHeight | No | long |
endTime | query | endTime in Milliseconds | No | long |
limit | query | limit | No | integer |
offset | query | offset | No | integer |
side | query | transaction side. Allowed value: [ RECEIVE, SEND] | No | enum string |
startTime | query | start time in Milliseconds | No | long |
txAsset | query | txAsset | No | string |
txType | query | transaction type. Allowed value: [ NEW_ORDER,ISSUE_TOKEN,BURN_TOKEN,LIST_TOKEN,CANCEL_ORDER,FREEZE_TOKEN,UN_FREEZE_TOKEN,TRANSFER,PROPOSAL,VOTE,MINT,DEPOSIT,CREATE_VALIDATOR,REMOVE_VALIDATOR,TIME_LOCK,TIME_UNLOCK,TIME_RELOCK,SET_ACCOUNT_FLAG,HTL_TRANSFER,CLAIM_HTL,DEPOSIT_HTL,REFUND_HTL] | No | enum string |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | TxPage |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/transactions-in-block/ GET
Summary: Get transactions in the specific block.
Description: Get transactions in the block. Multi-send and multi-coin transactions are flattened as transactions. This API is deprecated.
Rate Limit: 5 requests per IP per second.
Rate Limit: 60 requests per IP per minute.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
blockHeight | path | block height | Yes | string |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | BlockTx |
400 | Bad Request. The block to query is higher than current highest block. | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v2/transactions-in-block/ GET
Summary: transactions in Block
Description: Get transactions in the block. Multi-send and multi-coin transactions are included as sub-transactions.
Rate Limit: 5 request per IP per second.
Rate Limit: 60 requests per IP per minute.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
blockHeight | path | blockHeight | Yes | long |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | BlockTxV2 |
400 | Bad Request. The block to query is higher than current highest block. | Error |
/api/v1/atomic-swaps
GET
Summary: AtomicSwap
Description: Get atomic swaps by address.
Rate Limit: 5 request per IP per second.
Rate Limit: 60 requests per IP per minute.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
endTime | query | end time of blockTimestamp | No | long |
fromAddress | query | At least one of toAddress and fromAddress should be provided as parameter | No | string |
limit | query | default 25; max 1000. | No | integer |
offset | query | start with 0; default 0. | No | integer |
startTime | query | start time of blockTimestamp in Milliseconds; The maximum start — end query window is 3 months; Default query window is the latest 30 days. | No | long |
toAddress | query | At least one of toAddress and fromAddress should be provided as parameter | No | string |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | AtomicSwapPage |
/api/v1/atomic-swaps/ GET
Summary: AtomicSwap
Description: Get an AtomicSwap by swap id
Rate Limit: 5 request per IP per second.
Rate Limit: 60 request per IP per minute.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | path | swap id | Yes | string |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | AtomicSwap |
/api/v1/timelocks/ GET
Summary: Gets time lock records given an address
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | path | The account address to query | Yes | string |
id | query | the record id of timelock to query | No | long |
Responses
Code | Description | Schema |
---|---|---|
200 | Success | TimeLocks |
400 | Bad Request | Error |
500 | internal server error | Error |
/api/v1/timelock/?(id=)
GET
Summary: Get timelock records of an address.
Description: Get the timelock history of an address. Rate Limit: 60 requests per IP per minute.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | path | The account address to query | Yes | string |
id | query | the record id of timelock to query | No | long |
Responses
Code | Description | Schema |
---|---|---|
200 | Success | TimeLocks |
400 | Bad Request | Error |
404 | Not Found | |
500 | internal server error | Error |
/api/v1/mini/tokens
GET
Summary: Gets a list of available mini tokens.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
offset | query | offset | No | integer |
limit | query | limit | No | integer |
Responses
Code | Description | Schema |
---|---|---|
200 | Success | MiniTokens |
400 | Bad Request | Error |
500 | internal server error | Error |
/api/v1/mini/markets
GET
Summary: Gets a list of mini market pairs.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
offset | query | offset | No | integer |
limit | query | limit | No | integer |
Responses
Code | Description | Schema |
---|---|---|
200 | Success | Markets |
400 | Bad Request | Error |
/api/v1/mini/klines
GET
Summary: Get mini-token candlestick bars.
Description: Gets candlestick/kline bars for a mini-token symbol pair. Bars are uniquely identified by their open time.
If the time window is larger than limits, only the first n klines will return. In this case, please either shrink the window or increase the limit to get proper amount of klines.
Rate Limit: 10 requests per IP per second.
Example
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
symbol | query | symbol | Yes | string |
interval | query | interval. Allowed value: [1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M] | Yes | enum string |
limit | query | default 300; max 1000. | No | integer |
startTime | query | start time in Milliseconds | No | long |
endTime | query | end time in Milliseconds | No | long |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | [ Candlestick ] |
/api/v1/mini/orders/closed
GET
Summary: Get closed orders of mini-token pairs.
Description: Gets closed (filled and cancelled) orders for a given address.
Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months.
Rate Limit: 5 requests per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | query | the owner address | Yes | string |
end | query | end time in Milliseconds | No | long |
limit | query | default 500; max 1000. | No | integer |
offset | query | start with 0; default 0. | No | integer |
side | query | order side. 1 for buy and 2 for sell. | No | integer |
start | query | start time in Milliseconds | No | long |
status | query | order status list. Allowed value: [Ack, IocExpire, IocNoFill, FullyFill, Canceled, Expired, FailedBlocking, FailedMatching] | No | enum string |
symbol | query | symbol | No | string |
total | query | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response | No | integer |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | OrderList |
/api/v1/mini/orders/open
GET
Summary: Get open orders of mini-token pairs.
Description: Gets open orders for a given address. Rate Limit: 5 requests per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | query | the owner address | Yes | string |
limit | query | default 500; max 1000. | No | integer |
offset | query | start with 0; default 0. | No | integer |
symbol | query | symbol | No | string |
total | query | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response | No | integer |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | OrderList |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/mini/orders/ GET
Summary: Get an order of mini-token pairs.
Description: Gets metadata for an individual order by its ID. Rate Limit: 5 requests per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | path | order id | Yes | string |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | Order |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/mini/ticker/24hr
GET
Summary: Get a market ticker of mini-token pairs.
Description: Gets 24 hour price change statistics for a market pair symbol. Updated every second. Rate Limit: 5 requests per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
symbol | query | symbol | No | string |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | [ TickerStatistics ] |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
/api/v1/mini/trades
GET
Summary: Get market trades of mini-token pairs.
Description: Gets a list of historical trades. Query Window: Default query window is latest 7 days; The maximum start — end query window is 3 months. Rate Limit: 5 requests per IP per second.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
address | query | the buyer/seller address | No | string |
buyerOrderId | query | buyer order id | No | string |
end | query | end time in Milliseconds | No | long |
height | query | block height | No | long |
limit | query | default 500; max 1000. | No | integer |
offset | query | start with 0; default 0. | No | integer |
quoteAsset | query | quote asset | No | string |
sellerOrderId | query | seller order id | No | string |
side | query | order side. 1 for buy and 2 for sell. | No | integer |
start | query | start time in Milliseconds | No | long |
symbol | query | symbol | No | string |
total | query | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response | No | integer |
Responses
Code | Description | Schema |
---|---|---|
200 | OK | TradePage |
400 | Bad Request | Error |
404 | Not Found | |
default | Generic error response | Error |
Models
Error
Name | Type | Description | Example |
---|---|---|---|
code | long | error code | 400 |
message | string | error message |
Times
Name | Type | Description | Example |
---|---|---|---|
ap_time | string | event time | e.g. 2019-01-21T10:30:00Z |
block_time | string | the time of latest block | e.g. 2019-01-21T10:30:00Z |
Validators
Name | Type | Description | Example |
---|---|---|---|
block_height | long | Current block height | 12345 |
validators | [ Validator ] |
Validator
Name | Type | Description | Example |
---|---|---|---|
address | string (hex address) | Address | |
pub_key | [ integer ] | Public key bytes | |
voting_power | integer | validator’s voting power | |
accum | integer | validator’s accumulated voting power |
Name | Type | Description | Example |
---|---|---|---|
id | string | Authenticated identifier | 8c379d4d3b9995c712665dc9a9414dbde5b30483 |
original_listen_addr | string (RemoteAddr) | Original listen address before PeersService changed it | |
listen_addr | string (RemoteAddr) | Listen address | |
access_addr | string (RemoteAddr) | Access address (HTTP) | |
stream_addr | string (RemoteAddr) | Stream address (WS) | |
network | string | Chain ID | Binance-Chain-Ganges |
version | string | Version | 0.30.1 |
moniker | string | Moniker (Name) | data-seed-1 |
capabilities | [ string ] | Array of capability tags: node, qs, ap, ws | node,ap |
accelerated | boolean | Is an accelerated path to a validator node |
Transaction
Name | Type | Description | Example |
---|---|---|---|
hash | string (hex) | Hash of transaction, it returned as bytes before, and now it returns as hex string | |
log | string | Log of transaction | |
data | string | Data of transaction | |
height | string | Height of transaction | |
code | integer | Result code of transaction | |
ok | boolean | ||
tx | object | Detail of transaction, like transaction type, messages and signature |
For example, below is the detail of a send transaction. Most of the fields are fixed, but the detail of msg varies with msg type, if you query with —format=json.
Источник