Skip to main content

Withdrawal

3 endpoints

POST /users/{user}/wallets/{wallet}/withdrawals Create a withdrawal

Create a new withdrawal request.

Parameters

user required
string · path
id parameter must be included in the URI
wallet required
string · path
id parameter must be included in the URI

Request Body

assetId required
string
Associated digital asset to the wallet.
receiverAddress required
string
The address of the receiver
device required
string
Device name or user agent
ip required
string
User's IP address
memo
string
Note or description that will be recorded in the transaction
userNote
string
Purely informative note associated with the transaction
externalReference
string
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
string · path
id parameter must be included in the URI
wallet required
string · path
id parameter must be included in the URI
page
number · query
Page number of the records list
limit
number · query
Max number of records by page. limit=0 to return all records
sort
string · query
Sort the response PARAM or -PARAM
createdAfter
string · query
Created after date
createdBefore
string · query
Created before date
status
string · query
Purchase status
externalReference
string · query
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
string · path
id parameter must be included in the URI
wallet required
string · path
id parameter must be included in the URI
withdrawal required
string · path
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"
}