CreateInternalInstrumentTransferOrders

Inputs (Array[]) inherits from EntityBase

Name

Type

Description

Mandatory

Available from version

Name

Type

Description

Mandatory

Available from version

BrickId

Guid

The BrickId is populated from BFS when the entity is created so this is not used as an input

 

2.27

FromAccountNumber

string

This is either the account number or the BrickId of the account where the asset should be transferred from. One of these inputs is mandatory

True

2.27

FromAccountBrickId

Guid

2.27

ToAccountNumber

string

This is either the account number or the BrickId of the account where the asset should be transferred to. One of these inputs is mandatory

True

2.27

ToAccountBrickId

Guid

2.27

Units

decimal

The number of units to be moved between the FromAccount and ToAccount

True

2.27

Comment

string

Use this field to store any free text that you want to store on the order

True

2.27

TradeDate

DateTime

This is the trade date that will be used on the resulting transactions

True

2.27

SettlementDate

DateTime

This is the settle date that will be used on the resulting transactions

True

2.27

ValueDate

DateTime

This is the value date that will be used on the resulting transactions

True

2.27

InstrumentBrickId

Guid

This is the BrickId of the instrument that should be transferred

True

2.27

AcquisitionValue

decimal

The acquisition value that will be added to the transaction in the currency of the https://bricknode.atlassian.net/wiki/spaces/API/pages/56328265

If AcquisitionValue and AcquisitionValueAccountCurrency is supplied this will override the Acquisition value from the existing position and be used instead in the ToAccount.

 

2.27

AcquisitionPrice

decimal

The acquisition price per unit of the https://bricknode.atlassian.net/wiki/spaces/API/pages/56328265 that will be added to the transactions

Note: This field is calculated from AcquisitionValue / Units and will be deprecated in the future as input

 

2.27

AcquisitionValueAccountCurrency

decimal

The acquisition value in the base currency of the account that will be added to the transactions

If AcquisitionValue and AcquisitionValueAccountCurrency is supplied this will override the Acquisition value from the existing position and be used instead in the ToAccount.

 

2.27

AcquisitionPriceAccountCurrency

decimal

The acquisition price in the base currency of the account that will be added to the transactions

Note: This field is calculated from AcquisitionValueAccountCurrency / Units and will be deprecated in the future as an input

 

2.27

OverrideOwnershipChangeValidation

bool

By setting this value to true there will be not validation conducted regarding if the transfer will result in a transfer between accounts with different owners. If transfers of instruments occur between accounts with different owners there might be TRS reporting needed. Make sure that you know what you are doing if this is set to true.

 

2.27

Outputs

Name

Type

Description

Name

Type

Description

Entities

Array

All orders are returned along with each order’s BrickId and array of Errors per order

Code examples

C# - Create internal instrument transfer orders in a BFS instance
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 public class InternalInstrumentTransferOrderHelper { /// <summary> /// Create an internal instrument transfer order /// </summary> /// <param name="fromAccount">The account where the instrument should be transferred from</param> /// <param name="toAccount">The account where the instrument should be transferred to</param> /// <param name="instrument">The instrument that should be transferred</param> /// <param name="units">The number of units of the instrument that should be transferred</param> /// <param name="tradeDate">The date to use in the trade transaction</param> /// <param name="settlementDate">The date to use in the settle transaction</param> /// <param name="valueDate">The date to use in the settle transaction for value date</param> /// <param name="acquisitionPrice">The acquisition price to be used in the toAccount for the instrument</param> /// <param name="acquisitionPriceAccountCurrency">The acquisition price in the base account currency of the toAccount to be used in the toAccount for the instrument</param> /// <param name="acquisitionValue">The acquisition value to be used in the toAccount for the instrument</param> /// <param name="acquisitionValueAccountCurrency">The acquisition value in the base account currency of the toAccount to be used in the toAccount for the instrument</param> /// <param name="overrideOwnershipChangeValidation">If set to true there will be no validation made as to if the fromAccount and toAccount has different owners</param> /// <returns></returns> public static InternalInstrumentTransferOrder GenerateInternalInstrumentTransferOrder(Account fromAccount, Account toAccount, Instrument instrument, decimal units, DateTime tradeDate, DateTime settlementDate, DateTime valueDate, decimal? acquisitionPrice, decimal? acquisitionPriceAccountCurrency, decimal? acquisitionValue, decimal? acquisitionValueAccountCurrency, bool overrideOwnershipChangeValidation = false) { return new InternalInstrumentTransferOrder { FromAccountBrickId = fromAccount.BrickId, ToAccountBrickId = toAccount.BrickId, InstrumentBrickId = instrument.BrickId, Units = units, TradeDate = tradeDate, SettlementDate = settlementDate, ValueDate = valueDate, AcquisitionPrice = acquisitionPrice ?? 0, AcquisitionPriceAccountCurrency = acquisitionPriceAccountCurrency ?? 0, AcquisitionValue = acquisitionValue ?? 0, AcquisitionValueAccountCurrency = acquisitionValueAccountCurrency ?? 0, OverrideOwnershipChangeValidation = overrideOwnershipChangeValidation }; } } public class TestInternalCashTransferOrders { var request = new CreateInternalInstrumentTransferOrderRequest() request.Credentials = CorrectCredentials(); request.identify = CorrectIdentify(); var internalInstrumentTransferOrder = InternalInstrumentTransferOrderHelper.GenerateInternalInstrumentTransferOrder( accountFrom, accountTo, instrumentAssetToTransfer, 1M, DateTime.Today, DateTime.Today, DateTime.Today, null, null, null, null, true); request.Entities = new[] { internalInstrumentTransferOrder }; var response = client.CreateInternalInstrumentTransferOrders(request); }