The OpenWeb Ninja Real-Time Finance Data API offers a fast, reliable, and comprehensive real-time finance data - stocks, indices, ETF, timelines, currency, company income statement, cash flow, stock news, and more data. The API sources finance data from Google Finance (https://finance.google.com).
The API is an unofficial Google Finance REST interface providing stocks / market quotes and market trends, international exchanges / forex, crypto, up-to-date financial news, company fundamentals and analytics to help you make more informed trading and investment decisions.
For more information and notes about the freshness of the data - see the Google Finance disclaimer: https://www.google.com/googlefinance/disclaimer.
To begin using Real-Time Finance Data API, follow these steps and make your first API call:
Subscribe to a plan: Visit our Pricing page and subscribe to one of the plans. If you are just starting, you can subscribe to the free BASIC plan of the API with 200 free monthly requests (hard-limited and no credit card required).
Make your first API call: Visit the RapidAPI Playground - the Search endpoint should be selected and displayed on the main panel view. Since there is already a default query parameter value, just click the blue “Test endpoint” button to make a your first API call. The JSON response will be displayed on the right panel.
Documentation and Resources: Refer to the detailed endpoint, parameter descriptions, and examples provided in the Endpoints tab under each endpoint. Code snippets are available for all popular programming languages and environments, including - Javascript, Python, Java, Shell, and many others, to help you easily integrate the API into your project or workflow.
You should be good to go now!
To authenticate with the API, send the X-RapidAPI-Host header with a value of “real-time-finance-data” along with the X-RapidAPI-Key header set with your RapidAPI App API Key (as shown in the endpoint Code Snippets).
All JSON response bodies returned by our API backend have the following fields: status (ERROR or OK), request_id, and either error (including message and code fields), if the request failed and data field otherwise.
Here’s an example of a successful response:
{
"status": "OK",
"request_id": "53345b8a-de21-40c7-9ec7-b5842796c526",
"data": {..} or [..]
}
Here’s an example of an error response:
{
"status": "ERROR",
"request_id": "408a33ea-77f5-4a21-94e5-8b5884da6bb1",
"error": {
"message": "Limit should be an integer between 1-500.",
"code": 400
}
}
Please note that some errors might be returned by the RapidAPI gateway and will have a different structure. Please refer to the Error Handling / Error Response Structure section for more details.
In addition, RapidAPI gateway adds several headers to each response, for more information, please refer to https://docs.rapidapi.com/docs/response-headers.
For detailed endpoint parameters and responses documentation and examples, and to try the API, please refer to the Endpoints section of the API.
Find stocks, indices, mutual funds, futures, currency / forex / crypto using a free-form query or symbol as seen on Google Finance - https://www.google.com/finance.
This endpoint accepts a free form query and returns matches per result type (stock, index, mutual_fund, currency and futures).
Get the latest market trends (stocks, currency, indices, etc) and relevant news affecting the trends. This is what shown on Google Finance main page: https://www.google.com/finance.
The following trend types are supported: Most Active, Gainers, Losers, Crypto, Currencies and Climate Leaders.
Get stock market quote for the following stock types: stock, index, mutual fund and futures.
This endpoint accepts a stock symbol / ticker (e.g. AAPL:NASDAQ) and returns all stock price information, including current price, low, high, open, close, pre / post market and more.
Get stock time series and key news events for the following periods: 1 day, 5 days, 1 month, 6 months, year-to-date, 1 year, 5 years and all times (max). In addition, the endpoints returns the key news events that affected the stock prices in the specified period. Supports all stock types: stock, index, mutual fund and futures.
This endpoint accepts a stock symbol / ticker (e.g. AAPL:NASDAQ) and a period (1D, 5D, 1M, 6M, YTD, 1Y, 5Y or MAX) and returns the Stock Quote information, in addition to the requested time series and key news events in the same period.
Get the latest news related to a specific stock. Supports all stock types: stock, index, mutual fund and futures.
This endpoint accepts a stock symbol / ticker (e.g. AAPL:NASDAQ) and returns the latest news articles relevant for the stock.
Get stock / public company details. Supports all stock types: stock, index, mutual fund and futures. Returns company details for the stock type.
This endpoint accepts a stock symbol / ticker (e.g. AAPL:NASDAQ) and optionally a language (defaults to en) and returns the full Stock Quote and Company information including company contact details, about, employees information, location, website, ceo, cdp score and manyh other details.
Get public company’s quarterly or annual income statement. Supports the stock type only.
This endpoint accepts a stock symbol / ticker (e.g. AAPL:NASDAQ) and a period (QUARTERLY or ANNUAL) and returns the public company’s income statement for the requested period.
Get public company’s quarterly or annual balance sheet. Supports the stock type only.
This endpoint accepts a stock symbol / ticker (e.g. AAPL:NASDAQ) and a period (QUARTERLY or ANNUAL) and returns the public company’s balance sheet for the requested period.
Get public company’s quarterly or annual cash flow information. Supports the stock type only.
This endpoint accepts a stock symbol / ticker (e.g. AAPL:NASDAQ) and a period (QUARTERLY or ANNUAL) and returns the public company’s cash flow for the requested period.
Get currency / forex or crypto exchange rates.
This endpoint accepts a source currency symbol (e.g. from_symbol=USD) and a target currency symbol (e.g. to_symbol=EUR) and returns forex exchange rate and previous close rate.
Get currency / forex or crypto time series for the following periods: 1 day, 5 days, 1 month, 6 months, year-to-date, 1 year, 5 years and all times (max).
This endpoint accepts a source currency symbol (e.g. from_symbol=USD) and a target currency symbol (e.g. to_symbol=EUR) and returns the Currency Exchange Rate information, in addition to the requested time series.
Get the latest news related to a specific currency / forex or crypto.
This endpoint accepts a source currency symbol (e.g. from_symbol=USD) and a target currency symbol (e.g. to_symbol=EUR) and returns the latest relevant news articles about the forex.
Each subscription plan of the API defines the maximum number of requests permitted per month or the quota, in addition to a rate limit expressed in RPS (Requests Per Second).
Please note that all free plans of the API (e.g. BASIC) are rate limited to 1000 requests per hour. This is a RapidAPI requirement for any free plan.
All API responses include rate limit information in the following headers:
When hitting the rate limits of the API, the RapidAPI gateway will return a 429 Too Many Requests error. When that happens, wait until your rate limit resets, or consider upgrading your subscription plan for a higher limit. We can support almost any monthly quota and rate limit, contact us for more information.
Here’s an example of a 429 Too Many Requests error:
{
"message":"Too many requests"
}
Code examples are available for all popular programming languages and environments (Javascript, Python, Java, Shell, etc) on the Endpoints tab, on the right panel, under “Code Snippets”.
The OpenWeb Ninja Real-Time Finance Data API can be used for a variety of use cases, including:
The Real-Time Finance Data API is designed to provide robust and reliable access to search data. However, in the event of errors during API interaction, we use HTTP status codes to indicate the nature of the problem. Below, you’ll find detailed explanations of common error codes you may encounter, along with potential causes and suggested remediation steps.
400 Bad Request: This status is returned when your request is malformed or missing some required parameters. The response body might also include a “message” field, explaining the specific error. Ensure that all required fields are included and properly formatted before retrying your request.
403 Forbidden: This error indicates that you are not subscribed to the API or that your API key is invalid. If you believe this is in error, please contact RapidAPI support - support@rapidapi.com.
404 Not Found: This status is returned if the requested resource could not be found. This can occur with incorrect URL endpoints. Double-check the URL and try again.
429 Too Many Requests: This error means you have hit the rate limit for your subscription plan. Wait until your rate limit resets, or consider upgrading your subscription plan for a higher limit. If you believe this is in error, please contact us.
5XX Server Error (500, 502, and 503): This indicates a problem with our servers processing your request or an internal server timeout. This is a rare occurrence and should be temporary. If this error persists, please contact our technical support for assistance.
Errors returned by our API backend will have a message and potentially other details attached to them to help you understand and resolve issues. Here’s an example of an error response:
{
"status": "ERROR",
"request_id": "35dabdcd-b334-4600-afbc-d654b8af91cf",
"error": {
"message": "Missing query",
"code": 400
}
}
Some errors like 429 Too Many Requests, 403 Forbidden, or 404 Not Found, might be returned from RapidAPI gateway, in that case, the structure will be different. Here’s an example of an error response:
{
"message": "You are not subscribed to this API."
}
Implement error handling in your application to manage these responses gracefully. Here are some tips:
Retry Logic: For 5XX (500, 502, 503) and 429, implement a retry mechanism that waits for a few seconds before retrying the request.
Validation: Prior to sending requests, validate parameters to catch common errors like 400 Bad Request.
Logging: Log error responses for further analysis to understand patterns or recurring issues that might require changes in how you integrate with the API. The request_id field in the response can be used for further debugging.
If you encounter any issues that you are unable to resolve, or if you need further clarification on the errors you are seeing, please do not hesitate to contact us (see the Contact Us section below). Provide us with the error code, message, and the context in which the error occurred, and we will assist you promptly.
For custom plans / high tier plans, custom services or any other subject, feel free to drop us a private message or an email and we will get back to you shortly.
Email: support@openwebninja.com
Discord: https://discord.gg/wxJxGsZgha
LinkedIn: https://www.linkedin.com/company/openwebninja-api
For more about the data this API provides please refer to https://www.google.com/googlefinance/disclaimer.
Search
Find stocks, indices, mutual funds, futures, currency / forex / crypto using a free-form query or symbol as seen on Google Finance - https://www.google.com/finance.
This endpoint accepts a free form query and returns matches per result type (stock, index, mutual_fund, currency and futures). For more information, see the request / response examples on the playground.
Market Trends
Get the latest market trends (stocks, currency, indices, etc) and relevant news affecting the trends. This is what shown on Google Finance main page: https://www.google.com/finance.
The following trend types are supported: Most Active, Gainers, Losers, Crypto, Currencies and Climate Leaders.
Stock Quote
Get stock market quote for the following stock types: stock, index, mutual fund and futures.
This endpoint accepts a stock symbol / ticker (e.g. AAPL:NASDAQ) and returns all stock price information, including current price, low, high, open, close, pre / post market and more.
Stock Time Series
Get stock time series and key news events for the following periods: 1 day, 5 days, 1 month, 6 months, year-to-date, 1 year, 5 years and all times (max). In addition, the endpoints returns the key news events that affected the stock prices in the specified period. Supports all stock types: stock, index, mutual fund and futures.
This endpoint accepts a stock symbol / ticker (e.g. AAPL:NASDAQ) and a period (1D, 5D, 1M, 6M, YTD, 1Y, 5Y or MAX) and returns the Stock Quote information, in addition to the requested time series and key news events in the same period.
Stock News
Get the latest news related to a specific stock. Supports all stock types: stock, index, mutual fund and futures.
This endpoint accepts a stock symbol / ticker (e.g. AAPL:NASDAQ) and returns the latest news articles relevant for the stock.
Stock / Company Overview
Get stock / public company details. Supports all stock types: stock, index, mutual fund and futures. Returns company details for the stock type.
This endpoint accepts a stock symbol / ticker (e.g. AAPL:NASDAQ) and optionally a language (defaults to en) and returns the full Stock Quote and Company information including company contact details, about, employees information, location, website, ceo, cdp score and manyh other details.
Company Income Statement
Get public company’s quarterly or annual income statement. Supports the stock type only.
This endpoint accepts a stock symbol / ticker (e.g. AAPL:NASDAQ) and a period (QUARTERLY or ANNUAL) and returns the public company’s income statement for the requested period.
Company Balance Sheet
Get public company’s quarterly or annual balance sheet. Supports the stock type only.
This endpoint accepts a stock symbol / ticker (e.g. AAPL:NASDAQ) and a period (QUARTERLY or ANNUAL) and returns the public company’s balance sheet for the requested period.
Company Cash Flow
Get public company’s quarterly or annual cash flow information. Supports the stock type only.
This endpoint accepts a stock symbol / ticker (e.g. AAPL:NASDAQ) and a period (QUARTERLY or ANNUAL) and returns the public company’s cash flow for the requested period.
Currency Exchange Rate
Get currency / forex or crypto exchange rates.
This endpoint accepts a source currency symbol (e.g. from_symbol=USD) and a target currency symbol (e.g. to_symbol=EUR) and returns forex exchange rate and previous close rate.
Currency Time Series
Get currency / forex or crypto time series for the following periods: 1 day, 5 days, 1 month, 6 months, year-to-date, 1 year, 5 years and all times (max).
This endpoint accepts a source currency symbol (e.g. from_symbol=USD) and a target currency symbol (e.g. to_symbol=EUR) and returns the Currency Exchange Rate information, in addition to the requested time series.
Currency News
Get the latest news related to a specific currency / forex or crypto.
This endpoint accepts a source currency symbol (e.g. from_symbol=USD) and a target currency symbol (e.g. to_symbol=EUR) and returns the latest relevant news articles about the forex.
For more information, see the request / response examples on the API playground.
For custom plans / high tier plans, custom services or any other subject, feel free to drop us a private message or an email and we will get back to you shortly.
Email: support@openwebninja.com
Discord: https://discord.gg/wxJxGsZgha
LinkedIn: https://www.linkedin.com/company/openwebninja-api