Withdrawal
3 endpoints
POST
/users/{user}/wallets/{wallet}/withdrawals
Create a withdrawal
Create a new withdrawal request.
Parameters
user required
id parameter must be included in the URI
wallet required
id parameter must be included in the URI
Request Body
assetId required
Associated digital asset to the wallet.
receiverAddress required
The address of the receiver
device required
Device name or user agent
ip required
User's IP address
memo
Note or description that will be recorded in the transaction
userNote
Purely informative note associated with the transaction
externalReference
Reference to external withdrawal ID
Responses
201
400
Bad request or Not enough balance
401
Unauthorized
POST https://api.qa.onyze.pro/v1/users/{user}/wallets/{wallet}/withdrawals
Request body
{
"assetId": "GeFr9xwBR",
"receiverAddress": "1KUEUVh45uK6m83L4LTNF9D4Txi7KSEBxx",
"device": "Mozilla/5.0 (Android; Mobile; rv:13.0) Gecko/13.0 Firefox/13.0",
"ip": "167.145.132.65",
"memo": "Transaction note",
"userNote": "User note",
"externalReference": "External Withdrawal ID"
}
Response 201
{
"id": "2cdc8ab1-6d50-49cc-ba14-54e4ac7ec231"
}
GET
/users/{user}/wallets/{wallet}/withdrawals
List all withdrawals
List all existing withdrawal requests for a user and wallet. Admin audience is required to list all withdrawal requests for all users with userId=* and walletId=*.
Parameters
user required
id parameter must be included in the URI
wallet required
id parameter must be included in the URI
page
Page number of the records list
limit
Max number of records by page. limit=0 to return all records
sort
Sort the response PARAM or -PARAM
createdAfter
Created after date
createdBefore
Created before date
status
Purchase status
externalReference
Reference to external withdrawal ID
Responses
200
400
Bad request
401
Unauthorized
404
Not found
GET https://api.qa.onyze.pro/v1/users/{user}/wallets/{wallet}/withdrawals
Response 200
[
{
"id": "d8vJIh-H",
"createdAt": "2018-08-17T17:04:55.626Z",
"updatedAt": "2018-08-21T18:24:17.185Z",
"transactions": [
"string"
],
"amount": "15.3",
"userId": "yV_laCy3T",
"walletId": "yV_laCy3T",
"receiverAddress": "0x6acb9de0ce98c1ff6772aa8382335013a21df412",
"asset": "BTC",
"assetId": "yV_laCy3T",
"blockchainTransactionId": "string",
"status": "prepared"
}
]
GET
/users/{user}/wallets/{wallet}/withdrawals/{withdrawal}
Find a withdrawal by id
Find an existing withdrawal by its id.
Parameters
user required
id parameter must be included in the URI
wallet required
id parameter must be included in the URI
withdrawal required
id parameter must be included in the URI
Responses
200
401
Unauthorized
404
Not found
GET https://api.qa.onyze.pro/v1/users/{user}/wallets/{wallet}/withdrawals/{withdrawal}
Response 200
{
"id": "d8vJIh-H",
"createdAt": "2018-08-17T17:04:55.626Z",
"updatedAt": "2018-08-21T18:24:17.185Z",
"transactions": [
"string"
],
"amount": "15.3",
"userId": "yV_laCy3T",
"walletId": "yV_laCy3T",
"receiverAddress": "0x6acb9de0ce98c1ff6772aa8382335013a21df412",
"asset": "BTC",
"assetId": "yV_laCy3T",
"blockchainTransactionId": "string",
"status": "prepared"
}