Working with account balance alerts for back office users in Bricknode Broker

July 16, 2021. Stefan Willebrand.

The Alert Manager, which is available in the Marketplace at Bricknode has just received an upgrade with a new alert type which demonstrates the power of custom fields and how they can be used for expanding the systems of Bricknode.

The new alert is called House Account Balance Alert and is used for sending automated alerts to administrative users of Bricknode Broker. If you want to monitor certain house accounts for balances in cash or financial instruments in the trade or settle dimensions it is now possible to define lower and upper limits of these alerts which can be triggered once per day.

To add new alert settings to an account simply navigate to the account and click edit:

In the section for Custom Fields click the add-button to open the dialogue for adding new content.

The system will ask you to enter the name of the field, which you should name “AlertManager_HouseAccountBalance_Settings” and in the section for Value you should input content that is a valid JSON object. The code snippet below holds the possible settings where the alert has been configured for cash positions in USD and SEK together with a position in a financial instrument. When creating a new custom field you can simply copy the content below and past everything into the value field in Bricknode Broker. There is a built in JSON editor in Bricknode Broker so once you have created the field you can click to edit the field using the JSON icon in front of it.

{
"CashBalanceAlerts": [
{
"CurrencyCode": "SEK",
"LowerLimitTradedAmount": 20000,
"HigherLimitTradedAmount": 50000,
"LowerLimitSettledAmount": 20000,
"HigherLimitSettledAmount": 50000
},
{ 
"CurrencyCode": "USD", 
"LowerLimitTradedAmount": 20000, 
"HigherLimitTradedAmount": 50000, 
"LowerLimitSettledAmount": 20000, 
"HigherLimitSettledAmount": 50000 }
],
"InstrumentBalanceAlerts": [
{
"InstrumentBrickId": "2a607e20-9164-4963-b321-8a73297d3eab",
"LowerLimitTradedAmount": 10,
"HigherLimitTradedAmount": 100,
"LowerLimitSettledAmount": 10,
"HigherLimitSettledAmount": 100
}
]
}

Lets first explore the cash alerts. The section called CashBalanceAlerts holds what is called an Array of settings for each currency that you would like to activate alerts for.

The USD alert has a lower alert limit in the trade dimension at 20,000 and the same amount for the settle dimension. If the available balance in any of the dimensions goes below 20,000 (inclusive of reservations) an alert will be triggered. The upper alert is set at 50,000 where the reverse logic of the lower alert is true. If you only want to have an alert in the trade dimension and nothing else the other rows can be removed. For example like this:

{ "CashBalanceAlerts": [ 
{ 
"CurrencyCode": "USD",
"LowerLimitTradedAmount": 20000,
"LowerLimitSettledAmount": 20000,
} 
]
}

The currency is identified by the three-letter ISO currency code while the instrument alerts are mapped to a financial instruments BrickId (BFS Id), this is found at the bottom left of the instrument details in Bricknode Broker.

Once there are alerts configured for accounts you can navigate to the admin users in Bricknode Broker and simply add a custom field for them with the name AlertManager_HouseAccountBalance and the value set to true and these users will be on the receiver list of these alerts.