Back to Blog
by Finage at October 20, 2022 5 MIN READ
Stocks
The stock market can be very volatile. Success is based on being able to predict the next changes in stock prices. The best stock exchange marketers can use different data to determine how prices might change every day. However, this is solely not based on luck. Having the right tools can point stock exchange marketers to the required data. This gives room for making more informed decisions.
One of the best tools is the Finage Stocks API. It is quickly becoming popular as it serves many purposes:
- Users have access to real-time market prices
- It is also very reliable and provides accurate statistics
- All the market data is always available
- The latest data and trends can also be easily accessed
As it has a broad number of uses, Finage Stocks API is a must for anyone in the business. Continue reading to find out how to use Stocks API. We have also launched a quick guide on how to use the Stocks APIs that may make a huge difference to the trading game.
Finage Stocks API offers users a free trial. This provides access to the latest market data. To access a free trial users have to register on the Finage Stocks API website. The registration offers users an API key, which provides access to data. With this key, you can make requests that will be processed quickly and automatically. There are different packages. Some subscriptions offer limited services while others don't.
Restful APIs provide real-time data about both local and international stock markets. You can also access historical data from other markets including cryptocurrency. To access statistics, go to the dashboard on your API. Your dashboard can also help you track the number of requests that are processed daily. There are different sections for market feeds, each with the latest trends and data. Finage also provides financial statements for Canadian, American, and European countries.
Users of Finage Stocks API can expect quick responses after sending out a request. This is because the company uses the In-Memory Cache Engine. This not only provides quick responses but is also encrypted ensuring users are protected.
If you want to reduce the data size for one reason or another, use the Gzip compression. Using huge data sizes may slow down an API. So you are better off reducing the size to get faster results. Each subscription comes with Gzip compression which users should enable. To do this, users should add "Accept-Encoding" to each request made. The size of the response will vary greatly by simply encoding.
To make the latest Stock last quote response, you need to login into your API first. Fill in specific parameters such as:
- Stock symbol
- Price
- Bid
- Bid size
- Ask Size
- Timestamp
Simply putting in these parameters gives you the latest data based on what you want to know. Further, to send queries you can use symbols, the API key, and a time stamp. If you use different stock symbols, make sure to separate them with commas.
The number of symbols can extend to 100. However, the more symbols you put the slower the request will take. The ts (timestamp) can be either in milliseconds (Ms) or nanoseconds (ns). The default ts is ms. With this, you can get several prices including AAPL and TSLA with a single query.
For example, you can get the last quote for a symbol with this endpoint:
https://api.finage.co.uk/last/stock/{ symbol }?apikey=YOUR_API_KEY
- symbol = Stock symbol that you want to get prices
- apikey = Your API key
- ts = Timestamp type. The default is ms (Millisecond). You can use ns for the nanosecond timestamp.
https://api.finage.co.uk/last/stock/AAPL?apikey=YOUR_API_KEY
An example response is given below when you make an API request:
{
"symbol":"AAPL",
"ask":118.55,
"bid":118.53,
"asize":3,
"bsize":1,
"timestamp":1604710766331
}
To get the multiple stocks' last trade, you need the stock symbol of the prices you want to access. Queries will be made with the API key, ts, and dp_filter. The dp_filter allows you to filter dark pools. To do this, set the filter as "true". The default is always "false" which you can change at any time.
Here is an example of how you can get the last quote for a symbol with this endpoint:
https://api.finage.co.uk/last/stock/{ symbol }?apikey=YOUR_API_KEY
- symbol = Stock symbol that you want to get prices
- apikey = Your API key
- ts = Timestamp type. The default is ms (Millisecond). You can use ns for the nanosecond timestamps.
https://api.finage.co.uk/last/stock/AAPL?apikey=YOUR_API_KEY
An example response is given below when you make an API request.
Snapshot API allows users to collect data from US stock markets with a single request. This includes data about trades and the latest quotes. You can only get snapshots while the market is open. To make a query, you need to enable quotes. Other parameters include
- Trades
- Symbols
- API Key
Remember to always put a specific symbol. Leaving it blank means you will get data on the available markets.
Example. https://api.finage.co.uk/snapshot/stock?apikey=YOUR_API_KEY
- quotes = Enable or disable last quotes. Default is true.
- trades = Enable or disable last trades. Default is false.
- symbols = You can get the data from specific symbols by using this query. If you leave it empty, you will get the all available last data. (Separate symbols with commas.)
- apikey = Your API key
https://api.finage.co.uk/snapshot/stock?quotes=true&trades=true&symbols=AAPL,TSLA&apikey=YOUR_API_KEY
{
[
{
symbol: "AAPL",
ask: 136.64,
bid: 136.63,
asize: 20,
bsize: 8,
timestamp: 1612799228260,
},
{
symbol: "TSLA",
ask: 869.37,
bid: 869.1,
asize: 1,
bsize: 1,
timestamp: 1612799228580,
},
{
symbol: "GOGL",
ask: 5.15,
bid: 5.14,
asize: 10,
bsize: 44,
timestamp: 1612799214069,
},
];
}
For historical data, you need the stock symbol and date. As with other queries, you need the API key. I read of the ts, you will use the timestamp offset (tso). You also need the tick link which can range from 10 to 5000.
You can check out the Finage Stocks API docs and our offers to get more advantages. Users have access to the latest trends in real-time. There is also historical data that can be of value when predicting possible market changes. To get started, you have to register. The company provides free trials. There are also various subscription packages where you can select what APIs your company needs.
Once you have registered, you will have an API key. This allows you to send requests. The number of requests sent will depend on your subscription, as some are limited while others are unlimited. Check market prices or the latest data feeds from your dashboard. You can also reduce the request size by using Gzip compression. This prevents the API from underperforming.
You can get your Real-Time and Historical Stocks Data with Finage free Stock Data API key.
Build with us today!
Featured Posts
Common Myths About Cryptocurrency
June 23, 2024
AI and Crypto for Smarter Trading
June 22, 2024
The Growing Importance of Cybersecurity in Financial Services
June 21, 2024
Cryptocurrency Regulations: What the Latest Guidelines Mean for Investors
June 20, 2024
Understanding the Bond Market: Opportunities in 2024
June 19, 2024
Categories
Forex
Finage Updates
Stocks
Real-Time Data
Finage News
Crypto
ETFs
Indices
Technical Guides
Financial Statements
Excel Plugin
Web3
Tags
How to use Stocks API
Finage Stocks APIs
How to Get Real-Time Stocks Price
Stock Data Feeds APIs
Finage Stocks API
Join Us
You can test all data feeds today!
Start Free Trial
If you need more information about data feeds, feel free to ask our team.
Request Consultation
Back to Blog
Please note that all data provided under Finage and on this website, including the prices displayed on the ticker and charts pages, are not necessarily real-time or accurate. They are strictly intended for informational purposes and should not be relied upon for investing or trading decisions. Redistribution of the information displayed on or provided by Finage is strictly prohibited. Please be aware that the data types offered are not sourced directly or indirectly from any exchanges, but rather from over-the-counter, peer-to-peer, and market makers. Therefore, the prices may not be accurate and could differ from the actual market prices. We want to emphasize that we are not liable for any trading or investing losses that you may incur. By using the data, charts, or any related information, you accept all responsibility for any risks involved. Finage will not accept any liability for losses or damages arising from the use of our data or related services. By accessing our website or using our services, all users/visitors are deemed to have accepted these conditions.