Available Tickers API
Retrieve a list of all tickers that have predictions available for a specific prediction type. Use this endpoint to discover which tickers you can query.
Endpoint
Section titled “Endpoint”GET /v1/available/tickers/{type}Authentication
Section titled “Authentication”Requires API key via token query parameter.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Prediction type: daily or monthly |
Query Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | Yes | Your API key |
Request
Section titled “Request”# Get tickers with daily predictionscurl "https://api.finbrain.tech/v1/available/tickers/daily?token=YOUR_API_KEY"
# Get tickers with monthly predictionscurl "https://api.finbrain.tech/v1/available/tickers/monthly?token=YOUR_API_KEY"from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
# Get tickers with daily predictionsdaily_tickers = fb.available.tickers(prediction_type="daily")print(f"Daily predictions available for {len(daily_tickers)} tickers")
# Get tickers with monthly predictionsmonthly_tickers = fb.available.tickers(prediction_type="monthly")print(f"Monthly predictions available for {len(monthly_tickers)} tickers")#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_available_tickers(const std::string& type, const std::string& api_key) { CURL* curl = curl_easy_init(); std::string response;
if (curl) { std::string url = "https://api.finbrain.tech/v1/available/tickers/" + type + "?token=" + api_key;
curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response); curl_easy_perform(curl); curl_easy_cleanup(curl); }
return json::parse(response);}
int main() { auto data = get_available_tickers("daily", "YOUR_API_KEY");
std::cout << "Found " << data.size() << " tickers" << std::endl;
// Print first 10 tickers for (size_t i = 0; i < std::min(size_t(10), data.size()); i++) { std::cout << " " << data[i]["ticker"].get<std::string>() << " - " << data[i]["name"].get<std::string>() << " (" << data[i]["market"].get<std::string>() << ")" << std::endl; }
return 0;}use reqwest::blocking::Client;use serde::Deserialize;use std::error::Error;
#[derive(Debug, Deserialize)]struct TickerInfo { ticker: String, name: String, market: String,}
fn get_available_tickers(pred_type: &str, api_key: &str) -> Result<Vec<TickerInfo>, Box<dyn Error>> { let url = format!( "https://api.finbrain.tech/v1/available/tickers/{}?token={}", pred_type, api_key );
let client = Client::new(); let response: Vec<TickerInfo> = client.get(&url).send()?.json()?;
Ok(response)}
fn main() -> Result<(), Box<dyn Error>> { let data = get_available_tickers("daily", "YOUR_API_KEY")?;
println!("Found {} tickers", data.len());
// Print first 10 tickers for ticker_info in data.iter().take(10) { println!(" {} - {} ({})", ticker_info.ticker, ticker_info.name, ticker_info.market); }
Ok(())}import requests
# Daily tickersresponse = requests.get( "https://api.finbrain.tech/v1/available/tickers/daily", params={"token": "YOUR_API_KEY"})tickers = response.json()print(tickers)// Get daily tickersconst response = await fetch( "https://api.finbrain.tech/v1/available/tickers/daily?token=YOUR_API_KEY");const tickers = await response.json();console.log(`Found ${tickers.length} tickers`);console.log(tickers[0]); // { ticker: "AAPL", name: "Apple Inc.", market: "S&P 500" }Response
Section titled “Response”Success Response (200 OK)
Section titled “Success Response (200 OK)”[ { "ticker": "AIG", "name": "American International Group Inc.", "market": "S&P 500" }, { "ticker": "AAPL", "name": "Apple Inc.", "market": "S&P 500" }, { "ticker": "MSFT", "name": "Microsoft Corporation", "market": "S&P 500" } // ... thousands more]Response Fields
Section titled “Response Fields”The response is an array of ticker objects with the following fields:
| Field | Type | Description |
|---|---|---|
ticker | string | Ticker symbol |
name | string | Company name |
market | string | Market the ticker belongs to |
Prediction Types
Section titled “Prediction Types”| Type | Description | Forecast Horizon |
|---|---|---|
daily | Daily price predictions | 10 trading days |
monthly | Monthly price predictions | 12 months |
Usage Examples
Section titled “Usage Examples”Check Ticker Availability
Section titled “Check Ticker Availability”from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
def is_ticker_available(ticker, prediction_type="daily"): """Check if a ticker has predictions available""" tickers = fb.available.tickers(prediction_type=prediction_type) ticker_symbols = [t["ticker"] for t in tickers] return ticker.upper() in ticker_symbols
# Check if AAPL has daily predictionsif is_ticker_available("AAPL", "daily"): print("AAPL has daily predictions available")else: print("AAPL does not have predictions")Build Ticker Universe
Section titled “Build Ticker Universe”from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
# Get all available tickersall_tickers = fb.available.tickers(prediction_type="daily")
# Filter for specific marketsp500_tickers = [t for t in all_tickers if t["market"] == "S&P 500"]print(f"S&P 500 tickers: {len(sp500_tickers)}")
# Filter for specific tickerstech_symbols = ["AAPL", "MSFT", "GOOGL", "AMZN", "NVDA", "META"]tech_tickers = [t for t in all_tickers if t["ticker"] in tech_symbols]print(f"Tech universe: {[t['ticker'] for t in tech_tickers]}")Cross-Reference with Watchlist
Section titled “Cross-Reference with Watchlist”from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
watchlist = ["AAPL", "MSFT", "XYZ123", "GOOGL", "INVALID"]
# Get available tickerstickers_data = fb.available.tickers(prediction_type="daily")available = set(t["ticker"] for t in tickers_data)
# Find which watchlist items are availablevalid = [t for t in watchlist if t in available]invalid = [t for t in watchlist if t not in available]
print(f"Valid tickers: {valid}")print(f"Invalid tickers: {invalid}")Errors
Section titled “Errors”| Code | Error | Description |
|---|---|---|
| 400 | Bad Request | Invalid prediction type |
| 401 | Unauthorized | Invalid or missing API key |
| 500 | Internal Server Error | Server-side error |
Related Endpoints
Section titled “Related Endpoints”- Available Markets - Get available markets
- Ticker Predictions - Get predictions for a ticker
- Market Predictions - Get predictions for a market