Skip to main content

Cross-Chain API

To facilitate querying cross chain transactions between BNB Beacon Chain and BNB Smart Chain, following APIs are provided.

Mainnet base path: https://api.bnbchain.org

Version: 1.0.0

/cross_chain/v1/transfer_in_txs?address={address}​

Method​

GET

Summary​

Query transfer in cross chain transactions.

Parameters​

NameLocated inDescriptionRequiredSchema
addressqueryBNB Beacon Chain address or BNB Smart Chain addressYesstring
pagequerypage numberNoint
page_sizequerypage sizeNoint

Responses​

CodeDescriptionSchema
200OKTransferIns
401Unauthorized
403Forbidden

/cross_chain/v1/transfer_out_txs?address={address}​

Method​

GET

Summary​

Query transfer-out cross chain transactions.

Parameters​

NameLocated inDescriptionRequiredSchema
addressqueryBNB Beacon Chain address or BNB Smart Chain addressYesstring
pagequerypage numberNoint
page_sizequerypage sizeNoint

Responses​

CodeDescriptionSchema
200OKTransferOuts
401Unauthorized
403Forbidden

/cross_chain/v1/tx/{tx_hash}​

Method​

GET

Summary​

Query cross chain transaction on target chain by transaction hash.

Parameters​

NameLocated inDescriptionRequiredSchema
tx_hashqueryBNB Smart Chain transaction hashYesstring

Responses​

CodeDescriptionSchema
200OKTx
401Unauthorized
403Forbidden

/cross_chain/v1/reverse_tx/{tx_hash}​

Method​

GET

Summary​

Query source transaction (the transaction on the other chain) by the transaction hash on target chain.

Parameters​

NameLocated inDescriptionRequiredSchema
tx_hashqueryBNB Beacon Chain transaction hashYesstring

Responses​

CodeDescriptionSchema
200OKReverseTx
401Unauthorized
403Forbidden

Models​

Tx​

NameTypeDescriptionRequired
has_refundbooleanwhether the transaction has been refundedYes
cross_chain_tx_hashstringtransaction hash on the other chainYes
refund_tx_hashstringrefund transaction hash if existsNo

ReverseTx​

NameTypeDescriptionRequired
original_chain_tx_hashstringsource transaction hash on the other chainYes

TransferIns​

NameTypeDescriptionRequired
pageintpage numberYes
page_sizeintpage sizeYes
total_countinttotal transactionsYes
transfer_in_txsarraytransfer-in transaction hashesYes
original_txsarraythe corresponding source transaction hashesYes

TransferOuts​

NameTypeDescriptionRequired
pageintpage numberYes
page_sizeintpage sizeYes
total_countinttotal transactionsYes
transfer_out_txsarraytransfer-out transaction hashesYes
original_txsarraythe corresponding source transaction hashesYes