Get available markets
const url = 'https://api.openfx.com/v2/brokerage/{orgId}/available_markets';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.openfx.com/v2/brokerage/{orgId}/available_markets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.get("https://api.openfx.com/v2/brokerage/{orgId}/available_markets")
.header("Authorization", "Bearer <token>")
.asString();CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.openfx.com/v2/brokerage/{orgId}/available_markets");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openfx.com/v2/brokerage/{orgId}/available_markets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url https://api.openfx.com/v2/brokerage/{orgId}/available_markets \
--header 'Authorization: Bearer <token>'{
"status": "success",
"data": {
"tradingPairs": [
{
"buy": "USD",
"sell": "USDC"
},
{
"buy": "USDC",
"sell": "USD"
}
],
"tradeLimits": [
{
"USD": {
"minTradeLimit": 100,
"maxTradeLimit": 100000000
}
},
{
"USDC": {
"minTradeLimit": 100,
"maxTradeLimit": 10000000
}
}
]
}
}{
"status": "error",
"message": "Query validation failed"
}{
"status": "error",
"message": "The authorization key provided is either invalid or expired, please try again"
}{
"status": "error",
"message": "Request with this idempotency key is currently processing",
"error": {
"code": "IDEMPOTENCY_IN_FLIGHT",
"details": "Please wait for the original request to complete"
}
}{
"status": "error",
"message": "Idempotency key reused with different parameters",
"error": {
"code": "IDEMPOTENCY_MISMATCH",
"details": "This idempotency key was already used with different request parameters"
}
}{
"status": "error",
"message": "An internal error has occurred"
}Get available markets
Returns the full list of tradable currency pairs along with their trade limits and supported directions.
GET
/
v2
/
brokerage
/
{orgId}
/
available_markets
Get available markets
const url = 'https://api.openfx.com/v2/brokerage/{orgId}/available_markets';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.openfx.com/v2/brokerage/{orgId}/available_markets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.get("https://api.openfx.com/v2/brokerage/{orgId}/available_markets")
.header("Authorization", "Bearer <token>")
.asString();CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.openfx.com/v2/brokerage/{orgId}/available_markets");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.openfx.com/v2/brokerage/{orgId}/available_markets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url https://api.openfx.com/v2/brokerage/{orgId}/available_markets \
--header 'Authorization: Bearer <token>'{
"status": "success",
"data": {
"tradingPairs": [
{
"buy": "USD",
"sell": "USDC"
},
{
"buy": "USDC",
"sell": "USD"
}
],
"tradeLimits": [
{
"USD": {
"minTradeLimit": 100,
"maxTradeLimit": 100000000
}
},
{
"USDC": {
"minTradeLimit": 100,
"maxTradeLimit": 10000000
}
}
]
}
}{
"status": "error",
"message": "Query validation failed"
}{
"status": "error",
"message": "The authorization key provided is either invalid or expired, please try again"
}{
"status": "error",
"message": "Request with this idempotency key is currently processing",
"error": {
"code": "IDEMPOTENCY_IN_FLIGHT",
"details": "Please wait for the original request to complete"
}
}{
"status": "error",
"message": "Idempotency key reused with different parameters",
"error": {
"code": "IDEMPOTENCY_MISMATCH",
"details": "This idempotency key was already used with different request parameters"
}
}{
"status": "error",
"message": "An internal error has occurred"
}Returns the full list of tradable currency pairs along with their trade limits and supported directions.
Use this endpoint to:
See the full v2 error reference for retry semantics and idempotency-specific codes.
- Access the complete list of available currency pairs to trade
- Retrieve specifications on trading limits and possible trade directions by currency
Errors
| Status | Message | Notes |
|---|---|---|
| 400 | Query validation failed | Request didn’t match schema |
| 401 | The authorization key provided is either invalid or expired, please try again | Mint a fresh JWT — see Authentication |
| 409 | Request with this idempotency key is currently processing | See Errors → Idempotency |
| 422 | Idempotency key reused with different parameters | New body → new key |
| 500 | An internal error has occurred | Server fault; retry with backoff |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
⌘I