What is the correct endpoint to connect to the API?

Created at 26 May 2023, 11:15
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!
DI

diego.bernardes

Joined 26.05.2023

What is the correct endpoint to connect to the API?
26 May 2023, 11:15


The official documentation informs that the endpoints used to connect to the API are demo1.p.ctrader.com:5034 and demo1.p.ctrader.com:5034. I can't connect on those endpoints, but changing the port to 5035 I'm able to connect. Then there is a second problem with the certificates. I had to disable the verification otherwise I would get this error tls: failed to verify certificate: x509: certificate is valid for *.spotware.com, spotware.com, not demo2.p.ctrader.com.

So I just want to confirm two things:

  • Is the documentation wrong saying to use port 5034 instead of 5035?
  • Is demo1.p.ctrader.com:5035 the correct endpoint? I've seen libraries using demo.ctrader.com:5035
  • Is Spotware aware of the SSL problem?

@diego.bernardes
Replies

diego.bernardes
27 May 2023, 11:04

The documentation was updated, everything is working as expected now.


@diego.bernardes