Skip to main content

WebSocket API

This section will provide necessary information about the CoinAPI EMS WebSocket API protocol.

WebSocket API provides real-time communication capacity for order management, execution reports, balances and the positions.

Implemented Standards:


Your WebSocket client implementation must comply with the "v13" version of the protocol documented in the RFC6455, including responding with the "Pong" message each time we will send "Ping" (every minute), failure to respond with the "Pong" from your WebSocket client will cause a connection to be closed.


Deployment methodEnvironmentUrl
Managed CloudProductionUse Managed Cloud REST API /v1/locations to get specific endpoints to each server site where your deployments span
Self HostedProductionIP Address of the ems-gateway container/excecutable in the closest server site to the caller location


If the software is deployed as Self-Hosted then API do not require authentication as inside your infrastructure, your company is responsible for the security and access controls.

If the software is deployed in our Managed Cloud, there are 2 methods for authenticating with us, you only need to use one:

  1. Custom authorization header named X-CoinAPI-Key with the API Key
  2. Query string parameter named apikey with the API Key
  3. TLS Client Certificate from the `Managed Cloud REST API` (/v1/certificate/pem endpoint) while establishing a TLS session with us.

Custom authorization header

You can authorize by providing additional custom header named X-CoinAPI-Key and API key as its value.

Assuming that your API key is 73034021-THIS-IS-SAMPLE-KEY, then the authorization header you should send to us will look like: X-CoinAPI-Key: 73034021-THIS-IS-SAMPLE-KEY


This method is recommended by us and you should use it in production environments.

Query string authorization parameter

You can authorize by providing an additional parameter named apikey with a value equal to your API key in the query string of your HTTP request.

Assuming that your API key is 73034021-THIS-IS-SAMPLE-KEY and that you want to request all exchange rates from BTC asset, then your query string should look like this: GET /v1/exchangerate/BTC?apikey=73034021-THIS-IS-SAMPLE-KEY


Query string method may be more practical for development activities.