How To Build A Powerful Real-Time Stock Market App
Wouldn’t it be nice to have Stock Data Real-Time, Intraday & Historical Market information for your business and be able to instantly retrieve up-to-date data for any ticker down to the minute, request intraday quotes or search 30+ years of accurate historical market data? The stockmarket API is capable of delivering accurate data for 170,000+ worldwide stock tickers, from more than 50 countries, as well as 750+ market indices, information about timezones, currencies, collected from 70 global exchanges, including Nasdaq, NYSE, and more. In this article we will see how fast and easy it is to use RAD Studio and Delphi to create a Firemonkey multidevice application using the LowCode Wizard in addition to a REST client library to take advantage of market stack API and retrieve a JSON format response for stock market data in real-time. Our RAD Studio and Delphi applications will be able to call the API and request information based on the name of parameters you provide. How do I set up the MarketStack API? Make sure you refer to MarketStack API website (https://MarketStack.com/) and and sign up for the free plan providing only your email and some basic information (no credit card required). Once you are in the website will redirect you to a quick start guide dashboard and your API Access Key will be provided. The Access Key unique, personal and is required to authenticate with the API. Keep it safe! How do I call MarketStack API endpoints? Now all we need to do is to call the API base URL (http://api.marketStack.com/v1/) via a HTTP POST method with no JSON request body needed and some few requested parameters added to the URL address depending on the ednpoint we choose to call. One can do that using REST Client libraries available on several programming languages. marketStack offers several API endpoints to choose from: End-of-Day Data: Get daily stock market data. Intraday Data: Get intraday and real-time market data. Tickers: Get information about stock ticker symbols. Exchanges: Get infotmation about all supported exchanges. Currencies: Get information about all supported currencies. Timezones: Get information about all supported timezones. Our demo will focus on the End-of-Day endpoint but all the others follow similar logic but with different parameters passed. For a complete and detailed list of endpoints and its parameters make sure you refer to MarketStack Quickstart guide (https://marketStack.com/quickstart) // Intraday Data API Endpoint http://api.marketstack.com/v1/eod ? access_key = YOUR_ACCESS_KEY & symbols = AAPL // optional parameters: & interval = 1h & sort = DESC & date_from = YYYY-MM-DD & date_to = YYYY-MM-DD & limit = 100 & offset = 0 // more parameters available please refer to the API Documentation (https://marketStack.com/documentation) // Intraday Data API Endpoint http://api.marketstack.com/v1/eod ? access_key = YOUR_ACCESS_KEY & symbols = AAPL // optional parameters: & interval = 1h & sort = DESC & date_from = YYYY–MM–DD & date_to = YYYY–MM–DD & limit = 100 & offset = 0 // more parameters available please refer to the API Documentation (https://marketStack.com/documentation) What does the MarketStack API endpoint return? You can use the API’s eod endpoint in order to obtain end-of-day data for one or multiple stock tickers. A single or multiple comma-separated ticker symbols are passed to the API using the symbols parameter. After the call is done main results will be as shown below, […]
