Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ratiofx.com/llms.txt

Use this file to discover all available pages before exploring further.

GET /v1/quote

Returns a reference price for a currency pair. No inventory is reserved and the rate is not executable — use this to display pricing to your users before they commit.

Query parameters

pair
string
required
Currency pair to quote. Supported values: USD-IDR, USD-SGD, MYR-IDR.
side
string
required
Trade direction. BUY or SELL.
amount
number
required
Notional amount in the source currency.

Response 200 OK

{
  "pair": "USD-IDR",
  "side": "BUY",
  "indicative_rate": 16020.50,
  "mid": 15980.00,
  "spread_bps": 25,
  "timestamp": "2026-02-27T10:00:00Z",
  "quote_type": "INDICATIVE"
}
pair
string
Currency pair.
side
string
Trade direction.
indicative_rate
number
Reference rate. This rate is not executable and carries no expiry.
mid
number
Oracle mid-market rate.
spread_bps
number
Indicative spread in basis points.
timestamp
string
ISO 8601 server timestamp.
quote_type
string
Always INDICATIVE for this endpoint.
Indicative quotes are for display purposes only. To lock a rate for execution, request a firm quote using POST /v1/firm-quote.

POST /v1/firm-quote

Returns a binding BID/ASK with hard expiry and inventory reservation. You must execute the quote before expiry_timestamp or it will expire.

Request body

pair
string
required
Currency pair to quote. Supported values: USD-IDR, USD-SGD, MYR-IDR.
side
string
required
Trade direction. BUY or SELL.
amount
number
required
Notional amount in the source currency.
quote_type
string
required
Must be FIRM.
client_ref
string
Optional partner-side reference for reconciliation (e.g. your internal transaction ID).
{
  "pair": "USD-IDR",
  "side": "BUY",
  "amount": 50000,
  "quote_type": "FIRM",
  "client_ref": "TXN-20260227-001"
}

Response 200 OK

{
  "quote_id": "QT-8821-USD-IDR",
  "pair": "USD-IDR",
  "side": "BUY",
  "amount": 50000,
  "bid": 15940.00,
  "ask": 16020.00,
  "adjusted_mid": 15980.00,
  "spread_bps": 25,
  "expiry_timestamp": "2026-02-27T10:00:45Z",
  "max_size": 50000,
  "allowed_direction": "BUY",
  "state_flag": "NORMAL",
  "quote_type": "FIRM",
  "execution_path": "DIRECT",
  "fee_breakdown": {
    "tier": "MEDIUM",
    "fixed_fee": 0.633,
    "fixed_fee_currency": "USD",
    "fixed_fee_in_dest": 10000,
    "fixed_fee_dest_currency": "IDR",
    "variable_fee": 10.00,
    "variable_fee_bips": 2,
    "base_spread_bps": 20,
    "total_spread_bps": 25,
    "total_fee_usd": 10.633,
    "amount_to_convert": 49989.37,
    "is_partner_override": false
  }
}
The quote expires at expiry_timestamp. You must call POST /v1/execute before that time. Expired quotes return a QUOTE_EXPIRED error.
quote_id
string
Unique quote identifier. Pass this to POST /v1/execute to settle the swap.
pair
string
Currency pair.
side
string
Trade direction.
amount
number
Notional amount in the source currency.
bid
number
Bid price.
ask
number
Ask price.
adjusted_mid
number
Oracle mid-market rate after inventory adjustment.
spread_bps
number
Total spread in basis points.
expiry_timestamp
string
ISO 8601 hard expiry for this quote.
max_size
number
Maximum executable amount for this quote. Your execution amount must not exceed this value.
allowed_direction
string
Permitted trade direction under the current system state.
state_flag
string
System state at quote time: NORMAL, PROTECT, or RESTRICT.
execution_path
string
Routing path used: DIRECT or EXTERNAL_RFQ.
fee_breakdown
object
Full fee transparency for this quote.