Skip to main content
Version: 2019-05-29 (Current)

Retrieve forex rates

Fetches the current foreign exchange rate for a specified currency pair. Returns the real-time exchange rate used for multi-currency transactions. This endpoint is only accessible if multi-currency transactions are enabled on your account.


๐Ÿ”‘API Credentials

Request Parametersโ€‹

Required - 1 fieldRequired Parameters
โ–ผ
`currency`STRING(required)
Base currency as three-letter ISO 4217 code in lowercase. The rate will show conversion from this currency to your account funding currency.
Example:"usd"
Values:thb, jpy, sgd, myr, usd, eur, gbp

Responsesโ€‹

200

Successful request

Returns the forex object with current exchange rate information.

Forex object contains:
  • object - String value "forex"
  • location - API endpoint path (e.g., "/forex/usd")
  • livemode - Boolean indicating test or live mode
  • base - Source currency code (ISO 4217)
  • quote - Target currency code (typically account funding currency)
  • rate - Numeric exchange rate (approximately 2-4% above mid-market daily rates)
Rate calculation:
  • Rate represents how much of the quote currency equals one unit of base currency
  • Example: If base=USD, quote=THB, rate=30.4847, then 1 USD = 30.4847 THB
  • Rates include Omise's margin (2-4% above mid-market rates)

401

Unauthorized

Authentication failed. Invalid or missing API key.

Common causes:
  • Missing Authorization header
  • Invalid secret key
  • Incorrect HTTP Basic Auth format

404

Not found

Currency not found or multi-currency not enabled.

Common causes:
  • Invalid currency code
  • Multi-currency transactions not enabled on account
  • Currency not supported for your account

Code samplesโ€‹

curl https://api.omise.co/forex/usd \
-u skey_test_5xuy4w91xqz7d1w9u0t:

Try it outโ€‹

Required - 1 fields
โ–ผ