Skip to content

apptastic-software/trading-calendar

Repository files navigation

Trading Calendar

Build codecov Docker Image Version API Doc License

Free trading calendar REST API with holiday, late open, and early close. Over 60 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 image

Pull image from Docker Hub repository:

docker pull apptasticsoftware/trading-calendar:latest

Or pull image from GitHub Container Registry (GHCR):

docker pull ghcr.io/apptastic-software/trading-calendar:latest

Start the container

Run a container based on the image from Docker Hub:

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

Run a container based on the image from GHCR:

docker run -d --name trading-calendar -p 8000:80 ghcr.io/apptastic-software/trading-calendar

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

Test it

Test that the 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:8000/api/v1/openapi.json

Calendars

Exchange MIC Country Region
Toronto Stock Exchange XTSE 🇨🇦 Canada North America
New York Stock Exchange XNYS 🇺🇸 USA North America
CBOE Futures XCBF 🇺🇸 USA North America
Chicago Mercantile Exchange CMES 🇺🇸 USA North America
ICE US IEPA 🇺🇸 USA North America
Bermuda Stock Exchange XBDA 🇧🇲 Bermuda North America
Mexican Stock Exchange XMEX 🇲🇽 Mexico North America
B3 S.A. - Brasil Bolsa Balcao BVMF 🇧🇷 Brazil South America
Santiago Stock Exchange XSGO 🇨🇱 Chile South America
Colombia Securities Exchange XBOG 🇨🇴 Colombia South America
Lima Stock Exchange XLIM 🇵🇪 Peru South America
Buenos Aires Stock Exchange XBUE 🇦🇷 Argentina South America
London Stock Exchange XLON 🏴󠁧󠁢󠁥󠁮󠁧󠁿 England Europe    
Euronext Amsterdam XAMS 🇳🇱 Netherlands Europe      
Euronext Brussels XBRU 🇧🇪 Belgium Europe      
Luxembourg Stock Exchange XLUX 🇱🇺 Luxembourg Europe      
Euronext Lisbon XLIS 🇵🇹 Portugal Europe      
Euronext Paris XPAR 🇫🇷 France Europe      
Frankfurt Stock Exchange XFRA 🇩🇪 Germany Europe      
Deutsche Börse Xetra XETR 🇩🇪 Germany Europe      
European Energy Exchange XEEE 🇩🇪 Germany Europe      
Hamburg Stock Exchange XHAM 🇩🇪 Germany Europe      
Duesseldorf Stock Exchange XDUS 🇩🇪 Germany Europe      
SIX Swiss Exchange XSWX 🇨🇭 Switzerland Europe      
Bolsa de Madrid XMAD 🇪🇸 Spain Europe      
Borsa Italiana XMIL 🇮🇹 Italy Europe      
Wiener Borse XWBO 🇦🇹 Austria Europe      
Copenhagen Stock Exchange XCSE 🇩🇰 Denmark Europe      
Helsinki Stock Exchange XHEL 🇫🇮 Finland Europe      
Stockholm Stock Exchange XSTO 🇸🇪 Sweden Europe      
Iceland Stock Exchange XICE 🇮🇸 Iceland Europe      
Oslo Stock Exchange XOSL 🇳🇴 Norway Europe      
Irish Stock Exchange XDUB 🇮🇪 Ireland Europe      
Tallinn Stock Exchange XTAL 🇪🇪 Estonia Europe      
Riga Stock Exchange XRIS 🇱🇻 Latvia Europe      
Vilnius Stock Exchange XLIT 🇱🇹 Lithuania Europe      
Poland Stock Exchange XWAR 🇵🇱 Poland Europe      
Prague Stock Exchange XPRA 🇨🇿 Czech Republic Europe      
Bucharest Stock Exchange XBSE 🇷🇴 Romania Europe      
Zagreb Stock Exchange XZAG 🇭🇷 Croatia Europe      
Ljubljana Stock Exchange    XLJU 🇸🇮 Slovenia Europe      
Bratislava Stock Exchange XBRA 🇸🇰 Slovakia Europe
Belgrade Stock Exchange    XBEL 🇷🇸 Serbia Europe
Budapest Stock Exchange XBUD 🇭🇺 Hungary Europe      
Moscow Exchange XMOS 🇷🇺 Russia Europe      
Astana International Exchange AIXK 🇰🇿 Kazakhstan Europe      
Athens Stock Exchange ASEX 🇬🇷 Greece Europe      
Cyprus Stock Exchange XCYS 🇨🇾 Cyprus Europe      
Istanbul Stock Exchange XIST 🇹🇷 Turkey Europe
Australian Securities Exchange XASX 🇦🇺 Australia Asia-Pacific
New Zealand Exchange XNZE 🇳🇿 New Zealand Asia-Pacific
Singapore Exchange XSES 🇸🇬 Singapore Asia-Pacific
Shanghai Stock Exchange XSHG 🇨🇳 China Asia-Pacific
Hong Kong Stock Exchange XHKG 🇭🇰 Hong Kong Asia-Pacific
Taiwan Stock Exchange Corp. XTAI 🇹🇼 Taiwan Asia-Pacific
Tokyo Stock Exchange XTKS 🇯🇵 Japan Asia-Pacific
Korea Exchange XKRX 🇰🇷 South Korea Asia-Pacific
Malaysia Stock Exchange XKLS 🇲🇾 Malaysia Asia-Pacific
Philippine Stock Exchange XPHS 🇵🇭 Philippines Asia-Pacific
Stock Exchange of Thailand XBKK 🇹🇭 Thailand Asia-Pacific
Indonesia Stock Exchange XIDX 🇮🇩 Indonesia Asia-Pacific
Bombay Stock Exchange XBOM 🇮🇳 India Asia-Pacific
Pakistan Stock Exchange XKAR 🇵🇰 Pakistan Asia-Pacific
Tel Aviv Stock Exchange XTAE 🇮🇱 Israel Middle East
Saudi Stock Exchange XSAU 🇸🇦 Saudi Arabia Middle East
Johannesburg Stock Exchange XJSE 🇿🇦 South Africa Africa

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

License

MIT License

Copyright (c) 2024, Apptastic Software

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Packages

 
 
 

Contributors 5