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.
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.
Identifier | Description & example |
---|---|
instrumentKey | Infront code which is a combination of <symbol>.<exchange>. Example A1EWWW.ETR for Adidas
VB
|
isin | The isin code can be used to look up instruments. Example DE000A1EWWW0 for Adidas
VB
|
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
|
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. Example BE0974293251:EUR for AB Inbev quotation in EUR
VB
|
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
|
search string | The first instrument that matches the search string is returned. Example
VB
|
instrumentId | Infront internal, numerical code Example 159096 for Adidas
VB
|
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:
=INFRONT.GETFIELD("846900.ETR", "lastPriceTimestamp", "2022-08-15")
or as internal Excel date:
=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)
=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
=INFRONT.GETFIELD("DAX", "lastPrice", , "{""streaming"": false}")
The parameters can also be supplied as a string referring to an Excel range
Example
=INFRONT.GETFIELD("710000.ETR", "lastPrice", "2022-10-07", "H1:I3")
with in Excel the following information for example.
... | H | I | |
---|---|---|---|
1 | streaming | true | |
2 | convertTo | JPY | |
3 | backpadding | 10 |
Optional parameter | Description |
---|---|
streaming | This parameter can used to disable streaming for a certain function call. Example
VB
|
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
|
backpadding | The number of days to go backward to find a historical data point. The default value is set to 10. Example
VB
|