POST
/
fx
/
quotes
Create FX quote.
curl --request POST \
  --url https://sandbox.api.openfx.com/v1/fx/quotes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --header 'X-Signature: <api-key>' \
  --header 'X-Timestamp: <api-key>' \
  --data '
{
  "sellCurrency": "USD",
  "buyCurrency": "USD",
  "sellAmount": "1500.00",
  "buyAmount": "1500.00"
}
'
{
  "id": "qte_01953e1a5f4b7006",
  "sellCurrency": "USD",
  "buyCurrency": "GBP",
  "sellAmount": "10000.00",
  "buyAmount": "7850.00",
  "rate": "0.7850",
  "status": "active",
  "expiresAt": "2026-02-23T12:01:00Z",
  "createdAt": "2026-02-23T12:00:00Z"
}

Authorizations

Authorization
string
header
required

API key issued at onboarding. Passed as a Bearer token in the Authorization header: Authorization: Bearer <api-key>. Identifies the caller and determines organization scope. Invalid or revoked keys return 401 with error type authentication_error.

X-Signature
string
header
required

Ed25519 or RSA-SHA256 asymmetric signature over the request payload (ADR-0015). Provides request integrity and non-repudiation. The signature covers the HTTP method, path, query string, request body, and timestamp. Invalid signatures return 401 with error type authentication_error.

X-Timestamp
string
header
required

Unix timestamp (seconds) of when the request was signed. Server rejects requests where the timestamp drifts beyond +/-60 seconds from server time to prevent replay attacks. Must match the timestamp used in the signature computation.

Headers

Idempotency-Key
string
required

Idempotency key for this request. UUID v4 recommended. Max 128 characters. 24-hour retention. Same key + same body replays original response with Idempotency-Replayed: true. Same key + different body returns 409 (code: duplicate_idempotency_key). Same key while the original request is still processing returns 409 with a Retry-After header (code: idempotency_key_in_flight).

Maximum string length: 128
Example:

"550e8400-e29b-41d4-a716-446655440000"

Body

application/json

Provide exactly one of sellAmount or buyAmount (not both). The other side is calculated from the locked rate.

sellCurrency
string
required

ISO 4217 currency code for fiat (USD, EUR, GBP) or crypto asset ticker (USDC, BTC, ETH). Uppercase, 2-10 characters. Use this type in contexts where both fiat currencies and crypto assets are accepted.

Pattern: ^[A-Z]{2,10}$
Example:

"USD"

buyCurrency
string
required

ISO 4217 currency code for fiat (USD, EUR, GBP) or crypto asset ticker (USDC, BTC, ETH). Uppercase, 2-10 characters. Use this type in contexts where both fiat currencies and crypto assets are accepted.

Pattern: ^[A-Z]{2,10}$
Example:

"USD"

sellAmount
string
required

Monetary amount as a string. Always string, never float. Up to 8 decimal places for crypto precision.

Pattern: ^[0-9]+(\.[0-9]{1,8})?$
Example:

"1500.00"

buyAmount
string

Monetary amount as a string. Always string, never float. Up to 8 decimal places for crypto precision.

Pattern: ^[0-9]+(\.[0-9]{1,8})?$
Example:

"1500.00"

Response

FX quote created.

A locked FX rate quote valid for 60 seconds. Use to guarantee a rate before executing a conversion or payment. Supports either sellAmount or buyAmount as input (not both).

id
string
required

FX quote resource identifier.

Pattern: ^qte_[A-Za-z0-9]+$
Example:

"qte_01953e1a5f4b7006"

sellCurrency
string
required

ISO 4217 currency code for fiat (USD, EUR, GBP) or crypto asset ticker (USDC, BTC, ETH). Uppercase, 2-10 characters. Use this type in contexts where both fiat currencies and crypto assets are accepted.

Pattern: ^[A-Z]{2,10}$
Example:

"USD"

buyCurrency
string
required

ISO 4217 currency code for fiat (USD, EUR, GBP) or crypto asset ticker (USDC, BTC, ETH). Uppercase, 2-10 characters. Use this type in contexts where both fiat currencies and crypto assets are accepted.

Pattern: ^[A-Z]{2,10}$
Example:

"USD"

rate
string
required

Locked exchange rate.

Example:

"1.0852"

status
enum<string>
required

Lifecycle status of an FX quote.

Available options:
active,
expired,
consumed
expiresAt
string<date-time>
required

UTC timestamp in RFC 3339 / ISO 8601 format.

Example:

"2026-02-23T12:00:00Z"

createdAt
string<date-time>
required

UTC timestamp in RFC 3339 / ISO 8601 format.

Example:

"2026-02-23T12:00:00Z"

sellAmount
string

Monetary amount as a string. Always string, never float. Up to 8 decimal places for crypto precision.

Pattern: ^[0-9]+(\.[0-9]{1,8})?$
Example:

"1500.00"

buyAmount
string

Monetary amount as a string. Always string, never float. Up to 8 decimal places for crypto precision.

Pattern: ^[0-9]+(\.[0-9]{1,8})?$
Example:

"1500.00"

quoteType
enum<string>

Discriminator indicating this is an FX quote.

Available options:
fx,
payment
inverseRate
string

Inverse of the locked rate.

Example:

"0.9215"