CreateTradeOrders
Inputs (Array of TradeOrders) inherits from EntityBase
Name | Type | Description | Mandatory | Available from version | Comment |
---|---|---|---|---|---|
BrickId | Guid | Not used. | Â | Â | Â |
TradeOrderDirectionKey | string | Should be "Buy" or "Sell" | True | Â | Â |
Account | Guid | The BrickId of the account to be associated with the order | True | Â | Â |
Instrument | Guid | The BrickId of the instrument to be associated with the order | True | Â | Â |
Cash | Guid? | The BrickId of the Cash to be associated with the order. If this Id is not known, CashCurrencyCode can be used instead. | True | Â | Deprecated, not used after 2.26. Currency of instrument will be defaulted. Property will be removed in later releases |
CashCurrencyCode | string | The currency code, for example SEK, USD, EUR. If this is not supplied, Cash must be used instead. | Â | Deprecated, not used after 2.26. Currency of instrument will be defaulted. Property will be removed in later releases | |
InstrumentAmount | Decimal? | The Amount in units. Negative amount is not allowed. | True | Â | Â |
CashAmount | Decimal? | The Amount in units Cash. Negative amount is not allowed. | Only mandatory when IsUnitOrder = false | Â | Â |
CommissionAmount | Decimal | The commission amount. Negative amount is not allowed. | True | Â | Â |
OverrideCommissionAmount | bool | True if commission should override the existing fee configuration | Â | Â | Deprecated, is not used in the new way of handling fees. Fee Management |
IsUnitOrder | bool | True if order is in units | Â | Â | Â |
ReserveAssets | bool | True if asset (cash or instrument) should be reserved | Â | Â | Â |
LimitPrice | decimal | Limit price. Negative amount is not allowed. | Â | Â | Â |
OrderNo | string | Not used as an input. The created order will receive an order number that is returned in the output. | Â | Â | Â |
BusinessEventId | Guid | Not used as an input. The reference to the business event associated with the created order. | Â | 2.40 | Â |
ExternalReference | string | An external reference that will be stored on the order | Â | Â | Â |
OrderSettlementType | Enum | Order settlement type is only applicable for orders with the Internal execution interface. PAYMENT CONFIRMATION PRICE (Not supported) | Â | 2.02 | Â |
ExecutionInterfaceKey | String | The key of the Execution Interface that should be used for the order. The key can be found in the GUI depending on which interfaces are created for the BFS instance. This information can be found by navigating to SystemData->ExecutionInterfaces | True | 2.02 | Â |
OrderDateAndTime | DateTime | The date representing when the order was placed. This is not the system CreationDate which is set by BFS when the order is inputted via this method. Saved as OrderDate in BFS | Â | 2.02 | Â |
CustomFields | Object[] | CustomFields is an array of CustomField objects. Each CustomField consists of two strings, FieldName and Value. There are no datatypes associated with these properties, they are just a way for api-users to add custimized data to the object. | 2.09 | ||
DecisionMakers | Guid[] | TRS property. List of decision makers that should be associated with the order. Read more about TRS and decision makers here:Â TRS Manager | 2.26 | ||
DecisionMakerWithinFirm | Guid | TRS property. The person within the investment firm who is responsible for the investment decision. Also called Investment decision within firm. Read more in our KB: TRS Manager This field should only be populated if the DecisionMaker (the firm making the decisions) is the same firm as is the ExecutingParty. | 2.26 | ||
ShortSellingIndicator | Enum | TRS property. The short selling indicator is used in TRS reporting to define if a trade of the type Sell was a short sale or not. The allowed values are: SESH = Short sale with no exemption | 2.27 | ||
ExternalAccountDataForWithdrawal | For Sell-orders, if this property is used, the sell-order will generate an exchangeorder (of tradeorder in other currency than SEK) and an external withdrawal order | 2.33 |
Outputs
Name | Type | Description |
---|---|---|
Entities | Array | All trade orders is returned along with each trade order's BrickId, OrderNo and array of Errors per trade order |
XML request example
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CreateTradeOrders xmlns="http://tempuri.org/">
<req>
<Credentials>
<UserName>yourusername</UserName>
<Password>yourpassword</Password>
</Credentials>
<identify>youridentifier</identify>
<Entities>
<TradeOrder>
<BrickId>00000000-0000-0000-0000-000000000000</BrickId>
<TradeOrderDirectionKey>Buy</TradeOrderDirectionKey>
<Account>9b07cfc6-7374-4e34-95e8-1d50d091cf67</Account>
<Instrument>e9044d53-778a-4522-a0b5-399eb01429ac</Instrument>
<Cash xsi:nil="true" />
<CashCurrencyCode>SEK</CashCurrencyCode>
<InstrumentAmount>10</InstrumentAmount>
<CashAmount xsi:nil="true" />
<CommissionAmount>0</CommissionAmount>
<OverrideCommissionAmount>false</OverrideCommissionAmount>
<IsUnitOrder>true</IsUnitOrder>
<LimitPrice>0</LimitPrice>
<ExternalReference>Testing2</ExternalReference>
<OrderSettlementType>PAYMENT</OrderSettlementType>
<BusinessEventId>00000000-0000-0000-0000-000000000000</BusinessEventId>
</TradeOrder>
</Entities>
</req>
</CreateTradeOrders>
</s:Body>
</s:Envelope>
C# - CreateTradeOrders
//Create an order using the CreateTradeOrders method
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.CreateTradeOrders(new BFSServiceReference.CreateTradeOrderRequest()
{
Credentials = credentials,
identify = bfsidentifier, //Identifier is a unique token for your instance of BFS
Entities = new[]
{
new TradeOrder()
{
TradeOrderDirectionKey = "Buy",
Account = new Guid("cbfe4a0d-bf05-4a7e-bdc8-1ee809817bee"),
Instrument = new Guid("138e92a5-f1d6-4473-9ca4-45f511881676"),
CashCurrencyCode = "EUR",
CashAmount = 100M,
CommissionAmount = 0M,
ReserveAssets = true,
ExternalReference = "MyTestOrder",
OrderSettlementType = OrderSettlementType.PAYMENT,
ExecutionInterfaceKey = "Manual"
}
}
});
//Show information about the created orders
Console.WriteLine("Orders:");
foreach (var c in response.Entities)
{
Console.WriteLine(c.BrickId + ", " + c.OrderNo);
}
Blog stream
Create a blog post to share news and announcements with your team and company.
Related pages
Terms of License
Change Policy
© 2009 - 2024 Huddlestock Technologies AB All rights reserved