CreateCurrencyExchangeOrders

Inputs (Array of CurrencyExchangeOrder) inherits from EntityBase

The Entity takes an array of CurrencyExchangeBuyOrders and CurrencyExchangeSellOrders. The only difference between the buy and sell orders is the field SellAmount (only available for sell orders) and BuyAmount (only available for buy orders). The table below describes the properties for CurrencyExchangeBuyOrders and CurrencyExchangeSellOrders.

NameTypeDescriptionMandatoryAvailable from version
BrickIdGuidNot used as an input, the id of the order is populated by BFS after creation
2.25 
AccountGuidThe account to be associated with the order. This is the BrickId of the Account  True2.25 
AllocationOrder GuidThe BrickId of an allocation order if this order should be associated to such an order. 
2.25 
Batch GuidThe BrickId of a currency batch order. This is set by BFS after this order has been moved along in its workflow and included in a batch order that can be executed with a counterparty. 
2.25 
BuyCashAssetBrickIdGuidThe BrickId of the Cash asset that should be bought. For example a cash asset representing the currency USD.True2.25
SellCashAssetBrickIdGuidThe BrickId of the Cash asset that should be sold. For example a cash asset representing the currency SEK.True2.25
CommentstringA general comment for the order in free text.
2.25
CustomFieldsObject[]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.25
OrderNostringNot used as an input. The created order will receive an order number that is returned in the output.
2.25
RequestReferencestringA general free text field that will be returned in the output for the same object that it was supplied to.
2.25
BuyAmountDecimalThe amount that should be bought of the BuyCashAssetBrickId, this only exists on the CurrencyExchangeBuyOrders and must not be a value below 0.True2.25
SellAmountDecimalThe amount that should be sold of the SellCashAssetBrickId, this only exists on the CurrencyExchangeSellOrders and must not be a value below 0.True2.25

Outputs

NameTypeDescriptionAvailable from version
EntitiesArrayAll orders are returned along with each trade orders BrickId, OrderNo and all other fields together with an array of Errors per order.2.25 

Code examples

C# - Get all account types from a BFS instance
 request.Entities = new[]
            {
                new CurrencyExchangeOrdersCollection
                {
                    CurrencyExchangeBuyOrders = new[] 
                    {
                        new CurrencyExchangeOrderBuy
                        {
                            Account = Guid.Empty,
                            BuyCashAssetBrickId = Guid.Empty,
                            Comment = "Test comment",
                            CustomFields = new []
                            {
                                new CustomField
                                {
                                    FieldName = "Test",
                                    Value = "Value"
                                }
                            },
                            BuyAmount = 100M,
                            SellCashAssetBrickId = Guid.Empty
                        }
                    },
                    CurrencyExchangeSellOrders = new []
                    {
                        new CurrencyExchangeOrderSell()
                        {
                            Account = Guid.Empty,
                            BuyCashAssetBrickId = Guid.Empty,
                            Comment = "Test comment",
                            CustomFields = new []
                            {
                                new CustomField
                                {
                                    FieldName = "Test",
                                    Value = "Value"
                                }
                            },
                            SellAmount = 100M,
                            SellCashAssetBrickId = Guid.Empty
                        },
                    }
                }
            };


Blog stream

Create a blog post to share news and announcements with your team and company.

Terms of License
Change Policy
© 2009 - 2024 Huddlestock Technologies AB All rights reserved