Allways Access / Developersv1Get your API key
Endpoints

GET/v1/rate

A live quote for one amount. Open: no key needed. A rate is not a lock; create locks it.

Request

GET /v1/rate with a pair and exactly one amount.

NameRequiredRule
fromyesCurrency id to send
toyesCurrency id to receive
amountone ofPositive decimal string in from units
toAmountone ofDesired net decimal amount in to units
Requestcurl
curl "$API/v1/rate?from=sol&to=tao&amount=0.5"

Response

toAmount and rate price your whole amount, net of fee: toAmount is the number you get. When the request uses toAmount, fromAmount is rounded up to the smallest send amount whose live quote delivers at least the target.

FieldMeaning
from, toThe ids you asked for
fromAmountYour amount (amount, or the amount calculated for toAmount)
toAmountWhat you receive, net of fee
ratetoAmount per 1 fromAmount
minFromAmount, maxFromAmountBounds you can send right now, both ends inclusive
levelsRungs available right now: each has a rate and the largest maxFromAmount it fills
Responsejson
{
  "from": "sol",
  "to": "tao",
  "fromAmount": "0.5",
  "toAmount": "3.912",
  "rate": "7.824",
  "minFromAmount": "0.1",
  "maxFromAmount": "40",
  "levels": [
    { "rate": "7.824", "maxFromAmount": "12.4" },
    { "rate": "7.801", "maxFromAmount": "40" }
  ]
}

Errors

HTTPCodeExtra fieldsWhen
400invalid_pair—from and to do not pair
400invalid_amount—amount or toAmount is not a positive decimal string, or both/neither are set
422amount_too_lowminFromAmount, maxFromAmountamount is under the minimum
422amount_too_highminFromAmount, maxFromAmountamount is over the maximum
422no_liquidityminFromAmount, maxFromAmountNo liquidity for this pair right now
429rate_limitedretryAfterOver the limit; see Rate limits

Notes

  • levels is informational. Each rung is a rate available right now and the largest single order it can fill. You always get the best rung that fits your amount. Never combine rungs.
  • maxFromAmount and the rungs are live liquidity figures and change between calls; two rungs may share a cap.
  • minFromAmount is omitted from an amount_too_low body when the minimum is unknown.