Before you start
Make sure you have:- A PIK API key with FX conversion permissions.
- A wallet balance in the sell currency. Check via GET /api/v1/accounts//wallet/balances.
- The fx_conversion capability activated on the account.
Option A — Convert using Rates
Call POST /api/v1/fx/conversions with:- sell_currency — Currency converting from, for example USDT.
- buy_currency — Currency converting to, for example AUD.
- sell_amount or buy_amount — The amount on either side.
- conversion_type — Set to rate.
- x-on-behalf-of header — Connected account ID if applicable.
Option B — Convert using Quotes
Step 1 — Call POST /api/v1/fx/quotes with sell_currency, buy_currency, and amount. PIK returns a quote_id and quote_expiry. Step 2 — Before the quote_expiry passes, call POST /api/v1/fx/conversions with conversion_type set to quote and the quote_id.Checking conversion status
Call GET /api/v1/fx/conversions/conversion_id.- pending — Processing in progress.
- converted — Completed, buy currency credited.
- failed — Could not complete. Check failure_reason.
