Wallet methods
Wallet object
- id
string
The unique system identifier of a wallet.
This value was generated automatically when creating a wallet and can’t be changed.
- label
string
The tag or name assigned to a wallet for easier locating it in the system.
This value is set when creating a wallet and can be changed anytime.
- status
number
The current status of a wallet. Possible values:
1
— Not active. The wallet hasn’t been activated due to some technical or blockchain issues.2
— In progress. The wallet is now being registered in the system or requires the activation and currently unavailable.3
— Active. The wallet has been activated (if required) and can be used.
- type
number
The wallet type. Possible values:
1
— Merchant2
— Enterprise5
— Swap
This value was selected when creating a wallet and can’t be changed.
- created_at
string
The date and time of wallet creation.
- balance_confirmed
string
The balance available for financial operations.
- balance_pending
string
The sum of all deposit- and payout-related transactions that haven’t yet received the required number of confirmation blocks.
This value is positive for incoming and negative for outgoing transactions. This balance can’t currently be used for financial operations.
- balance_unusable
string
The amount of incoming transfers blocked by AML.
This balance can’t currently be used for financial operations.
- minimal_transfer_amount
string
For Enterprise wallets only.
The minimum amount of the incoming transfer, in the wallet currency.
Payments below the specified amount are automatically rejected. This can be useful if the transaction blockchain fee exceeds the transaction amount. In this case, you can see a new transfer with the Cancelled status on the Wallet management > Transfers page of the Web UI; the callback isn’t sent. Such transfers can be confirmed and accepted manually, on the Events page of the Web UI.
- destination
object
For Enterprise wallets only.
The wallet address.
The object contains the following fields:
- address_type
string or null
For wallets denominated in BTC, LTC, BCH, XRP: the address type. Refer to Address types for supported values.
For other wallets the value is
null
.- address
string
The deposit address.
For wallets denominated in XRP, an array of objects is returned containing the
x-address
andaddress
(with a destinationtag
additionally specified):"destination": [ { "address_type": "x-address", "address": "X7dBkB9KmvUh6GGHbjhxdu4LfkwhJ74oVWbGRoy7VLnHdJ6" }, { "address_type": "address", "address": "rsxXXvBXmKUkCyCeNCHUFpfCX9pQdxQhv5", "tag": "0" } ]
For wallets denominated in XLM, the
destination
object is as follows:"destination": { "address_type": "address", "address": "GCZJFWB5NVQHVBMV4U6CCJIXXBGINGYF2W33PMD5REBD5VQ6H6BLCJR5", "tag_type": 0, "tag": "" }
where:
address_type
is always"address"
.address
is a string value containing the wallet address.tag_type
is a number value containing tag or memo type. Possible values:0
— no memo1
— a 64-bit unsigned integer
tag
is a string value containing the tag.
- address_type
- currency
object
The wallet currency.
The object contains the string
id
field matching the currency ISO code (refer to Currency codes for possible values).- parent
object
For wallets denominated in tokens only.
The Parent wallet of a wallet denominated in tokens. For other wallets, returns
"data": null
.The object contains the string
id
field matching the parent wallet system identifier.
{
"type": "wallet",
"id": "448",
"attributes": {
"label": "My Wallet",
"status": 3,
"type": 2,
"created_at": "2020-11-06T06:03:44.301815Z",
"balance_confirmed": "0.23221548",
"balance_pending": "0.00000000",
"balance_unusable": "0.00364702",
"minimal_transfer_amount": "0.00000546",
"destination": {
"address_type": "p2sh-segwit",
"address": "2N3Ac2cZzRVoqfJGu1bFaAebq3izTgr1WLv"
}
},
"relationships": {
"currency": {
"data": {
"type": "currency",
"id": "2005"
}
},
"parent": {
"data": {
"type": "wallet",
"id": "14"
}
}
}
}
Get wallet
Request
- id
string
The unique system identifier of a wallet.
Filtering by object parameters can be applied according to the JSON API Specification.
GET[base]/wallet/{id}
curl --request GET \
--url [base]/wallet/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json'
import requests
url = 'https://[base]/wallet/'
headers = {
'Content-Type': 'application/vnd.api+json',
'Authorization': 'Bearer
}
requests.get(url, headers=headers)
<?php
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
$client = new GuzzleHttp\Client();
try {
$res = $client->get('https://[base]/wallet/', [
'headers' => [
'Authorization' => 'Bearer <Change to your access token>',
'Content-Type' => 'application/vnd.api+json',
],
]);
echo $res->getBody();
} catch (RequestException $e) {}
Response
In case of success, the response body contains a wallet object or an array of objects (if the id
wasn’t specified).
The wallets list is paginated and the default page size is 10. You can adjust pagination according to the JSON API Specification.
Response codes
HTTP code |
Application code |
Description |
Suggested action |
---|---|---|---|
200 |
— |
The request succeeded. |
— |
401 |
2007: No active account found with the given credentials. |
Incorrect credentials. |
Send correct credentials. |
403 |
3001: You can not view wallet |
You don’t have permissions to view the wallet. |
— |
404 |
404: Not found |
The wallet with the given |
Send a correct |
500 |
— |
Internal server error. |
Try again later. |
502 |
— |
Bad gateway. |
Try again later. |
503 |
— |
Service unavailable. |
Try again later. |
504 |
— |
Gateway timeout. |
Try again later. |
5xx |
— |
Other server errors. |
Try again later. |