Skip to main content
GET
/
rates
/
{network}
/
{from}
/
{amount}
/
{to}
Get token rate (v2)
curl --request GET \
  --url https://api.paycrest.io/v2/rates/{network}/{from}/{amount}/{to}
{
  "status": "success",
  "message": "Operation successful",
  "data": {
    "buy": {
      "rate": "<string>",
      "providerIds": [
        "<string>"
      ],
      "orderType": "<string>",
      "refundTimeoutMinutes": 123
    },
    "sell": {
      "rate": "<string>",
      "providerIds": [
        "<string>"
      ],
      "orderType": "<string>",
      "refundTimeoutMinutes": 123
    }
  }
}
Get buy and/or sell quotes on a specific network—either a token + fiat pair or a fiat + fiat corridor (via USDC). This is the recommended public rates URL for v2 integrations.
The legacy endpoint GET /v1/rates/{token}/{amount}/{fiat} (optional network query) returns a single numeric data field. The v2 path below returns a structured buy / sell payload.

Path parameters

ParameterDescription
networkNetwork id: ethereum, base, bnb-smart-chain, lisk, scroll, celo, arbitrum-one, polygon, asset-chain
fromFiat currency code or token symbol on network (paired with to)
amountFor token + fiat: crypto (token) notional. For fiat + fiat: amount in from fiat.
toFiat currency code or token symbol on network (paired with from)
Token + fiat: exactly one fiat and one token (.../USDT/100/NGN.../NGN/100/USDT). from/to cannot both be tokens. Path order does not imply trade direction—use side or read data.buy / data.sell for onramp vs offramp display. Fiat + fiat: both are fiat codes; the server quotes through USDC on the same network. sell.rate = to per 1 from. buy.rate = from per 1 to (inverse corridor, not the reciprocal of sell—each side uses the appropriate leg bid/ask).

Query parameters

ParameterRequiredDescription
sideNobuy or sell to return only that side. Omit to receive both when available.
from_sourceNoIf from matches both a fiat currency and a crypto asset on the network, set to fiat or crypto. Omit when unambiguous.
to_sourceNoIf to matches both a fiat currency and a crypto asset on the network, set to fiat or crypto. Omit when unambiguous.
provider_idNoExactly 8 alphabetic characters (A–Z, a–z) to pin the quote to one provider.

Example

# Both buy and sell quotes on Base (token then fiat)
GET https://api.paycrest.io/v2/rates/base/USDT/100/NGN

# Same pair with fiat then token
GET https://api.paycrest.io/v2/rates/base/NGN/100/USDT

# Sell side only (typical for offramp display)
GET https://api.paycrest.io/v2/rates/base/USDT/100/NGN?side=sell

# Specific provider
GET https://api.paycrest.io/v2/rates/base/USDT/100/NGN?provider_id=AbCdEfGh

Success response (data)

Each populated side includes:
FieldTypeDescription
ratestringFor token+fiat: fiat per crypto. For fiat+fiat: see path rules above (sell = to per from, buy = from per to).
providerIdsstring[]Provider id(s) for the quote
orderTypestringe.g. regular or otc
refundTimeoutMinutesintegerMinutes until automatic refund for that flow
{
  "status": "success",
  "message": "Rate fetched successfully",
  "data": {
    "buy": {
      "rate": "1498.25",
      "providerIds": ["AbCdEfGh"],
      "orderType": "regular",
      "refundTimeoutMinutes": 60
    },
    "sell": {
      "rate": "1500.50",
      "providerIds": ["AbCdEfGh"],
      "orderType": "regular",
      "refundTimeoutMinutes": 60
    }
  }
}
When side=buy or side=sell, only that key is present under data.

Errors

HTTPTypical cause
400Invalid amount, invalid side, invalid from_source/to_source (must be fiat or crypto), ambiguous segment without disambiguation, invalid provider_id, unsupported asset on network, or conversion rules (e.g. stable only to its base fiat)
404No provider available for the amount/currency/network
503Banking/mobile network issues affecting providers for the currency
500Internal error while resolving the rate

Rate resolution

Behavior matches the priority-queue–based resolution used when creating orders: the quote reflects provider selection and validation for the requested side (buy vs sell). Path segment order (from / to) does not select direction—use ?side=, or read data.sell for offramp (crypto → fiat) display and data.buy for onramp (fiat → crypto) before POST /v2/sender/orders. See also Get Token Rate (v1) for the legacy scalar response.

Path Parameters

network
enum<string>
required

Blockchain network identifier (lowercase in URL).

Available options:
ethereum,
base,
bnb-smart-chain,
lisk,
scroll,
celo,
arbitrum-one,
polygon,
asset-chain
from
string
required

Fiat code or token symbol on network (paired with to).

amount
string
required

For token+fiat pairs, the token notional. For fiat+fiat pairs, the amount in from fiat.

to
string
required

Fiat code or token symbol on network (paired with from).

Query Parameters

side
enum<string>

Return only the buy or sell quote. Omit for both sides.

Available options:
buy,
sell
from_source
enum<string>

When from matches both a fiat and a crypto asset on network, set to fiat or crypto to disambiguate. Ignored when from is unambiguous.

Available options:
fiat,
crypto
to_source
enum<string>

When to matches both a fiat and a crypto asset on network, set to fiat or crypto to disambiguate. Ignored when to is unambiguous.

Available options:
fiat,
crypto
provider_id
string

Optional. When set, limits the quote to this provider. Must be exactly 8 alphabetic characters (A–Z, a–z).

Pattern: ^[A-Za-z]{8}$

Response

Token rate quote(s)

status
string
Example:

"success"

message
string
Example:

"Operation successful"

data
object

Public token rate quote. Omit side to receive both buy and sell; use side=buy or side=sell for a single side.