Docs
Search the docs
Find a page in the docs

API reference

Create a quote

Lock a conversion rate for 15 minutes.

POST /v1/fx/quotes

Create a payment for target_amount in target_currency, with fx_quote_id set to the quote id, before expires_at.

Body parameters

amount integer required
The price, in the source currency's minor units.
source_currency string required
The pricing currency.
target_currency string required
The currency to charge in. Must differ from source_currency.

Request

curl -X POST https://api.camelpayment.com/v1/fx/quotes \
  -H "Authorization: Bearer $CAMEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 10000,
    "source_currency": "USD",
    "target_currency": "ARS"
  }'

Response

201
{
  "id": "fxq_01JBXA7K2M4N6P8R0T2V4X6Z8B",
  "object": "fx_quote",
  "source_amount": 10000,
  "source_currency": "USD",
  "target_amount": 15400000,
  "target_currency": "ARS",
  "rate": "1540.0000000000",
  "market_rate": "1540.0000000000",
  "spread_bps": 0,
  "rates_as_of": "2026-11-12T15:00:00Z",
  "expires_at": "2026-11-12T15:19:05Z",
  "created_at": "2026-11-12T15:04:05Z"
}

Errors

StatusWhen
401 The API key is missing, malformed, or revoked.
422 A currency is not supported, or both currencies are the same.
429 Too many requests. Wait for Retry-After seconds.
503 Exchange rates are temporarily unavailable.