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
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
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.
bnbGenerateWallet()
Example
#️⃣ Execute command in terminal
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
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.
bnbGetAccount()
Example
#️⃣ Execute command in terminal
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
Description
Get Binance Account
5 credits per API call.
Get Binance Account Detail by address.
bnbGetBlock()
Example
#️⃣ Execute command in terminal
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
Description
Get Binance Transactions in Block
5 credits per API call.
Get Transactions in block by block height.
bnbGetCurrentBlock()
Example
#️⃣ Execute command in terminal
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.
bnbGetTransaction()
Example
#️⃣ Execute command in terminal
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
Description
Get Binance Transaction
5 credits per API call.
Get Binance Transaction by transaction hash.
bnbGetTxByAccount()
Example
#️⃣ Execute command in terminal
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
Description
Get Binance Transactions By Address
5 credits per API call.
Get Binance Transactions by address.
transferBnbBlockchain()
Example
#️⃣ Execute command in terminal
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
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.
transferBnbBlockchainKMS()
Example
#️⃣ Execute command in terminal
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
Description
Send Binance / Binance Token from account to account