Public developer API
POST /v1/fx/convert
Executes a conversion at the rate locked by POST /v1/fx/quote. A quote can be used once.
Access
A project-specific API key (Authorization: Bearer dapi_live_...) and its Business ID (X-Business-Id). Rate limited per business (120 calls a minute by default).
Requires an Idempotency-Key header.
Requires an Idempotency-Key header.
Body
| Field | Type | Required | Description |
|---|---|---|---|
quote_id | string | yes | The id from POST /v1/fx/quote. |
Example request
curl --request POST \
--url 'https://production.dutchapi.co/v1/fx/convert' \
--header 'X-Business-Id: YOUR_BUSINESS_ID' \
--header 'Authorization: Bearer bsk_live_YOUR_BUSINESS_SECRET' \
--header 'Idempotency-Key: fx-0001' \
--header 'Content-Type: application/json' \
--data '{"quote_id":"fxq_5a1c"}'
Response 201
{
"id": "fx_92ac10",
"object": "exchange",
"kind": "conversion",
"status": "completed",
"amount": 100,
"currency": "USD",
"fee": 0,
"to": {
"currency": "XAF",
"amount": 59040,
"rate": 590.4
}
}
Errors
| Status | error | Meaning |
|---|---|---|
| 400 | idempotency_key_required | Send an Idempotency-Key header. |
| 400 | quote_id_required | Send the quote_id. |
| 409 | quote_expired_or_used | Get a new quote. |
| 402 | insufficient_funds | The wallet balance is too low. |
| 423 | money_movement_paused | The kill switch is on. |
| 422 | exchange_rejected | The partner rejected the conversion. |