LogoLogo
Release notesHomepageTry demo
  • Welcome to B2BINPAY docs
  • Get started
    • Quick start guide
    • Explore the Web interface
  • User guide
    • Wallet management
      • Wallets
      • Transfers
      • Deposits
      • Payouts
      • Events
      • Callbacks
    • Custody
      • Wallets
      • Requests
      • History
    • Staking
      • TRX staking
    • Rates
    • Swaps
      • Wallets
      • Swap
      • History
  • How-tos
    • Manage your profile and system
      • How to change your password
      • How to enable 2FA
      • How to whitelist IP addresses
      • How to access the API
      • How to enable additional AML check
    • Manage your wallets
      • How to create a wallet
      • How to grant access to your wallet
      • How to manage user roles
      • How to restrict access to your wallet
      • How to generate a report on wallet balances
      • How to set withdrawal thresholds
    • Manage your assets
      • How to create a deposit
      • How to create a payout
      • How to create a bank withdrawal
      • How to create an internal transfer
      • How to select the optimal blockchain fee
      • How to speed up your payout by changing the blockchain fee
      • How to whitelist a payout address
      • How to swap funds
      • How to top up or withdraw funds from your Custody wallet
  • API guide
    • API overview
    • Authentication
    • Wallet methods
    • Transfer methods
    • Deposit methods
    • Payout methods
    • Currency methods
    • Rate methods
  • References
    • Key terms
    • User roles
    • Transfer types
    • Currency codes
    • Block explorer list
    • Address types
    • Useful links
  • Troubleshooting
    • Error: No active account found with the given credentials
    • Error: Invalid 2FA code
    • Error: You IP is not whitelisted
    • Unresolved deposits
    • Missing deposits
    • Canceled transfers
    • Unconfirmed transfers
  • Release notes
Powered by GitBook
On this page
  • Currency object
  • Get currency
  • Request
  • Response

Was this helpful?

  1. API guide

Currency methods

Currency object

Name
Type
Description

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 example

{
  "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

GET [base]/currency/{id}

Name
Type
Required
Description

id

string

No

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

Request example

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

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.

404

404: Not found

The currency with the given id wasn’t found.

Send a correct id.

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.

PreviousPayout methodsNextRate methods

Last updated 7 months ago

Was this helpful?

Filtering by object parameters can be applied according to the .

In case of success, the response body contains a 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
JSON API Specification
currency object