Introduction
This API allows you to interact with the Binance Smart Chain including Binance COIn and BEP-20 tokens. If you ever looked for a possibility to automate token or BNB payments this is the right place.
You still have no idea for real use cases? Let me give you some examples: Accept your own BEP-20 token as payment method for your shop, distribute airdrop tokens of your ICO, convert your site currency to a token that can be traded on exchanges and many more.
There are a lot of use cases which are not only limited to sending tokens and BNB but also receiving them. You could even create a secure wallet for your token which only the wallet owner has access to.
Postman
Postman collection and documentation will follow soon...
API Requests
All Requests to our API are made in JSON format using HTTP POST. We will also return everything in JSON format. The Europe API endpoint is located at https://eu.bsc.chaingateway.io/v1/{function}.
API Key
You can get your personal API Key from your account dashboard. It is used by us to determine who is accessing the API and to count the requests by that account.
There are 2 possibilities to use it in your requests:
- Add it in the HTTP header as
'Authorization: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m'
. This is very secure and may be the only option in future versions.
- Add it to the JSON body in your request, like
"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"
. This is not recommended!
Please do not share your api key! If you did so by mistake, immediately regenerate it in your account panel!
Parameters
Binancecoin Address
This is an Binancecoin address, which has 0x in front and 40 hexadecimal characters after it. CAUTION: If you send tokens, the receiving address must be BEP-20 compatible. So please don't use an exchange address.
Contract Address
The contract address is the binance smart chain contract address of the BEP-20 token you want to use. It has the same format as normal Binancecoin addresses.
Amount
We want amounts to be in normal decimal format and as string. If you want to send 2.5 BNB, use "2.5". If you want to send 1 million tokens, use "1000000". If you are not sure how many decimals a token has, you can use the
getToken function. We decided to use amounts in string format to support up to 18 decimals with perfect precision.
Password
Whenever you create a new Binancecoin address, you need to specify a password for it. This password is used for all transactions you are doing with this address.
We don't save this password on our end, so please don't lose it.
Security
Our API is very secure. The Nodes are not hosted on the same machine as the API endpoint. Also, they are not using the standard port and have a few proxies running in front. They are protected with a few firewalls, ddos protection and breach detection, too. We also have protected our endpoint and nodes against bruteforce. Sensitive data, especially keystores are being saved only with really strong and military proof encryption. But even if someone would get control over our systems, your funds would still be save. Like you can see above, every Binancecoin address needs a password for transactions. Without it, the funds can't be accessed. This means our system is as secure as your application. If you don't secure your system and don't store the passwords in a safe way, attackers may be able to steal funds from your addresses. (They would still need your API Key however)
Fees
We are charging on a monthly plan basis if you use our API. You can see the exact pricing and request amounts
here. There are also transaction fees, which go to the miners to include your transaction in a block. So please make sure there are always enough Binance coins on the address you are sending tokens or BNB from. The exact fee which is used is determined by the average gas fee at that time (If not specified otherwise).
Receiving Subscriptions/IPNs
Once we detect a balance update in one of your subscriptions, we will delay a JSON formatted call to the URL you provided. You will need to return
{"ok": true}
in JSON format after receiving so our system knows you received the call successfully. If you don't return ok, we will try to send the call again 10 times within 10 minutes.
Here is an explanation of the parameters we send you:
Parameter |
Type |
Explanation |
Example |
id |
integer |
The unique ID of the IPN |
141854 |
action |
string |
Either "withdraw" or "deposit" |
deposit |
type |
string |
Either "ETH" or "BEP-20" |
ETH |
binancecoinaddress |
string |
The BSC address you subscribed to |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
contractaddress |
string |
Token smart contract address (BEP-20). |
0x5b86a33f0c232fe909eb4602a9d039072869d915 |
amount |
string |
Amount received/sent |
0.0464537 |
timestamp |
string |
Date and time of the IPN |
2021-08-30 15:15:39 |
An example of a call would look like this:
{"id": 141854, "action": "deposit", "type": "BEP-20", "binancecoinaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "amount": "0.0464537", "timestamp": "2021-08-30 15:15:39"}
getToken
Endpoint:
https://eu.bsc.chaingateway.io/v1/getToken
HTTP Method: POST
Returns information about a specific BEP-20 token like name, symbol, decimal places and total supply.
Parameter |
Explanation |
Example |
contractaddress |
Binance smart chain contract address of the BEP-20 token |
0x5b86a33f0c232fe909eb4602a9d039072869d915 |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "name": "Bitfranken", "symbol": "BIFRA", "decimals": 2, "supply": 76507131570}
getLastBlockNumber
Endpoint:
https://eu.bsc.chaingateway.io/v1/getLastBlockNumber
HTTP Method: POST
Returns the block number of the last mined binance smart chain block.
Parameter |
Explanation |
Example |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "blocknumber": 6496847}
getGasPrice
Endpoint:
https://eu.bsc.chaingateway.io/v1/getGasPrice
HTTP Method: POST
Returns the current gas price in GWEI.
Parameter |
Explanation |
Example |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "gasprice": 3}
getExchangeRate
Endpoint:
https://eu.bsc.chaingateway.io/v1/getExchangeRate
HTTP Method: POST
Returns the current Binance Coin (BNB) price in Euro or US Dollar
Parameter |
Explanation |
Example |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
currency |
eur or usd |
eur |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m", "currency": "eur"}
Example Response JSON:
{"ok": true, "currency": "eur", "rate": 263.28}
getBinancecoinBalance
Endpoint:
https://eu.bsc.chaingateway.io/v1/getBinancecoinBalance
HTTP Method: POST
Returns the Binance coin (BNB) balance of a given address.
Parameter |
Explanation |
Example |
binancecoinaddress |
Binance coin address you want to get the balance of |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"binancecoinaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "binancecoinaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "balance": "0.456"}
getTokenBalance
Endpoint:
https://eu.bsc.chaingateway.io/v1/getTokenBalance
HTTP Method: POST
Returns the token balance of a given address.
Parameter |
Explanation |
Example |
contractaddress |
Binance smart chain contract address of the BEP-20 token |
0x5b86a33f0c232fe909eb4602a9d039072869d915 |
binancecoinaddress |
Binance coin address you want to get the balance of |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "binancecoinaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "binancecoinaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "balance": "0.456"}
getTransaction
Endpoint:
https://eu.bsc.chaingateway.io/v1/getTransaction
HTTP Method: POST
Returns info about a specific confirmed BNB or BEP-20 transaction on the binance smart chain by transaction hash
Parameter |
Explanation |
Example |
txid |
(Optional) Transaction id/hash of Binancecoin or token transfer |
0x9800b1a53ce3aae4652b7e4b69a1cdaaab47ecd36f91558590f0436deb05669f |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"txid":"0x9800b1a53ce3aae4652b7e4b69a1cdaaab47ecd36f91558590f0436deb05669f", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok":true,"bep-20":false,"txid":"0x344eee4cbcca4978557a86912199dd3c127897a9b144d456c1431a3567705f1c","blockhash":"0x6fc87395b11279295d6c99561be167e7f98c76da8666a1375efe2ceed88ea232","blocknumber":5564697,"txindex":277,"from":"0x33d5a7f388b1aa58a935ece946cb45cfc8505bdf","to":"0x734be7ac1efbe09aa13ed54b4935016a80214d12","amount":"0.003043132108765433","gasprice":10,"gas":21000,"confirmations":53947}
getTransactionReceipt
Endpoint:
https://eu.bsc.chaingateway.io/v1/getTransactionReceipt
HTTP Method: POST
Returns information about a specific transaction hash, especially if a transaction failed or succeeded after block inclusion.
Parameter |
Explanation |
Example |
txid |
(Optional) Transaction id/hash of Binancecoin or token transfer |
0x9800b1a53ce3aae4652b7e4b69a1cdaaab47ecd36f91558590f0436deb05669f |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"txid":"0x2792995bce621174ba9e77b9de61fad3bc3b7fab93470e640c401096ea65d29a", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok":true,"txid":"0x2792995bce621174ba9e77b9de61fad3bc3b7fab93470e640c401096ea65d29a","txindex":"102","blockhash":"0x64243b4d43a8acf3b69b570c20fa06a3992d3723b07cd4e90db81e1a521b55c0","blocknumber":"8602400","cumulativegasused":"13532610","gasused":"23509","status":false}
getNFTOwner Beta
Endpoint:
https://eu.bsc.chaingateway.io/v1/getNFTOwner
HTTP Method: POST
Returns the owner address of a specificied BEP-721 token id.
Parameter |
Type |
Explanation |
Example |
contractaddress |
string |
Binance smart chain contract address of the BEP-721 token |
0x5b86a33f0c232fe909eb4602a9d039072869d915 |
tokenid |
integer |
id of the token you want to get the owner address of |
10011 |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "tokenid": 10011, "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "tokenid": 10011, "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "owner": "0x0a24f6e6979ff44cd345ab97f3d46791a8cfffcc"}
getNFTURI Beta
Endpoint:
https://eu.bsc.chaingateway.io/v1/getNFTURI
HTTP Method: POST
Returns the URI of the specified NFT. The returned URI leads to more details of the NFT, like name, description and image.
Parameter |
Type |
Explanation |
Example |
contractaddress |
string |
Binance smart chain contract address of the BEP-721 token |
0x5b86a33f0c232fe909eb4602a9d039072869d915 |
tokenid |
integer |
id of the token you want to get the owner address of |
10011 |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "tokenid": 10011, "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "tokenid": 10011, "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "NFTURI": "https://example.com/token/10011"}
estimateGas Beta
Endpoint:
https://eu.bsc.chaingateway.io/v1/estimateGas
HTTP Method: POST
Calculates an estimate of needed gas and returns it.
Parameter |
Explanation |
Example |
from |
(optional) Binancecoin address you want to send from |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
data |
(optional) Data input, for interacting with smart contracts |
0x48656c6c6f20576f726c6421 |
to |
Binancecoin address you want to send to |
0xef4943d727e34280a2efa0b3352dfd61f508ee48 |
data |
(optional) Encoded transaction data. Please check Ethereum ABI Encoding to understand how to use this parameter. |
0xa9059cbb00000000000000000000000046705dfff24256421a05d056c29e81bdc09723b800000000000000000000000000000000000000000000000000000000f6b2dbcb |
value |
(optional) Amount of BNB to send |
0.05 |
gasprice |
(optional) gas price in gwei. |
5 |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48", "data": "0xa9059cbb00000000000000000000000046705dfff24256421a05d056c29e81bdc09723b800000000000000000000000000000000000000000000000000000000f6b2dbcb", "value": "0.00", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m", "gasprice": 5}
Example Response JSON:
{"ok": true, "gas": 21608, "from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48", "data": "0xa9059cbb00000000000000000000000046705dfff24256421a05d056c29e81bdc09723b800000000000000000000000000000000000000000000000000000000f6b2dbcb", "value": "0.05", "gasprice": 5}
listAddresses
Endpoint:
https://eu.bsc.chaingateway.io/v1/listAddresses
HTTP Method: POST
Returns all Binancecoin addresses created with an account
Parameter |
Explanation |
Example |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok":true,"addresses":[{"binancecoinaddress":"0xa1f36016221d48ce7f15cde7b826a4fbe09bacce"}]}
importAddress
Endpoint:
https://eu.bsc.chaingateway.io/v1/importAddress
HTTP Method: POST
Imports an existing keystore into our system and makes it possible to send transactions from it
Parameter |
Explanation |
Example |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
filename |
Filename of the keystore file |
UTC--2020-05-01T12-30-12.020Z--4fb45889cd2d3348348e39c613c41bf1dc43760a |
content |
Content of keystore file |
{"version":3,"id":"f0449f3f-1ef2-5fb9-bf09-20bb72c47167","address":"4fb45889cd2d3348348e39c613c41bf1dc43760a","crypto":{"ciphertext":"027fbbe9d7b91b1a4a3afddcb27a07ac5e7fff550fd167452a6345a961f21a4d","cipherparams":{"iv":"a2b3022a9d7d76ade60dd70e5405cc09"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"fd84f455da4ad1325cf5bc7beb06bf3052919278c76373a67507aaa68bcebab3","n":131056,"r":6,"p":1},"mac":"d46d36b6facd1f3f5549f01cb5c87de0c01b68b6445410259128c52d515a7b6d"}} |
password |
Password to access the keystore (won't be stored unencrypted) |
padN39QkRA2hJ |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m", "filename": "UTC--2020-05-01T12-30-12.020Z--4fb45889cd2d3348348e39c613c41bf1dc43760a", "content": {"version":3,"id":"f0449f3f-1ef2-5fb9-bf09-20bb72c47167","address":"4fb45889cd2d3348348e39c613c41bf1dc43760a","crypto":{"ciphertext":"027fbbe9d7b91b1a4a3afddcb27a07ac5e7fff550fd167452a6345a961f21a4d","cipherparams":{"iv":"a2b3022a9d7d76ade60dd70e5405cc09"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"fd84f455da4ad1325cf5bc7beb06bf3052919278c76373a67507aaa68bcebab3","n":131056,"r":6,"p":1},"mac":"d46d36b6facd1f3f5549f01cb5c87de0c01b68b6445410259128c52d515a7b6d"}}, "password": "padN39QkRA2hJ"}
Example Response JSON:
{"ok":true,"binancecoinaddress": "0x4fb45889cd2d3348348e39c613c41bf1dc43760a", "filename": "UTC--2020-05-01T12-30-12.020Z--4fb45889cd2d3348348e39c613c41bf1dc43760a"}
exportAddress
Endpoint:
https://eu.bsc.chaingateway.io/v1/exportAddress
HTTP Method: POST
Exports an existing keystore file so you can use it in other wallets
Parameter |
Explanation |
Example |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
binancecoinaddress |
EBinancecoin address you want the keystore of |
0x4fb45889cd2d3348348e39c613c41bf1dc43760a |
password |
Password to access the keystore |
padN39QkRA2hJ |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m", "binancecoinaddress": "0x4fb45889cd2d3348348e39c613c41bf1dc43760a", "password": "padN39QkRA2hJ"}
Example Response JSON:
{"ok":true, "filename": "UTC--2020-05-01T12-30-12.020Z--4fb45889cd2d3348348e39c613c41bf1dc43760a", "content": {"version":3,"id":"f0449f3f-1ef2-5fb9-bf09-20bb72c47167","address":"4fb45889cd2d3348348e39c613c41bf1dc43760a","crypto":{"ciphertext":"027fbbe9d7b91b1a4a3afddcb27a07ac5e7fff550fd167452a6345a961f21a4d","cipherparams":{"iv":"a2b3022a9d7d76ade60dd70e5405cc09"},"cipher":"aes-128-ctr","kdf":"scrypt","kdfparams":{"dklen":32,"salt":"fd84f455da4ad1325cf5bc7beb06bf3052919278c76373a67507aaa68bcebab3","n":131056,"r":6,"p":1},"mac":"d46d36b6facd1f3f5549f01cb5c87de0c01b68b6445410259128c52d515a7b6d"}}}
subscribeAddress
Endpoint:
https://eu.bsc.chaingateway.io/v1/subscribeAddress
HTTP Method: POST
Creates a new subscription/IPN for the given address (and contractaddress). You will receive a notification to the given url every time a deposit is received or a withdrawal has been sent.
Please return {"ok": true} in JSON format and with JSON header to signal our API that the IPN has been received successfully. For an example, check out this tutorial.
Parameter |
Explanation |
Example |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
binancecoinaddress |
The address you want to watch |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
contractaddress |
(Optional) Contractaddress of the Token you want to watch (Will watch Binance coin by default) |
0x5b86a33f0c232fe909eb4602a9d039072869d915 |
url |
The URL you want to receive notifications on. The script on the url should run below 10 seconds, otherwise the notification will fail! Also, please return {"ok": true} in JSON format and header to signal our API that the IPN has been received successfully. |
https://yoururl.com/ipnreceiver.php |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m","binancecoinaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "url": "https://yoururl.com/ipnreceiver.php"}
Example Response JSON:
{"ok":true, "binancecoinaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "url": "https://yoururl.com/ipnreceiver.php"}
UnsubscribeAddress
Endpoint:
https://eu.bsc.chaingateway.io/v1/unsubscribeAddress
HTTP Method: POST
Deletes an existing subscription/IPN for the given address (and contractaddress).
Parameter |
Explanation |
Example |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
binancecoinaddress |
The address you are watching |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
contractaddress |
(Optional) Contractaddress of the Token you are watching (Will unwatch Binance coin by default) |
0x5b86a33f0c232fe909eb4602a9d039072869d915 |
url |
The URL you receive notifications on |
https://yoururl.com/ipnreceiver.php |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m","binancecoinaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "url": "https://yoururl.com/ipnreceiver.php"}
Example Response JSON:
{"ok":true, "binancecoinaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "url": "https://yoururl.com/ipnreceiver.php", "deleted": true}
listSubscribedAddresses
Endpoint:
https://eu.bsc.chaingateway.io/v1/listSubscribedAddresses
HTTP Method: POST
Returns all subscriptions/IPNs created with an account
Parameter |
Explanation |
Example |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok":true,"ipns":[{"binancecoinaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "url": "https://yoururl.com/ipnreceiver.php"}]}
listFailedIPNs
Endpoint:
https://eu.bsc.chaingateway.io/v1/listFailedIPNs
HTTP Method: POST
Returns all IPNs that couldn't be sent. Our system tries to send IPNs 10 times until they end up failed.
Parameter |
Explanation |
Example |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok":true,"failed_ipns":[{"id":"182659","timestamp":"2019-12-18 17:14:36","binancecoinaddress":"0xa1f36016221d48ce7f15cde7b826a4fbe09bacce",
"contractaddress":null,"amount":"0.0277",
"url":"https:\/\/yoururl.com/ipnreceiver.php","action":"withdraw"}]}
resendFailedIPN
Endpoint:
https://eu.bsc.chaingateway.io/v1/resendFailedIPN
HTTP Method: POST
Tries to resend a failed IPN
Parameter |
Explanation |
Example |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
id |
ID of the IPN to send again |
182659 |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m", "id": 182659}
Example Response JSON:
{"ok":true, "id": 182659}
newAddress
Endpoint:
https://eu.bsc.chaingateway.io/v1/newAddress
HTTP Method: POST
Generates a new Binancecoin address you can use to send or receive funds. Do not lose the password! We can't restore access to an address if you lose it.
Parameter |
Explanation |
Example |
password |
Password which is being used for transactions. DON'T LOSE IT |
padN39QkRA2hJ |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"password": "padN39QkRA2hJ", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "binancecoinaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "password": "padN39QkRA2hJ"}
deleteAddress
Endpoint:
https://eu.bsc.chaingateway.io/v1/deleteAddress
HTTP Method: POST
Deletes an existing Binancecoin address from our systems. Be careful when using this function.
Parameter |
Explanation |
Example |
binancecoinaddress |
Binancecoin address you want to renew |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
password |
The Password of the Binancecoin address |
padN39QkRA2hJ |
Example Request JSON:
{"binancecoinaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m", "password": "padN39QkRA2hJ"}
Example Response JSON:
{"ok": true, "binancecoinaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "deleted": true}
sendBinancecoin
Endpoint:
https://eu.bsc.chaingateway.io/v1/sendBinancecoin
HTTP Method: POST
Sends Binance coin (BNB) from an address controlled by the account to a specified receiver address.
Parameter |
Explanation |
Example |
from |
Binancecoin address you want to send from |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
data |
(optional) Data input, for interacting with smart contracts |
0x48656c6c6f20576f726c6421 |
to |
Binancecoin address you want to send to |
0xef4943d727e34280a2efa0b3352dfd61f508ee48 |
password |
Password of the Binancecoin address you want to send from |
padN39QkRA2hJ |
amount |
Amount of BNB you want to send |
0.05 |
identifier |
(Optional) Prevents double sending. Can be any string below 32 characters. |
CN562 |
nonce |
The nonce of the transaction (to replace pending tx for example) |
15 |
gas |
(optional) gas amount. Default is 21000 |
21000 |
gasprice |
(optional) gas price in gwei. |
5 |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48", "password": "padN39QkRA2hJ", "amount": "0.05", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m", "gas": 21000}
Example Response JSON:
{"ok": true, "txid": "0xcff06775098019d18f7bab6a350c18e86f89399d
b63cbce5269104e6c9a79499", "from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48", "amount": "0.05"}
clearAddress
Endpoint:
https://eu.bsc.chaingateway.io/v1/clearAddress
HTTP Method: POST
Sends all Binance coin (BNB) on an address to a specified receiver address.
Parameter |
Explanation |
Example |
binancecoinaddress |
Binancecoin address you want to clear |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
newaddress |
Binancecoin address you want to send all BNB to |
0xef4943d727e34280a2efa0b3352dfd61f508ee48 |
password |
Password of the Binancecoin address you want to send from |
padN39QkRA2hJ |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"binancecoinaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "newaddress": "0xef4943d727e34280a2efa0b3352dfd61f508ee48", "password": "padN39QkRA2hJ", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "txid": "0xcff06775098019d18f7bab6a350c18e86f89399d
b63cbce5269104e6c9a79499", "binancecoinaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "newaddress": "0xef4943d727e34280a2efa0b3352dfd61f508ee48", "amount: "0.00980226", "gas": "0.000063", "total": "0.00986526"}
sendToken
Endpoint:
https://eu.bsc.chaingateway.io/v1/sendToken
HTTP Method: POST
Sends BEP-20 tokens from an address controlled by the account to a specified receiver address. The token contract address is needed to specify the token.
Parameter |
Explanation |
Example |
contractaddress |
Binance smart chain contract address of the BEP-20 token |
0x5b86a33f0c232fe909eb4602a9d039072869d915 |
from |
Binancecoin address you want to send from |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
to |
Binancecoin address you want to send to |
0xef4943d727e34280a2efa0b3352dfd61f508ee48 |
password |
Password of the Binancecoin address you want to send from |
padN39QkRA2hJ |
amount |
Amount of tokens you want to send |
0.05 |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
identifier |
(Optional) Prevents double sending. Can be any string below 32 characters. |
CN562 |
gasprice |
(Optional) Gas Price in GWEI |
5 |
gas |
(Optional) gas limit |
90000 |
Example Request JSON:
{"contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48", "password": "padN39QkRA2hJ", "amount": "0.05", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "txid": "0xcff06775098019d18f7bab6a350c18e86f89399d
b63cbce5269104e6c9a79499", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48", "amount": "0.05"}
sendNFT Beta
Endpoint:
https://eu.bsc.chaingateway.io/v1/sendNFT
HTTP Method: POST
Sends BEP-721 tokens from an address controlled by the account to a specified receiver address. The token contract address and id is needed to specify the token.
Parameter |
Explanation |
Example |
contractaddress |
Binance smart chain contract address of the BEP-721 token |
0x5b86a33f0c232fe909eb4602a9d039072869d915 |
tokenid |
ID of the token to send as integer |
10011 |
from |
Binancecoin address you want to send from |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
to |
Binancecoin address you want to send to |
0xef4943d727e34280a2efa0b3352dfd61f508ee48 |
password |
Password of the Binancecoin address you want to send from |
padN39QkRA2hJ |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
gasprice |
(Optional) Gas Price in GWEI |
5 |
gas |
(Optional) gas limit |
200000 |
Example Request JSON:
{"contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48", "password": "padN39QkRA2hJ", "tokenid": 10011, "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "txid": "0xcff06775098019d18f7bab6a350c18e86f89399d
b63cbce5269104e6c9a79499", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48", "tokenid": 10011}