Skip to main content

INFRONT.GETFIELD function

The INFRONT.GETFIELD function allows to retrieve one value for a specific instrument at a given point in time.  Some options can be set to do for example a currency conversion or backpadding.
If available the data can be streamed as well.

Only price fields are available historically and can be streamed.  For other fields the period parameter is ignored and the most recent value is always returned.  

Function syntax

VB
INFRONT.GETFIELD ( <instrument identifier>, <field>, <period>, <options>)


Parameters

Instrument identifier

By default the Infront instrument key is used and returned when building a function via the side panel, but other instrument identifiers and combinations of those are supported.

IdentifierDescription & example
instrumentKey

Infront code which is a combination of <symbol>.<exchange>.
<symbol> is typically a wkn, isin or exchange ticker
<exchange> is an Infront specific code for the exchange, which sometimes is equal to the MIC

Example

A1EWWW.ETR for Adidas

VB
=INFRONT.GETFIELD("A1EWWW.ETR", "lastPrice")
isin

The isin code can be used to look up instruments.
If no exchange or currency is given the exchange and currency are selected based on your terminal preferences.

Example

DE000A1EWWW0 for Adidas

VB
=INFRONT.GETFIELD("DE000A1EWWW0", "lastPrice")
isin:mic

The isin code can be used in combination with mic (market identifier code) to select an instrument at a specific exchange.  A colon is used to separate the isin and mic.

Example

BE0974293251:XBRU for AB Inbev on Euronext Brussels

VB
=INFRONT.GETFIELD("BE0974293251:XBRU", "lastPrice")
isin:currency

The isin code can be used in combination with an ISO currency code to selection a specific currency quotation.  A colon is used to separate the isin and currency.
If no exchange is given the exchange is selected based on your terminal preferences.

Example

BE0974293251:EUR for AB Inbev quotation in EUR

VB
=INFRONT.GETFIELD("BE0974293251:EUR", "lastPrice")
isin:mic:currency

The isin code can be used in combination with mic (market identifier code) to select an instrument at a specific exchange and in combination with an ISO currency code to selection a specific currency quotation.  A colon is used to separate the isin, mic and currency.

Example

BE0974293251:XBRU:EUR for AB Inbev quotation on Euronext Brussels in EUR

VB
=INFRONT.GETFIELD("BE0974293251:XBRU:EUR", "lastPrice")
search string

The first instrument that matches the search string is returned.

Example

VB
=INFRONT.GETFIELD("DAX", "lastPrice")
instrumentId

Infront internal, numerical code

Example

159096 for Adidas

VB
=INFRONT.GETFIELD(159096, "lastPrice")

Field

A basic field list is provided in the side panel. When exporting from the terminal more internal fields are supported implicitly.

Period

If left empty, the default value is "latest".
The period parameter only applies to the following fields: lastPrice, highPrice, lowPrice, firstPrice, lastPriceTimestamp, cumulativeTrades, volume.  For all other fields the parameter is ignored.

The date can be provided as a string like:

VB
=INFRONT.GETFIELD("846900.ETR", "lastPriceTimestamp", "2022-08-15")

or as internal Excel date:

VB
=INFRONT.GETFIELD("846900.ETR", "lastPriceTimestamp", HEUTE() - 2)

If no data is found on the given date, we go by default up to 10 days back to show the latest data. This behaviour can be configured with the optional parameter backPadding (see Options - backpadding

VB
=INFRONT.GETFIELD("846900.ETR", "lastPriceTimestamp", "2022-08-14", "{""backPadding"":0}")

Options

The options are supposed to be provided as JSON, however it seems you can only provide parameters as string from Excel and parse it as JSON. That means the quotes inside the JSON string have to be double quoted for valid JSON.

Example

VB
=INFRONT.GETFIELD("DAX", "lastPrice", , "{""streaming"": false}")

The parameters can also be supplied as a string referring to an Excel range

Example

VB
 =INFRONT.GETFIELD("710000.ETR", "lastPrice", "2022-10-07", "H1:I3")

with in Excel the following information for example.


...HI
1
streamingtrue
2
convertToJPY
3
backpadding   10


Optional parameterDescription
streaming

This parameter can used to disable streaming for a certain function call. 

Example

VB
=INFRONT.GETFIELD("DAX", "lastPrice", , "{""streaming"": false}")
convertTo

ISO currency code which indicates to which currency the value should be converted.  When streaming mode is active, values are updated both when a new base value or a new cross rate update is provided.

Example

CODE
=INFRONT.GETFIELD("846900.ETR"; "lastPrice";;"{""convertTo"":""USD""}")

backpadding

The number of days to go backward to find a historical data point.  The default value is set to 10.

Example

VB
=INFRONT.GETFIELD("846900.ETR", "lastPriceTimestamp", "2022-08-14", "{""backPadding"":0}")
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.