...
Name | Type | Description | Mandatory | Available from version |
---|---|---|---|---|
Account | Guid | Account of the reservation | true | |
Asset | Guid | Asset of the reservation | true | |
Reference | Guid | 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. | ||
Order | Guid | This property should contain the BrickId of the referenced order if information of the order should be reachable in the graphical user interfaces where the reservations are listed. This field will be deprecated in the future and set automatically based on the Reference given. | ||
ReservedAmountTrade | decimal | Amount for trade dimension | ||
ReservedAmountSettle | 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); } |
...