/depositToExchange
1 min
POST
http://1.1.1.1/depositToExchange
account_idintegerThe ID of the account involved in this action
exchange_namestringthe exchange name
coin_typestringCoin symbol we want to use in this operation
amountstringamount to transfer in smallest units
feeinteger<p>the fee/gas price/max fee/.... we want to transfer, depending on the coin</p>
gas_limitinteger<p>the gas limit we want to transfer need to be None unless ETH/ERC20/XTZ</p>
descriptionstring<p>free text for describing the transaction (will not be sent to the blockchain)</p>
max_priority_feeinteger<p>the max priority fee we want to tip the miner.</p>
<ul>
<li>Should be sent in EVM / ERC20 transactions
that are EIP1559 type, otherwise should be None. (for more info, read <a href="https://metamask.io/1559/" target="_blank">https://metamask.io/1559/</a>)</li>
</ul>
storage_limitinteger<p>the max storage for the transaction. Only relevant for XTZ.</p>
<p>257 for non existing address in blockchain and 0 for existing address, to be on the safe side you may always use 257</p>
bodyobject
200success
curl --request POST \
--url 'http://1.1.1.1/depositToExchange?account_id=1&exchange_name=okx&coin_type=ETH&amount=1000000&fee=30000000000&gas_limit=21000&description=myDeposit&max_priority_fee=1000000000&storage_limit=257' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"FunctionData": {
"AccountId": 1,
"ExchangeName": "binance",
"CoinType": "ETH",
"Fee": {
"GasLimit": 21000,
"GasPrice": "30000000000",
"MaxPriorityFee": "4000000000",
"StorageLimit": "4000000000"
},
"GroupTransaction": "false",
"IsMetaMaskTransaction": "false",
"Transactions": [
{
"AmountToTransfer": "1000000",
"DestinationAddress": "0x23a4B607D0c0d3F129808b5707e7090d68289c44"
}
]
},
"Meta": {
"FunctionName": "depositToExchange",
"RandomData": "288cd49d4b8bf00e7d6114b78d5668d5581d6b953fafef779133caa844cd4229",
"Destination": "b9cb8afe52f1d52521cf2b62dfe12146156ad5328f83c62c20c7da81b263356a61340de745c858998544c041798b01c2f4fac31bebe52a19280a32cd57d6d374ea",
"Time": "2021-02-07T18:37:46.948Z",
"Source": "048b99461a70a49abe63fd585cb224177a22a92d2e9e4ddfbc0027887bee9d1843388f42a3eb2e740565e115ad8b7981abf59e3b03b771f4b063b53c517d7a9d99",
"AccessToken": "51311c84d2c8fd2fafbe56ceb1fb30a99d3417abfc55769577338ab286798087"
}
}'- This function initiates the deposit operation and, on success, returns an array of transactions with details like the amount transferred and the destination address.
- return on success transactions array: [{'AmountToTransfer': '600','DestinationAddress': '3CSXFAJoWJqEXqV9LFjsbagreAt5PpGLzF'}]}
- NOTE: the deposit address is not controlled by GK8 system.
NOTE The following parameters returned from exchange:
- ApprovalRequestStatus: The status of the deposit approval request
- CoinType: The coin type used in this operation
- AmountToTransfer: The amount deposited on this operation
- DestinationAddress: The address deposited to
example: depositToExchange(1, "okx", "ETH", "1000000", 30000000000, gas_limit=21000, max_priority_fee= 4000000000)