Binance testnet api key

Содержание
  1. Как создать криптовалютный дашборд с помощью Plotly и API Binance
  2. Упрощаем отслеживание активов
  3. Как установить API Binance
  4. Настраиваем реальный API Binance
  5. Настраиваем тестовый API Binance
  6. Как получить данные с помощью API Binance
  7. Устанавливаем библиотеку python-binance
  8. Получаем информацию об аккаунте
  9. Получаем архивные данные
  10. Получаем данные в реальном времени
  11. Как создать дашборд с помощью Plotly
  12. Как получить API ключ на Binance?
  13. Шаг 1. Заходим на биржу.
  14. Шаг 2. Настраиваем двухфакторную аутентификацию (если она настроена переходите к шагу 3.
  15. Вариант 1. Настройка SMS аутентификации на Binance.
  16. Вариант 2. Настройка Google Authenticication на бирже Binance.
  17. Шаг 3. Создание API ключа для Binance.
  18. HTTP API
  19. /api/v1/time
  20. /api/v1/node-info
  21. /api/v1/validators
  22. /api/v1/peers
  23. /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. Источник
  24. /api/v1/account/ /sequence
  25. /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. Источник
  26. /api/v1/tokens
  27. /api/v1/markets
  28. /api/v1/fees
  29. /api/v1/depth
  30. /api/v1/broadcast
  31. /api/v1/klines
  32. /api/v1/orders/closed
  33. /api/v1/orders/open
  34. /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. Источник
  35. /api/v1/ticker/24hr
  36. /api/v1/trades
  37. /api/v1/block-exchange-fee
  38. /api/v1/transactions
  39. /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. Источник
  40. /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. Источник
  41. /api/v1/atomic-swaps
  42. /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. Источник
  43. /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. Источник
  44. /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. Источник
  45. /api/v1/mini/tokens
  46. /api/v1/mini/markets
  47. /api/v1/mini/klines
  48. /api/v1/mini/orders/closed
  49. /api/v1/mini/orders/open
  50. /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. Источник
  51. /api/v1/mini/ticker/24hr
  52. /api/v1/mini/trades
  53. Models
  54. Error
  55. Times
  56. Validators
  57. Validator
  58. Transaction
Читайте также:  Аудит операций с финансовыми инвестициями

Как создать криптовалютный дашборд с помощью Plotly и API Binance

Упрощаем отслеживание активов

Apr 1 · 9 min read

Как установить API Binance

Binance предоставляет два типа доступа к API: реальный и тестовый.

Настраиваем реальный API Binance

Реальный API обеспечивает прямой доступ к аккаунту. В нем будут отражены любые сделки, совершенные через этот API. Поэтому использовать его следует с осторожностью.

Для начала нужно зарегистрироваться на Binance.

После регистрации вам будет предложено установить двухфакторную аутентификацию (2FA). Вы также можете подключить ее самостоятельно в настройках безопасности.

Затем переходим во вкладку API Management в настройках. Вам будет предложено установить метки для ключей API. Эта функция пригодится тем, у кого есть несколько ключей, связанных с одним аккаунтом.

Указываем метк и и нажимаем Create API. После этого нужно пройти аутентификацию еще раз. Затем отобразятся API Key и Secret Key. Скопируйте их в безопасное место. По умолчанию получить доступ к ключам можно следующим способом, который можно изменить:

Мы будем использовать ключи как реального, так и тестового API, чтобы понять, как с ними работать. С целью не засорять реальный аккаунт установим доступ только для чтения для ключей реального API:

Сохранять ключи реального API мы будем в файл secret.cfg , как показано ниже. Не забывайте, что нельзя ни с кем делиться этим файлом.

Настраиваем тестовый API Binance

Тестовый API Binance полностью имитирует взаимодействие с реальным API. Рекомендуем для начала повзаимодействовать с ним, чтобы убедиться в корректности работы приложения.

Для начала необходимо войти в систему: https://testnet.binance.vision/ (на данный момент вход поддерживается только с GitHub).

Затем нажмите на Generate HMAC_SHA256 Key (Сгенерировать ключ HMAC_SHA256) и снова укажите метки для ключей. Отобразившиеся после создания ключи также скопируйте в безопасное место. Все подробности о тестовом API можно прочитать на главной странице.

Читайте также:  Разработка торгового бота binance

Теперь добавим ключи тестового API в файл secret.cfg , как показано ниже:

Мы успешно настроили ключи реального и тестового API и сохранили их в файле secret.cfg . Теперь можно переходить к получению данных.

Как получить данные с помощью API Binance

Устанавливаем библиотеку python-binance

Binance не предоставляет библиотеку Python для взаимодействия с API. Поэтому мы воспользуемся популярным сторонним инструментом под названием python-binance .

Устанавливаем python-binance с помощью следующей команды:

Получаем информацию об аккаунте

В этом разделе мы воспользуемся тестовым аккаунтом. По умолчанию в нем будет отображаться баланс различных криптовалют. У python-binance нет доступа к тестовому API, поэтому мы поменяем URL-адрес конечной точки.

Код ниже предоставляет информацию о тестовом аккаунте:

Мы получаем такие важные данные, как тип аккаунта ( accountType ), баланс, разрешение и прочие.

Теперь получим баланс ETH:

Библиотека python-binance предоставляет много возможностей. Подробную информацию о ней можно найти в документации.

Получаем архивные данные

Тестовый API выдает фиктивные архивные данные. Поэтому мы воспользуемся реальным API и его ключами.

Ниже показано, как получить стоимость ETH на Binance с самой ранней даты до текущего дня:

Вывод выше представляет следующие параметры, упомянутые в документации Binance API:

Преобразовываем полученные данные в датафрейм и сохраняем его как файл CSV:

Получаем данные в реальном времени

Чтобы передавать данные в реальном времени, можно воспользоваться WebSocket Binance. Вот как это сделать:

Ниже показано, как остановить потоковую передачу данных и закрыть WebSocket:

Итак, мы научились получать данные несколькими способами. Теперь можно переходить к созданию дашборда Plotly.

Как создать дашборд с помощью Plotly

В этом разделе мы создадим дашборд с помощью Plotly, который будет отслеживать криптовалютный портфель тестового аккаунта в реальном времени и изменять его общую стоимость в зависимости от получаемых данных.

Вот как будет выглядеть финальная версия дашборда. Детали внешнего вида можно изменить позднее:

В дашборд включены следующие функции:

  • Индикатор: общая стоимость портфеля в USDT.
  • Индикатор: общая стоимость портфеля в BTC.
  • Индикатор: конвертация BNB/USDT.
  • Круговая диаграмма: распределение портфеля (в USDT).
  • Столбчатая диаграмма: распределение токенов.

Теперь рассмотрим код.

  1. Импортируем все необходимые библиотеки:

2. Прочитываем все ключи, устанавливаем соединение и получаем информацию об аккаунте:

3. Определяем функции, которые будут обрабатывать потоковые данные и рассчитывать показатели на их основе:

4. Начинаем передавать данные в реальном времени:

5. Определяем макет, графики и хостинг:

Вот и все! Этот код позволяет отслеживать криптовалютный портфель тестового аккаунта. Его можно с легкостью настроить и для реального аккаунта без изменения URL-адреса конечной точки.

Весь код можно найти в репозитории на GitHub.

Источник

Как получить API ключ на Binance?

ВАЖНО! ДОВЕРИТЕЛЬНОЕ УПРАВЛЕНИЕ И ПАРТНЁРСКАЯ ПРОГРАММА ВРЕМЕННО ПРИОСТАНОВЛЕНЫ!

Процедура простая, не занимает много времени и не требует специальных навыков.

Шаг 1. Заходим на биржу.

Переходим на официальный сайт Binance и заходим в свой аккаунт. О том как его создать и начать торговлю, читайте здесь.

Шаг 2. Настраиваем двухфакторную аутентификацию (если она настроена переходите к шагу 3.

Это мера нужна для вашей безопасности. Кроме того, Binance не даст вам ключи, пока вы не настроите 2FA.

Жмем на кнопку в верхнем правом углу.

После чего выйдет страница настроек аккаунта. Здесь можно включить 2 FA.

На Binance два вида аутентификации: по SMS и через приложение Google Authenticication.

Вы можете установить только одно из них, но я бы рекомендовал установить сразу оба.

Вариант 1. Настройка SMS аутентификации на Binance.

Жмем кнопку “включить”.

Выходит окно, куда нужно вписать номер телефона, на который будут приходить СМС. Дальше жмем “Send SMS”.

Номер телефона вводим через восьмерку!

Дальше на телефон, который вы указали, приходит шестизначный код. Его вставляем в поле и жмем “отправить”.

Готово! Аутентификация по SMS включена.

Вариант 2. Настройка Google Authenticication на бирже Binance.

Все на той же странице настроек, жмем кнопку “включить”.

Дальше устанавливаем приложение Google Authenticication на телефон. Пользуйтесь только официальной версией, скачанной из AppStore или Google Play.

Дальше открываем приложение на телефоне и сканируем QR-код с биржи.

После этого записываем ключ на бумаге, он нужен будет для восстановления.

Далее вводим данные. Логин пароль — это ваш пароль для входа на Binance! Аутентификационный код Google берем из приложения.

Готово! Аутентификация с Google Authenticication завершена.

Можем переходить непосредственно к созданию API ключа.

Шаг 3. Создание API ключа для Binance.

Снова переходим в настройки аккаунта.

Жмем “параметры API”.

Далее выйдет окно, в котором вы должны указать имя для ключа, например “ключ для Филиппа”. Затем нажимаем “создать новый ключ”.

Далее нужно ввести код аутентификации (SMS или Google, можно выбрать любой).

Затем на почту, которая привязана к вашему аккаунту, будет выслано письмо. Необходимо будет пройти по ссылке внутри него.

После перехода можно будет увидеть созданный ключ.

Точнее, по факту их будет два: API key и secret Key. Они нужны для доверительного управления вашим аккаунтом биржи.

Важно! Эти наборы символов дают право управления вашими средствами, но чтобы они были защищены от вывода, НЕ СТАВЬТЕ галочку в окне “разрешить выводы средств”.

Источник

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.

Источник

Оцените статью