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

# API overview

> Every v2 endpoint, grouped by domain: MarketData, Balances, Trade, Deposits, and Withdrawals.

The OpenFX v2 API provides programmatic access to market data, trade execution, and money movement. This page lists every v2 endpoint grouped by domain, with links to the full reference.

**Version**: v2.0.0

## Server

```
https://api.openfx.com
```

## Security

| Scheme       | Type | Format |
| ------------ | ---- | ------ |
| `bearerAuth` | HTTP | JWT    |

See [Authentication](/v2/authentication) for how to mint a bearer token.

## OpenAPI description

Download the v2 OpenAPI bundle: [api-docs.openfx.com/\_bundle/api/v2/index.yaml](https://api-docs.openfx.com/_bundle/api/v2/index.yaml)

## MarketData

Retrieve the complete list of tradable fiat and stablecoin currency pairs on the OpenFX platform.

<Card title="Get available markets" icon="chart-line" href="/v2/api-reference/market-data/get-available-markets">
  `GET /v2/brokerage/{orgId}/available_markets` — Access the complete list of tradable currency pairs along with trading limits and supported directions.
</Card>

## Balances

Real-time tracking and management of currency holdings within an account.

<Card title="Get balances" icon="wallet" href="/v2/api-reference/balances/get-balances">
  `GET /v2/brokerage/{orgId}/balances` — View real-time balances, track multi-currency holdings, monitor available trading funds, and reconcile account positions.
</Card>

## Trade

The Trade endpoints implement a quote-then-trade workflow: generate a quote, then execute against the quote ID within the 3-second validity window.

<Card title="Generate quote" icon="bolt" href="/v2/api-reference/trade/generate-quote">
  `POST /v2/brokerage/{orgId}/generate_quote` — Create a quote for a specific currency pair and amount. Returns a quote ID and rate valid for 3 seconds.
</Card>

<Note>
  **Idempotency (v2 only)**: `generate_quote` requires an `Idempotency-Key` header. Keys are cached for **30 minutes**. Reusing a key with the same parameters returns the cached response; different parameters return a 422.
</Note>

<Card title="List trades" icon="list" href="/v2/api-reference/trade/list-trades">
  `GET /v2/brokerage/{orgId}/trades` — List all trades, both completed and pending. Use it to track activity, monitor statuses, generate reports, and reconcile transactions.
</Card>

<Card title="Get trade by ID" icon="magnifying-glass" href="/v2/api-reference/trade/get-trade-by-id">
  `GET /v2/brokerage/{orgId}/trade/{id}` — Detailed information on a specific trade: execution details, settlement status, timestamps, and trade parameters.
</Card>

<Card title="Execute trade" icon="arrow-right-arrow-left" href="/v2/api-reference/trade/execute-trade">
  `POST /v2/brokerage/{orgId}/trade` — Execute a currency exchange against a valid quote ID. Must be called within 3 seconds of quote generation.
</Card>

<Note>
  **Idempotency (v2 only)**: `trade` requires an `Idempotency-Key` header. Keys are cached for **24 hours**. Reusing a key with the same parameters returns the cached response; different parameters return a 422.
</Note>

## Deposits

Deposit endpoints provide visibility into incoming funding across supported fiat currencies and stablecoins.

<Card title="List deposits" icon="arrow-down" href="/v2/api-reference/deposits/list-deposits">
  `GET /v2/brokerage/{orgId}/deposits` — Get a complete view of all deposits (fiat and stablecoin) for an organization.
</Card>

## Withdrawals

Withdrawal endpoints manage outbound payments to approved wallets and bank accounts, for both fiat and stablecoin rails.

<Card title="List withdrawal wallets" icon="wallet" href="/v2/api-reference/withdrawals/list-withdrawal-wallets">
  `GET /v2/brokerage/{orgId}/withdrawal_addresses` — Retrieve the list of approved stablecoin wallets that can receive withdrawals.
</Card>

<Card title="List fiat withdrawal accounts" icon="building-columns" href="/v2/api-reference/withdrawals/list-fiat-withdrawal-accounts">
  `GET /v2/brokerage/{orgId}/fiat_withdrawal_addresses` — Retrieve the list of approved fiat withdrawal accounts. Paginated for organizations with many accounts.
</Card>

<Card title="List withdrawals" icon="list" href="/v2/api-reference/withdrawals/list-withdrawals">
  `GET /v2/brokerage/{orgId}/withdrawals` — Get a complete view of all withdrawals (fiat and stablecoin) for an organization.
</Card>

<Card title="Get withdrawal by ID" icon="magnifying-glass" href="/v2/api-reference/withdrawals/get-withdrawal-by-id">
  `GET /v2/brokerage/{orgId}/withdrawal/{withdrawalId}` — Detailed information on a specific withdrawal using its unique identifier.
</Card>

<Card title="Initiate stablecoin withdrawal" icon="arrow-up" href="/v2/api-reference/withdrawals/initiate-stablecoin-withdrawal">
  `POST /v2/brokerage/{orgId}/withdrawal` — Initiate a stablecoin withdrawal to an approved wallet address.
</Card>

<Note>
  **Idempotency (v2 only)**: `withdrawal` requires an `Idempotency-Key` header. Keys are cached for **7 days**. Reusing a key with the same parameters returns the cached response; different parameters return a 422.
</Note>

<Card title="Initiate fiat withdrawal" icon="building-columns" href="/v2/api-reference/withdrawals/initiate-fiat-withdrawal">
  `POST /v2/brokerage/{orgId}/fiat_withdrawal` — Initiate a fiat withdrawal to an approved bank account.
</Card>

<Note>
  **Idempotency (v2 only)**: `fiat_withdrawal` requires an `Idempotency-Key` header. Keys are cached for **7 days**. Reusing a key with the same parameters returns the cached response; different parameters return a 422.
</Note>

## See also

* [Authentication](/v2/authentication) — JWT bearer token generation
* [Manage API keys](/v2/api-keys) — Create, scope, and revoke API keys
* [Rate limits](/v2/rate-limits) — Default 30 RPS limit and how to raise it
* [Sandbox](/v2/sandbox) — Test against the isolated Sandbox environment
* [Migration: v1 to v2](/v2/migration-v1-to-v2) — Required `Idempotency-Key` header, domain change, removed `/orders` endpoint
