Topics
16 Nov 2023, 07:42
 1169
 1
15 Nov 2023, 10:36
 2069
 16
Replies

Spotware
31 Mar 2017, 10:02

Hi ycomp,

Currently you cannot determine bedorehand if a symbol is tradable or not. When orders are send for a symbol in non tradable hours, you will receive a rejection message with error code MARKET_CLOSED. Please see https://connect.spotware.com/docs/api-reference/developer-library/common-model-messages


@Spotware

Spotware
31 Mar 2017, 09:46

FIX API does not have a message for the symbols list. You will need to either get them from cTrader or using Connect API


@Spotware

Spotware
31 Mar 2017, 09:44

Hi mindbreaker,

In case you have multiple positions open, the server will stream multiple position reports. Therefore you will need to keep reading your stream for incoming data.


@Spotware

Spotware
30 Mar 2017, 15:31

1) in the docs it says "volume" is required, what value should I specify for volume to signify that the entire position should be closed? 0 doesn't work.

Yes, indeed. The volume is required. Apologies for the previous answer. 

2) Heartbeat.

You do not need to aknowledge heartbeat receipt to the server. The server just lets you know that it is alive, in case your application needs this info. In a similar way, You will need to send a heartbeat to the server that your application is alive so the server keeps the connection open.


@Spotware

Spotware
30 Mar 2017, 14:50

Hi mindbreaker,

FIX API works for all cTrader accounts. Can you please check again the host name through your cTrader FIX API credentials?


@Spotware

Spotware
30 Mar 2017, 14:04

Yes you can use ProtoOAClosePositionReq


@Spotware

Spotware
30 Mar 2017, 12:10

RE: RE: RE:

mindbreaker said:

Spotware said:

ycomp said:

how should I handle the situation where my program:

1. sends a market order request

2. connection drops

3. market order filled

4. response message missed (because not connected)

5. reconnected

so now on the server will be an open trade, that my program doesn't know was opened

 

You can get an account's history at any time, including orders, positions and deals through Accounts API.

https://connect.spotware.com/docs/api-reference/accounts-api

But in ConnectApi 2s refresh request interval exist (2 secomds in forex reality is eternity) !!!

Yes this is true for subsequent requests, but what ycomp desrcibes is a rare scenario which will not happen every less than two seconds.


@Spotware

Spotware
30 Mar 2017, 12:06

Hi mindbreaker,

Get the latest code from GitHub. Heartbeat issue is solved

And why there no queue for message ? When i hit cople buttons in short time application will crash.

The example's purpose is to demonstrate how to construct, send and receive a FIX message therefore it was kept as simple as possible. It does not have any practical use therefore there is no need to implement queueing or other mechanisms that would complicate the sample. 


@Spotware

Spotware
30 Mar 2017, 11:42

RE:

ycomp said:

how should I handle the situation where my program:

1. sends a market order request

2. connection drops

3. market order filled

4. response message missed (because not connected)

5. reconnected

so now on the server will be an open trade, that my program doesn't know was opened

 

You can get an account's history at any time, including orders, positions and deals through Accounts API.

https://connect.spotware.com/docs/api-reference/accounts-api


@Spotware

Spotware
30 Mar 2017, 10:46

RE: RE:

ycomp said:

Spotware said:

Hi ycomp,

1) what is this heartbeat thing? I assume I can ignore using it if I ping the servers routinely?

Heartbeat is used to keep the communication link alive while there is no activity from the client side. Preferably use heartbeat.

just to confirm.. if I use heartbeat, then I don't need to ping at all ?

Yes, for maithaining a live communication, sending heartbeats is adequate.


@Spotware

Spotware
30 Mar 2017, 09:43

Hi ycomp,

1) what is this heartbeat thing? I assume I can ignore using it if I ping the servers routinely?

Heartbeat is used to keep the communication link alive while there is no activity from the client side. Preferably use heartbeat.

2) and what is a positionId ? like in ProtoOACreateOrderReq ?

The position ID is used when you want the order not to create a new position but merge the deals into an existing position. If for example you create a BUY position of €1000 EURUSD and then send another order request of  €1000 EURUSD with direction BUY and pass the open position's ID, then the position will become €2000 BUY, instead of having two separate positions.

3) how can I convert an orderID into a positionID so that I can call ProtoOAClosePositionReq  

When orders are executed, the positionID is returned. See ProtoOAExecutionEvent


@Spotware

Spotware
29 Mar 2017, 17:17

Hi mindbreaker,

The forum exists mostly for community members to help each other. Therefore if you want to get speedy answers from the community, you need to be as clear as possible, else noone will be able to help you. Spotware staff usually intervenes only when some questions are very specific and cannot be answered by the community. Our specialists are currently occupied building and maintaining wonderful software therefore it might take some time to take an answer from them, especially when they don't have enough information to understand the problem.

Regarding the sample using SSL it will come soon but we can not provide a date.


@Spotware

Spotware
29 Mar 2017, 16:33

Hi mindbreaker,

It would be easier for someone to help you if you could share the code or at least if the exception message was in English.


@Spotware

Spotware
29 Mar 2017, 14:23

Hi ycomp,

1) You need to get an authorization every time you establish the connection. Then you need to ping the server every ath least ten seconds to keep the connections alive.

2) If you have a trading api token you can access both scopes. 


@Spotware

Spotware
29 Mar 2017, 14:09

Hi ycomp,

We have deleted your previous posts


@Spotware

Spotware
29 Mar 2017, 12:47

Hi richardblackhall,

Up and down chart movement is not currently availabe in cTrader Web. It will be implemented in one of our future releases.


@Spotware

Spotware
29 Mar 2017, 12:27

Hi mindbreaker,

We would like to thank you for your effort and the time you spent to prepare the video. It is going to be a useful addition to the material available to Spotware Connect community.

We look forward to your next video!


@Spotware

Spotware
29 Mar 2017, 11:55

Hi taharxeg,

It is a known issue and will be resolved soon.

Best Regards,


@Spotware

Spotware
29 Mar 2017, 11:53

Hi mindbreaker,

You cannot check the type of the token but you should know what type of token it is since you are the one requesting it. You can keep this information and associate it with the token.


@Spotware

Spotware
27 Mar 2017, 14:29

Hi tmc. 

Thanks for your suggestions. We will consider implementing them in the forum


@Spotware