Rates

The effective FX rates for your account in your environment. Read the rate we’ll apply to a cross-currency payout before you build it — the value returned here is the same rate the funding_currency flow uses, so you can pull it into your own calculations.

The result is environment-scoped to your API key: a sandbox (sk_test_…) key returns your test rates; a live (sk_live_…) key returns your live rates. Each rate is your effective rate — a negotiated override on your account if you have one, otherwise the platform default.

Before you use a rate

  • Reading rates needs only a valid API key — no extra capability or account enablement.
  • Rates are indicative. The rate applied to a payout is the one active at the time the payout is processed, so a value you read here can change before you send. Fees are not included.
  • A returned pair is not a promise you can transact it. Only pairs whose currencies are active in your environment appear here. To actually send a cross-currency payout, your account must be enabled for cross-currency payouts and the API key must carry the cross-currency capability — see Fund from another currency.

GETList rates

GET/v1/rates

Returns your active exchange rates, one row per currency pair. Optionally filter to a single pair with from and/or to. Cached on Swappr’s side (60-second TTL).

Query parameters
fromstring

Optional. Narrow to a source currency (ISO 4217, e.g. CAD). An unknown code returns 400.

tostring

Optional. Narrow to a destination currency (ISO 4217, e.g. NGN). An unknown code returns 400.

Response fields

FieldTypeNotes
from_currencystringSource ISO 4217 currency code (e.g. CAD).
to_currencystringDestination ISO 4217 currency code (e.g. NGN).
ratestringDestination-per-source rate as a decimal string (same shape as the fx.rate field on a payout). Multiply your source amount by this to estimate the converted amount.

Notes

  • Rates are indicative. The rate applied to a payout is the one active at the time the payout is processed — a rate you read here can change before you send. Fees are not included in rate.
  • The rate is your effective rate: if your account has a negotiated override for a pair, that value is returned; otherwise you see the platform default. You only ever see your own account’s rates.
  • The set is environment-scoped to your key. Always read it with the key for the environment you’re integrating against.
  • An account with no active pairs returns an empty list, not an error.
  • No extra permission is needed — any valid key can read it.

Errors

CodeHTTPCause
unsupported_currency400from or to is not a valid currency code.
unauthorized401Missing or invalid API key.
Request
# All pairs
curl 'https://api.swappr.me/api/v1/rates' \
  -H "Authorization: Bearer sk_live_..."
 
# A single pair
curl 'https://api.swappr.me/api/v1/rates?from=CAD&to=NGN' \
  -H "Authorization: Bearer sk_live_..."
Response
{
  "object": "list",
  "data": [
    {
      "from_currency": "CAD",
      "to_currency": "NGN",
      "rate": "1050.5"
    },
    {
      "from_currency": "USD",
      "to_currency": "NGN",
      "rate": "1450.0"
    }
    // ...
  ]
}
200 OK