Api Reference

Assets

Endpoint to retrieve the list of available cryptocurrencies

Get Assets List

Retrieves the complete list of active cryptocurrencies available for payments and payouts.

Endpoint

GET /api/assets

Headers

Authorization: Bearer {token}
Accept: application/json

Parameters

This endpoint does not accept any parameters.

Example Request

curl -X GET https://api.flow-payments.com/api/assets \
  -H "Authorization: Bearer sk_live_abc123..." \
  -H "Accept: application/json"

Successful Response

Code: 200 OK

{
  "data": [
   {
        "id": 1,
        "name": "Bitcoin",
        "symbol": "BTC",
        "chain": "bitcoin",
        "type": "native",
        "decimals": 8,
        "usd_rate": "93037.28254643",
        "network_fee": "0",
        "min_confirmations": 1
    },
    {
        "id": 2,
        "name": "Ethereum",
        "symbol": "ETH",
        "chain": "ethereum",
        "type": "native",
        "decimals": 18,
        "usd_rate": "3125.16675365",
        "network_fee": "0.000000042162288",
        "min_confirmations": 5
    }
  ]
}

Response Fields

FieldTypeDescription
idintegerUnique identifier of the asset
namestringFull name of the cryptocurrency
symbolstringCryptocurrency symbol (e.g., BTC, ETH)
chainstringBlockchain on which the asset exists
typestringAsset type: native (native coin) or token (ERC-20, etc.)
decimalsintegerNumber of decimals for the asset
usd_ratestringCurrent exchange rate in USD
network_feestringNetwork fee in standard units
min_confirmationsintegerMinimum number of confirmations required for a transaction to be considered valid

Asset Types

Native (Native Coin)

Native coins are the primary cryptocurrencies of a blockchain:

  • Bitcoin (BTC) on the Bitcoin blockchain
  • Ethereum (ETH) on the Ethereum blockchain
  • Polygon (MATIC) on the Polygon blockchain
  • Solana (SOL) on the Solana blockchain

Token

Tokens are assets created on an existing blockchain via smart contracts:

  • USDC on Ethereum (ERC-20)
  • USDT on Ethereum (ERC-20)

Use Cases

1. Display Payment Options

Use this endpoint to display available cryptocurrencies in your payment interface:

const response = await fetch('https://api.flow-payments.com/api/assets', {
  headers: {
    'Authorization': 'Bearer sk_live_abc123...',
    'Accept': 'application/json'
  }
});

const { data: assets } = await response.json();

// Display in interface
assets.forEach(asset => {
  console.log(`${asset.name} (${asset.symbol}) - $${asset.usd_rate}`);
});

2. Calculate Crypto Amount

Use the usd_rate to convert a USD amount to cryptocurrency:

$amountUSD = 100; // $100 USD
$asset = $assets[0]; // Bitcoin

$amountCrypto = $amountUSD / floatval($asset['usd_rate']);
echo "Amount: {$amountCrypto} {$asset['symbol']}";
// Result: Amount: 0.00222222 BTC

Possible Errors

CodeDescription
401Missing or invalid authentication token
429Rate limit exceeded
500Internal server error

Important Notes

!NOTE

  • Exchange rates (usd_rate) are updated regularly but may vary
  • Network fees may change based on blockchain congestion

!TIP Cache the assets list and refresh it periodically (e.g., every hour) rather than calling it for every transaction.