Equeum
Search
⌃K

Coding & Accessing Equeum APIs

Introduction

The Equeum API provides free access to historical and real-time data for over 500 metrics covering:
  • On-Chain Data
  • News and Social Media
  • Sentiment Exchange Flow
  • Data Derivatives
  • Price Trend Indicators
  • MVRV and NVT
  • Wallet Address Attributes
  • Mempool Analytics
  • Mining Indicators
  • Volatility / Market Internals
  • ….and more

Getting Started

This document illustrates how to incorporate into a bot the extensive set of built-in data sources and metrics using the Equeum API. The API is accessible to any bot, including those developed using the FreqTrade or Jesse framework.
In addition, it illustrates how to combine built-in metrics and data sources using the Equeum development framework to create custom Equeum API endpoints. These custom endpoints can be kept private or open-sourced and available to other bot developers.

Using the Equeum API

Users can create complete strategies using the Equeum API endpoints, or the endpoints can be incorporated into existing strategies for creating buy/sell signals.
In this documentation, we will create endpoints for Ethereum, but it is the same process for any of the other 25 heavily-traded coins currently covered by Equeum.

Building Strong Signals from Weak Signals

Each of the existing Equeum API endpoints, along with the custom endpoints, are considered “weak” signals. That is, any single one of the signals is sufficient in creating a robust strategy, but in aggregate, the signals can create a strong signal. With access to custom endpoints created by any platform user, developers can effectively access the collective intelligence of a global pool of developers.

Select Metric Data Sources

As an example, we will create a custom “sentiment” metric, built by aggregating a selection from the Equeum built-in data sources, as well as data sources provided by other developers.
  • Sentiment derived from news headlines: increasing positive sentiment is a good leading indicator of upward price movement, and vice versa for negative sentiment
  • Realized volatility: a measure of how much the price of ETH fluctuates relative to its price.
  • Ethereum active addresses: An active address is one that has made a transaction in the past 24 hours, and an increase in this number indicates growing trend strength
  • Ethereum exchange in-flows: an increasing flow of ETH from external wallets onto exchanges indicates an increasing number of sellers; vice versa for exchange outflows
  • Ethereum MVRV: this metric indicates when the ETH exchange traded price is below fair values for Ethereum
  • NVT ratio: A high NVT ratio (or uptrend) indicates that investors are pricing ETH at a premium, as Market Cap growth outpaces utilization of on-chain transactions
  • Ethereum gas fees: increasing gas fees are an indicator of growing trend strength

Create A Bot

Create a bot using the Jesse or FreqTrade framework, as usual.

Clone the Equeum API Extension

Clone the open-source Equeum extension and incorporate it into your strategy. This extension automates the process of bringing external data points into your Jesse or FreqTrade bot, and you can treat the data the same as any other internal or external data source.

Code Custom Endpoint

On the Equeum platform, custom endpoints are created using the built-in DSL, called EQL (Equeum Query Language). EQL vastly simplifies and facilitates creating and backtesting content for investment strategies.

Equeum Editor, Chart and Resource Library

ETHSentiment Strategy Source Code

// From the Resource Library, select the data source for each metric
// Assign variable names to each of the data sources
ethExchangeInflow = equeum:eth_transactions_transfers_to_exchanges_count_gn
ethVolatility = equeum:eth_market_realized_volatility_1_week_gn
ethActiveAddresses = equeum:eth_addresses_active_count_gn
ethNewsSentiment = equeum:eth_sentiment_score_average_per_min
ethGasFees = equeum:eth_average_transaction_fee_24h
ethMvrv = equeum:eth_market_mvrv_z_score_gn!
ethNvt = equeum:eth_indicators_nvts_gn
// Use the built-in rsi function to normalize each of the input metrics. This enables any metric to be
// evaluated using a common scale. Assign a lookback length to be used in normalization
rsiLookBack = 100
// For each metric, smooth using a moving average with 3 different lookback lengths
// The EQL "ensemble" function (see below) will optimize the lookback parameter
shortLookBack = 400
mediumLookBack = 800
longLookBack = 1600
// Put all inputs into list; use “->” operator to pipe data from normalize to average function
beginList:
ethExchangeInflow -> rsi(rsiLookBack) -> average(shortLookBack)!
ethVolatility -> rsi(rsiLookBack) -> average(shortLookBack)
ethActiveAddresses -> rsi(rsiLookBack) -> average(shortLookBack)
ethNewsSentiment -> rsi(rsiLookBack) -> average(shortLookBack)
ethGasFees -> rsi(rsiLookBack) -> average(shortLookBack)
ethMvrv -> rsi(rsiLookBack) -> average(shortLookBack)
ethNvt -> rsi(rsiLookBack) -> average(shortLookBack)
ethExchangeInflow -> rsi(rsiLookBack) -> average(mediumLookBack)
ethVolatility -> rsi(rsiLookBack) -> average(mediumLookBack)
ethActiveAddresses -> rsi(rsiLookBack) -> average(mediumLookBack)
ethNewsSentiment -> rsi(rsiLookBack) -> average(mediumLookBack)
ethGasFees -> rsi(rsiLookBack) -> average(mediumLookBack)
ethMvrv -> rsi(rsiLookBack) -> average(mediumLookBack)
ethNvt -> rsi(rsiLookBack) -> average(mediumLookBack)
ethExchangeInflow -> rsi(rsiLookBack) -> average(longLookBack)
ethVolatility -> rsi(rsiLookBack) -> average(longLookBack)
ethActiveAddresses -> rsi(rsiLookBack) -> average(longLookBack)
ethNewsSentiment -> rsi(rsiLookBack) -> average(longLookBack)
ethGasFees -> rsi(rsiLookBack) -> average(longLookBack)
ethMvrv -> rsi(rsiLookBack) -> average(longLookBack)
ethNvt -> rsi(rsiLookBack) -> average(longLookBack)
endList:
list = @[ beginList : endList ]!
// Set and chart the target attribute to be used in building and backtesting
assetPrice = ETH.close
// Send list to ensemble function, which dynamically optimizes the set of inputs to be used
ethSentimentMetric = list -> ensemble(asset = ETH) -> average(800)
// Make the data available by API or webhook using the export statement
export ethSentimentMetric

Backtest Metric

Use the built-in backtest function to see how the new metric performs.

Export Data to a Spreadsheet

Can see stats for strategy, equity curve, and listing of each trade.

Accessing Built-in and Custom Endpoints

Now that we have created a custom API endpoint, it can be accessed in two ways. First via the Equeum Rest API; second via webhooks.