> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pik.global/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Conversion

> Step-by-step guide to creating a currency conversion in PIK using either the Rates or Quotes method.

## **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/account-id`account`: inline export/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.

A status of converted in the response means the conversion completed and the buy currency has been credited.

### **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.

### **Common errors**

INSUFFICIENT\_BALANCE — Sell currency balance is lower than the sell amount. BELOW\_MINIMUM\_AMOUNT — Amount is below the minimum for the currency pair. QUOTE\_EXPIRED — Quote has passed its expiry. Request a new quote and resubmit immediately. CAPABILITY\_NOT\_ACTIVATED — fx\_conversion not activated on the account.
