GetCurrencyValues

GetCurrencyValues

Filter inputs

Name

Type

Description

Mandatory

Available from version

RequestedCurrencyCode

string

The currency that you want the price of...

True

2.20.1

SourceCurrencyCode

string

... expressed in number of units of the requested currency to make up for one source currency

True

2.20.1

FromDate

DateTime?

The first date of the range of dates you want the prices from

 

2.20.1

ToDate

DateTime?

The last date of the range of dates you want the prices from

 

2.20.1

Response rows (Array) inherits from EntityBase

Name

Type

Description

Available from version

BrickId

Guid

Not used

2.20.1

PriceDate

DateTime

The price date

2.20.1

RequestedCurrencyCode

string

The currency that you want the price of...

2.20.1

SourceCurrencyCode

string

... expressed in number of units of the requested currency to make up for one source currency

2.20.1

StatusKey

string

Status of the requested currency

2.20.1

Value

double

The value of the price of the current date

2.20.1

General idea

This method fetches the historic prices for currencies and returns them to the user.

As a user you can specify a SourceCurrencyCode and a RequestedCurrencyCode. These are meant to represent the currency that you want the price of (Requested currency) expressed in number of units of the requested currency to make up for one source currency (SourceCurrencyCode ).

The price will be calculated as:

RequestedCurrencyPrice/SourceCurrencyPrice

Code examples

var request = new GetCurrencyValueRequest {               Credentials = CorrectCredentials(),               identify = CorrectIdentify(),               Fields = new GetCurrencyValuesFields              {                         PriceDate = true,                         StatusKey = true,                         RequestedCurrencyCode = true,                         SourceCurrencyCode = true,                         Value = true              },              Args = new GetCurrencyValuesArgs()             {                       RequestedCurrencyCode = "SEK",                       SourceCurrencyCode = "EUR"             } }; var currencyValuesResponse = client.GetCurrencyValues(request);