# Overview of OpenFX APIs OpenFX provides a robust and secure API suite engineered for high performance and reliability, enabling programmatic access to real-time market data, trade execution, and money movement functionalities. This guide will walk through the step-by-step process of deposits, quoting, trading, settlements and monitoring using OpenFX APIs. Version: v1.0.0 ## Servers OpenFX API Server ``` https://api.sandbox.openfx.com ``` ## Security ### bearerAuth Type: http Scheme: bearer Bearer Format: JWT ## Download OpenAPI description [Overview of OpenFX APIs](https://docs.sandbox.openfx.com/_bundle/api/index.yaml) ## MarketData This endpoint retrieves a complete list of all tradable fiat and stablecoin currency pairs on the OpenFX platform. ### Get available markets - [GET /v1/brokerage/{orgId}/available_markets](https://docs.sandbox.openfx.com/api/marketdata/getavailablemarkets.md): Use this endpoint to: - Access the complete list of available currency pairs to trade - Retrieve specifications on trading limits and possible trade directions by currency ## Balances The Balance endpoints enable real-time tracking and management of currency holdings within an account. ### Get balances - [GET /v1/brokerage/{orgId}/balances](https://docs.sandbox.openfx.com/api/balances/getbalances.md): Use this endpoint to: - View real-time balances - Track multi-currency holdings - Monitor available trading funds - Reconcile account positions ## Trade The Trade APIs facilitate programmatic currency exchange through a quote-then-trade workflow, ensuring price transparency and guaranteed execution at quoted rates. ### Generate quote - [POST /v1/brokerage/{orgId}/generate_quote](https://docs.sandbox.openfx.com/api/trade/generatequote.md): Creates a new quote for a specific currency pair and amount, returning a quote ID and guaranteed rate valid for 3 seconds. Use this endpoint to: - Get real-time exchange rates - Lock in rates for trading - Calculate exchange amounts - Review applicable fees and margins ### List trades - [GET /v1/brokerage/{orgId}/trades](https://docs.sandbox.openfx.com/api/trade/listtrades.md): Returns a comprehensive list of all orders, including both completed and pending transactions. Use this endpoint to: - Track trading activity - Monitor order statuses - Generate trading reports - Reconcile transactions ### Get trade by ID - [GET /v1/brokerage/{orgId}/trade/{id}](https://docs.sandbox.openfx.com/api/trade/gettradebyid.md): Provides detailed information on a specific trade using its unique identifier. Use this endpoint to: - Verify order execution details - View settlement status - Access transaction timestamps - Review trade parameters ### Execute trade - [POST /v1/brokerage/{orgId}/trade](https://docs.sandbox.openfx.com/api/trade/executetrade.md): Executes a currency exchange trade using a valid quote ID. Must be called within 3 seconds of quote generation. Use this endpoint to: - Execute currency exchanges - Lock in quoted rates - Convert between currencies - Initiate settlement process ## Deposits Deposit endpoints enable secure funding of trading accounts across multiple supported currencies and methods. ### List deposits - [GET /v1/brokerage/{orgId}/deposits](https://docs.sandbox.openfx.com/api/deposits/listdeposits.md): This endpoint is used to get a comprehensive view of all deposits (both fiat and stablecoins) done by an organization. ## Withdrawals The Withdrawal API facilitates secure fund withdrawals for both fiat and stablecoins. ### List withdrawal wallets - [GET /v1/brokerage/{orgId}/withdrawal_addresses](https://docs.sandbox.openfx.com/api/withdrawals/listwithdrawalwallets.md): This endpoint is used to retrieve a complete list of all approved withdrawal wallets associated with an organization. These are destinations where an organization can send their withdrawals. ### List withdrawal accounts - [GET /v1/brokerage/{orgId}/fiat_withdrawal_addresses](https://docs.sandbox.openfx.com/api/withdrawals/listfiatwithdrawalaccounts.md): This endpoint is used to get a complete list of all approved fiat withdrawal accounts for an organization. The responses have pagination included to help navigate through multiple accounts if needed. ### List withdrawals - [GET /v1/brokerage/{orgId}/withdrawals](https://docs.sandbox.openfx.com/api/withdrawals/listwithdrawals.md): This endpoint is used to get a comprehensive view of all withdrawals (both fiat and stablecoins) done by an organization. ### Get withdrawal by ID - [GET /v1/brokerage/{orgId}/withdrawal/{withdrawalId}](https://docs.sandbox.openfx.com/api/withdrawals/getwithdrawalbyid.md): Fetches detailed information about a specific withdrawal using its unique identifier. ### Initiate stablecoin withdrawal - [POST /v1/brokerage/{orgId}/withdrawal](https://docs.sandbox.openfx.com/api/withdrawals/initiatestablecoinwithdrawal.md): Initiates a stablecoin withdrawal to an approved wallet address. ### Initiate fiat withdrawal - [POST /v1/brokerage/{orgId}/fiat_withdrawal](https://docs.sandbox.openfx.com/api/withdrawals/initiatefiatwithdrawal.md): Initiates a fiat withdrawal to an approved bank account.