Proxies and endpoints¶
cTrader Open API exposes access to several proxies located in different regions so that you can minimise latency and ensure that your service functions as smoothly as possible.
Fortunately, you do not have to choose the most suitable proxy manually. By leveraging the power of the AWS Global Accelerator, our Open API allows for connecting to just one endpoint; afterwards, your client will be redirected to the closest proxy we have available.
Connect to endpoints¶
The following endpoints are exposed for connecting to our Open API proxies.
| Live | Demo |
|---|---|
live.ctraderapi.com:5035 (for operating with Protobufs) | demo.ctraderapi.com:5035 (for operating with Protobufs) |
live.ctraderapi.com:5036 (for operating with JSON) | demo.ctraderapi.com:5036 (for operating with JSON) |
Protobuf vs JSON
Operating with Protobuf always requires a connection to port 5035 (and only this port). Operating with JSON always requires a connection with port 5036 (and only this port).
Live and demo environments
Demo and live environments are fully separated. If you connect to a live endpoint, you cannot use demo accounts in your application, and vice versa. If your application needs to operate on behalf of demo and live accounts simultaneously, you would need to establish and maintain two separate connections.
TCP vs WebSocket
The endpoints are the same for TCP and WebSocket connections. Note that ports 5035 and 5036 both support TCP and WebSocket connections.
The process of connecting to the endpoints is covered in our Establish a connection tutorial.