Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

NameTypeDescriptionMandatoryAvailable from version
AccountGuidAccount of the reservation true 
AssetGuidAsset of the reservation true 
ReferenceGuid

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.  

OrderGuidOrderId 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.

TradeOrders

TransferOrders



ReservedAmountTradedecimalAmount for trade dimension 

ReservedAmountSettleReservedAmountSettlementdecimalAmount for settle dimenstion

OverrideMustCoverboolBy 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

NameTypeDescriptionAvailable from version
BrickIdGuidThe BrickId (unique id) of the created 

...

Code Block
languagec#
themeRDark
titleC# - Create reservations
linenumberstrue
collapsetrue
 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);
        }

...