Available Regions API
List all available markets grouped by geographic region. Use this discovery endpoint to find which markets are available in each region before querying for tickers or predictions.
Endpoint
Section titled “Endpoint”GET /v2/regionsAuthentication
Section titled “Authentication”Supports multiple authentication methods (in order of preference):
| Method | Example |
|---|---|
| Bearer token (recommended) | Authorization: Bearer YOUR_API_KEY |
| X-API-Key header | X-API-Key: YOUR_API_KEY |
| Query parameter | ?apiKey=YOUR_API_KEY |
| Legacy query parameter | ?token=YOUR_API_KEY |
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | No | Your API key (if not using header auth) |
This endpoint has no path parameters or additional query parameters.
Request
Section titled “Request”from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
regions = fb.available.regions(as_dataframe=True)print(regions)curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://api.finbrain.tech/v2/regions"import requests
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.get( "https://api.finbrain.tech/v2/regions", headers=headers)result = response.json()#include <iostream>#include <string>#include <curl/curl.h>#include <nlohmann/json.hpp>
using json = nlohmann::json;
size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* userp) { userp->append((char*)contents, size * nmemb); return size * nmemb;}
json get_regions(const std::string& api_key) { CURL* curl = curl_easy_init(); std::string response;
if (curl) { std::string url = "https://api.finbrain.tech/v2/regions";
struct curl_slist* headers = nullptr; std::string auth_header = "Authorization: Bearer " + api_key; headers = curl_slist_append(headers, auth_header.c_str());
curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response); curl_easy_perform(curl); curl_slist_free_all(headers); curl_easy_cleanup(curl); }
return json::parse(response);}
int main() { auto result = get_regions("YOUR_API_KEY");
for (auto& region : result["data"]["regions"]) { std::cout << region["region"].get<std::string>() << ":" << std::endl; for (auto& market : region["markets"]) { std::cout << " - " << market.get<std::string>() << std::endl; } }
return 0;}use reqwest::blocking::Client;use reqwest::header::{AUTHORIZATION, HeaderValue};use serde::Deserialize;use std::error::Error;
#[derive(Debug, Deserialize)]struct ApiResponse { success: bool, data: RegionsData,}
#[derive(Debug, Deserialize)]struct RegionsData { regions: Vec<Region>,}
#[derive(Debug, Deserialize)]struct Region { region: String, markets: Vec<String>,}
fn get_regions(api_key: &str) -> Result<ApiResponse, Box<dyn Error>> { let client = Client::new(); let response: ApiResponse = client .get("https://api.finbrain.tech/v2/regions") .header(AUTHORIZATION, HeaderValue::from_str(&format!("Bearer {}", api_key))?) .send()? .json()?;
Ok(response)}
fn main() -> Result<(), Box<dyn Error>> { let result = get_regions("YOUR_API_KEY")?;
for region in &result.data.regions { println!("{}:", region.region); for market in ®ion.markets { println!(" - {}", market); } }
Ok(())}const response = await fetch( "https://api.finbrain.tech/v2/regions", { headers: { "Authorization": "Bearer YOUR_API_KEY" } });const result = await response.json();console.log(result.data);Response
Section titled “Response”Success Response (200 OK)
Section titled “Success Response (200 OK)”{ "success": true, "data": { "regions": [ { "region": "US", "markets": ["DOW 30", "NASDAQ", "NYSE", "S&P 500"] }, { "region": "UK", "markets": ["UK FTSE 100"] }, { "region": "DE", "markets": ["Germany DAX"] }, { "region": "Global", "markets": ["Commodities", "Crypto Currencies", "ETFs", "Foreign Exchange", "Index Futures"] } ] }, "meta": { "timestamp": "2026-01-19T15:05:55.187Z" }}Response Fields
Section titled “Response Fields”| Field | Type | Description |
|---|---|---|
success | boolean | Whether the request was successful |
data | object | Regions data container |
meta | object | Response metadata |
Data Object Fields
Section titled “Data Object Fields”| Field | Type | Description |
|---|---|---|
regions | array | Array of region objects |
Region Fields
Section titled “Region Fields”Each item in the regions array contains:
| Field | Type | Description |
|---|---|---|
region | string | Region code (e.g., US, UK, DE, Global) |
markets | array | Array of market name strings available in this region |
Usage Examples
Section titled “Usage Examples”List All Markets in a Region
Section titled “List All Markets in a Region”import requests
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.get( "https://api.finbrain.tech/v2/regions", headers=headers)result = response.json()regions = result["data"]["regions"]
# Find all US marketsfor region in regions: if region["region"] == "US": print("US Markets:") for market in region["markets"]: print(f" - {market}")Build a Region-to-Markets Lookup
Section titled “Build a Region-to-Markets Lookup”import requests
headers = {"Authorization": "Bearer YOUR_API_KEY"}
response = requests.get( "https://api.finbrain.tech/v2/regions", headers=headers)result = response.json()regions = result["data"]["regions"]
# Create a lookup dictionaryregion_map = {r["region"]: r["markets"] for r in regions}
# Use it for filteringprint(f"Global markets: {', '.join(region_map.get('Global', []))}")print(f"Total regions: {len(region_map)}")print(f"Total markets: {sum(len(m) for m in region_map.values())}")Errors
Section titled “Errors”| Code | Error | Description |
|---|---|---|
| 401 | Unauthorized | Invalid or missing API key |
| 500 | Internal Server Error | Server-side error |
Related
Section titled “Related”- Available Markets - List markets (v1 endpoint)
- Available Tickers - Get tickers for a market
- Market Predictions - Get predictions for a market