Hey guys is it normal not to receive any events when I close or add to a position on my account, with the following code ?
RequestOptions options = new RequestOptions();
SyncRequestClient syncRequestClient = SyncRequestClient.create(PrivateConfig.API_KEY, PrivateConfig.SECRET_KEY,
options);
// Start user data stream
String listenKey = syncRequestClient.startUserDataStream();
System.out.println("listenKey: " + listenKey);
LOG.info("listenKey: " + listenKey);
// Keep user data stream
syncRequestClient.keepUserDataStream(listenKey);
client.subscribeUserDataEvent(listenKey, new SubscriptionListener<UserDataUpdateEvent>() {
@Override
public void onReceive(UserDataUpdateEvent data) {
LOG.info(data.toString());
LOG.info(data.getEventType());
LOG.info(data.getEventTime());
System.out.println(data.toString());
}
}, new SubscriptionErrorHandler() {
@Override
public void onError(BinanceApiException exception) {
LOG.info("ERROR : " + exception.getMessage() + " " + exception.getErrType());
System.out.println("ERROR : " + exception.getMessage() + " " + exception.getErrType());
}
});
Regards,
Andrei