...
Name | Type | Description | Mandatory | Available from version | |||
---|---|---|---|---|---|---|---|
Account | Guid | Account of the reservation | true | ||||
Asset | Guid | Asset of the reservation | true | ||||
Reference | Guid | Reference of the reservation. This property is needed to be set if you for example want to link the reservation to a specific order. For example: if you create a Subscription order, you take the id from the order and set it to the Reference property. By doing this, the reservation and the subscription order is linked. | Order | Guid | OrderId of the reservation. This property is not - contradictory to it's name - the property you should use to link an order with the reservation. Reservations can be linked to different type of orders, these are: SubscriptionOrders - If a subscription order is referenced the reservation will have reserved the inputted asset in relationship to the subscription order and when the subscription order is progressed to create a TradeOrder the reservation will be removed and a new reservation for the same asset and amount will be created for the resulting TradeOrder. | ||
ReservedAmountTrade | decimal | Amount for trade dimension | |||||
ReservedAmountSettleReservedAmountSettlement | decimal | Amount for settle dimenstion | |||||
OverrideMustCover | bool | By default this property is set to false. When setting it to true, the api will bypass validation of the creation of the Reservation, in terms of the account having sufficient funds of the asset. If an account has MustCover set to true and OverrideMustCover is set to true, no validation is performed. If an account has MustCover set to true and OverrideMustCover set to false, validation will be performed. | 2.35 |
Response rows
Name | Type | Description | Available from version |
---|---|---|---|
BrickId | Guid | The BrickId (unique id) of the created |
...
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
public static void CreateReservation() { var binding = new BasicHttpBinding(); binding.MaxReceivedMessageSize = Int32.MaxValue; var target = new bfsapi.bfsapiSoapClient(binding, new EndpointAddress("http://localhost:20010/bfsapi.asmx")); var req = new CreateReservationRequest(); req.Credentials = new bfsapi.Credentials { UserName = "username", Password = "passworkd" }; req.identify = "identify"; var orderRef = Guid.NewGuid(); var accountId= Guid.NewGuid(); var assetId= Guid.NewGuid(); req.Entities = new[] { new bfsapi.Reservation() { Account = accountId, Asset = assetId, Comment = "Testreservation", Reference = orderRef, Order = orderRef, ReservedAmountTrade = 100M, ReservedAmountSettlement = 100M OverrideMustCover = true } }; var resp = target.CreateReservations(req); } |
...