Real-time connection status monitoring & position open/close events

Created at 01 Aug 2021, 20:01
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
OP

opusensemble

Joined 29.07.2021

Real-time connection status monitoring & position open/close events
01 Aug 2021, 20:01


Dear friends,

When developing a dashboard tool to reflect the account status, which API functions better allow the implementation of: 

1) Real-time connection status monitoring (Needed to display in the tool GUI as connected/disconnected) 
2) Real-time position open/close events (Needed for real-time trade monitoring)

Thank you / Kind Regards


@opusensemble
Replies

amusleh
02 Aug 2021, 07:52

Hi,

You have to use ExecutionEvent, whenever a trader executes a trading operation you will receive an execution event with the trading operation details.

Regarding connection status, you have to use your socket and check if you can send/receive a message or not, there is also a client disconnected proto message that you can use.

Please check our OpenAPI.NET WPF and ASP web app samples.

For more please check the Open API documentation.


@amusleh

opusensemble
03 Aug 2021, 02:07

Dear amusleh, 

Thank you for your reply. 

Does ExecutionEvent also apply to position modification (TP, SL or partial closes)? 

Thank you 


@opusensemble

amusleh
03 Aug 2021, 08:09

RE:

opusensemble said:

Dear amusleh, 

Thank you for your reply. 

Does ExecutionEvent also apply to position modification (TP, SL or partial closes)? 

Thank you 

Hi,

Yes, it does.


@amusleh