99 * User data update event which can be of two types:
1010 *
1111 * 1) outboundAccountInfo, whenever there is a change in the account (e.g. balance of an asset)
12- * 2) executionReport, whenever there is a trade or an order
12+ * 2) outboundAccountPosition, the change in account balances caused by an event.
13+ * 3) executionReport, whenever there is a trade or an order
1314 */
1415@ JsonIgnoreProperties (ignoreUnknown = true )
1516@ JsonDeserialize (using = UserDataUpdateEventDeserializer .class )
@@ -62,6 +63,8 @@ public String toString() {
6263 .append ("eventTime" , eventTime );
6364 if (eventType == UserDataUpdateEventType .ACCOUNT_UPDATE ) {
6465 sb .append ("accountUpdateEvent" , accountUpdateEvent );
66+ } else if (eventType == UserDataUpdateEventType .ACCOUNT_POSITION_UPDATE ) {
67+ sb .append ("accountPositionUpdateEvent" , accountUpdateEvent );
6568 } else {
6669 sb .append ("orderTradeUpdateEvent" , orderTradeUpdateEvent );
6770 }
@@ -70,6 +73,7 @@ public String toString() {
7073
7174 public enum UserDataUpdateEventType {
7275 ACCOUNT_UPDATE ("outboundAccountInfo" ),
76+ ACCOUNT_POSITION_UPDATE ("outboundAccountPosition" ),
7377 ORDER_TRADE_UPDATE ("executionReport" );
7478
7579 private final String eventTypeId ;
@@ -87,6 +91,8 @@ public static UserDataUpdateEventType fromEventTypeId(String eventTypeId) {
8791 return ACCOUNT_UPDATE ;
8892 } else if (ORDER_TRADE_UPDATE .eventTypeId .equals (eventTypeId )) {
8993 return ORDER_TRADE_UPDATE ;
94+ } else if (ACCOUNT_POSITION_UPDATE .eventTypeId .equals (eventTypeId )) {
95+ return ACCOUNT_POSITION_UPDATE ;
9096 }
9197 throw new IllegalArgumentException ("Unrecognized user data update event type id: " + eventTypeId );
9298 }
0 commit comments