Stock Market API StockMarketClock

Full Access to Stock Market Trading Hours API

Timely information is the key to successful trading and that begins with knowing exactly when markets are open around the world.

The StockMarketClock API that powers this site is now available for use in your project. StockMarketClock offers a simple RESTful API that can be easily integrated into your new or existing trading tools. Our API is built using industry standard best practices which allows you to use the API with existing tools like AJAX, cURL, or your programming language of choice.

Monthly Subscription

Full Access to the API
Flexible monthly subscription

$29.95 / mo

Yearly Subscription

Full access to the API
Simple yearly subscription

$299.95 / yr (Save 20%)


Secure payment via Stripe, instant access, and 100% money-back guarantee!

Secure Transaction Secure Stripe Payment Processing


  • Provides accurate opening and closing time for 70+ stock exchanges
  • Immediately get your API key with a 100% money-back guarantee
  • All holiday closures and special hours are taken into account
  • Please contact us to inquire about receiving additional data or other special requests

Usage

There are two endpoints available

First is the list endpoint which enumerates all available stock exchanges:

https://www.stockmarketclock.com/api-v1/list
{
    "results": [
        "adx",
        "ase-amman",
        "ase-athens",
        "asx",
        "bc",
        "bcba",
        "bde-barbados",
        "bhb",
        "bist",
        "bme",
        "bmv",
        "bovespa",
        "bse-beirut",
        "bse-bombay",
        "bse-budapest",
        "bsx",
        "bvb",
        "bvc",
        "bvl",
        "bvs",
        "bx",
        "cse",
        "cse-colombo",
        "dfm",
        "dse",
        "egx",
        "eurex",
        "euronext",
        "euronext-paris",
        "fsx",
        "gpw",
        "hkex",
        "hnx",
        "hose",
        "idx",
        "ise",
        "jpx",
        "jse",
        "jse-jamaica",
        "kase",
        "krx",
        "lse",
        "luxse",
        "moex",
        "mse",
        "mta",
        "myx",
        "nasdaq",
        "nse-india",
        "nse-nairobi",
        "nse-nigeria",
        "nyse",
        "nzx",
        "omx",
        "omxc-copenhagen",
        "omxh-helsinki",
        "omxr-riga",
        "ose",
        "pex",
        "pse",
        "psx",
        "qe",
        "sem",
        "set",
        "sgx",
        "six",
        "sse",
        "szse",
        "tadawul",
        "tase",
        "tse",
        "tsx",
        "twse",
        "ux",
        "vse",
        "zse"
    ]
}

Second is the status endpoint which returns the real-time stock exchange open/closed status:

https://www.stockmarketclock.com/api-v1/status?exchange=nyse,jpx
{
    "results": {
        "nyse": {
            "name": "New York Stock Exchange",
            "status": "closed",
            "reason": null,
            "until": "Mon, 18 Dec 2017 14:30:00 +0000",
            "timezone": "America/New_York"
        },
        "jpx": {
            "name": "Tokyo Stock Exchange",
            "status": "closed",
            "reason": null,
            "until": "Mon, 18 Dec 2017 00:00:00 +0000",
            "timezone": "Asia/Tokyo"
        }
    }
}

Code Examples

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script type="text/javascript">
$( document ).ready(function() {
  var markets   = ["nyse", "jpx"];
  var api_token = "YourApiKeyHere";
  $.ajax({
    method: "POST",
    url: "https://www.stockmarketclock.com/api-v1/status",
    data: {
      exchange: markets.join(","),
      api_token: api_token
    },
    success: function(data) {
      console.log(data);
    },
    error: function(data) {
      console.log("Error:", data);
    }
  });
}
</script>
<?php

$endpoint  = 'https://www.stockmarketclock.com/api-v1/status';
$markets   = ["nyse", "jpx"];
$api_token = "YourApiKeyHere";

$curl = curl_init($endpoint);
$curl_post_data = [
    'exchange'  => join(",", $markets),
    'api_token' => $api_token,
];
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $curl_post_data);

$curl_response = curl_exec($curl);
if ($curl_response === false) {
    $info = curl_getinfo($curl);
    curl_close($curl);
    die('error occurred during curl exec. Additional info: ' . var_dump($info));
}
curl_close($curl);
$decoded = json_decode($curl_response, true);
if (isset($decoded->response->status) && $decoded->response->status == 'ERROR') {
    die('error occurred: ' . $decoded->response->errormessage);
}
var_dump($decoded);

?>
import urllib
from urllib2 import Request, urlopen, URLError

request = Request('https://www.stockmarketclock.com/api-v1/status')
data = urllib.urlencode({
	'exchange': 'nyse,jpx',
	'api_token': 'YourApiKeyHere'
})

try:
	response = urlopen(request,data)
	results = response.read()
	print results
except URLError, e:
	print 'There was an error:', e

Looking for a different language? Contact us.

Frequently Asked Questions

Is there a Rate Limit?

In order to ensure the availability of this API for all customers, we implement a rate limiting scheme that prevents high bursts of traffic. Users are limited to 1,000 requests per minute. This should be more than enough for any application, but if you need more requests for any reason, please contact us.


How will I receive my API key?

When you sign up you will get your API key instantly on the screen and the key will be emailed to you. After signing up you will be able to login to manage you account.


I'm not sure how to use the API

We are here to help. If you need help integrating the API into your application, contact us for a free consultation.


Disclaimer and Terms

Please read the terms and conditions for a description of the data included and the disclaimer of liability. We provide this data on an as-is basis, and while we take all measures to ensure accuracy and completion we cannot be held liable for the contents of the data provided. We provide a 100% money-back guarantee if you are dissatisfied with your order for any reason.


Our Customer Feedback:

"Thank you! This is exactly what I was looking for.. You saved us a lot of time. Thanks again for the great customer service!"

Dave W., Ph.D.

"Your API was a big help for our business. The price is fair for what you get."

Allen C.