In this global economic turmoil, it has become very important for investors to make the right financial decision based on accurate and up-to-date market data. With Sencha Ext JS and Marketstack API, you can build a stock market web application that provides real-time data and helps the investors uncover valuable insights. In this article, you will find all the details. What is Marketstack API? Marketstack is a REST API that provides real-time stock market data. It supports 25,000 stock tickers across the globe from 72 stock exchanges, including NYSE, Nasdaq, and ENX. Also, it offers accurate historical market data of more than 30 years. With an uptime of nearly 100%, it has become one of the most reliable stock market APIs that you can find online. Why should you use Marketstack API? Offers real-time, intraday, and historical stock market data in JSON format, which is very easy to integrate with web applications Supports integration with multiple languages and frameworks, including JavaScript, Python, Node, and Go Handles traffic spike efficiently Offers bank-grade security using the industry-standard 256-bit HTTPS encryption Provides easy-to-follow documentation How to Build a Real-Time Stock Market Web Application with Sencha Ext JS and Marketstack API Sencha Ext JS is a feature-rich JavaScript framework for building business-grade web applications. By integrating Marketstack API, you can create a real-time stock market application easily. Take a look at it: To create the stock market application shown above, you have to follow these steps: 1. First, you have to create the model. Go to app > model folder, create HomeModel.js file and add these codes: Ext.define(‘Demo.model.HomeModel’, { extend: ‘Ext.data.Model’, alternateClassName: [ ‘home’ ], requires: [ ‘Ext.data.field.Number’, ‘Ext.data.proxy.Rest’ ], fields: [ { type: ‘float’, name: ‘low’ }, { type: ‘float’, name: ‘high’ }, { type: ‘int’, name: ‘date’ }, { type: ‘float’, name: ‘close’ }, { type: ‘float’, name: ‘open’ } ], proxy: { type: ‘rest’ } }); Here, you are adding different fields, including open, close, data, high and low. Also, you are defining their types. 2. Then you have to create the view. Go inside view folder and create OHLCCharts.js file. Insert these codes: Ext.define(‘Demo.view.OHLCCharts’, { extend: ‘Ext.panel.Panel’, alias: ‘widget.OHLCCharts’, alternateClassName: [ ‘OHLCCharts’ ], requires: [ ‘Demo.view.OHLCChartsViewModel’, ‘Demo.view.OHLCChartsViewController’, ‘Ext.toolbar.Toolbar’, ‘Ext.toolbar.Fill’, ‘Ext.form.field.Date’, ‘Ext.button.Button’, ‘Ext.chart.CartesianChart’, ‘Ext.chart.axis.Time’, ‘Ext.chart.series.CandleStick’, ‘Ext.chart.interactions.PanZoom’, ‘Ext.chart.interactions.Crosshair’ ], controller: ‘ohlccharts’, viewModel: { type: ‘ohlccharts’ }, dock: ‘top’, height: ‘100vh’, padding: 0, style: { background: ‘#ffffff’ }, width: ‘100wh’, layout: ‘fit’, bodyPadding: 0, frameHeader: false, manageHeight: false, dockedItems: [ { xtype: ‘toolbar’, alignTarget: ”, border: 2, dock: ‘top’, style: { background: ‘#c6e4aa’ }, layout: { type: ‘hbox’, padding: ‘0 10 0 0’ }, items: [ { xtype: ‘tbfill’ }, { xtype: ‘textfield’, id: ‘tickerInput’, width: 100, fieldLabel: ‘Ticker’, labelWidth: 40, value: ‘AAPL’ }, { xtype: ‘datefield’, id: ‘fromDatePicker’, width: 250, fieldLabel: ‘From’, labelWidth: 50, value: ’01/01/2020′ }, { xtype: ‘datefield’, id: ‘toDatePicker’, resizable: false, width: 250, fieldLabel: ‘To’, labelWidth: 50, value: ’12/31/2020′ }, { xtype: ‘button’, id: ‘refreshBtn’, text: ‘Refresh’, listeners: { click: ‘onRefreshBtnClick’ } } ] }, { xtype: ‘cartesian’, dock: ‘top’, height: ’85vh’, id: ‘mycandlestickchart’, itemId: ‘mycandlestickchart’, margin: ‘0 0 0 […]