Swap notification

Created at 04 Jun 2016, 16:33
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!
moneybiz's avatar

moneybiz

Joined 06.12.2011

Swap notification
04 Jun 2016, 16:33


What is the best way to notify the client of swaps reflected to the open positions?
Refresh all positions at the possible swap reflection time?

How do you do it in cTrader?
Is there a way to know the rates beforehand?


@moneybiz
Replies

kricka
05 Jun 2016, 01:07

Swap information

That is a very interesting question you put forward to the Spotware team to answer to.

To my knowledge it can only be retrieved when the swap is an actuality in a position and is debited on the position. The rate question beforehand would be a big help but I don't think that it's a possibility in the current API.

Market Order 3.0 uses the swap information to give the right correct risk at hand though, but to know the swap beforehand, I would like that too.


@kricka

moneybiz
06 Jun 2016, 10:29

RE: Swap information

kricka said:

That is a very interesting question you put forward to the Spotware team to answer to.

To my knowledge it can only be retrieved when the swap is an actuality in a position and is debited on the position. The rate question beforehand would be a big help but I don't think that it's a possibility in the current API.

Market Order 3.0 uses the swap information to give the right correct risk at hand though, but to know the swap beforehand, I would like that too.

There is no OnSwapDeducted event on bots API, how is it updated internally?
Do they sync all of the positions with the server periodically? If I have 100 positions opened at the time do they download all positons state from server or just the swap info is comming for each position if so why there is no event to be notified about it?

In connect API I didn't see any info on how to do it. The only thing that can be done is to periodically fetch all of the positions from the server and upadte the local state.


 


@moneybiz

Spotware
07 Jun 2016, 15:14

Dear Trader,

We don't publish any information regarding the source code of cTrader platforms.

Unfortunately, we cannot further assist you with your question


@Spotware