CreateInternalInstrumentTransferOrders
Inputs (Array[]) inherits from EntityBase
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 Instrument 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 Instrument 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 |
---|---|---|
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
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);
}
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