ProtoOASubscribeForTradingEventsReq
ProtoOASubscribeForTradingEventsReq
23 Apr 2017, 05:26
1. What does ProtoOASubscribeForTradingEventsReq/Res do? What happens after?
2. Can it be used to get real-time position information?
Replies
ycomp
24 Apr 2017, 13:56
RE:
Spotware said:
Hi ycomp,
ProtoOASubscribeForTradingEventsReq is used to subscribe to trading events like order filling, canceling, closing etc. It can not be used to receive position information. If you need position information you can do it through Accounts API.
is there any kind of connections per second limit with the Accounts API? or can I hit it as much as I want?
@ycomp
ycomp
04 May 2017, 05:27
does this limit apply to the Trading API also?
I never had any problems before creating and closing a bunch of trades one after another, since I started using the trading api.
but today I'm continually getting a socket closed from the trading API - the accounts API works fine from the same program with the same credentials.
@ycomp
ycomp
04 May 2017, 05:27
RE:
ycomp said:
does this limit apply to the Trading API also?
I never had any problems before creating and closing a bunch of trades one after another, since I started using the trading api.
but today I'm continually getting a socket closed from the trading API - the accounts API works fine from the same program with the same credentials.
on a pepperstone demo account
@ycomp
ycomp
04 May 2017, 10:12
RE:
Spotware said:
Hi ycomp,
Do you send a heartbeat to the server every 10 seconds as described here https://connect.spotware.com/docs/frequently-asked-questions ?
no, I send a ping request approx. every 5 seconds, unless in the last 5 seconds i've transmitted some other message (if my code is working correctly)
is that not sufficient?
@ycomp
Spotware
24 Apr 2017, 12:01
Hi ycomp,
ProtoOASubscribeForTradingEventsReq is used to subscribe to trading events like order filling, canceling, closing etc. It can not be used to receive position information. If you need position information you can do it through Accounts API.
@Spotware