Documentation
Welcome to the API documentation - your comprehensive source for real-time and historical financial market data. Our API provides access to commodities, currencies, forex rates, treasury yields, stock prices, and global market indexes.
https://api.financialdata.com/api/v1Commodities
Access real-time and historical commodity prices including gold, silver, oil, natural gas, copper, and agricultural products.
Endpoints
| Endpoint | Description | Parameters |
|---|---|---|
GET /commodities | Get all commodities with their current prices | None |
GET /commodities/:code | Get a specific commodity by its code | code - Commodity code (e.g., GOLD, SILVER, OIL) |
GET /commodities/:code/history | Get complete price history for a commodity | code - Commodity code |
GET /commodities/:code/history/period/:period | Get price history for a specific time period | code - Commodity codeperiod - Time period (e.g., 1d, 1w, 1m, 3m, 6m, 1y) |
GET /commodities/:code/history/latest | Get the latest price entry for a commodity | code - Commodity code |
Example Response
Currencies (Forex)
Live and historical foreign exchange rates for major and minor currency pairs.
Endpoints
| Endpoint | Description | Parameters |
|---|---|---|
GET /forex | Get all forex currency pairs with current rates | None |
GET /forex/:code | Get a specific forex pair by its code | code - Currency pair (e.g., EURUSD, GBPUSD, USDJPY) |
GET /forex/:code/history | Get complete exchange rate history for a currency pair | code - Currency pair code |
GET /forex/:code/history/period/:period | Get exchange rate history for a specific time period | code - Currency pair codeperiod - Time period (e.g., 1d, 1w, 1m, 3m, 6m, 1y) |
GET /forex/:code/history/latest | Get the latest exchange rate entry for a currency pair | code - Currency pair code |
Example Response
Interbank Forex (Bank of Ghana Rates)
Average exchange rates between banks provided by the Bank of Ghana. These represent the interbank market rates.
Endpoints
| Endpoint | Description | Parameters |
|---|---|---|
GET /interbank-pairs | Get all interbank currency pairs | None |
GET /interbank-pairs/:id | Get an interbank pair by its database ID | id - Database ID of the interbank pair |
GET /interbank-pairs/code/:code | Get an interbank pair by currency code | code - Currency code (e.g., USD, EUR, GBP) |
GET /interbank-pairs/bank/:bankCode | Get interbank rates for a specific bank | bankCode - Bank identifier code |
GET /interbank-pairs/:id/history | Get price history for an interbank pair | id - Interbank pair ID |
GET /price-history/:bankCode/period/:period | Get price history for a bank over a specific period | bankCode - Bank codeperiod - Time period (e.g., 1d, 1w, 1m) |
GET /price-history/:bankCode/latest | Get the latest price history entry for a bank | bankCode - Bank code |
Example Response
Market Indexes
Major global market indexes including FTSE 100, GSE Composite, S&P 500, Dow Jones, NASDAQ, DAX, and Nikkei.
Endpoints
| Endpoint | Description | Parameters |
|---|---|---|
GET /indices | Get all market indexes with current values | None |
GET /indices/:code | Get a specific index by its code | code - Index code (e.g., FTSE100, GSE, SPX) |
GET /indices/:code/history | Get historical data for a specific index | code - Index code |
Example Response
Stocks & Equity
Comprehensive stock market data including company profiles, statistics, dividends, earnings, financials, and price history.
Company Information Endpoints
| Endpoint | Description | Parameters |
|---|---|---|
GET /equity/profiles/:company_id | Get company profile information | company_id - Company identifier |
GET /equity/statistics/:company_id | Get company statistics (P/E ratio, market cap, etc.) | company_id - Company identifier |
GET /equity/dividends/:company_id | Get dividend history for a company | company_id - Company identifier |
GET /equity/earnings/:company_id | Get earnings reports for a company | company_id - Company identifier |
GET /equity/financial/:company_id | Get financial statements for a company | company_id - Company identifier |
GET /equity/holders/:company_id | Get institutional and insider holdings | company_id - Company identifier |
GET /equity/company/:company_id/all | Get all data for a company in one request | company_id - Company identifier |
Price History Endpoints
| Endpoint | Description | Parameters |
|---|---|---|
GET /equity/price-history/:company_id | Get complete price history for a company | company_id - Company identifier |
GET /equity/price-history/:company_id/24h | Get price history for last 24 hours | company_id - Company identifier |
GET /equity/price-history/:company_id/1w | Get price history for last week | company_id - Company identifier |
GET /equity/price-history/:company_id/3m | Get price history for last 3 months | company_id - Company identifier |
GET /equity/price-history/:company_id/6m | Get price history for last 6 months | company_id - Company identifier |
GET /equity/price-history/:company_id/ytd | Get price history from year to date | company_id - Company identifier |
GET /equity/price-history/:company_id/1y | Get price history for last year | company_id - Company identifier |
GET /equity/price-history/:company_id/2y | Get price history for last 2 years | company_id - Company identifier |
GET /equity/price-history/:company_id/5y | Get price history for last 5 years | company_id - Company identifier |
GET /equity/price-history/:company_id/10y | Get price history for last 10 years | company_id - Company identifier |
GET /equity/price-history/:company_id/all | Get all-time price history | company_id - Company identifier |
Market Analysis Endpoints
| Endpoint | Description | Parameters |
|---|---|---|
GET /equity/exchange/:exchangeSymbol/top-gainers | Get top gaining stocks on an exchange | exchangeSymbol - Exchange symbol (e.g., GSE, NYSE, NASDAQ) |
GET /equity/exchange/:exchangeSymbol/top-losers | Get top losing stocks on an exchange | exchangeSymbol - Exchange symbol |
GET /equity/exchange/:exchangeSymbol/performance-by-industry | Get performance metrics grouped by industry | exchangeSymbol - Exchange symbol |
GET /equity/exchange/:exchangeSymbol/market-movers | Get stocks with highest volume and activity | exchangeSymbol - Exchange symbol |
GET /equity/gse/status | Get current market status for GSE | None |
Example Response
Treasury Bonds
Government bond yields, treasury bills, notes, bonds, and yield curve data.
Endpoints
| Endpoint | Description | Parameters |
|---|---|---|
GET /treasury | Get all treasury bonds and bills | None |
GET /treasury/active | Get currently active treasury bonds | None |
GET /treasury/highest-yielding | Get bonds with the highest yields | None |
GET /treasury/:id | Get a specific treasury bond by ID | id - Treasury bond identifier |
Example Response
All GET endpoints accept an optional ?api_key=YOUR_API_KEY query parameter or you can include it in the request headers as X-API-Key. Rate limits apply based on your subscription tier.