Currency methods
Currency object
- iso number
The currency numeric identifier. It is identical to
id
.- name string
The currency full name: for example,
Bitcoin
.- alpha string
Currency alphabetic identifier: for example,
BTC
.- exp number
Currency precision (the number of digits after the decimal separator).
- confirmation_blocks number
Default number of blocks needed to send a callback.
- minimal_transfer_amount string
The minimum amount of crediting to the wallet in the wallet currency. If the amount of the incoming transfer is less than the specified minimal transfer amount, the transfer will be cancelled.
- block_delay number
An estimated block mining time, in seconds.
- parent object
Parent currency applicable for tokens only; for coins returns
null
. Contains parent currencyid
and represents a blockchain relating to the parent currency.- alias string
Ticker or alias. Used for identifying similar currencies based on different blockchains.
{
"type": "currency",
"id": "2015",
"attributes": {
"iso": 2015,
"name": "TetherUS",
"alpha": "USDT-ETH",
"alias": "USDT",
"exp": 6,
"confirmation_blocks": 3,
"minimal_transfer_amount": "15.000000",
"block_delay": 0
},
"relationships": {
"parent": {
"data": {
"type": "currency",
"id": "1002"
}
}
}
}
Get currency
Request
- id string
The currency identifier.
Filtering by any object parameters can be applied according to the JSON API Specification.
GET[base]/currency/{id}
$ curl --request GET \
--url https://[base]/currency/ \
--header 'authorization: Bearer eyJ0eXAiOiJKV1QiLC...' \
--header 'content-type: application/vnd.api+json'
import requests
url = 'https://[base]/currency/'
headers = {
'authorization': 'Bearer <Change to your access token>',
'content-type': 'application/vnd.api+json',
}
requests.get(url, headers=headers)
<?php
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
$client = new GuzzleHttp\Client();
try {
$res = $client->get('https://[base]/currency/', [
'headers' => [
'Authorization' => 'Bearer <Change to your access token>',
'Content-Type' => 'application/vnd.api+json',
],
]);
echo $res->getBody();
} catch (RequestException $e) {}
Response
In case of a successful response, a currency object or an array of objects (if id
was not specified) is returned.
HTTP status codes
200 Success.
404 Currency with given id
not found.