TABLE OF CONTENTS
- Endpoint
- Authentication
- Requesting an account list
- Retrieving deposit address
- Obtaining and renewing deposit addresses
- Retrieving balance information
- Retrieving list of trusted addresses
- Creating withdrawal requests
- Retrieving a list of active withdrawal requests
- Retrieving a list of active deposits
- Retrieving balance history
The Transfers API allows for the automation of deposits and withdrawals to your account.
Endpoint
The Transfers API is a REST API. All its methods are accessible by the following endpoint:
https://api.xena.exchange/transfers/
Authentication
Authentication for the Transfers API requires the same information as the Trading API. Instead of sending some initial message like Logon, each call to the REST Transfers API must contain 4 HTTP headers:
X-AUTH-API-KEY
X-AUTH-API-PAYLOAD
X-AUTH-API-SIGNATURE
X-AUTH-API-NONCE
Nonce (UNIX nanoseconds timestamp) must be unique for each request and no older than 60 seconds.
Learn how to get keys for API.
Requesting an account list
The method returns an array of accounts to which the API Key has access with the scope “transfers.”
Response:
Retrieving deposit address
Response:
The method returns HTTP status code 404 (Not Found) if there is no active address for the requested account and currency.
“allowsRenewal” indicates whether the address may be renewed by the client or whether it is permanent.
Obtaining and renewing deposit addresses
Response:
Retrieving balance information
Response:
Retrieving list of trusted addresses
It is possible to withdraw funds via the API only through trusted addresses. This method returns the list of trusted addresses for all currencies for the given account.
Response:
Creating withdrawal requests
It is possible to withdraw funds via the API only through trusted addresses. Two-factor authentication is skipped for requests created through the API.
Body:
Response:
In the event of a bad request, the response contains the HTTP status code 400 and error description in its body:
The “fields” array contains the names of the fields that have not passed validation.
Retrieving a list of active withdrawal requests
This method returns a list of the active requests and requests completed within the last 24 hours.
Response:
Withdrawal request statuses
Status | Status Message |
1 | New |
2 | Completed |
3 | Duplicate |
4 | Not enough money |
5 | Waiting for manual approval from XENA |
100, 101, 102, 103 | Request is being processed |
Retrieving a list of active deposits
Returns a list of active deposits and deposits completed within the last 24 hours.
Response:
Deposit statuses
Status | Status Message |
1 | New |
2 | Completed |
Retrieving balance history
Returns a list of balance operations.
Parameters: page, limit (up to 5000), from, to, symbol, trade_id, client_order_id
To filter by blockchain transaction:
Request with pagination:
Response:
Response parameters
Field | Type / possible values | Status Message | |
accountId | M | number | Account number |
ts | M | timestamp | Operation timestamp |
amount | M | sring | Operation amount |
kind | M | string | Operation type Possible values: - "deposit" - "withdrawal" - "internal deposit" - "internal withdrawal" - "rebate" - "reward" |
commission | M | string | Operation commission |
id | M | number | Operation id |