Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 03:26:19 +0000



Post From: Invalid AccountBalanceUpdate Json message received from DTC Server

[2024-01-17 14:15:46]
User218244 - Posts: 21
My DTC Client application received (at 08:15:48 EST) the following invalid AccountBalanceUpdate Json message from Sierra Chart DTC Server:

"{"Type":600,"RequestID":0,"CashBalance":6181.82,"BalanceAvailableForNewPositions":6310.039954021857,"SecuritiesValue":6310.039954021857,"MarginRequirement":0,"TotalNumberMessages":1,"MessageNumber":1,"NoAccountBalances":0,"Unsolicited":1,"OpenPositionsProfitLoss":0,"DailyProfitLoss":128.219996971339,"AccountCurrency":"USD","TradeAccount":"******","InfoText":"Cash Balance update | Cash balance adjustment | Account: ****** | Balance: 6310.04 | EODAccountValueUsingOpenProfitLossBasedOnSettlement: 6310.04 | AccountValueCaptureTime: none UTC | BalanceFromFirmImportFile: 6181.82 | Change: -128.22 | New NLV: 6181.82 | RecalculateDailyLossLimit: Yes"

Note, in particular, that there is no closing parenthesis to the message and I believe is missing a null terminator. For what its worth, this is the exact Exception from my application:

System.ArgumentException: Cannot parse line "{"Type":600,"RequestID":0,"CashBalance":6181.82,"BalanceAvailableForNewPositions":6310.039954021857,"SecuritiesValue":6310.039954021857,"MarginRequirement":0,"TotalNumberMessages":1,"MessageNumber":1,"NoAccountBalances":0,"Unsolicited":1,"OpenPositionsProfitLoss":0,"DailyProfitLoss":128.219996971339,"AccountCurrency":"USD","TradeAccount":"******","InfoText":"Cash Balance update | Cash balance adjustment | Account: ****** | Balance: 6310.04 | EODAccountValueUsingOpenProfitLossBasedOnSettlement: 6310.04 | AccountValueCaptureTime: none UTC | BalanceFromFirmImportFile: 6181.82 | Change: -128.22 | New NLV: 6181.82 | RecalculateDailyLossLimit: Yes" into SierraChart Message "JsonMessage".
---> System.Text.Json.JsonException: Expected end of string, but instead reached end of data. Path: $.InfoText | LineNumber: 0 | BytePositionInLine: 649.
---> System.Text.Json.JsonReaderException: Expected end of string, but instead reached end of data. LineNumber: 0 | BytePositionInLine: 649.

Date Time Of Last Edit: 2024-01-17 19:16:29