Introduction
This API allows you to interact with Ethereum and all ERC20 tokens. If you ever looked for a possibility to automate token or ethereum payments this is the right place.
You still have no idea for real use cases? Let me give you some examples: Accept your own 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 but also receiving them. You could even create a secure wallet for your token which only the wallet owner has access to.
Postman
Postman is a great software to test APIs, it helped us a lot when developing this API. If you haven't installed it yet, you can download it
here.
We have created a Postman collection that allows to import all functions and their settings, including descriptions in Postman. This way you can test all functions with the click of a button (just change the parameters before).
You can import the collection by clicking the button below:
Postman Documentation
While we worked a lot with Postman, we found this beautiful feature to generate a whole documentation out of a collection. It includes examples of using all Chaingateway.io functions in all popular programming languages, which is great for beginners but also advanced developers. It is really recommended to check it out!
Open Postman Documentation
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.eth.chaingateway.io/v1/{function}. We are currently working on providing an US based endpoint.
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 to the JSON body in your request, like
"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"
. This is not recommended!
- Add it in the HTTP header as
'Authorization: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m'
. This is way more secure and may be the only option in future versions.
Please do not share your api key! If you did so by mistake, immediately regenerate it in your account panel!
Parameters
Ethereum Address
This is an ethereum address, which has 0x in front and 40 hexadecimal characters after it. CAUTION: If you send tokens, the receiving address must be ERC20 compatible. So please don't use an exchange address.
Contract Address
The contract address is the ethereum smart contract address of the ERC20 token you want to use. It has the same format as normal Ethereum addresses.
Amount
We want amounts to be in normal decimal format. If you want to send 2.5 ETH, 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.
Password
Whenever you create a new ethereum 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, so please don't lose it.
Identifier
The identifier parameter allows to attach an unique string (Up to 32 characters) to a transaction. If the identifier has been used for a transaction in the last 30 days already, our API won't process the transaction. This prevents double sending of the same transaction in case you don't get a response from our API.
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 ethereum 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 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 ethereum miners to include your transaction in a block. So please make sure there is always enough ethereum on the address you are sending tokens or ethereum from. The exact fee which is used is determined by the average gas fee at that time (If not specified otherwise).
getToken
Endpoint:
https://eu.eth.chaingateway.io/v1/getToken
HTTP Method: POST
Returns information about a specific ERC20 token like name, symbol, decimal places and total supply.
Parameter |
Explanation |
Example |
contractaddress |
Ethereum contract address of the ERC20 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.eth.chaingateway.io/v1/getLastBlockNumber
HTTP Method: POST
Returns the block number of the last mined ethereum 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.eth.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.eth.chaingateway.io/v1/getExchangeRate
HTTP Method: POST
Returns the current Ethereum 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": 163.28}
getEthereumBalance
Endpoint:
https://eu.eth.chaingateway.io/v1/getEthereumBalance
HTTP Method: POST
Returns the ethereum balance of a given address.
Parameter |
Explanation |
Example |
ethereumaddress |
Ethereum address you want to get the balance of |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"ethereumaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "ethereumaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "balance": 0.456}
getTokenBalance
Endpoint:
https://eu.eth.chaingateway.io/v1/getTokenBalance
HTTP Method: POST
Returns the token balance of a given address.
Parameter |
Explanation |
Example |
contractaddress |
Ethereum contract address of the ERC20 token |
0x5b86a33f0c232fe909eb4602a9d039072869d915 |
ethereumaddress |
Ethereum address you want to get the balance of |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "ethereumaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "ethereumaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "balance": 0.456}
getTransactions Beta
Endpoint:
https://eu.eth.chaingateway.io/v1/getTransactions
HTTP Method: POST
Returns transactions which match the given parameters including all required information
Parameter |
Explanation |
Example |
txid |
(Optional) Transaction id/hash of Ethereum or token transfer |
0x9800b1a53ce3aae4652b7e4b69a1cdaaab47ecd36f91558590f0436deb05669f |
contract_address |
(Optional) Filter by Contract Address of a valid ERC20 token |
0xd26114cd6EE289AccF82350c8d8487fedB8A0C07 |
type |
(Optional) Type filter. Allowed values are 'ERC20' for ERC20 transactions and 'ETH' for Ethereum transactions |
ERC20 |
from |
(Optional) Filter by sender ethereum address |
0x0a2311594059B468c9897338b027C8782398b481 |
to |
(Optional) Filter by receiving ethereum address |
0xbee9422f1b65687d0cb923bbd1fc5ccb9307e861 |
amount |
(Optional) Amount of transactions to display (max. 200 per request) |
10 |
start |
(Optional) Offset to skip transactions. Can be used for pagination. |
5 |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"txid":"0x9800b1a53ce3aae4652b7e4b69a1cdaaab47ecd36f91558590f0436deb05669f", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok":true,"transactions":[{"txid":"0x9800b1a53ce3aae4652b7e4b69a1cdaaab47ecd36f91558590f0436deb05669f","block_number":"6432816","contract_address":"0x9E2B71e87d9304c4773674584EB9D0c838643568","type":"ERC20","token_name":null,"token_symbol":null,"token_decimals":null,"token_supply":null,"gas":"90000","gas_price":"9","from":"0x8dF9654c7D81c850FDd35D93292B2fC60e666bF0","to":"0xbee9422f1b65687d0cb923bbd1fc5ccb9307e861","amount":"10"}]}
getBlock Beta
Endpoint:
https://eu.eth.chaingateway.io/v1/getBlock
HTTP Method: POST
Returns all information of the specified block, for example block number, hash, transaction count, difficulty and optionally all transactions
Parameter |
Explanation |
Example |
block |
block number, block hash or "latest" |
5000000 |
transactions |
(Optional) When true, returns all transactions of the block also |
true |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"block": "5000000", "transactions": false, "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok":true, "hash":"0x7d5a4369273c723454ac137f48a4f142b097aa2779464e6505f1b1c5e37b5382", "block_number":"5000000", "parent_hash":"0xcae4df80f5862e4321690857eded0d8a40136dafb8155453920bade5bd0c46c0", "miner":"0xb2930B35844a230f00E51431aCAe96Fe543a0347", "difficulty":"2546613975853490", "size_in_bytes":"24017", "gas_limit":"8000029", "gas_used":"7994053", "time_stamp":"2018-01-30 14:41:33", "transactions_count":"109"}
listAddresses
Endpoint:
https://eu.eth.chaingateway.io/v1/listAddresses
HTTP Method: POST
Returns all ethereum addresses created with an account
Parameter |
Explanation |
Example |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok":true,"addresses":[{"ethaddress":"0xa1f36016221d48ce7f15cde7b826a4fbe09bacce"}]}
importAddress
Endpoint:
https://eu.eth.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,"ethaddress": "0x4fb45889cd2d3348348e39c613c41bf1dc43760a", "filename": "UTC--2020-05-01T12-30-12.020Z--4fb45889cd2d3348348e39c613c41bf1dc43760a"}
exportAddress
Endpoint:
https://eu.eth.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 |
ethaddress |
Ethereum address you want the keystore of |
0x4fb45889cd2d3348348e39c613c41bf1dc43760a |
password |
Password to access the keystore |
padN39QkRA2hJ |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m", "ethaddress": "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.eth.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 |
ethereumaddress |
The address you want to watch |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
contractaddress |
(Optional) Contractaddress of the Token you want to watch (Will watch ethereum 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","ethereumaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "url": "https://yoururl.com/ipnreceiver.php"}
Example Response JSON:
{"ok":true, "ethereumaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "url": "https://yoururl.com/ipnreceiver.php"}
UnsubscribeAddress
Endpoint:
https://eu.eth.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 |
ethereumaddress |
The address you are watching |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
contractaddress |
(Optional) Contractaddress of the Token you are watching (Will watch ethereum by default) |
0x5b86a33f0c232fe909eb4602a9d039072869d915 |
url |
The URL you receive notifications on |
https://yoururl.com/ipnreceiver.php |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m","ethereumaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "url": "https://yoururl.com/ipnreceiver.php"}
Example Response JSON:
{"ok":true, "ethereumaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "url": "https://yoururl.com/ipnreceiver.php", "deleted": true}
listSubscribedAddresses
Endpoint:
https://eu.eth.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":[{"ethereumaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "url": "https://yoururl.com/ipnreceiver.php"}]}
listFailedIPNs
Endpoint:
https://eu.eth.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","ethereumaddress":"0xa1f36016221d48ce7f15cde7b826a4fbe09bacce",
"contractaddress":null,"amount":"0.0277",
"url":"https:\/\/yoururl.com/ipnreceiver.php","action":"withdraw"}]}
resendFailedIPN
Endpoint:
https://eu.eth.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.eth.chaingateway.io/v1/newAddress
HTTP Method: POST
Generates a new ethereum addresses 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, "ethereumaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "password": "padN39QkRA2hJ"}
deleteAddress
Endpoint:
https://eu.eth.chaingateway.io/v1/deleteAddress
HTTP Method: POST
Deletes an existing ethereum address. Be careful when using this function.
Parameter |
Explanation |
Example |
ethereumaddress |
Ethereum address you want to renew |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
password |
The Password of the ethereum address |
padN39QkRA2hJ |
Example Request JSON:
{"ethereumaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m", "password": "padN39QkRA2hJ"}
Example Response JSON:
{"ok": true, "ethereumaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "deleted": true}
sendEthereum
Endpoint:
https://eu.eth.chaingateway.io/v1/sendEthereum
HTTP Method: POST
Sends ethereum from an address controlled by the account to a specified receiver address.
Parameter |
Explanation |
Example |
from |
Ethereum address you want to send from |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
to |
Ethereum address you want to send to |
0xef4943d727e34280a2efa0b3352dfd61f508ee48 |
password |
Password of the ETH address you want to send from |
padN39QkRA2hJ |
amount |
Amount of ETH you want to send |
0.05 |
gas |
(optional) gas amount. Default is 21000 |
21000 |
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.eth.chaingateway.io/v1/clearAddress
HTTP Method: POST
Sends all available ethereum funds of an address to a specified receiver address.
Parameter |
Explanation |
Example |
ethereumaddress |
Ethereum address you want to clear |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
newaddress |
Ethereum address you want to send all Ethereum to |
0xef4943d727e34280a2efa0b3352dfd61f508ee48 |
password |
Password of the ETH address you want to send from |
padN39QkRA2hJ |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"ethereumaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "newaddress": "0xef4943d727e34280a2efa0b3352dfd61f508ee48", "password": "padN39QkRA2hJ", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "txid": "0xcff06775098019d18f7bab6a350c18e86f89399d
b63cbce5269104e6c9a79499", "ethereumaddress": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "newaddress": "0xef4943d727e34280a2efa0b3352dfd61f508ee48", "amount: 0.00980226, "gas": 0.000063, "total": 0.00986526}
sendToken
Endpoint:
https://eu.eth.chaingateway.io/v1/sendToken
HTTP Method: POST
Sends ERC20 tokens from an address controlled by the account to a specified receiver address. The token contract address is needed to specify the token. The use of the identifier parameter is recommend and awaits an unique string. Whenever a transaction is being sent, the identifier is checked and the transaction gets dropped if there is one with that identifier already.
Parameter |
Explanation |
Example |
contractaddress |
Ethereum contract address of the ERC20 token |
0x5b86a33f0c232fe909eb4602a9d039072869d915 |
from |
Ethereum address you want to send from |
0xa1f36016221d48ce7f15cde7b826a4fbe09bacce |
to |
Ethereum address you want to send to |
0xef4943d727e34280a2efa0b3352dfd61f508ee48 |
password |
Password of the ETH 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, "gasprice": 5, "gas": 90000, "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "txid": "0xcff06775098019d18f7bab6a350c18e86f89399d
b63cbce5269104e6c9a79499", "contractaddress": "0x5b86a33f0c232fe909eb4602a9d039072869d915", "from": "0xa1f36016221d48ce7f15cde7b826a4fbe09bacce", "to": "0xef4943d727e34280a2efa0b3352dfd61f508ee48", "amount": 0.05}