Cryptocurrency

Cryptocurrency API allows merchants to get some information about cryptocurrencies, that may be used during invoice creation

Entities

Cryptocurrency

Cryptocurrency entity represents single cryptocurrency

Type may be imported as:

import type { Cryptocurrency } from '@simplepay-ai/api-client';

Type definition:

interface Cryptocurrency {
    /**
     * Cryptocurrency ID
     *
     * @example '4967cf90-ce74-4edf-9b4e-f6392de1c95a'
     */
    id: string;

    /**
     * Cryptocurrency symbol
     *
     * @example 'USDT'
     */
    symbol: string;

    /**
     * Cryptocurrency name
     *
     * @example 'Tether'
     */
    name: string;

    /**
     * Number of decimal places
     *
     * @example 18
     */
    decimals: number;

    /**
     * Is stablecoin
     *
     * @example true
     */
    stable: boolean;

    /**
     * List of blockchains in which cryptocurrency may be accepted
     */
    networks?: Network[];

    /**
     * Conversion rates to fiat currencies
     *
     * Key is ISO 4217 alphabetic code of fiat currency
     *
     * Value is price for 1 coin
     *
     * @example {
     *   USD: 1,
     *   EUR: 0.98
     * }
     * @see https://en.wikipedia.org/wiki/ISO_4217
     */
    rates?: CryptocurrencyRates;
}

Network

Network entity represents single blockchain network

Type may be imported as:

Type definition:

CryptocurrencyRates

CryptocurrencyRates entity is an object with conversion rates to fiat currencies

Key is ISO 4217 alphabetic code of fiat currency

Value is price for 1 coin

Type may be imported as:

Type definition:

Methods

List cryptocurrencies

Request type definition:

Validation errors type definition:

Method call example:

If you require cryptocurrency that is not in list, we will be glad to help you, feel free to Request Cryptocurrency

Last updated

Was this helpful?