Skip to main content

API reference for block service

API description for block and transaction service

Version: V1.0​

Mainnet base path: https://api.binance.org/bc/

Testnet base path: https://testnet-api.binance.org/bc/

/api/v1/blocks​

GET​

Summary​

Get a batch of blocks, including fees.

Rate Limit: 500 request per IP in 5 minutes.

Parameters​
NameLocated inDescriptionRequiredSchema
endHeightqueryend of block height, endHeight-startHeight <= 50Yeslong
startHeightquerystart of block height, startHeight should bigger than 0Yeslong
Responses​
CodeDescriptionSchema
200OKBlocksVO
401Unauthorized
403Forbidden
404Not Found

/api/v1/blocks/{blockHeight}​

GET​

Summary​

Get a block, including fees, for a particular block height.

Rate Limit: in together with /api/v1/blocks/{blockHeight}/txs 1500 request per IP in 5 minutes.

Parameters​
NameLocated inDescriptionRequiredSchema
blockHeightpathheight of blockYeslong
Responses​
CodeDescriptionSchema
200OKBlockVO
401Unauthorized
403Forbidden
404Not Found

/api/v1/blocks/{blockHeight}/txs​

GET​

Summary​

Get transactions in a particular block height.

Rate Limit: in together with /api/v1/blocks/{blockHeight} 1500 request per IP in 5 minutes.

Parameters​
NameLocated inDescriptionRequiredSchema
blockHeightpathheight of blockYeslong
Responses​
CodeDescriptionSchema
200OKTxsVO
401Unauthorized
403Forbidden
404Not Found

/api/v1/txs​

GET​

Summary​

Search transactions by criteria.

Rate Limit: 500 request per IP in 5 minutes (please read notes for more details).

Parameters​
NameLocated inDescriptionRequiredSchema
addressqueryaddressYesstring
addressTypequeryaddress type: FROM or TONostring
assetqueryassetNostring
endTimequeryend time in in milliseconds, endTime - startTime should be smaller than 7 daysYeslong
limitquerydefault 10, max 50Nointeger
offsetquerydefault 0, max 10000Nointeger
startTimequerystart time in millisecondsYeslong
typequerytypeNostring

Notes:

  1. The timeframe between endTime and startTime should be less than 7 days. The shorter timeframe will get faster response, and longer timeframe will trigger more strict rate limiter.
  2. type: NEW_ORDER, ISSUE_TOKEN, BURN_TOKEN, LIST_TOKEN, CANCEL_ORDER, FREEZE_TOKEN, UN_FREEZE_TOKEN, TRANSFER, PROPOSAL, SIDE_PROPOSAL, VOTE, SIDE_VOTE, DEPOSIT, SIDE_DEPOSIT, MINT, CREATE_VALIDATOR, REMOVE_VALIDATOR, TIME_LOCK, TIME_UNLOCK, TIME_RELOCK, SET_ACCOUNT_FLAG, HTL_TRANSFER, DEPOSIT_HTL, CLAIM_HTL, REFUND_HTL, CREATE_SIDECHAIN_VALIDATOR, EDIT_SIDECHAIN_VALIDATOR, SIDECHAIN_DELEGATE, SIDECHAIN_REDELEGATE, SIDECHAIN_UNDELEGATE, ORACLE_CLAIM, CROSS_TRANSFER_OUT, CROSS_BIND, CROSS_UNBIND, BSC_SUBMIT_EVIDENCE, SIDECHAIN_UNJAIL, TRANSFER_TOKEN_OWNERSHIP, TINY_TOKEN_ISSUE, MINI_TOKEN_ISSUE, MINI_TOKEN_LIST, MINI_TOKEN_SET_URI
  3. addressType: FROM or TO
Responses​
CodeDescriptionSchema
200OKTxsVO
401Unauthorized
403Forbidden
404Not Found

/api/v1/txs/{txHash}​

GET​

Summary​

Get a transaction by a hash.

Rate Limit: 1500 request per IP in 5 minutes.

Parameters​
NameLocated inDescriptionRequiredSchema
txHashpathhash of txYesstring
Responses​
CodeDescriptionSchema
200OKTxVO
401Unauthorized
403Forbidden
404Not Found

Models​

BlockVO​

NameTypeDescriptionRequired
consumeTimelongelapsed time from last blockNo
fees[ FeeVO ]feesNo
hashstringblock hashNo
heightlongblock heightNo
parentHashstringblock's parent hashNo
proposerAddrstringproposer's address of the blockNo
proposerNodestringproposer's nameNo
sizelongsizeNo
timelongblock timestampNo
txCountintegerthe count of tx in the blockNo

BlocksVO​

NameTypeDescriptionRequired
blocks[ BlockVO ]blocksNo

FeeVO​

NameTypeDescriptionRequired
addressstringaddressNo
assetstringfee assetNo
blockHeightlongheight of blockNo
quantitylongquantity of the assetNo

FeesVO​

NameTypeDescriptionRequired
fees[ FeeVO ]feesNo

TxVO​

NameTypeDescriptionRequired
amountlongamount of the assetNo
assetstringassetNo
blockHeightlongheight of the blockNo
blockTimelongtimestamp of the blockNo
codeintegercodeNo
datastringdifferent schemas for different tx typesNo
feelongfeeNo
fromAddrstringfrom addressNo
hashstringhash of the txNo
logstringlogNo
memostringmemoNo
sequencelongsequenceNo
sourcelongsourceNo
toAddrstringto addressNo
typestringtx typeNo

TxsVO​

NameTypeDescriptionRequired
totallongtotal count of txsNo
txs[ TxVO ]txsNo