apptastic-software / trading-calendar

Free REST API with over 50+ unique exchange calendars for equity and futures markets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trading Calendar

Download License

Free market calendar REST API with holiday, late open, and early close. Over 50+ unique exchange calendars for global equity and futures markets.

Data includes:

  • All holidays, including: trading holidays and partial days
  • Support for timezones and daylight savings time transitions
  • Definitions for weekends for each market
  • Open and close time for each market
  • Current market status (open or closed based on static schedule).

Running it locally

Pull the Docker Image

Pull pre-built image from Docker Hub repository:

docker pull apptasticsoftware/trading-calendar:latest

Start the Docker Container

Run a container based on the image:

docker run -d --name trading-calendar -p 8000:80 apptasticsoftware/trading-calendar

It will take around one minute for the container to start and accept requests.

Test it

Test that the docker container is working:

 http://127.0.0.1:8000/api/v1/markets?mic=XNYS

Swagger UI

UI with interactive exploration, call and test API directly from the browser:

http://127.0.0.1:8000/docs

ReDoc UI

Alternative API documentation with ReDoc:

http://127.0.0.1:8000/redoc

OpenAPI

OpenAPI 3.1 specification:

http://127.0.0.1:8001/api/v1/openapi.json

Calendar Support

Exchange MIC Country Exchange Website
New York Stock Exchange XNYS ๐Ÿ‡บ๐Ÿ‡ธ USA https://www.nyse.com/index
CBOE Futures XCBF ๐Ÿ‡บ๐Ÿ‡ธ USA https://markets.cboe.com/us/futures/overview/
Chicago Mercantile Exchange CMES ๐Ÿ‡บ๐Ÿ‡ธ USA https://www.cmegroup.com/
ICE US IEPA ๐Ÿ‡บ๐Ÿ‡ธ USA https://www.theice.com/index
Toronto Stock Exchange XTSE ๐Ÿ‡จ๐Ÿ‡ฆ Canada https://www.tsx.com/
B3 S.A. - Brasil Bolsa Balcao BVMF ๐Ÿ‡ง๐Ÿ‡ท Brazil https://www.b3.com.br/en_us/
London Stock Exchange XLON ๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ England https://www.londonstockexchange.com/home/homepage.htm
Euronext Amsterdam XAMS ๐Ÿ‡ณ๐Ÿ‡ฑ Netherlands https://www.euronext.com/en/regulation/amsterdam
Euronext Brussels XBRU ๐Ÿ‡ง๐Ÿ‡ช Belgium https://www.euronext.com/en/regulation/brussels
Euronext Lisbon XLIS ๐Ÿ‡ต๐Ÿ‡น Portugal https://www.euronext.com/en/regulation/lisbon
Euronext Paris XPAR ๐Ÿ‡ซ๐Ÿ‡ท France https://www.euronext.com/en/regulation/paris
Frankfurt Stock Exchange XFRA ๐Ÿ‡ฉ๐Ÿ‡ช Germany https://en.boerse-frankfurt.de/
Deutsche Bรถrse Xetra XETR ๐Ÿ‡ฉ๐Ÿ‡ช Germany https://www.xetra.com/xetra-en/
SIX Swiss Exchange XSWX ๐Ÿ‡จ๐Ÿ‡ญ Switzerland https://www.six-group.com/exchanges/index.html
Tokyo Stock Exchange XTKS ๐Ÿ‡ฏ๐Ÿ‡ต Japan https://www.jpx.co.jp/english/
Austrialian Securities Exchange XASX ๐Ÿ‡ฆ๐Ÿ‡บ Australia https://www.asx.com.au/
Bolsa de Madrid XMAD ๐Ÿ‡ช๐Ÿ‡ธ Spain http://www.bolsamadrid.es/ing/aspx/Portada/Portada.aspx
Borsa Italiana XMIL ๐Ÿ‡ฎ๐Ÿ‡น Italy https://www.borsaitaliana.it/homepage/homepage.en.htm
New Zealand Exchange XNZE ๐Ÿ‡ณ๐Ÿ‡ฟ New Zealand https://www.nzx.com/
Wiener Borse XWBO ๐Ÿ‡ฆ๐Ÿ‡น Austria https://www.wienerborse.at/en/
Hong Kong Stock Exchange XHKG ๐Ÿ‡ญ๐Ÿ‡ฐ Hong Kong https://www.hkex.com.hk/?sc_lang=en
Copenhagen Stock Exchange XCSE ๐Ÿ‡ฉ๐Ÿ‡ฐ Denmark https://www.nasdaqomxnordic.com/
Helsinki Stock Exchange XHEL ๐Ÿ‡ซ๐Ÿ‡ฎ Finland https://www.nasdaqomxnordic.com/
Stockholm Stock Exchange XSTO ๐Ÿ‡ธ๐Ÿ‡ช Sweden https://www.nasdaqomxnordic.com/
Oslo Stock Exchange XOSL ๐Ÿ‡ณ๐Ÿ‡ด Norway https://www.oslobors.no/ob_eng/
Irish Stock Exchange XDUB ๐Ÿ‡ฎ๐Ÿ‡ช Ireland https://www.euronext.com/en/markets/dublin
Bombay Stock Exchange XBOM ๐Ÿ‡ฎ๐Ÿ‡ณ India https://www.bseindia.com
Singapore Exchange XSES ๐Ÿ‡ธ๐Ÿ‡ฌ Singapore https://www.sgx.com
Shanghai Stock Exchange XSHG ๐Ÿ‡จ๐Ÿ‡ณ China http://english.sse.com.cn
Korea Exchange XKRX ๐Ÿ‡ฐ๐Ÿ‡ท South Korea https://global.krx.co.kr
Iceland Stock Exchange XICE ๐Ÿ‡ฎ๐Ÿ‡ธ Iceland https://www.nasdaqomxnordic.com/
Poland Stock Exchange XWAR ๐Ÿ‡ต๐Ÿ‡ฑ Poland https://www.gpw.pl
Santiago Stock Exchange XSGO ๐Ÿ‡จ๐Ÿ‡ฑ Chile https://inter.bolsadesantiago.com/sitios/en/Paginas/home.aspx
Colombia Securities Exchange XBOG ๐Ÿ‡จ๐Ÿ‡ด Colombia https://www.bvc.com.co/nueva/index_en.html
Mexican Stock Exchange XMEX ๐Ÿ‡ฒ๐Ÿ‡ฝ Mexico https://www.bmv.com.mx
Lima Stock Exchange XLIM ๐Ÿ‡ต๐Ÿ‡ช Peru https://www.bvl.com.pe
Prague Stock Exchange XPRA ๐Ÿ‡จ๐Ÿ‡ฟ Czech Republic https://www.pse.cz/en/
Budapest Stock Exchange XBUD ๐Ÿ‡ญ๐Ÿ‡บ Hungary https://bse.hu/
Athens Stock Exchange ASEX ๐Ÿ‡ฌ๐Ÿ‡ท Greece https://www.athexgroup.gr
Istanbul Stock Exchange XIST ๐Ÿ‡น๐Ÿ‡ท Turkey https://www.borsaistanbul.com/en/
Tel Aviv Stock Exchange XTAE ๐Ÿ‡ฎ๐Ÿ‡ฑ Israel https://www.tase.co.il/Eng/Pages/Homepage.aspx
Johannesburg Stock Exchange XJSE ๐Ÿ‡ฟ๐Ÿ‡ฆ South Africa https://www.jse.co.za/z
Malaysia Stock Exchange XKLS ๐Ÿ‡ฒ๐Ÿ‡พ Malaysia https://www.bursamalaysia.com
Moscow Exchange XMOS ๐Ÿ‡ท๐Ÿ‡บ Russia https://www.moex.com/en/
Philippine Stock Exchange XPHS ๐Ÿ‡ต๐Ÿ‡ญ Philippines https://www.pse.com.ph/stockMarket/home.html
Stock Exchange of Thailand XBKK ๐Ÿ‡น๐Ÿ‡ญ Thailand https://www.set.or.th/set/mainpage.do?language=en&country=US
Indonesia Stock Exchange XIDX ๐Ÿ‡ฎ๐Ÿ‡ฉ Indonesia https://www.idx.co.id/
Taiwan Stock Exchange Corp. XTAI ๐Ÿ‡น๐Ÿ‡ผ Taiwan https://www.twse.com.tw/en/
Buenos Aires Stock Exchange XBUE ๐Ÿ‡ฆ๐Ÿ‡ท Argentina https://www.bcba.sba.com.ar/
Pakistan Stock Exchange XKAR ๐Ÿ‡ต๐Ÿ‡ฐ Pakistan https://www.psx.com.pk/
Saudi Stock Exchange XSAU ๐Ÿ‡ธ๐Ÿ‡ฆ Saudi Arabia https://www.saudiexchange.sa/
Astana International Exchange AIXK ๐Ÿ‡ฐ๐Ÿ‡ฟ Kazakhstan https://www.aix.kz/
Bucharest Stock Exchange XBSE ๐Ÿ‡ท๐Ÿ‡ด Romania https://www.bvb.ro/

Note that exchange calendars are defined by their ISO-10383 market identifier code (MIC).

About

Free REST API with over 50+ unique exchange calendars for equity and futures markets.

License:MIT License


Languages

Language:Python 99.2%Language:Dockerfile 0.8%