GetCurrencyValues

Filter inputs

NameTypeDescriptionMandatoryAvailable from version
RequestedCurrencyCodestringThe currency that you want the price of...True2.20.1
SourceCurrencyCodestring... expressed in number of units of the requested currency to make up for one source currencyTrue2.20.1
FromDateDateTime?The first date of the range of dates you want the prices from
2.20.1
ToDateDateTime?The last date of the range of dates you want the prices from
2.20.1

Response rows (Array) inherits from EntityBase

NameTypeDescriptionAvailable from version
BrickIdGuidNot used2.20.1
PriceDateDateTimeThe price date2.20.1
RequestedCurrencyCodestringThe currency that you want the price of...2.20.1
SourceCurrencyCodestring... expressed in number of units of the requested currency to make up for one source currency2.20.1
StatusKeystringStatus of the requested currency2.20.1
ValuedoubleThe value of the price of the current date2.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

C# - Get currency values from a BFS instance
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);