Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Api/BNBBeaconChainApi

BNB Beacon Chain API Reference

// Set your API Keys 👇 here
$sdk = new \Tatum\Sdk();

// MainNet API Call
$sdk->mainnet()->api()->bNBBeaconChain();

// TestNet API Call
$sdk->testnet()->api()->bNBBeaconChain();

Methods

Method Description
bnbBroadcast() Broadcast signed BNB transaction
bnbGenerateWallet() Generate Binance wallet
bnbGetAccount() Get Binance Account
bnbGetBlock() Get Binance Transactions in Block
bnbGetCurrentBlock() Get Binance current block
bnbGetTransaction() Get Binance Transaction
bnbGetTxByAccount() Get Binance Transactions By Address
transferBnbBlockchain() Send Binance / Binance Token from account to account
transferBnbBlockchainKMS() Send Binance / Binance Token from account to account

bnbBroadcast()

Example

#️⃣ Execute command in terminal

✨ php -f bnbBroadcast.php

Request

POST /v3/bnb/broadcast

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->bNBBeaconChain()->bnbBroadcast(
    \Tatum\Model\Broadcast $broadcast
): \Tatum\Model\TransactionHash

Parameters

Name Type Description Notes
$broadcast \Tatum\Model\Broadcast    

Return type

\Tatum\Model\TransactionHash

Description

Broadcast signed BNB transaction

5 credits per API call.

Broadcast signed transaction to Binance blockchain. This method is used internally or Tatum client libraries. It is possible to create custom signing mechanism and use this method only for broadcasting data to the blockchain.

Back to top


bnbGenerateWallet()

Example

#️⃣ Execute command in terminal

✨ php -f bnbGenerateWallet.php

Request

GET /v3/bnb/account

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->bNBBeaconChain()->bnbGenerateWallet(): \Tatum\Model\BnbWallet

Parameters

This endpoint does not need any parameter.

Return type

\Tatum\Model\BnbWallet

Description

Generate Binance wallet

5 credits per API call.

Generate BNB account. Tatum does not support HD wallet for BNB, only specific address and private key can be generated.

Back to top


bnbGetAccount()

Example

#️⃣ Execute command in terminal

✨ php -f bnbGetAccount.php

Request

GET /v3/bnb/account/{address}

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->bNBBeaconChain()->bnbGetAccount(
    string $address
): \Tatum\Model\BnbAccount

Parameters

Name Type Description Notes
$address string Account address you want to get balance of  

Return type

\Tatum\Model\BnbAccount

Description

Get Binance Account

5 credits per API call.

Get Binance Account Detail by address.

Back to top


bnbGetBlock()

Example

#️⃣ Execute command in terminal

✨ php -f bnbGetBlock.php

Request

GET /v3/bnb/block/{height}

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->bNBBeaconChain()->bnbGetBlock(
    float $height
): \Tatum\Model\BnbBlock

Parameters

Name Type Description Notes
$height float Block height  

Return type

\Tatum\Model\BnbBlock

Description

Get Binance Transactions in Block

5 credits per API call.

Get Transactions in block by block height.

Back to top


bnbGetCurrentBlock()

Example

#️⃣ Execute command in terminal

✨ php -f bnbGetCurrentBlock.php

Request

GET /v3/bnb/block/current

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->bNBBeaconChain()->bnbGetCurrentBlock(): float

Parameters

This endpoint does not need any parameter.

Return type

float

Description

Get Binance current block

5 credits per API call.

Get Binance current block number.

Back to top


bnbGetTransaction()

Example

#️⃣ Execute command in terminal

✨ php -f bnbGetTransaction.php

Request

GET /v3/bnb/transaction/{hash}

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->bNBBeaconChain()->bnbGetTransaction(
    string $hash
): \Tatum\Model\BnbTx

Parameters

Name Type Description Notes
$hash string Transaction hash  

Return type

\Tatum\Model\BnbTx

Description

Get Binance Transaction

5 credits per API call.

Get Binance Transaction by transaction hash.

Back to top


bnbGetTxByAccount()

Example

#️⃣ Execute command in terminal

✨ php -f bnbGetTxByAccount.php

Request

GET /v3/bnb/account/transaction/{address}

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->bNBBeaconChain()->bnbGetTxByAccount(
    string $address,
    float $start_time,
    float $end_time,
    [ float $limit, ]
    [ float $offset, ]
    [ string $asset, ]
    [ string $address_type ]
): \Tatum\Model\BnbTxInAccount

Parameters

Name Type Description Notes
$address string Account address  
$start_time float Start time in milliseconds  
$end_time float End time in milliseconds  
$limit float Items per page. [optional]
$offset float Pagination offset [optional]
$asset string Asset name [optional]
$address_type string Address type [optional]

Return type

\Tatum\Model\BnbTxInAccount

Description

Get Binance Transactions By Address

5 credits per API call.

Get Binance Transactions by address.

Back to top


transferBnbBlockchain()

Example

#️⃣ Execute command in terminal

✨ php -f transferBnbBlockchain.php

Request

POST /v3/bnb/transaction

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->bNBBeaconChain()->transferBnbBlockchain(
    \Tatum\Model\TransferBnbBlockchain $transfer_bnb_blockchain
): \Tatum\Model\TransactionHash

Parameters

Name Type Description Notes
$transfer_bnb_blockchain \Tatum\Model\TransferBnbBlockchain    

Return type

\Tatum\Model\TransactionHash

Description

Send Binance / Binance Token from account to account

10 credits per API call.

Send Binance or Binance Token token from account to account. This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key. No one should ever send it’s own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production, Tatum KMS should be used for the highest security standards, and signatureId should be present in the request. Alternatively, using the Tatum client library for supported languages.

Back to top


transferBnbBlockchainKMS()

Example

#️⃣ Execute command in terminal

✨ php -f transferBnbBlockchainKMS.php

Request

POST /v3/bnb/transaction

Type signature

(new \Tatum\Sdk())->{mainnet/testnet}()->api()->bNBBeaconChain()->transferBnbBlockchainKMS(
    \Tatum\Model\TransferBnbBlockchainKMS $transfer_bnb_blockchain_kms
): \Tatum\Model\TransactionHash

Parameters

Name Type Description Notes
$transfer_bnb_blockchain_kms \Tatum\Model\TransferBnbBlockchainKMS    

Return type

\Tatum\Model\TransactionHash

Description

Send Binance / Binance Token from account to account

Back to top