Dictionaries

Use the APIs below you to retrieve all possible values such base domain entities as the currency and the blockchain, and so on.

The Currency object

The Currency object defines a currency known to the system. The currency code attribute is likely to be found inside the Money type across various resources of the API.

Properties

  • Name
    code
    Type
    string
    Description

    A unique identifier for the currency, or the currency code.

  • Name
    name
    Type
    string
    Description

    The name with a short description of the currency.

  • Name
    formatDecimals
    Type
    number
    Description

    The number of decimal places to be displayed after the decimal point.

  • Name
    address
    Type
    string
    Description

    The address of an ERC20/BEP20/XXX20 smart contract of this currency, if applicable.

  • Name
    blockchain
    Type
    string
    Description

    The blockchain network code where this currency is issued, if applicable.

  • Name
    label
    Type
    string
    Description

    A label that can be used alongside the value in human-readable texts.

  • Name
    isStable
    Type
    bool
    Description

    Indicates whether this currency is a stablecoin.

  • Name
    isSettlementSupported
    Type
    bool
    Description

    Indicates whether settlements are supported in this currency.


The Blockchain object

The Blockchain object defines core metadata for the blockchain network.

Properties

  • Name
    blockchain
    Type
    string
    Description

    A unique identifier for the blockchain, or the blockchain code.

  • Name
    apiType
    Type
    string
    Description

    Defined the class of the RPC API for this blockchain.

  • Name
    isActive
    Type
    bool
    Description

    Indicates whether this blockchain is enabled for processing operations.

  • Name
    net
    Type
    string
    Description

    Indicates whether this blockchain is a testnet or a mainnet.

  • Name
    nativeAsset
    Type
    object
    Description

    Native currency description for this blockchain network.


GET/v1/dictionary/currencies

Retrieve currencies

This endpoint allows you to retrieve all supported currency codes with meta information about them.

Learn how money type is encoded

Request

GET
/v1/dictionary/currencies
curl https://partner-api.smartypay.io/v1/dictionary/currencies \
  --user API_KEY:SECRET

Response

{
  "currencies": [
    {
      "address": "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56",
      "blockchain": "BinanceMainNet",
      "code": "bBUSD",
      "formatDecimals": 18,
      "isSettlementSupported": false,
      "isStable": true,
      "label": "BUSD",
      "name": "Binance USD stable coin (BSC/MainNet)",
      "symbol": "bBUSD"
    },
    {
      "address": "0x9b3273282f3b68dbF9b2c35f784cB1a012Cd670B",
      "blockchain": "PolygonMumbaiNet",
      // ...
    }
  ]
}

GET/v1/dictionary/blockchains

Retrieve blockchains

This endpoint allows you to retrieve all supported blockchain networks codes with meta information about them.

Request

GET
/v1/dictionary/blockchains
curl https://partner-api.smartypay.io/v1/dictionary/blockchains \
  --user API_KEY:SECRET

Response

{
  "blockchains": [
    {
      "apiType": "WEB3",
      "blockchain": "EthereumMainNet",
      "isActive": true,
      "nativeAsset": {
        "code": "ETH",
        "formatDecimals": 18,
        "isSettlementSupported": false,
        "label": "ETH",
        "name": "Ethereum native asset",
        "symbol": "ETH"
      },
      "net": "MainNet"
    },
    {
        "apiType": "Tron",
        "blockchain": "TronMainNet",
        // ...
    }
  ]
}