Crypto-ML API Documentation

Crypto-ML offers API access as part of the Crypto-ML Pro Solutions.

API Overview

Crypto-ML provides a WebSocket API. Once connected, you will receive output from our machine learning models.

The WebSocket connection is designed to stay open until your client terminates the connection. That means a ping or “keep-alive” mechanism is not required from the client in order to keep the connection up.

Using this method, each end client receives notifications immediately.

Crypto-ML API WebSocket Diagram - Multi-Connection

Account Provisioning

After registering for an API account, your organization will receive an API Key. This key will allow for a defined number of concurrent sessions.

API Details

Following are technical details for using the API.

API Access URL


Sample Payloads

Market Index

Every 24 hours, the client receives updated Market Index data, including the current value and the 7-day trend.

Market Index samples:

{"bullBear":"BULL 13.56","_7dayTrend":"Bull market weakening."}
{"bullBear":"BULL 19.62","_7dayTrend":"Bull market strengthening."}
{"bullBear":"BEAR -0.55","_7dayTrend":"Bear market strengthening."}
{"bullBear":"BEAR -6.07","_7dayTrend":"Bear market weakening."}

Trade Alerts

As real-time trade alerts are issued, the data will be instantly streamed.

The systems generating trades are identified by the bot field that is presented.

Strategy summaries:

HoldKeeps a designated percentage of your portfolio held in cryptocurrency.
CML-AAnomaly Detection: Measures the predictions from our neural networks to find anomalies in the market that indicate market manipulation that should be followed.
CML-I Investment: This strategy utilizes the CML-A machine learning foundation, but targets longer-term positions rather than swing trades.
CML-T Technical: Applies deep learning to technical analysis data in order to generate a high-probability rules-based system.
CML-XExperimental: Leading-edge strategies still in the research-and-development phase.

Learn more about our Trade Strategies.

Trade samples:

{"side":"sell", "productCode":"BTC-USD", "price":"9543.01", "time":"2020-02-24T18:38:01.6484377Z", "bot":"CML-A"}
{"side":"sell", "productCode":"ETH-USD", "price":"267.32", "time":"2020-02-24T09:23:25.7622456Z", "bot":"CML-X"}
{"side":"buy", "productCode":"BTC-USD", "price":"9891.77","time":"2020-02-23T05:37:39.2429824Z", "bot":"CML-X"}
{"side":"buy", "productCode":"ETH-USD", "price":"264.56", "time":"2020-02-22T01:22:42.2901814Z", "bot":"CML-T"}

Details as follows:

  • side: denotes the “open long” or “close long” trigger event as buy or sell
  • productCode: denotes the product pair the trigger is for as BTC-USD, ETH-USD.
  • price: the USD value at which the trigger was generated.
  • time: the time in UTC (Zulu) at which the trigger was generated.
  • bot: denotes the bot issued the trigger.

Price Prediction

At established intervals (hourly), the client receives the latest price prediction notification. This predicts price change 24 hours from now.

{"crypto":"BTC", "prediction_6hr":"-5.125331544688167", "prediction_12hr":"-6.503530925894259", "manip_value":"1"}
{"crypto":"ETH", "prediction_6hr":"-3.459357198412614", "prediction_12hr":"-4.6226615096171875", "manip_value":"-1"}
{"crypto":"USD-BTC", "prediction_6hr":"-1.7687265604505078", "prediction_12hr":"-3.964182570826924", "manip_value":"-1"}
{"crypto":"USD-ETH", "prediction_6hr":"0.10868181010881219", "prediction_12hr":"-2.6982040678439647", "manip_value":"1"}
  • prediction_6hr: the predicted percentage price change 6 hours into the future.
  • prediction_12hr: the predicted percentage price change 12 hours into the future.
  • manip_value: identifies anomalies in price behavior. For example, the market may be expected to drop but is instead going up. Bullish anomalies are flagged as 1 (buy signal). Bearish anomalies are flagged as -1 (sell signal). Learn more about manipulation anomalies.

JavaScript Client Sample

The following code creates a simple JavaScript client that opens the WebSocket connection and receives updates from Crypto-ML’s Streaming API.

Similar clients can be written in other languages.

It is recommended to write your WebSocket client so that if it disconnects for any reason, re-connection logic will initiate. The retry logic should keep running until the connection is reestablished.

socket = new WebSocket("wss://<a href="" target="_blank" rel="noreferrer noopener"></a>");
socket.onopen = function(e) {
  console.log("Connection established");  
socket.onmessage = function(event) {
  console.log("Data received from server:"+;
socket.onclose = function(event) {
  if (event.wasClean) {
    console.log("Connection closed cleanly, code="+event.code+",reason="+event.reason);
  } else {  
    console.log("Connection died");
socket.onerror = function(error) {
  console.log("error:"+ error.message);

Ready to Get Started?

Learn more and sign up now at Crypto-ML Pro Solutions.