Nasdaq functions are used for downloading and accessing Nasdaq Data Link datasets. Make sure that NasdaqlInitialize is called before all other functions.


Sections


Functions

Function Details


Functions


Name

Description

NasdaqInitialize(string)

Initializes the Nasdaq Data Link API functions. This function must be called before any other Nasdaq API function.

NasdaqUpdateTimeSeries()

Refreshes the loaded time series with the latest values based on the current Desktop time. This function is usually called at the beginning of each OnBarUpdate call.

long NasdaqTimeSeriesDate(int,int)

Gets the timestamp of a specified point in a specified time series.

int NasdaqTimeSeriesFieldIndex(int, string)

Gets the field index for a specified field id in a specified time series or -1 if the field is not found.

string[] NasdaqTimeSeriesFields(int)

Gets the field Ids of a specified time series.

int NasdaqTimeSeriesLoad(string, string, bool, int)

Loads a specified time series and returns a unique time series index to identify it.

double NasdaqTimeSeriesValue(int, int, int)

Gets the value of a specified data point in a specified time series.


Function Details


NasdaqInitialize(string apiKey)

Initializes the Nasdaq Data Link API functions. This function must be called before any other Nasdaq API function.


Parameters


Type

Identifier

Description

string

apiKey

The Nasdaq API key.


Scripts


All


NasdaqUpdateTimeSeries()

Updates the loaded time series with the latest values based on the current Desktop time. This function is usually called at the beginning of each OnBarUpdate call.


Parameters


No Parameters


Scripts


All


long NasdaqTimeSeriesDate(int, int)

Gets the timestamp of a specified point in a specified time series.


Returns


The timestamp of the specified point.


Parameters


Type

Identifier

Description

int

timeSeriesIndex

The time series index.

int

timeSeriesShift

The shift relative to the last point, such that 0 is the latest point, 1 is the point preceding it, etc.


Scripts


All


int NasdaqTimeSeriesFieldIndex(int timeSeriesIndex, string fieldId)

Gets the field index for a specified field in a specified time series or -1 if the field is not found.


Returns


The field index for the specified field in the specified time series or -1 if the field is not found.


Parameters


Type

Identifier

Description

int

timeSeriesIndex

The time series index.

string

fieldId

The field's Nasdaq identifier / name.


Scripts


All


string[] NasdaqTimeSeriesFields(int timeSeriesIndex)

Gets the field Ids of a specified time series.


Returns


The field Ids of the specified time series.


Parameters


Type

Identifier

Description

int

timeSeriesIndex

The time series index.


Scripts


All


int NasdaqTimeSeriesLoad(string databaseCode, string datasetCode, bool checkForUpdates, int reportingLagMinutes)

Loads a specified time series and returns a unique time series index to identify it.


Returns


The unique time series index that identifies the requested time series.


Parameters


Type

Identifier

Description

string

databaseCode

The Nasdaq database code of the time series.

string

datasetCode

The Nasdaq dataset code of the time series.

bool

checkForUpdates

Indicates whether Nasdaq should be queried for any updates to the dataset.

int

reportingLagMinutes

The number of minutes that need to pass after the data point's timestamp until the data point becomes available for reading.


Scripts


All


double NasdaqTimeSeriesValue(int timeSeriesIndex, int fieldIndex, int timeSeriesShift)

Gets the value of a specified data point in a specified time series.


Returns


The value of the specified data point in the specified time series.


Parameters


Type

Identifier

Description

int

timeSeriesIndex

The time series index from which to read.

int

fieldIndex

The field index from which to read.

int

timeSeriesShift

The shift relative to the last point, such that 0 is the latest point, 1 is the point preceding it, etc.


Scripts


All