Account Balance Data Messages


ACCOUNT_BALANCE_REQUEST [s_AccountBalanceRequest structure] Server >> Client

This is a message from the Client to the Server to request Trade Account Balance data.

The Server will respond with an ACCOUNT_BALANCE_UPDATE or reject the request.

The Server will set the RequestID in the ACCOUNT_BALANCE_UPDATE message to match the RequestID in the ACCOUNT_BALANCE_REQUEST.

The Server will periodically send ACCOUNT_BALANCE_UPDATE messages as the Account Balance data changes. The frequency of the updates is determined by the Server. Account Balance updates are considered automatically subscribed to. When unsolicited ACCOUNT_BALANCE_UPDATE messages are sent by the Server, the RequestID will be 0.

Field Name Field Description
[unsigned int16] Size

The standard message size field. Automatically set by constructor.

[unsigned int16] Type

The standard message type field. Automatically set by constructor.

[int32] RequestID

A unique request identifier for this request.

[char] TradeAccount

This is an optional field. Leave this empty to request the Server to return Account Balance data for all Trade Accounts on the logged in Username. Otherwise, specify a particular Trade Account to request Account Balance data for.

ACCOUNT_BALANCE_REJECT [s_AccountBalanceReject structure] Server >> Client

Field Name Field Description
[unsigned int16] Size

The standard message size field. Automatically set by constructor.

[unsigned int16] Type

The standard message type field. Automatically set by constructor.

[int32] RequestID

A unique request identifier for this request.

[char] RejectText

ACCOUNT_BALANCE_UPDATE [s_AccountBalanceUpdate structure] Server >> Client

This is an optional message from the Server to Client to provide Account Balance information for a particular Trade Account. The server needs to provide a separate message for each Trade Account associated with the logged in username if it supports Account Balance updates.

The Server will respond with an ACCOUNT_BALANCE_UPDATE in response to a ACCOUNT_BALANCE_REQUEST message. The Server will set the RequestID in the ACCOUNT_BALANCE_UPDATE message to match the RequestID in the ACCOUNT_BALANCE_REQUEST message.

The Server will periodically send ACCOUNT_BALANCE_UPDATE messages as the Account Balance data changes. The frequency of the updates is determined by the Server. Account Balance updates are considered automatically subscribed to. When an unsolicited ACCOUNT_BALANCE_UPDATE message is sent, the RequestID field will be 0.

When the server is responding with one or more ACCOUNT_BALANCE_UPDATE messages in response to a ACCOUNT_BALANCE_REQUEST message, it must not send any unsolicited ACCOUNT_BALANCE_UPDATE messages interleaved with the solicited ACCOUNT_BALANCE_UPDATE messages in response to the ACCOUNT_BALANCE_REQUEST message.

Field Name Field Description
[unsigned int16] Size

The standard message size field. Automatically set by constructor.

[unsigned int16] Type

The standard message type field. Automatically set by constructor.

[int32] RequestID

This is the RequestID which was set in the ACCOUNT_BALANCE_REQUEST that this message is in response to.

In the case when this is a periodic unsolicited Account Balance update, RequestID must be set to 0, the default.

[double] CashBalance

The current cash balance for the account in the currency specified by the AccountCurrency field.

[double] BalanceAvailableForNewPositions

The CashBalance minus the cash required to maintain securities on margin the Trade Account currently has.

[char] AccountCurrency

ISO Currency Code for the cash values in this message.

[char] TradeAccount

The trade account identifier for the Account Balance information.

[double] SecuritiesValue

This is the value of all cash and securities as a cash value.

[double] MarginRequirement

This is the current cash requirement to maintain securities on margin the Trade Account currently has.

[int32] TotalNumberMessages

This indicates the total number of Account Balance Update messages when a batch of messages is being sent. If there is only one Account Balance Update message being sent, this will be 1. Use a value of 1 for an unsolicited message.

A Client should not rely on this field for an unsolicited message. This is required to be set.

[int32] MessageNumber

This indicates the 1-based index of the Account Balance Update message when a batch of messages is being sent. If there is only one Account Balance Update message being sent, this will be 1. Use a value of 1 for an unsolicited message.

A Client should not rely on this field for an unsolicited message. This is required to be set.

[unsigned int8] NoAccountBalances

Set to an integer value of 1 to indicate there are no Account Balances in response to an ACCOUNT_BALANCE_REQUEST message.

Otherwise, the Server must leave this at the default of 0.

The Server is always expected to respond with a single ACCOUNT_BALANCE_UPDATE message when there is no ACCOUNT_BALANCE_UPDATE message for any Trade Account when the Account Balances have been requested by the Client with an ACCOUNT_BALANCE_REQUEST message.

When the Server is sending an ACCOUNT_BALANCE_UPDATE message to the Client and it is indicating that the balance related fields are all zero, then the NoAccountBalances field must be left at the default of 0. It is not used indicate the balance related fields are all zero.

This is always set to the default of 0 for an unsolicited ACCOUNT_BALANCE_UPDATE .

[unsigned int8] Unsolicited

Set to 1 to indicate this is an unsolicited Account Balance Update message. In other words, it is a real-time Account Balance Update message which is not an initial response to an ACCOUNT_BALANCE_REQUEST message.


*Last modified Saturday, 10th September, 2016.