Currency methods

Currency object

id string

The unique system identifier of a currency, matching the ISO code.

blockchain_name string

The name of a blockchain, for example: Bitcoin.

The value is filled in by default only for coins. For other currencies, the value is an empty string.

iso number

The ISO code of a currency.

name string

The name of a currency, for example: Bitcoin.

alpha string

The alphabetic code of a currency, for example: BTC.

alias string or null

The alternative identifier used to identify similar currencies in different blockchains.

tags string

The tags assigned via the B2BinPay Back Office.

exp number

The currency precision, that is the number of digits after the decimal separator.

confirmation_blocks number or null

For cryptocurrencies, the default number of blocks needed to send a callback.

For fiat currencies, null.

minimal_transfer_amount string

The minimum possible amount of transfers.

block_delay number

For cryptocurrencies, the estimated block mining time, in seconds.

For fiat currencies, 0.

parent object

For tokens only.

The parent currency of a token, in the same blockchain. For other currencies, returns "data": null.

The object contains the string id field matching the parent currency ISO code.

CURRENCY OBJECT
{
  "type": "currency",
  "id": "2015",
  "attributes": {
    "blockchain_name": "",
    "iso": 2015,
    "name": "TetherUS",
    "alpha": "USDT-ETH",
    "alias": "USDT",
    "tags": "",
    "exp": 6,
    "confirmation_blocks": 3,
    "minimal_transfer_amount": "25.000000",
    "block_delay": 75
  },
  "relationships": {
    "parent": {
      "data": {
        "type": "currency",
        "id": "1002"
      }
    }
  }
}

Get currency

Request

id string

The unique system identifier of a currency, matching the ISO code.

Filtering by any object parameters can be applied according to the JSON API Specification.

GET[base]/currency/{id}

curl --request GET \
--url [base]/currency/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json'
import requests

url = '[base]/currency/'

headers = {
  'Authorization': 'Bearer <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('[base]/currency/', [
    'headers' => [
      'Authorization' => 'Bearer <token>',
      'Content-Type' => 'application/vnd.api+json',
    ],
  ]);
  echo $res->getBody();
} catch (RequestException $e) {}

Response

In case of success, the response body contains a Currency object or an array of objects (if id was not specified).

Response codes