LARGE TABLE DOWNLOAD

Users that wish to obtain a full history of any large tables on Data Link will want to consider our bulk download API. Users can request various slices of the data, full history, or partial based on desired predicates. A list of files will be made available for you to download and load into your desired data store.

Consider using our convenience utility bulkdownload, which handles multi-threaded downloads and retries.

API Reference

The bulkdownload API is broken into two parts. An initial request with desired predicates, followed by the subsequent file download.

Prerequisite

All requests will require the use of an API Key. You can set the api key by defining an appropriate HTTP Header. You can obtain your API Key by reviewing your Account Profile.

X-Api-Token: <your api key>

Request Files

Definition:
GET https://data.nasdaq.com/api/v1/bulkdownloads/{datatable_code}?<row_filter_criteria>

The parameters depend on the product schema. Add query parameters based on the given product's schema. We'll include a sample schema for the purposes of this document.

Sample Datatable Schema

ColumnTypeDescription
symboltextThe name of the symbol
pricedoubleThe price
quantitydoubleThe quantity
dateDateDate of the trade. Format: YYYY-MM-DD

The above column names are used to define request predicates that make up the request query parameter key-names.

FILTER OPERATORS

The following are filter operators, which can be appended to all filters, regardless of the table. The filter operators will further modify your results. Callers will combine these filter options with the name of the column defined by the datatable schema.

Parameter SuffixDescription
.eq=Modifies the parameter to return values equal to the requested value
.lt=Modifies the parameter to return values less than the requested value
.lte=Modifies the parameter to return values less than or equal to the requested value
.gt=Modifies the parameter to return values greater than the requested value
.gte=Modifies the parameter to return values greater than or equal to the requested value
.uppereq=Modifies the parameter to return values in uppercase and equal to the requested value
.neq=Modifies the parameter to return values in not equal to the requested value
.upperneq=Modifies the parameter to return values in uppercase and not equal to the requested value
.in[]=Modifies the parameter to return values equal to either or all specified comma separated requested values
.upperin=Modifies the parameter to return values equal to either or all uppercase specified comma separated requested values
.nin=Modifies the parameter to return values not equal to either or all specified comma separated requested values
.uppernin=Modifies the parameter to return values not equal to either or all uppercase specified comma separated requested values

Example Request

Given the above sample schema, make a request with query parameters using the available filter predicates as follows:

curl -v -H "X-Api-Token: <your api key>" \
"https://data.nasdaq.com/api/v1/bulkdownloads/FOO/BAR?date.eq=2024-03-20&symbol.eq=ZZYZ"
curl -v -H "X-Api-Token: <your api key>" \
"https://data.nasdaq.com/api/v1/bulkdownloads/FOO/BAR?date.eq=2024-03-20&symbol.in[]=XXX&symbol.in[]=YYYY"

Example Response

{
    "bulk_download": {
        "code": "FOO/BAR",
        "columns": [],
        "filters": [
            {
                "key": "date",
                "value": "2024-03-20",
                "operator": "gt"
            },
            {
                "key": "symbol",
                "value": "ZZYZ",
                "operator": "eq"
            }
        ],
        "status": "PENDING",
        "total_size": 0,
        "schema": null,
        "files": [
            {
                "url": "https://data.nasdaq.com/api/v1/bulkdownloads/file/xxxxxxxxxxxxxxxxxxxxxxxxxxx.parquet",
                "size": 134068222
            },
            ...
        ],
        "errors": null,
        "rate_limited_until: ""
    }
}

JSON Response Breakdown

KeyDescription
statusRequests will require time for processing. Check this value to know when we're done generating your files. Values will be one of the statuses defined in the next table.
filesA list of objects. Use this value to perform the subsequent downloads. May be empty if there are no files generated for the given filter predicates.
errorsIf an error occurs, use this key to find out the failure reason.
rate_limited_untilWhen the max daily limit is hit for number of requests, this attribute value will show when a new request should be attempted in UTC time. See Rate Limits for more details.
statusdescription
PENDINGRequest has been received and the query is currently in the queue.
RUNNINGRequest has been received and the query is currently being processed.
SUCCEEDEDRequest was successfully processed. File(s) are available to download.
CANCELLEDA request in pending state stays active for 15 minutes. If there’s no check-in it will be cancelled due to inactivity.
COLUMN_FILTER_FAILUREThere was a problem with the requested filters. Check for typos and if the specified column is part of the schema.
FAILEDSomething went wrong with the request. Details will be provided in the error message.
CLOSED

Files Object

{
  "url": "https://data.nasdaq.com/api/v1/bulkdownloads/file/xxxxxxxxxxxxxxxxxxxxxxxxxxx.parquet",
  "size": 134068222
}
keydescription
urlThe URL of the file to download. Requests will require the X-Api-Token HTTP header to be set
sizeThe size of the file

Download the Files

Once callers receive a list of files to download, make subsequent requests to download the file. The following API will require setting the X-API-Token with your API Key.

Definition:
GET https://data.nasdaq.com/api/v1/bulkdownloads/file/{filename}.{ext}

curl -v -H "X-Api-Token: <your api key>" \
"https://data.nasdaq.com/api/v1/bulkdownloads/file/xxxxxxxxxxxxxxxxxxxxx.parquet

Rate Limits

For successful API requests, subscribers should attempt to download all files in the response before the same request is made again.

For ongoing daily requests, a limit of 30 requests per table is applied.

For new subscribers, an initial 25 request limit will be available after which the ongoing daily limit applies.

Subscribers will receive 'rate_limited_until' with the time when they should attempt the next request.

Status Codes

HTTPS

All REST API requests for bulk download must be made using HTTPS. Requests made over HTTP will fail.

HTTP/Nasdaq Data Link error codes

The Nasdaq Data Link REST API for bulk download returns standard HTTP status codes to indicate the success or failure of requests.

  • A 2XX response indicates that the request was processed successfully.
  • A 4XX response indicates that there was something wrong with the request.
  • A 5XX response indicates that the server encountered an error while processing the request.

In addition to HTTP status codes, the Nasdaq Data Link REST API for bulk download returns custom success and error messages for specific error types. These are tabulated below:

Nasdaq Data Link CodeHTTP Status CodeDescription
QEAx05401Unauthorized
QEAx06429You have exceeded your daily call limit as a subscriber
QEAx07202Please try again in 30 seconds