Sandbox mode — Use https://wallet.e-mazad.store/api/v1 as your base URL
WalletsFX

Foreign Exchange (FX)

Get real-time exchange rates between supported currencies and execute currency conversions within your wallets.

Get exchange rates

Retrieve current exchange rates for a given base currency. Rates are updated in real time and include a spread that reflects the conversion cost.

GET/fx/rates

Get live exchange rates for a base currency.

Query parameters

NameTypeRequiredDescription
basestringrequiredBase currency code (e.g., "IQD"). Rates will be quoted against this currency.
targetsstringoptionalComma-separated target currencies (e.g., "USD,EUR"). Omit for all supported currencies.
curl "https://wallet.e-mazad.store/api/v1/fx/rates?base=IQD&targets=USD,EUR" \
  -H "Authorization: Bearer sk_sandbox_..."

Rate expiry

Rates include an expires_at timestamp. Always check this before displaying rates to users. Expired rates should be refreshed before executing a conversion.

Execute conversion

Convert funds between currencies within a wallet. The conversion uses the current live rate and is settled instantly.

POST/fx/convert

Convert funds between currencies in a wallet at the current live rate.

Request body

NameTypeRequiredDescription
wallet_idstringrequiredThe wallet ID to convert within, or "me" for merchant wallet.
from_currencystringrequiredSource currency code (e.g., "IQD").
to_currencystringrequiredTarget currency code (e.g., "USD").
amountintegerrequiredAmount to convert in smallest unit of the source currency.
curl -X POST https://wallet.e-mazad.store/api/v1/fx/convert \
  -H "Authorization: Bearer sk_sandbox_..." \
  -H "Content-Type: application/json" \
  -d '{
    "wallet_id": "me",
    "from_currency": "IQD",
    "to_currency": "USD",
    "amount": 1310000
  }'

Conversion is irreversible

Once a currency conversion is executed, it cannot be reversed. To convert back, you would need to execute a new conversion in the opposite direction at the then-current rate.

Supported currency pairs

All supported currencies can be converted to and from each other. IQD is the primary settlement currency.

CurrencyCan convert toSpread
IQDUSD, EUR, GBP, AED, TRY1.5%
USDIQD, EUR, GBP, AED, TRY1.5%
EURIQD, USD, GBP, AED, TRY1.5%
GBPIQD, USD, EUR, AED, TRY1.5%
AEDIQD, USD, EUR, GBP, TRY1.5%
TRYIQD, USD, EUR, GBP, AED2.0%

Sandbox rates are fixed

In the sandbox environment, FX rates are fixed and do not fluctuate. This makes testing predictable and reproducible. Production rates update in real time from market data.