Withdrawal
Withdrawal
Attrubute Name | Type | Description | Example |
---|---|---|---|
id | number | id of deposit | |
customer_id | string | id of customer | |
asset_uuid | string | uuid of asset | |
amount | string | amount | |
state | string | withdrawal status, one of PENDING/COMPLETED/FAILED | |
recipient_id | string | id of recipient | |
completed_at | string | completed time | |
inserted_at | string | withdraw time | |
is_internal | boolean | whether is internal withdrawl | |
target_address | string | address of target | |
note | string | content of note |
Get withdrawals of user
Required read permission of wallet
GET /viewer/withdrawals
Parameters
Name | Type | Require | Description | Example |
---|---|---|---|---|
page_token | string | false | request page after this page token | |
limit | string | false | defalut 50 | |
kind | string | false | kind: on_chain, off_chain, internal | |
asset_symbol | string | false | asset symbol | BTC |
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":"dxvf"
}
Create withdrawal of user
Required write permission of wallet
POST /viewer/withdrawals
Parameters
Name | Type | Require | Description | Example |
---|---|---|---|---|
symbol | string | true | asset symbol | BTC |
target_address | string | true | target address | 3PumsXwUSakZomHXMcY93RrVRJ7PAi2ida |
amount | string | true | amount | 2.52 |
memo | string | false | memo | |
gateway_name | string | false | withdraw asset belongs to which chain | For 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.
{
"code":0,
"message":"",
"data":[
{
"id":1,
"customer_id":7,
"asset_uuid":"50293b12-5be8-4f5b-b31d-d43cdd5ccc29",
"amount":"100",
"recipient":null,
"state":"PENDING",
"is_internal":true,
"note":"asdsadsad",
"kind":"on_chain",
"txid":"asdasdasdsadsadsad",
"confirms":5,
"inserted_at":null,
"updated_at":null,
"completed_at":null,
"commision":null,
"explain":""
}
]
}