Skip to main content

Withdrawal

API Scopes

GET request need Permission to view withdrawal history, POST request need Permission to execute withdrawals.

Withdrawal

Attrubute NameTypeDescriptionExample
idnumberid of deposit
customer_idstringid of customer
asset_uuidstringuuid of asset
amountstringamount
statestringwithdrawal status, one of PENDING/COMPLETED/FAILED/CANCELLED
recipient_idstringid of recipient
completed_atstringcompleted time
inserted_atstringwithdraw time
is_internalbooleanwhether is internal withdrawl
target_addressstringaddress of target
notestringcontent of note

Get withdrawals of user

Required read permission of wallet

GET /viewer/withdrawals

Parameters

NameTypeRequireDescriptionExample
page_tokenstringfalserequest page after this page token
limitstringfalsedefalut 50
kindstringfalsekind: on_chain, off_chain, internal
asset_symbolstringfalseasset symbolBTC

Response is a Withdrawal array.

{
"data": [{
"id": 10,
"customer_id": "10",
"asset_symbol": "ETH",
"amount": "5",
"state": "COMPLETED",
"note": "2018-03-15T16:13:45.610463Z",
"txid": "0x4643bb6b393ac20a6175c713175734a72517c63d6f73a3ca90a15356f2e967da0",
"completed_at": "2018-03-15T16:13:45.610463Z",
"inserted_at": "2018-03-15T16:13:45.610463Z",
"is_internal": true,
"target_address": "0x4643bb6b393ac20a6175c713175734a72517c63d6f7"
}],
"page_token":"eyJvZmZzZXQiOjEwMCwia2luZCI6IlRSQU5TRkVSIn0="
}

Get one withdrawal

GET /viewer/withdrawals/{guid}

Parameters

NameTypeRequireDescriptionExample
guidstringtrueguidc37173f4-751f-4cc1-9904-c1041dcae4f7

Response is Withdrawal object.

{
"code":0,
"message":"",
"data": {
"id": 10,
"customer_id": "10",
"asset_symbol": "ETH",
"amount": "5",
"state": "COMPLETED",
"note": "2018-03-15T16:13:45.610463Z",
"txid": "0x4643bb6b393ac20a6175c713175734a72517c63d6f73a3ca90a15356f2e967da0",
"completed_at": "2018-03-15T16:13:45.610463Z",
"inserted_at": "2018-03-15T16:13:45.610463Z",
"is_internal": true,
"target_address": "0x4643bb6b393ac20a6175c713175734a72517c63d6f7"
}
}

Create withdrawal of user

Required write permission of wallet

POST /viewer/withdrawals

Parameters

NameTypeRequireDescriptionExample
symbolstringtrueasset symbolBTC
target_addressstringtruetarget address which in whitelist3PumsXwUSakZomHXMcY93RrVRJ7PAi2ida
amountstringtrueamount2.52
memostringfalsememo
guidstringfalseguidc37173f4-751f-4cc1-9904-c1041dcae4f7
gateway_namestringfalsewithdraw asset belongs to which chainFor example, if you wish to widrawal USDT on Ethereum, then symbol should be 'USDT' and gateway_name should be 'Ethereum'. Avaliable gateway names: Bitcoin, Ethereum, Tron, EOS, Mixin

Response is a Withdrawal object.

{
"code":0,
"message":"",
"data": {
"id": 10,
"customer_id": "10",
"asset_symbol": "ETH",
"amount": "5",
"state": "COMPLETED",
"note": "2018-03-15T16:13:45.610463Z",
"txid": "0x4643bb6b393ac20a6175c713175734a72517c63d6f73a3ca90a15356f2e967da0",
"completed_at": "2018-03-15T16:13:45.610463Z",
"inserted_at": "2018-03-15T16:13:45.610463Z",
"is_internal": true,
"target_address": "0x4643bb6b393ac20a6175c713175734a72517c63d6f7"
}
}

Cancel one withdrawal

POST /viewer/withdrawals/{guid}/cancel

this is a async api, and returning code 0 does not mean final success, it is recommended to obtain the final status through the get api

Parameters

NameTypeRequireDescriptionExample
guidstringtrueguidc37173f4-751f-4cc1-9904-c1041dcae4f7

Response

{
"code":0,
"message":"cancel request submitted",
"data": null
}