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

# Hedging

> Protect your holdings from crypto volatility using instant swaps

Crypto assets can move significantly in value within short periods. Hedging lets you manage that exposure by swapping volatile assets into stable currencies (and back) using Obiex's RFQ trading system. This is useful for businesses that hold crypto treasury, platforms processing payments in volatile currencies, or any integration where price risk needs to be controlled.

## Common scenarios

* **Locking in value after a deposit**: A user deposits BTC. You immediately swap it to USDT to avoid exposure to BTC price movements while the funds are held.
* **Timing a payout**: You hold USDT and want to convert to NGN right before settling a payout, minimising the time your funds sit in a volatile position.
* **Rebalancing treasury**: You hold a mix of assets and want to rebalance into stablecoins at the end of each day.

## How it works

<Steps>
  <Step title="Get a quote">
    Call the Create quote endpoint with your source currency, target currency, amount, and side (BUY or SELL). The response includes the current rate and the exact amount you'll receive, along with a validity window in seconds.
  </Step>

  <Step title="Review and accept">
    If the rate is acceptable, accept the quote within the validity window using the returned `quoteId`. Obiex executes the swap instantly at the quoted rate.
  </Step>

  <Step title="Confirm the new balance">
    After the swap, your source wallet is debited and your target wallet is credited. You can verify the updated balance via the wallet endpoint.
  </Step>
</Steps>

<Warning>
  Quotes expire quickly, typically within 30 seconds. Always check `expiresIn` and accept before the window closes. If the quote expires, request a new one.
</Warning>

<Note>
  There are no extra charges for trading. Obiex does not add fees on top of the quoted rate.
</Note>

## Supported pairs

Use the `/trades/pairs` endpoint to see all available trading pairs. Common pairs include:

* BTC / USDT
* ETH / USDT
* BNB / USDT
* USDT / NGNX

You can also query a specific pair to get current rate information before requesting a formal quote.

## Key endpoints

| Method | Endpoint                                  | Description                         |
| ------ | ----------------------------------------- | ----------------------------------- |
| GET    | `/trades/pairs`                           | List all supported trading pairs    |
| GET    | `/trades/pairs/{sourceCode}/{targetCode}` | Get rate info for a specific pair   |
| POST   | `/trades/quote`                           | Request a swap quote                |
| POST   | `/trades/quote/{quoteId}`                 | Accept a quote and execute the swap |
| GET    | `/wallets/{currencyCode}`                 | Verify updated balance after a swap |
| GET    | `/trades/summary/me`                      | Review swap history                 |
