Price a currency pair
Changed onOne endpoint with one job: price an FX pair. That price becomes the LP_EXECUTION leg of whatever consumes it.
A quote isn't a transaction type. What you do with it decides that:
- POST /v1/customers/{customerId}/conversions, where both sides are the customer's own balances, makes it a CONVERSION.
- POST /v1/customers/{customerId}/payouts/fiat, where value leaves, makes it a PAY_OUT with the FX running as a leg inside it.
- A pay-in never consumes a quote. The deposit intent's indicativeRate is its price.
Setting the amount. Set fromAmount to fix what's debited, or toAmount to fix what lands. Sending both is a conflict, not a constraint.
Conditional fields. chain is required when either side is a stablecoin and must be omitted otherwise. rail is required when either side is fiat and must be omitted otherwise. Supplying a field the pair shape forbids is an error rather than an ignored value.
Why the rail is part of the price. (rail, currency) names the route being priced. (ACH, BOB) and (ACH, CLP) price separately, and (CHATS, USD) means USD delivered in Hong Kong. A quote that didn't know the rail could only return an average.
Par pairs, USD against USDC or USDT, are quotable at a rate of 1 with the fee table itemized, but a quote is never required for them.
A pair whose route isn't LIVE in GET /v1/countries/{country} fails with route_unsupported before anything is locked. Execute inside expiresAt, and re-quote rather than retry an expired one.
Request
- Base URLhttps://api.sandbox.alfredpay.io
- URLhttps://api.sandbox.alfredpay.io/v1/customers/{customerId}/quotes
- Auth
- HTTP bearer
- or API key in header api-key and API key in header api-secret
Headers
Required on every state-changing POST, simulators included; the only exempt POST is …/verifications/preflight. Replay (same key, same body) returns the original response with Idempotent-Replayed: true; same key with a different body → 409 idempotency_conflict. Keys are UUIDs, scoped to the API key, retained for 24 hours.
Request body
Response
Created
Changes
- info
endpoint added
- info