Navbar
shell python javascript csharp java
  • Introduction
  • Authenticate
  • Quotes
  • Trades
  • Analytics
  • Jobs
  • Ref Data
  • Download result file
  • Errors
  • Introduction

    Nasdaq Data on Demand provides institutional investors, fund managers and traders with financial analytics, and buy and sell signals derived from structured and unstructured data, and our machine intelligence engine.

    Authenticate

    # Replace `__key__` and `__secret__` with your API credentials
    
    curl --request POST \
    --url https://dataondemand.nasdaq.com/api/v1/authenticate \
    --header 'Content-Type: application/json' \
    --data '{"client_key":"__key__", "client_secret":"__secret__"}'
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/authenticate'
    
    payload = {'client_key':'__key__', 'client_secret':'__secret__'}
    headers = {'Content-Type': 'application/json'}
    
    response = requests.request('POST', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'POST',
      url: 'https://dataondemand.nasdaq.com/api/v1/authenticate'',
      headers: { 'Content-Type': 'application/json' },
      body: { client_key: '__key__', client_secret: '__secret__' },
      json: true
    };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/authenticate");
    
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/json");
    var json = "{\"client_key\":\"__key__\", \"client_secret\":\"__secret__\"}";
    request.AddParameter("application/json", json, ParameterType.RequestBody);
    
    IRestResponse response = client.Execute(request);
    
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/authenticate";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpPost post = new HttpPost(url);
    post.setHeader("Content-Type", "application/json");
    String json = "{\"client_key\":\"__key__\", \"client_secret\":\"__secret__\"}";
    post.setEntity(json);
    
    org.apache.http.HttpResponse response = client.execute(post);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above command returns JSON structured like this:

    {
        "access_token": "__token__",
        "expires_in": 720
    }
    

    Nasdaq Data on Demand uses API tokens to allow access, so you'll need to authenticate first before making API calls.

    HTTP Request

    POST https://dataondemand.nasdaq.com/api/v1/authenticate

    Header Request Parameters

    Parameter Required Value
    Content-Type true application/json

    Body Request Parameters

    Parameter Required Description
    client_key true Your issued client key.
    client_secret true Your issued client secret.

    The Authenticate endpoint returns a Bearer token to be included in all subseqent API requests that looks like the following:

    Authorization: Header __token__

    Quotes

    Request Quotes

    Returns all quotes for the specified parameters

    Async

    Maximum of 10 symbols can be queried over maximum one year interval. Jobs are processed at 44th minute past every hour

    curl -X POST "https://dataondemand.nasdaq.com/api/v1/quotes/async" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer __token__" \
    -d '{ "start": "2018-08-27T10:00:00.000Z", "end": "2018-08-27T11:00:00.000Z" , "market_centers": ["string"], "symbols": ["AAPL"]}'
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/quotes/async'
    
    payload = { "start": "2018-08-27T10:00:00.000Z", "end": "2018-08-27T11:00:00.000Z" , "market_centers": ["string"], "symbols": ["AAPL"]}
    headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('POST', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'POST',
      url: 'https://dataondemand.nasdaq.com/api/v1/quotes/async',
      headers: {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: { "start": "2018-08-27T10:00:00.000Z", "end": "2018-08-27T11:00:00.000Z" , "market_centers": ["string"], "symbols": ["AAPL"]},
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/quotes/async");
    
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    var json = "{ \"start\": \"2018-08-27T10:00:00.000Z\", \"end\": \"2018-08-27T11:00:00.000Z\" , \"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    request.AddParameter("application/json", json, ParameterType.RequestBody);
    
    IRestResponse response = client.Execute(request);
    
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/quotes/async";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpPost post = new HttpPost(url);
    post.setHeader("Content-Type", "application/json");
    post.AddHeader("Authorization", "Bearer __token__");
    post.AddHeader("accept", "application/json");
    String json = "{ \"start\": \"2018-08-27T10:00:00.000Z\", \"end\": \"2018-08-27T11:00:00.000Z\" , \"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    post.setEntity(json);
    
    org.apache.http.HttpResponse response = client.execute(post);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    {
      "request_id": "string"
    }
    

    HTTP Request

    POST https://dataondemand.nasdaq.com/api/v1/quotes/async

    Header Request Parameters

    Parameter Required Value
    Content-Type true application/json
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    Parameter Required Description
    start true Start Date in format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
    end true End Date in format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
    symbols true Symbols whose quotes are required
    market_centers false Market Centers for fetching Quote
    next_cursor true Pagination Count

    Response Columns

    Column Description
    ask_price Ask Price
    ask_quantity Ask Quantity
    bid_price Bid Price
    bid_quantity Bid Quantity
    end_time End Date in format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
    market_center Market Center for the Quote
    quote_conditions Quote Condition
    sipfeed Feed on which Quote was reported
    sipfeed_seq Sequence of Quote on the feed
    start_time Start Date in format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
    symbol Symbol

    Recurring

    To query all symbols use %. The file generated are files chunked in 2 gb pieces in a zip file. The zip file name is of the format "JobType-RequestId/JobType_StartDate_EndDate.zip"

    curl -X POST "https://dataondemand.nasdaq.com/api/v1/quotes/recurring" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer __token__" \
    -d '{ "market_centers": ["string"], "symbols": ["AAPL"]}'
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/quotes/recurring'
    
    payload = { "market_centers": ["string"], "symbols": ["AAPL"]}
    headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('POST', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'POST',
      url: 'https://dataondemand.nasdaq.com/api/v1/quotes/recurring',
      headers: {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: { "market_centers": ["string"], "symbols": ["AAPL"]},
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/quotes/recurring");
    
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    var json = "{ \"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    request.AddParameter("application/json", json, ParameterType.RequestBody);
    
    IRestResponse response = client.Execute(request);
    
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/quotes/recurring";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpPost post = new HttpPost(url);
    post.setHeader("Content-Type", "application/json");
    post.AddHeader("Authorization", "Bearer __token__");
    post.AddHeader("accept", "application/json");
    String json = "{ \"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    post.setEntity(json);
    
    org.apache.http.HttpResponse response = client.execute(post);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    {
          "request_id": "string"
    }
    

    HTTP Request

    POST https://dataondemand.nasdaq.com/api/v1/quotes/recurring

    Header Request Parameters

    Parameter Required Value
    Content-Type true application/json
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    Parameter Required Description
    symbols true Symbols whose quotes are required
    market_centers false Market Centers for fetching Quote

    Trades

    Request Trades

    Returns all trades for the specified parameters

    Async

    Maximum of 50 symbols can be queried over maximum one year interval. Jobs are processed at 44th minute past every hour

    curl -X POST "https://dataondemand.nasdaq.com/api/v1/trades/async" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer __token__" \
    -d '{ "start": "2018-08-27T10:00:00.000Z", "end": "2018-08-27T11:00:00.000Z" , "market_centers": ["string"], "sub_market_centers": ["string"], "symbols": ["AAPL"]}'
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/trades/async'
    
    payload = { "start": "2018-08-27T10:00:00.000Z", "end": "2018-08-27T11:00:00.000Z" , "market_centers": ["string"], "sub_market_centers": ["string"], "symbols": ["AAPL"]}
    headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('POST', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'POST',
      url: 'https://dataondemand.nasdaq.com/api/v1/trades/async',
      headers: {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: { "start": "2018-08-27T10:00:00.000Z", "end": "2018-08-27T11:00:00.000Z" , "market_centers": ["string"], "sub_market_centers": ["string"], "symbols": ["AAPL"]},
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/trades/async");
    
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    var json = "{ \"start\": \"2018-08-27T10:00:00.000Z\", \"end\": \"2018-08-27T11:00:00.000Z\" , \"market_centers\": \"['string']\", \"sub_market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    request.AddParameter("application/json", json, ParameterType.RequestBody);
    
    IRestResponse response = client.Execute(request);
    
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/trades/async";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpPost post = new HttpPost(url);
    post.setHeader("Content-Type", "application/json");
    post.AddHeader("Authorization", "Bearer __token__");
    post.AddHeader("accept", "application/json");
    String json = "{ \"start\": \"2018-08-27T10:00:00.000Z\", \"end\": \"2018-08-27T11:00:00.000Z\" , \"market_centers\": \"['string']\", \"sub_market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    post.setEntity(json);
    
    org.apache.http.HttpResponse response = client.execute(post);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    {
          "request_id": "string"
    }
    

    HTTP Request

    POST https://dataondemand.nasdaq.com/api/v1/trades/async

    Header Request Parameters

    Parameter Required Value
    Content-Type true application/json
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    Parameter Required Description
    start true Start Date in format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
    end true End Date in format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
    sub_market_centers false Sub Market Centers for fetching Trades
    market_centers false Market Centers for fetching Trades
    symbols true Symbols whose trades are required
    next_cursor true Pagination Count

    Response Columns

    Column Description
    canceled_indicator Indicates if trade is cancelled
    dott DOTT character
    listing_venue Bid Price
    market_center Market center on which trade was executed
    msn Message Sequence Number
    omsn Original Message Sequence Number
    price Price at which trade was executed
    quantity No. of shares for which the trade was executed
    sales_conditions Sales Conditions
    sub_market_center Sub market center
    symbol Symbol for the trade
    trade_date Trade Date in format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'

    Recurring

    To query all symbols use %. The file generated are files chunked in 2 gb pieces in a zip file. The zip file name is of the format "JobType-RequestId/JobType_StartDate_EndDate.zip"

    curl -X POST "https://dataondemand.nasdaq.com/api/v1/trades/recurring" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer __token__" \
    -d '{"market_centers": ["string"], "sub_market_centers": ["string"], "symbols": ["AAPL"]}'
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/trades/recurring'
    
    payload = {"market_centers": ["string"], "sub_market_centers": ["string"], "symbols": ["AAPL"]}
    headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('POST', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'POST',
      url: 'https://dataondemand.nasdaq.com/api/v1/trades/recurring',
      headers: {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: {"market_centers": ["string"], "sub_market_centers": ["string"], "symbols": ["AAPL"]},
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/trades/recurring");
    
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    var json = "{\"market_centers\": \"['string']\", \"sub_market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    request.AddParameter("application/json", json, ParameterType.RequestBody);
    
    IRestResponse response = client.Execute(request);
    
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/trades/recurring";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpPost post = new HttpPost(url);
    post.setHeader("Content-Type", "application/json");
    post.AddHeader("Authorization", "Bearer __token__");
    post.AddHeader("accept", "application/json");
    String json = "{\"market_centers\": \"['string']\", \"sub_market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    post.setEntity(json);
    
    org.apache.http.HttpResponse response = client.execute(post);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    {
          "request_id": "string"
    }
    

    HTTP Request

    POST https://dataondemand.nasdaq.com/api/v1/trades/recurring

    Header Request Parameters

    Parameter Required Value
    Content-Type true application/json
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    Parameter Required Description
    sub_market_centers false Sub Market Centers for fetching Trades
    market_centers false Market Centers for fetching Trades
    symbols true Symbols whose trades are required

    Request First Trades

    Returns first trade of a certain date for the specified parameters

    Async

    Jobs are processed at 44th minute past every hour

    curl -X POST "https://dataondemand.nasdaq.com/api/v1/trades/async/first" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer __token__" \
    -d '{ "trade_date": "2018-08-27", "market_centers": ["string"], "symbols": ["AAPL"]}'
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/trades/async/first'
    
    payload = { "trade_date": "2018-08-27", "market_centers": ["string"], "symbols": ["AAPL"]}
    headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('POST', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'POST',
      url: 'https://dataondemand.nasdaq.com/api/v1/trades/async/first',
      headers: {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: { "trade_date": "2018-08-27", "market_centers": ["string"], "symbols": ["AAPL"]},
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/trades/async/first");
    
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    var json = "{ \"trade_date\": \"2018-08-27\",\"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    request.AddParameter("application/json", json, ParameterType.RequestBody);
    
    IRestResponse response = client.Execute(request);
    
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/trades/async/first";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpPost post = new HttpPost(url);
    post.setHeader("Content-Type", "application/json");
    post.AddHeader("Authorization", "Bearer __token__");
    post.AddHeader("accept", "application/json");
    String json = "{ \"trade_date\": \"2018-08-27\",\"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    post.setEntity(json);
    
    org.apache.http.HttpResponse response = client.execute(post);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    HTTP Request

    POST https://dataondemand.nasdaq.com/api/v1/trades/async/first

    Header Request Parameters

    Parameter Required Value
    Content-Type true application/json
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    Parameter Required Description
    trade_date true Trade Date in format: yyyy-MM-dd
    market_centers false Market Centers for fetching Trades
    symbols true Symbols whose trades are required

    Response Columns

    Column Description
    canceled_indicator Indicates if trade is cancelled
    dott DOTT character
    listing_venue Bid Price
    market_center Market center on which trade was executed
    msn Message Sequence Number
    omsn Original Message Sequence Number
    price Price at which trade was executed
    quantity No. of shares for which the trade was executed
    sales_conditions Sales Conditions
    sub_market_center Sub market center
    symbol Symbol for the trade
    trade_date Trade Date in format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'

    Recurring

    To query all symbols use %. The file generated are files chunked in 2 gb pieces in a zip file. The zip file name is of the format "JobType-RequestId/JobType_StartDate_EndDate.zip"

    curl -X POST "https://dataondemand.nasdaq.com/api/v1/trades/recurring/first" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer __token__" \
    -d '{"market_centers": ["string"], "symbols": ["AAPL"]}'
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/trades/recurring/first'
    
    payload = {"market_centers": ["string"], "symbols": ["AAPL"]}
    headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('POST', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'POST',
      url: 'https://dataondemand.nasdaq.com/api/v1/trades/recurring/first',
      headers: {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: {"market_centers": ["string"], "symbols": ["AAPL"]},
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/trades/recurring/first");
    
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    var json = "{\"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    request.AddParameter("application/json", json, ParameterType.RequestBody);
    
    IRestResponse response = client.Execute(request);
    
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/trades/recurring/first";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpPost post = new HttpPost(url);
    post.setHeader("Content-Type", "application/json");
    post.AddHeader("Authorization", "Bearer __token__");
    post.AddHeader("accept", "application/json");
    String json = "{\"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    post.setEntity(json);
    
    org.apache.http.HttpResponse response = client.execute(post);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    {
          "request_id": "string"
    }
    

    HTTP Request

    POST https://dataondemand.nasdaq.com/api/v1/trades/recurring/first

    Header Request Parameters

    Parameter Required Value
    Content-Type true application/json
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    Parameter Required Description
    market_centers false Market Centers for fetching Trades
    symbols true Symbols whose trades are required

    Request Last Trades

    Returns last trade of a certain date for the specified parameters

    Async

    Jobs are processed at 44th minute past every hour

    curl -X POST "https://dataondemand.nasdaq.com/api/v1/trades/async/last" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer __token__" \
    -d '{ "trade_date": "2018-08-27", "market_centers": ["string"], "symbols": ["AAPL"]}'
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/trades/async/last'
    
    payload = { "trade_date": "2018-08-27", "market_centers": ["string"], "symbols": ["AAPL"]}
    headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('POST', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'POST',
      url: 'https://dataondemand.nasdaq.com/api/v1/trades/async/last',
      headers: {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: { "trade_date": "2018-08-27", "market_centers": ["string"], "symbols": ["AAPL"]},
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/trades/async/last");
    
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    var json = "{ \"trade_date\": \"2018-08-27\",\"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    request.AddParameter("application/json", json, ParameterType.RequestBody);
    
    IRestResponse response = client.Execute(request);
    
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/trades/async/last";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpPost post = new HttpPost(url);
    post.setHeader("Content-Type", "application/json");
    post.AddHeader("Authorization", "Bearer __token__");
    post.AddHeader("accept", "application/json");
    String json = "{ \"trade_date\": \"2018-08-27\",\"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    post.setEntity(json);
    
    org.apache.http.HttpResponse response = client.execute(post);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    {
          "request_id": "string"
    }
    

    HTTP Request

    POST https://dataondemand.nasdaq.com/api/v1/trades/async/last

    Header Request Parameters

    Parameter Required Value
    Content-Type true application/json
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    Parameter Required Description
    trade_date true Trade Date in format: yyyy-MM-dd
    market_centers false Market Centers for fetching Trades
    symbols true Symbols whose trades are required

    Response Columns

    Column Description
    canceled_indicator Indicates if trade is cancelled
    dott DOTT character
    listing_venue Bid Price
    market_center Market center on which trade was executed
    msn Message Sequence Number
    omsn Original Message Sequence Number
    price Price at which trade was executed
    quantity No. of shares for which the trade was executed
    sales_conditions Sales Conditions
    sub_market_center Sub market center
    symbol Symbol for the trade
    trade_date Trade Date in format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'

    Recurring

    To query all symbols use %. The file generated are files chunked in 2 gb pieces in a zip file. The zip file name is of the format "JobType-RequestId/JobType_StartDate_EndDate.zip"

    curl -X POST "https://dataondemand.nasdaq.com/api/v1/trades/recurring/last" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer __token__" \
    -d '{ "trade_date": "market_centers": ["string"], "symbols": ["AAPL"]}'
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/trades/recurring/last'
    
    payload = { "market_centers": ["string"], "symbols": ["AAPL"]}
    headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('POST', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'POST',
      url: 'https://dataondemand.nasdaq.com/api/v1/trades/recurring/last',
      headers: {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: { "market_centers": ["string"], "symbols": ["AAPL"]},
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/trades/recurring/last");
    
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    var json = "{ \"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    request.AddParameter("application/json", json, ParameterType.RequestBody);
    
    IRestResponse response = client.Execute(request);
    
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/trades/recurring/last";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpPost post = new HttpPost(url);
    post.setHeader("Content-Type", "application/json");
    post.AddHeader("Authorization", "Bearer __token__");
    post.AddHeader("accept", "application/json");
    String json = "{\"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    post.setEntity(json);
    
    org.apache.http.HttpResponse response = client.execute(post);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    {
          "request_id": "string"
    }
    

    HTTP Request

    POST https://dataondemand.nasdaq.com/api/v1/trades/recurring/last

    Header Request Parameters

    Parameter Required Value
    Content-Type true application/json
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    Parameter Required Description
    market_centers true Market Center for fetching Trades
    symbols true Symbols whose trades are required

    Analytics

    End of Day Data

    Returns aggregated analytic values across all trades for each day for the specified parameters including the range of dates.

    End of day query follows a logical interpretation of processing guidelines for sale conditions when calculating each aggregated value. For Nasdaq and OTC symbols UTP Trade Data Feed Specification is followed. For NYSE symbols Consolidated Tape System Specification

    In this query, if no market center is specified as an input parameter then consolidated rules are incorporated otherwise the unconsolidated rules.

    Consolidated Processing Guidelines Market Center Processing Guidelines
    Modifier Condition Update High/Low Update Last Update High/Low Update Last Update Volume
    @ Regular Sale Yes Yes Yes Yes Yes
    A Acquisition Yes Yes Yes Yes Yes
    B Bunched Trade Yes Yes Yes Yes Yes
    C Cash Sale No No No No Yes
    D Distribution Yes Yes Yes Yes Yes
    E Placeholder TBD TBD TBD TBD TBD
    F Intermarket Sweep Yes Yes Yes Yes Yes
    G Bunched Sold Trade Yes No1 Yes No1 Yes
    H Price Variation Trade No No No No Yes
    I Odd Lot Trade No No No No Yes
    K Rule 155 Trade (AMEX) Yes Yes Yes Yes Yes
    L Sold Last Yes Yes2 Yes Yes Yes
    M Market Center Official Close No No Yes Yes No
    N Next Day No No No No Yes
    O Opening Prints Yes Yes Yes Yes Yes
    P Prior Reference Price Yes No1 Yes No1 Yes
    Q Market Center Official Open3 No No Yes No No
    R Seller No No No No Yes
    S Split Trade Yes Yes Yes Yes Yes
    T Form T No No No No Yes
    U Extended trading hours (Sold Out of Sequence) No No No No Yes
    V Contingent Trade No No No No Yes
    W Average Price Trade No No No No Yes
    X Cross Trade Yes Yes Yes Yes Yes
    Y Yellow Flag Regular Trade Yes Yes Yes Yes Yes
    Z Sold (Out of Sequence) Yes No1 Yes No1 Yes
    1 Stopped Stock (Regular Trade) Yes Yes Yes Yes Yes
    4 Derivatively Priced Yes No1 Yes No1 Yes
    5 Re - Opening Prints Yes Yes Yes Yes Yes
    6 Closing Prints Yes Yes Yes Yes Yes
    7 Qualified Contingent Trade ("QCT") No No No No Yes
    8 Placeholder For 611 Exempt TBD TBD TBD TBD TBD
    9 Correct Consolidated Close (per listing market) Yes Yes No No No

    1UTDF Subscribers should only update the field values if the trade is the first or only last sale eligible trade transaction of the business day from any UTP participant.

    2 UTDF subscribers should update consolidated last sale field if received prior to the End of Last Sale Eligibility Control Message (16:00:10). After End of Last Sale Eligibility Control Message is received the transaction would only update the market center-specific last sale value but not the consolidated last sale value.

    3 Please note that direct data recipients, which maintain individual market center open values, should use the “Q” value as the official market center opening value and populate data displays accordingly.

    Async

    Maximum of 50 symbols can be queried over maximum one year interval. Jobs are processed at 44th minute past every hour

    curl -X POST "https://dataondemand.nasdaq.com/api/v1/analytics/async/endOfDayData" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer __token__" \
    -d '{ "start": "2018-08-27T10:00:00.000Z", "end": "2018-08-27T11:00:00.000Z" , "market_centers": ["string"], "symbols": ["AAPL"]}'
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/analytics/async/endOfDayData'
    
    payload = { "start": "2018-08-27T10:00:00.000Z", "end": "2018-08-27T11:00:00.000Z" , "market_centers": ["string"], "sub_market_centers": ["string"], "symbols": ["AAPL"]}
    headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('POST', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'POST',
      url: 'https://dataondemand.nasdaq.com/api/v1/analytics/async/endOfDayData',
      headers: {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: { "start": "2018-08-27T10:00:00.000Z", "end": "2018-08-27T11:00:00.000Z" , "market_centers": ["string"], "sub_market_centers": ["string"], "symbols": ["AAPL"]},
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/analytics/async/endOfDayData");
    
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    var json = "{ \"start\": \"2018-08-27T10:00:00.000Z\", \"end\": \"2018-08-27T11:00:00.000Z\" , \"market_centers\": \"['string']\", \"sub_market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    request.AddParameter("application/json", json, ParameterType.RequestBody);
    
    IRestResponse response = client.Execute(request);
    
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/analytics/async/endOfDayData";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpPost post = new HttpPost(url);
    post.setHeader("Content-Type", "application/json");
    post.AddHeader("Authorization", "Bearer __token__");
    post.AddHeader("accept", "application/json");
    String json = "{ \"start\": \"2018-08-27T10:00:00.000Z\", \"end\": \"2018-08-27T11:00:00.000Z\" , \"market_centers\": \"['string']\", \"sub_market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    post.setEntity(json);
    
    org.apache.http.HttpResponse response = client.execute(post);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    {
          "request_id": "string"
    }
    

    HTTP Request

    POST https://dataondemand.nasdaq.com/api/v1/analytics/async/endOfDayData

    Header Request Parameters

    Parameter Required Value
    Content-Type true application/json
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    Parameter Required Description
    start true Start Date in format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
    end true End Date in format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
    symbols true Symbols whose trades are required
    market_centers false Market Centers for fetching Trades

    Response Columns

    Column Description
    close Closing Price
    high High price
    last_sale Price of last eligible trade
    low Low Price
    open Opening Price
    volume Volume of shares
    symbol Symbol for the trade
    date Trade Date

    Recurring

    To query all symbols use %. The file generated are files chunked in 2 gb pieces in a zip file. The zip file name is of the format "JobType-RequestId/JobType_StartDate_EndDate.zip"

    curl -X POST "https://dataondemand.nasdaq.com/api/v1/analytics/recurring/endOfDayData" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer __token__" \
    -d '{"market_centers": ["string"], "symbols": ["AAPL"]}'
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/analytics/recurring/endOfDayData'
    
    payload = {"market_centers": ["string"], "sub_market_centers": ["string"], "symbols": ["AAPL"]}
    headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('POST', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'POST',
      url: 'https://dataondemand.nasdaq.com/api/v1/analytics/recurring/endOfDayData',
      headers: {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: {"market_centers": ["string"], "sub_market_centers": ["string"], "symbols": ["AAPL"]},
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/analytics/recurring/endOfDayData");
    
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    var json = "{\"market_centers\": \"['string']\", \"sub_market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    request.AddParameter("application/json", json, ParameterType.RequestBody);
    
    IRestResponse response = client.Execute(request);
    
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/analytics/recurring/endOfDayData";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpPost post = new HttpPost(url);
    post.setHeader("Content-Type", "application/json");
    post.AddHeader("Authorization", "Bearer __token__");
    post.AddHeader("accept", "application/json");
    String json = "{\"market_centers\": \"['string']\", \"sub_market_centers\": \"['string']\", \"symbols\": \"['AAPL']\"}";
    post.setEntity(json);
    
    org.apache.http.HttpResponse response = client.execute(post);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    {
          "request_id": "string"
    }
    

    HTTP Request

    POST https://dataondemand.nasdaq.com/api/v1/analytics/recurring/endOfDayData

    Header Request Parameters

    Parameter Required Value
    Content-Type true application/json
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    Parameter Required Description
    symbols true Symbols whose trades are required
    market_centers false Market Centers for fetching Trades

    Vwap Data

    Returns aggregated Vwap, Twap, trade count, trade volume across all trades for each for user defined interval and other parameters.

    Vwap query follows a logical interpretation of processing guidelines for sale conditions when calculating each aggregated value. For Nasdaq and OTC symbols UTP Trade Data Feed Specification is followed. For NYSE symbols Consolidated Tape System Specification

    Consolidated Processing Guidelines Market Center Processing Guidelines
    Modifier Condition Update High/Low Update Last Update High/Low Update Last Update Volume
    @ Regular Sale Yes Yes Yes Yes Yes
    A Acquisition Yes Yes Yes Yes Yes
    B Bunched Trade Yes Yes Yes Yes Yes
    C Cash Sale No No No No Yes
    D Distribution Yes Yes Yes Yes Yes
    E Placeholder TBD TBD TBD TBD TBD
    F Intermarket Sweep Yes Yes Yes Yes Yes
    G Bunched Sold Trade Yes No1 Yes No1 Yes
    H Price Variation Trade No No No No Yes
    I Odd Lot Trade No No No No Yes
    K Rule 155 Trade (AMEX) Yes Yes Yes Yes Yes
    L Sold Last Yes Yes2 Yes Yes Yes
    M Market Center Official Close No No Yes Yes No
    N Next Day No No No No Yes
    O Opening Prints Yes Yes Yes Yes Yes
    P Prior Reference Price Yes No1 Yes No1 Yes
    Q Market Center Official Open3 No No Yes No No
    R Seller No No No No Yes
    S Split Trade Yes Yes Yes Yes Yes
    T Form T No No No No Yes
    U Extended trading hours (Sold Out of Sequence) No No No No Yes
    V Contingent Trade No No No No Yes
    W Average Price Trade No No No No Yes
    X Cross Trade Yes Yes Yes Yes Yes
    Y Yellow Flag Regular Trade Yes Yes Yes Yes Yes
    Z Sold (Out of Sequence) Yes No1 Yes No1 Yes
    1 Stopped Stock (Regular Trade) Yes Yes Yes Yes Yes
    4 Derivatively Priced Yes No1 Yes No1 Yes
    5 Re - Opening Prints Yes Yes Yes Yes Yes
    6 Closing Prints Yes Yes Yes Yes Yes
    7 Qualified Contingent Trade ("QCT") No No No No Yes
    8 Placeholder For 611 Exempt TBD TBD TBD TBD TBD
    9 Correct Consolidated Close (per listing market) Yes Yes No No No

    1UTDF Subscribers should only update the field values if the trade is the first or only last sale eligible trade transaction of the business day from any UTP participant.

    2 UTDF subscribers should update consolidated last sale field if received prior to the End of Last Sale Eligibility Control Message (16:00:10). After End of Last Sale Eligibility Control Message is received the transaction would only update the market center-specific last sale value but not the consolidated last sale value.

    3 Please note that direct data recipients, which maintain individual market center open values, should use the “Q” value as the official market center opening value and populate data displays accordingly.

    NOTE: User can override all of the conditions below by providing a list of sale conditions. However, that will affect every aggregate returned by this query.

    After filtering the trade records according to the above conditions, the earliest trade record is going to be determinant of the first price.

    Async

    Maximum of 50 symbols can be queried over maximum one year interval. Jobs are processed at 44th minute past every hour

    curl -X POST "https://dataondemand.nasdaq.com/api/v1/analytics/async/vwap" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer __token__" \
    -d '{ "start": "2018-08-27T10:00:00.000Z", "end": "2018-08-27T11:00:00.000Z" , "market_centers": ["string"], "symbols": ["AAPL"], "sales_conditions": [{"string"}]}'
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/analytics/async/vwap'
    
    payload = { "start": "2018-08-27T10:00:00.000Z", "end": "2018-08-27T11:00:00.000Z" , "market_centers": ["string"], "symbols": ["AAPL"], "sales_conditions": ["string"]}
    headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('POST', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'POST',
      url: 'https://dataondemand.nasdaq.com/api/v1/analytics/async/vwap',
      headers: {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: { "start": "2018-08-27T10:00:00.000Z", "end": "2018-08-27T11:00:00.000Z" , "market_centers": ["string"], "symbols": ["AAPL"], "sales_conditions": ["string"]},
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/analytics/async/vwap");
    
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    var json = "{ \"start\": \"2018-08-27T10:00:00.000Z\", \"end\": \"2018-08-27T11:00:00.000Z\" , \"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\", \"sales_conditions\": \"['string']\"}";
    request.AddParameter("application/json", json, ParameterType.RequestBody);
    
    IRestResponse response = client.Execute(request);
    
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/analytics/async/vwap";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpPost post = new HttpPost(url);
    post.setHeader("Content-Type", "application/json");
    post.AddHeader("Authorization", "Bearer __token__");
    post.AddHeader("accept", "application/json");
    String json = "{ \"start\": \"2018-08-27T10:00:00.000Z\", \"end\": \"2018-08-27T11:00:00.000Z\" , \"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\", \"sales_conditions\": \"['string']\"}";
    post.setEntity(json);
    
    org.apache.http.HttpResponse response = client.execute(post);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    {
          "request_id": "string"
    }
    

    HTTP Request

    POST https://dataondemand.nasdaq.com/api/v1/analytics/async/vwap

    Header Request Parameters

    Parameter Required Value
    Content-Type true application/json
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    Parameter Required Description
    start true Start Date in format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
    end true End Date in format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
    market_centers false Market Center for fetching Trades
    symbols true Symbols whose trades are required
    sales_conditions false Conditions of Sales

    Response Columns

    Column Description
    symbol Symbol for the trade
    trades Number of Trades
    twap Time weighted average price
    volume Volume of shares
    vwap Volume weighted average price

    Recurring

    To query all symbols use %. The file generated are files chunked in 2 gb pieces in a zip file. The zip file name is of the format "JobType-RequestId/JobType_StartDate_EndDate.zip"

    curl -X POST "https://dataondemand.nasdaq.com/api/v1/analytics/recurring/vwap" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer __token__" \
    -d '{"market_centers": ["string"], "symbols": ["AAPL"], "sales_conditions": [{"string"}]}'
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/analytics/recurring/vwap'
    
    payload = {"market_centers": ["string"], "symbols": ["AAPL"], "sales_conditions": ["string"]}
    headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('POST', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'POST',
      url: 'https://dataondemand.nasdaq.com/api/v1/analytics/recurring/vwap',
      headers: {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: {"market_centers": ["string"], "symbols": ["AAPL"], "sales_conditions": ["string"]},
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/analytics/recurring/vwap");
    
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    var json = "{\"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\", \"sales_conditions\": \"['string']\"}";
    request.AddParameter("application/json", json, ParameterType.RequestBody);
    
    IRestResponse response = client.Execute(request);
    
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/analytics/recurring/vwap";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpPost post = new HttpPost(url);
    post.setHeader("Content-Type", "application/json");
    post.AddHeader("Authorization", "Bearer __token__");
    post.AddHeader("accept", "application/json");
    String json = "{\"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\", \"sales_conditions\": \"['string']\"}";
    post.setEntity(json);
    
    org.apache.http.HttpResponse response = client.execute(post);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    {
          "request_id": "string"
    }
    

    HTTP Request

    POST https://dataondemand.nasdaq.com/api/v1/analytics/recurring/vwap

    Header Request Parameters

    Parameter Required Value
    Content-Type true application/json
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    Parameter Required Description
    market_centers false Market Centers for fetching Trades
    symbols true Symbols whose trades are required
    sales_condition false Sales Conditions

    Summarized Trades Data

    Returns aggregated Vwap, Twap, trade count, trade volume, low, high, first trade price and last trade price on user defined sub-intervals. Sub-intervals are defined by trade_period and trade_precision e.g. trade_period=5 and trade_precision=SECOND results in sub-intevals of 5 second length.

    This query follows a logical interpretation of processing guidelines for sale conditions when calculating each aggregated value. For Nasdaq and OTC symbols UTP Trade Data Feed Specification is followed. For NYSE symbols Consolidated Tape System Specification

    Consolidated Processing Guidelines Market Center Processing Guidelines
    Modifier Condition Update High/Low Update Last Update High/Low Update Last Update Volume
    @ Regular Sale Yes Yes Yes Yes Yes
    A Acquisition Yes Yes Yes Yes Yes
    B Bunched Trade Yes Yes Yes Yes Yes
    C Cash Sale No No No No Yes
    D Distribution Yes Yes Yes Yes Yes
    E Placeholder TBD TBD TBD TBD TBD
    F Intermarket Sweep Yes Yes Yes Yes Yes
    G Bunched Sold Trade Yes No1 Yes No1 Yes
    H Price Variation Trade No No No No Yes
    I Odd Lot Trade No No No No Yes
    K Rule 155 Trade (AMEX) Yes Yes Yes Yes Yes
    L Sold Last Yes Yes2 Yes Yes Yes
    M Market Center Official Close No No Yes Yes No
    N Next Day No No No No Yes
    O Opening Prints Yes Yes Yes Yes Yes
    P Prior Reference Price Yes No1 Yes No1 Yes
    Q Market Center Official Open3 No No Yes No No
    R Seller No No No No Yes
    S Split Trade Yes Yes Yes Yes Yes
    T Form T No No No No Yes
    U Extended trading hours (Sold Out of Sequence) No No No No Yes
    V Contingent Trade No No No No Yes
    W Average Price Trade No No No No Yes
    X Cross Trade Yes Yes Yes Yes Yes
    Y Yellow Flag Regular Trade Yes Yes Yes Yes Yes
    Z Sold (Out of Sequence) Yes No1 Yes No1 Yes
    1 Stopped Stock (Regular Trade) Yes Yes Yes Yes Yes
    4 Derivatively Priced Yes No1 Yes No1 Yes
    5 Re - Opening Prints Yes Yes Yes Yes Yes
    6 Closing Prints Yes Yes Yes Yes Yes
    7 Qualified Contingent Trade ("QCT") No No No No Yes
    8 Placeholder For 611 Exempt TBD TBD TBD TBD TBD
    9 Correct Consolidated Close (per listing market) Yes Yes No No No

    1UTDF Subscribers should only update the field values if the trade is the first or only last sale eligible trade transaction of the business day from any UTP participant.

    2 UTDF subscribers should update consolidated last sale field if received prior to the End of Last Sale Eligibility Control Message (16:00:10). After End of Last Sale Eligibility Control Message is received the transaction would only update the market center-specific last sale value but not the consolidated last sale value.

    3 Please note that direct data recipients, which maintain individual market center open values, should use the “Q” value as the official market center opening value and populate data displays accordingly.

    After filtering the trade records according to the above conditions, the earliest trade record is going to be determinant of the first price.

    Async

    Maximum of 50 symbols can be queried over maximum one year interval. Jobs are processed at 44th minute past every hour

    curl -X POST "https://dataondemand.nasdaq.com/api/v1/analytics/async/summarizedTrades" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer __token__" \
    -d '{ "start": "2018-08-27T10:00:00.000Z", "end": "2018-08-27T11:00:00.000Z" , "market_centers": ["string"], "symbols": ["AAPL"], "trade_period": 0, "trade_precision": "SECOND" }'
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/analytics/async/summarizedTrades'
    
    payload = { "start": "2018-08-27T10:00:00.000Z", "end": "2018-08-27T11:00:00.000Z" , "market_centers": ["string"], "symbols": ["AAPL"], "trade_period": 0, "trade_precision": "SECOND" }
    headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('POST', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'POST',
      url: 'https://dataondemand.nasdaq.com/api/v1/analytics/async/summarizedTrades',
      headers: {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: { "start": "2018-08-27T10:00:00.000Z", "end": "2018-08-27T11:00:00.000Z" , "market_centers": ["string"], "symbols": ["AAPL"], "trade_period": 0, "trade_precision": "SECOND" },
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/analytics/async/summarizedTrades");
    
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    var json = "{ \"start\": \"2018-08-27T10:00:00.000Z\", \"end\": \"2018-08-27T11:00:00.000Z\" , \"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\", \"trade_period\": 0, \"trade_precision\":\"SECOND\"}";
    request.AddParameter("application/json", json, ParameterType.RequestBody);
    
    IRestResponse response = client.Execute(request);
    
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/analytics/async/summarizedTrades";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpPost post = new HttpPost(url);
    post.setHeader("Content-Type", "application/json");
    post.AddHeader("Authorization", "Bearer __token__");
    post.AddHeader("accept", "application/json");
    String json = "{ \"start\": \"2018-08-27T10:00:00.000Z\", \"end\": \"2018-08-27T11:00:00.000Z\" , \"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\", \"trade_period\": 0, \"trade_precision\":\"SECOND\"}";
    post.setEntity(json);
    
    org.apache.http.HttpResponse response = client.execute(post);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    {
          "request_id": "string"
    }
    

    HTTP Request

    POST https://dataondemand.nasdaq.com/api/v1/analytics/async/summarizedTrades

    Header Request Parameters

    Parameter Required Value
    Content-Type true application/json
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    Parameter Required Description
    start true Start Date in format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
    end true End Date in format: yyyy-MM-dd'T'HH:mm:ss.SSS'Z'
    market_centers false Market Center for fetching Trades
    symbols true Symbols whose trades are required
    trade_period true Duration of Trade
    trade_precision true Precision Unit (SECOND, MINUTE or HOUR)

    Response Columns

    Column Description
    first First Trade of Interval
    high High price of Interval
    last Last Trade of Interval
    low Low Price of Interval
    symbol Symbol for the trade
    time_interval Start timestamp of time time interval
    trades Number of trades in interval
    twap Time Weighted Average Price of Interval
    volume Volume of shares in interval
    vwap Volume wWeighted Average Price of Interval

    Recurring

    To query all symbols use %. The file generated are files chunked in 2 gb pieces in a zip file. The zip file name is of the format "JobType-RequestId/JobType_StartDate_EndDate.zip"

    curl -X POST "https://dataondemand.nasdaq
    .com/v1/analytics/recurring/summarizedTrades" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer __token__" \
    -d '{"market_centers": ["string"], "symbols": ["AAPL"], "trade_period": 0, "trade_precision": "SECOND" }'
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/analytics/recurring/summarizedTrades'
    
    payload = {"market_centers": ["string"], "symbols": ["AAPL"], "trade_period": 0, "trade_precision": "SECOND" }
    headers = {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('POST', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'POST',
      url: 'https://dataondemand.nasdaq.com/api/v1/analytics/recurring/summarizedTrades',
      headers: {'accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: {"market_centers": ["string"], "symbols": ["AAPL"], "trade_period": 0, "trade_precision": "SECOND" },
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/analytics/recurring/summarizedTrades");
    var request = new RestRequest(Method.POST);
    request.AddHeader("Content-Type", "application/json");
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    var json = "{\"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\", \"trade_period\": 0, \"trade_precision\":\"SECOND\"}";
    request.AddParameter("application/json", json, ParameterType.RequestBody);
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/analytics/recurring/summarizedTrades";
    HttpClient client = HttpClientBuilder.create().build();
    HttpPost post = new HttpPost(url);
    post.setHeader("Content-Type", "application/json");
    post.AddHeader("Authorization", "Bearer __token__");
    post.AddHeader("accept", "application/json");
    String json = "{\"market_centers\": \"['string']\", \"symbols\": \"['AAPL']\", \"trade_period\": 0, \"trade_precision\":\"SECOND\"}";
    post.setEntity(json);
    org.apache.http.HttpResponse response = client.execute(post);
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    {
          "request_id": "string"
    }
    

    HTTP Request

    POST https://dataondemand.nasdaq.com/api/v1/analytics/recurring/summarizedTrades

    Header Request Parameters

    Parameter Required Value
    Content-Type true application/json
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    Parameter Required Description
    market_centers false Market Center for fetching Trades
    symbols true Symbols whose trades are required
    trade_period true Duration of Trade
    trade_precision true Precision Unit (SECOND, MINUTE or HOUR)

    Jobs

    List Recurring Jobs

    Returns user's current list of recurring jobs.

    curl -X GET "https://dataondemand.nasdaq.com/api/v1/jobs/recurring" \
    -H "accept: application/json" \
    -H "Authorization: Bearer __token__" 
    
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/jobs/recurring'
    
    payload = None
    headers = {'accept': 'application/json', 'Authorization': 'Bearer __token__'}
    response = requests.request('GET', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'GET',
      url: 'https://dataondemand.nasdaq.com/api/v1/jobs/recurring',
      headers: {'accept': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: null,
      json: true};
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/jobs/recurring");
    var request = new RestRequest(Method.GET);
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/jobs/recurring";
    HttpClient client = HttpClientBuilder.create().build();
    HttpGet get = new HttpGet(url);
    get.AddHeader("Authorization", "Bearer __token__");
    get.AddHeader("accept", "application/json");
    org.apache.http.HttpResponse response = client.execute(get);
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    
    [
      {
        "request_id": "string",
        "request_type": "string",
        "request_status": "string",
        "download_url": "string",
        "ftp_url": "string",
        "symbols": ["string", "string"],
        "market_centers": ["string", "string"],
        "sub_market_centers": ["string", "string"],
        "trade_period": "5",
        "trade_precision": "SECOND",
        "archived_jobs": [
                {
                    "request_status": "string",
                    "download_url": "string",
                    "ftp_url": "string"
                }
         ]
      }
    ]
    
    

    HTTP Request

    GET https://dataondemand.nasdaq.com/api/v1/jobs/recurring

    Header Request Parameters

    Parameter Required Value
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    None.

    List Async Download Jobs

    Returns user's current list of async download jobs.

    curl -X GET "https://dataondemand.nasdaq.com/api/v1/jobs/async" \
    -H "accept: application/json" \
    -H "Authorization: Bearer __token__" 
    
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/jobs/async'
    
    payload = None
    headers = {'accept': 'application/json', 'Authorization': 'Bearer __token__'}
    response = requests.request('GET', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'GET',
      url: 'https://dataondemand.nasdaq.com/api/v1/jobs/async',
      headers: {'accept': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: null,
      json: true};
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/jobs/async");
    var request = new RestRequest(Method.GET);
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/jobs/async";
    HttpClient client = HttpClientBuilder.create().build();
    HttpGet get = new HttpGet(url);
    get.AddHeader("Authorization", "Bearer __token__");
    get.AddHeader("accept", "application/json");
    org.apache.http.HttpResponse response = client.execute(get);
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    
    [
      {
        "request_id": "string",
        "request_type": "string",
        "request_status": "string",
        "download_url": "string",
        "ftp_url": "string",
        "begin": "2018-06-01T12:00:00",
        "end": "2018-06-01T13:00:00",
        "symbols": ["string", "string"],
        "market_centers": ["string", "string"],
        "sub_market_centers": ["string", "string"],
        "trade_period": "5",
        "trade_precision": "SECOND"
      }
    ]
    
    

    HTTP Request

    GET https://dataondemand.nasdaq.com/api/v1/jobs/async

    Header Request Parameters

    Parameter Required Value
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    None.

    Request Recurring Job Status

    Returns status of user's async recurring download job that is identified by request_id.

    curl -X GET "https://dataondemand.nasdaq.com/api/v1/jobs/recurring/__request_id__" \
    -H "accept: application/json" \
    -H "Authorization: Bearer __token__"
    
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/jobs/recurring/__request_id__'
    
    payload = None
    headers = {'accept': 'application/json', 'Authorization': 'Bearer __token__'}
    response = requests.request('GET', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'GET',
      url: 'https://dataondemand.nasdaq.com/api/v1/jobs/recurring/__request_id__',
      headers: {'accept': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: null,
      json: true};
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/jobs/recurring/__request_id__");
    var request = new RestRequest(Method.GET);
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/jobs/recurring/__request_id__";
    HttpClient client = HttpClientBuilder.create().build();
    HttpGet get = new HttpGet(url);
    get.AddHeader("Authorization", "Bearer __token__");
    get.AddHeader("accept", "application/json");
    org.apache.http.HttpResponse response = client.execute(get);
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    
    [
      {
        "request_id": "string",
        "request_type": "string",
        "request_status": "string",
        "download_url": "string",
        "ftp_url": "string",
        "symbols": ["string", "string"],
        "market_centers": ["string", "string"],
        "sub_market_centers": ["string", "string"],
        "trade_period": "5",
        "trade_precision": "SECOND",
        "archived_jobs": [
                {
                    "request_status": "string",
                    "download_url": "string",
                    "ftp_url": "string"
                }
         ]
      }
    ]
    
    

    HTTP Request

    GET https://dataondemand.nasdaq.com/api/v1/jobs/recurring/__request_id__

    Header Request Parameters

    Parameter Required Value
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    None.

    Request Async Job Status

    Returns status of user's async download job that is identified by request_id.

    curl -X GET "https://dataondemand.nasdaq.com/api/v1/jobs/async/__request_id__" \
    -H "accept: application/json" \
    -H "Authorization: Bearer __token__"
    
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/jobs/async/__request_id__'
    
    payload = None
    headers = {'accept': 'application/json', 'Authorization': 'Bearer __token__'}
    response = requests.request('GET', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'GET',
      url: 'https://dataondemand.nasdaq.com/api/v1/jobs/async/__request_id__',
      headers: {'accept': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: null,
      json: true};
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/jobs/async/__request_id__");
    var request = new RestRequest(Method.GET);
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/jobs/async/__request_id__";
    HttpClient client = HttpClientBuilder.create().build();
    HttpGet get = new HttpGet(url);
    get.AddHeader("Authorization", "Bearer __token__");
    get.AddHeader("accept", "application/json");
    org.apache.http.HttpResponse response = client.execute(get);
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    
    [
      {
        "request_id": "string",
        "request_type": "string",
        "request_status": "string",
        "download_url": "string",
        "ftp_url": "string",
        "symbols": ["string", "string"],
        "market_centers": ["string", "string"],
        "sub_market_centers": ["string", "string"],
        "trade_period": "5",
        "trade_precision": "SECOND"
      }
    ]
    
    

    HTTP Request

    GET https://dataondemand.nasdaq.com/api/v1/jobs/async/__request_id__

    Header Request Parameters

    Parameter Required Value
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    None.

    Delete Recurring Job Request

    Delete user's recurring download job request that is identified by request_id.

    curl -X DELETE "https://dataondemand.nasdaq.com/api/v1/jobs/recurring/__request_id__" \
    -H "Authorization: Bearer __token__"
    
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/jobs/recurring/__request_id__'
    
    payload = None
    headers = {'Authorization': 'Bearer __token__'}
    response = requests.request('DELETE', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'DELETE',
      url: 'https://dataondemand.nasdaq.com/api/v1/jobs/recurring/__request_id__',
      headers: {'Authorization': 'Bearer __token__'}},
      body: null,
      json: true};
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/jobs/recurring/__request_id__");
    var request = new RestRequest(Method.DELETE);
    request.AddHeader("Authorization", "Bearer __token__");
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/jobs/recurring/__request_id__";
    HttpClient client = HttpClientBuilder.create().build();
    HttpDelete delete = new HttpDelete(url);
    delete.AddHeader("Authorization", "Bearer __token__");
    org.apache.http.HttpResponse response = client.execute(delete);
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands does not return anything

    HTTP Request

    DELETE https://dataondemand.nasdaq.com/api/v1/jobs/async/__request_id__

    Header Request Parameters

    Parameter Required Value
    Authorization true Bearer __token__

    Body Request Parameters

    None.

    Ref Data

    List Market Centers

    Returns the list of market centers.

    curl -X GET "https://dataondemand.nasdaq.com/api/v1/refdata/markets" \
    -H "accept: application/json" \
    -H "Authorization: Bearer __token__" 
    
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/refdata/markets'
    
    payload = None
    headers = {'accept': 'application/json', 'Authorization': 'Bearer __token__'}
    response = requests.request('GET', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'GET',
      url: 'https://dataondemand.nasdaq.com/api/v1/refdata/markets',
      headers: {'accept': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: null,
      json: true};
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/refdata/markets");
    var request = new RestRequest(Method.GET);
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/refdata/markets";
    HttpClient client = HttpClientBuilder.create().build();
    HttpGet get = new HttpGet(url);
    get.AddHeader("Authorization", "Bearer __token__");
    get.AddHeader("accept", "application/json");
    org.apache.http.HttpResponse response = client.execute(get);
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    
    [
      {
         "mic": "string",
         "code": "string",
         "name": "string"
      }
    ]
    
    

    HTTP Request

    GET https://dataondemand.nasdaq.com/api/v1/refdata/markets

    Header Request Parameters

    Parameter Required Value
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    None.

    Quote Symbols

    Returns the list of quotes symbols. The query matches the begining of quote symbol to symbol_prefix and its end to symbol_suffix. These are optional parameters. If both are presenet both must match against the symbol for it to qualify. Max query size is one year.

    curl -X GET "https://dataondemand.nasdaq.com/api/v1/refdata/symbols/quotes?start=2018-08-27&end=2018-08-27T11%3A00%3A00.000Z&symbol_prefix=A&symbol_suffix=L"
    -H "accept: application/json" \
    -H "Authorization: Bearer __token__" \
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/refdata/symbols/quotes?start=2018-08-27&end=2018-08-28&symbol_prefix=A&symbol_suffix=L'
    
    payload = None
    headers = {'accept': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('GET', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'GET',
      url: 'https://dataondemand.nasdaq.com/api/v1/refdata/symbols/quotes?start=2018-08-27&end=2018-08-28&symbol_prefix=A&symbol_suffix=L',
      headers: {'accept': 'application/json',  'Authorization': 'Bearer __token__'}},
      body: null,
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/refdata/symbols/quotes?start=2018-08-27&end=2018-08-28&symbol_prefix=A&symbol_suffix=L");
    
    var request = new RestRequest(Method.GET);
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/refdata/symbols/quotes?start=2018-08-27&end=2018-08-28&symbol_prefix=A&symbol_suffix=L";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpGet get = new HttpGet(url);
    get.AddHeader("Authorization", "Bearer __token__");
    get.AddHeader("accept", "application/json");
    org.apache.http.HttpResponse response = client.execute(get);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    
     [ "string" ]
    
    

    HTTP Request

    GET https://dataondemand.nasdaq.com/api/v1/refdata/symbols/quotes?start=2018-08-27&end=2018-08-28&symbol_prefix=A&symbol_suffix=L

    Header Request Parameters

    Parameter Required Value
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    None

    Trade Symbols

    Returns the list of trades symbols. The query matches the begining of trade symbol to symbol_prefix and its end to symbol_suffix. These are optional parameters. If both are presenet both must match against the symbol for it to qualify. Max query size is one year.

    curl -X GET "https://dataondemand.nasdaq.com/api/v1/refdata/symbols/trades?start=2018-08-27&end=2018-08-27T11%3A00%3A00.000Z&symbol_prefix=A&symbol_suffix=L"
    -H "accept: application/json" \
    -H "Authorization: Bearer __token__" \
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/refdata/symbols/trades?start=2018-08-27&end=2018-08-28&symbol_prefix=A&symbol_suffix=L'
    
    payload = None
    headers = {'accept': 'application/json', 'Authorization': 'Bearer __token__'}
    
    response = requests.request('GET', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'GET',
      url: 'https://dataondemand.nasdaq.com/api/v1/refdata/symbols/trades?start=2018-08-27&end=2018-08-28&symbol_prefix=A&symbol_suffix=L',
      headers: {'accept': 'application/json',  'Authorization': 'Bearer __token__'}},
      body: null,
      json: true };
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/refdata/symbols/trades?start=2018-08-27&end=2018-08-28&symbol_prefix=A&symbol_suffix=L");
    
    var request = new RestRequest(Method.GET);
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/refdata/symbols/trades?start=2018-08-27&end=2018-08-28&symbol_prefix=A&symbol_suffix=L";
    
    HttpClient client = HttpClientBuilder.create().build();
    
    HttpGet get = new HttpGet(url);
    get.AddHeader("Authorization", "Bearer __token__");
    get.AddHeader("accept", "application/json");
    org.apache.http.HttpResponse response = client.execute(get);
    
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    
     [ "string" ]
    
    

    HTTP Request

    GET https://dataondemand.nasdaq.com/api/v1/refdata/symbols/trades?start=2018-08-27&end=2018-08-28&symbol_prefix=A&symbol_suffix=L

    Header Request Parameters

    Parameter Required Value
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    None

    Sales Conditions

    Returns the list of sale conditions.

    curl -X GET "https://dataondemand.nasdaq.com/api/v1/conditions/sales" \
    -H "accept: application/json" \
    -H "Authorization: Bearer __token__" 
    
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/conditions/sales'
    
    payload = None
    headers = {'accept': 'application/json', 'Authorization': 'Bearer __token__'}
    response = requests.request('GET', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'GET',
      url: 'https://dataondemand.nasdaq.com/api/v1/conditions/sales',
      headers: {'accept': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: null,
      json: true};
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/conditions/sales");
    var request = new RestRequest(Method.GET);
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/conditions/sales";
    HttpClient client = HttpClientBuilder.create().build();
    HttpGet get = new HttpGet(url);
    get.AddHeader("Authorization", "Bearer __token__");
    get.AddHeader("accept", "application/json");
    org.apache.http.HttpResponse response = client.execute(get);
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    
    [
      {
         "mic": "code",
         "code": "description",
         "name": "feed"
      }
    ]
    
    

    HTTP Request

    GET https://dataondemand.nasdaq.com/api/v1/conditions/sales

    Header Request Parameters

    Parameter Required Value
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    None.

    Quote Conditions

    Returns the list of quotes conditions.

    curl -X GET "https://dataondemand.nasdaq.com/api/v1/conditions/quotes" \
    -H "accept: application/json" \
    -H "Authorization: Bearer __token__" 
    
    
    import requests
    
    url = 'https://dataondemand.nasdaq.com/api/v1/conditions/quotes'
    
    payload = None
    headers = {'accept': 'application/json', 'Authorization': 'Bearer __token__'}
    response = requests.request('GET', url, json=payload, headers=headers)
    
    print(response.text)
    
    var request = require("request");
    
    var options = { method: 'GET',
      url: 'https://dataondemand.nasdaq.com/api/v1/conditions/quotes',
      headers: {'accept': 'application/json', 'Authorization': 'Bearer __token__'}},
      body: null,
      json: true};
    
    request(options, function (error, response, body) {
      console.log(body);
    });
    
    using RestSharp;
    var client = new RestClient("https://dataondemand.nasdaq.com/api/v1/conditions/quotes");
    var request = new RestRequest(Method.GET);
    request.AddHeader("Authorization", "Bearer __token__");
    request.AddHeader("accept", "application/json");
    IRestResponse response = client.Execute(request);
    Console.WriteLine(response.Content);
    
    String url = "https://dataondemand.nasdaq.com/api/v1/conditions/quotes";
    HttpClient client = HttpClientBuilder.create().build();
    HttpGet get = new HttpGet(url);
    get.AddHeader("Authorization", "Bearer __token__");
    get.AddHeader("accept", "application/json");
    org.apache.http.HttpResponse response = client.execute(get);
    System.out.println(EntityUtils.toString(response.getEntity()));
    

    The above commands return JSON structured like this:

    
    [
      {
         "mic": "code",
         "code": "description",
         "name": "feed"
      }
    ]
    
    

    HTTP Request

    GET https://dataondemand.nasdaq.com/api/v1/conditions/quotes

    Header Request Parameters

    Parameter Required Value
    Authorization true Bearer __token__
    Accept true application/json

    Body Request Parameters

    None.

    Download result file

    This section contains examples for downloading result file of recurring or async bulk download jobs.

    Programmatical and CLI way of download

    in the code examples __download_uri__ is received from email or jobs end point.

    curl -L __download_uri__ > __file_name__.zip
    
    Uri downloadUri = new Uri("__download_uri__");
    HttpClient httpClient = new HttpClient();
    Task<HttpResponseMessage> response = httpClient.GetAsync(downloadUri.AbsoluteUri);
    response.Wait();
    HttpResponseMessage res = response.Result;
    if (res.IsSuccessStatusCode)
    {
        var bytes = await res.Content.ReadAsByteArrayAsync();
        String zipFileName = downloadUri.Segments.Last();
        BinaryWriter bw = new BinaryWriter(new FileStream(zipFileName, FileMode.Create));
        bw.Write(bytes);
        bw.Flush();
    }
    

    Errors

    The Nasdaq Analytics Hub API uses the following error codes:

    Code Meaning
    400 Bad Request -- Your request is invalid.
    401 Unauthorized -- Your not entitled for requested data.
    404 Not Found -- The specified API endpoint could not be found.
    500 Internal Server Error -- We had a problem with our server. Try again later.
    503 Service Unavailable -- We're temporarily offline for maintenance. Try again later.