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

# Trading

> Swap between supported currencies using our RFQ system or instant swap

Our platform supports trading between a variety of currencies. You can either use the **RFQ (Request for Quote)** system — where you lock in a rate before confirming — or the **Instant Swap** endpoint, which creates and executes the trade in a single request.

## Key Features

### Currency Availability

Use the **Get Tradable Currencies** endpoint to display the list of tradable currencies supported by the platform. These are the only currencies allowed for swaps.

### Trading Pairs

Use the **Get Pairs** endpoint to retrieve the supported currency pairs for trading. For example, a supported trade pair might be BTC-USDT.

### Instant Swap

The simplest way to execute a trade. A single request to `/trades/swap` creates a quote and executes the trade immediately at the best available rate — no need to call create-quote and accept-quote separately.

Provide either `amount` (how much of the source currency you are selling) or `amountToReceive` (the exact amount of the target currency you want), but not both.

```json theme={null}
{
  "sourceId": "USDT",
  "targetId": "NGNX",
  "amount": 10,
  "side": "SELL"
}
```

<Note>
  There are no extra charges for this service.
</Note>

### RFQ System

Use the two-step RFQ flow when you want to show users a confirmed rate before committing to the trade.

1. **Create Quote**: Obtain a quote by specifying source currency, target currency, amount, and side (BUY/SELL). The response includes the swap rate, the amount you'll receive, and a validity window in seconds.

   For example, if you're swapping 1,000 USDT to BTC, the quote will include the current rate (e.g., 67,648.9154 USDT per BTC) and show the amount you'll receive in BTC (0.0478218 BTC).

2. **Validity Window**: The quote must be accepted within this time window. If it expires, request a new quote.

3. **Accept Quote**: Pass the `quoteId` from the Create Quote response to confirm the swap. Funds are deducted from your source wallet and credited to your target wallet.

### Transaction History

To review swap transactions, use the **Get User Trades** endpoint. You can filter by side (buy/sell), currency ID, and date.

## Key Endpoints

| Method | Endpoint                  | Description                                             |
| ------ | ------------------------- | ------------------------------------------------------- |
| GET    | `/currencies/tradeable`   | List of tradable currencies on our platform             |
| GET    | `/trades/pairs`           | Retrieve supported currency pairs                       |
| POST   | `/trades/swap`            | Create and execute a swap in one request (instant swap) |
| POST   | `/trades/quote`           | Create a quote (RFQ flow)                               |
| POST   | `/trades/quote/{quoteId}` | Accept a quote to complete the swap (RFQ flow)          |
| GET    | `/trades/summary/me`      | Review transaction history                              |

## Flow

**Instant swap** (recommended for most integrations):

1. Fetch tradable currencies and pairs
2. Call `/trades/swap` with the source, target, and amount

**RFQ flow** (use when you want to display a locked-in rate to the user):

1. Fetch tradable currencies and pairs
2. Call `/trades/quote` to get a rate and quote ID
3. Call `/trades/quote/{quoteId}` within the validity window to confirm
