Name | Type | Description | Mandatory | Default value | Available from version | Comment |
---|---|---|---|---|---|---|
PriceDateEntries[] | PriceDateEntry[] | Array of PriceDateEntries | Yes | |||
ClearAllPreviousData | bool | Clears all data previous to the first date in the range in PriceDateEntries. | No | false | 2.23 | |
ClearPreviousDataByRange | bool | Clears all data between the first and the last date in the range | No | false | 2.23 | |
UpdateCurrentPriceFromLastPrice | bool | Update the price on the instrument from the last date in the range in PriceDateEntries | No | false | 2.23 | Feature change from 2.23. If you want to update the price with the latest price, the property must be set to true. Included in NuGet package version 1.1.1 and above https://www.nuget.org/packages/Bricknode.Soap.Sdk/ |
ClearAllsubsequentData | bool | Clears all data after the last date in the range in PriceDateEntries. | No | false | 2.23 |
Name | Type | Description | Mandatory |
---|---|---|---|
AssetId | Guid | This is the unique id of the asset that should be updated | Yes |
Price | double | The new price of the asset | Yes |
PriceDate | DateTime | The date that the new price will be in use | Yes |
Name | Type | Description |
---|---|---|
Message | string | A message indicating if something went wrong during the call or not |
//Use SetHistoricPrices to add quote history to an instrument var client = new BFSServiceReference.bfsapiSoapClient(); var credentials = new BFSServiceReference.Credentials() { UserName = bfsusername, //Username of administrative user in your instance of BFS Password = bfspassword, //Password of the administrative user in your instance of BFS }; var response = client.SetHistoricPrices(new BFSServiceReference.SetHistoricPricesRequest() { Credentials = credentials, identify = bfsidentifier, //Identifier is a unique token for your instance of BFS PriceDateEntries = new PriceDateEntry[] { new PriceDateEntry() { AssetId = new Guid("7f1478ff-62a8-42a5-bff5-8487f72d7861"), Price = 100, PriceDate = DateTime.UtcNow, }, new PriceDateEntry() { AssetId = new Guid("7f1478ff-62a8-42a5-bff5-8487f72d7861"), Price = 100, PriceDate = DateTime.UtcNow.AddDays(-1), }, new PriceDateEntry() { AssetId = new Guid("7f1478ff-62a8-42a5-bff5-8487f72d7861"), Price = 100, PriceDate = DateTime.UtcNow.AddDays(-2), } } }); Console.WriteLine(response.Message); |