AlgoHive
Blocks

Data Sources

Connect to exchanges, markets, and custom data feeds.

Data sources bring market data into your strategy. Every strategy needs at least one data source.

Data Source Types

Exchange

Standard spot market data from exchanges like Binance, Coinbase, etc.

Columns: open high low close volume

Example URI: system://exchange/?symbol=BTC-USD&timeframe=4h

Perpetual

Futures/perpetual market data with additional metrics.

Columns: funding_rate oi cvd open high low close volume

Example URI: system://perpetual/?symbol=BTC-USD&timeframe=1h

Prediction

Prediction market data from Polymarket, Kalshi, etc.

Columns: yes_odds no_odds volume liquidity

Example URI: system://prediction/?symbol=ELECTION-2024&timeframe=1h

Custom

Your own data sources via API integration.

Columns: Defined by your data source configuration.

Learn more about Custom Data Sources →

Creating a Data Source

  1. Click Add Data Source in the workflow editor
  2. Enter an alias — a short name like btc or main
  3. Select the type (exchange, perpetual, prediction, custom)
  4. Choose the symbol (e.g., BTC-USD)
  5. Select the timeframe (1m, 5m, 15m, 1h, 4h, 1d, 1w)
  6. Click Add

Using Data Sources

Reference data in expressions using the alias:

btc.close          # Closing price
btc.high           # High price
btc.volume         # Volume
perp.funding_rate  # Funding rate (perpetual only)

Timeframes

Available timeframes depend on your plan:

PlanTimeframes
Paper4h, 1d, 1w
Trader15m, 1h, 4h, 1d, 1w
Pro1m, 5m, 15m, 1h, 4h, 1d, 1w

Multi-Symbol Strategies

Add multiple data sources for multi-symbol strategies:

btc → BTC-USD 4h
eth → ETH-USD 4h

Then create analysis that compares them:

btc_stronger: btc.close / btc.close[30] > eth.close / eth.close[30]

Multi-Timeframe Strategies

Add the same symbol at different timeframes:

btc_4h → BTC-USD 4h
btc_1d → BTC-USD 1d

Use higher timeframe for trend, lower for entry:

daily_trend: EMA(btc_1d.close, 20) > EMA(btc_1d.close, 50)
entry_signal: cross_above(EMA(btc_4h.close, 9), EMA(btc_4h.close, 21))

Custom Data Sources

Create custom data sources in Settings → Data Sources:

  1. Define your data source name and namespace
  2. Configure the API endpoint
  3. Map response fields to columns
  4. Test the configuration
  5. Use in strategies like any other data source

Custom data sources enable:

  • On-chain metrics
  • Sentiment data
  • News feeds
  • Your own signals

Best Practices

💡Tip

Use short, descriptive aliases like btc or eth instead of generic names like datasource1. This makes your expressions much easier to read!

  • Use short, descriptive aliases (btc, eth, not datasource1)
  • Match timeframe to your trading style
  • Consider using perpetual data for more metrics
  • Test custom data sources thoroughly before using in live strategies

On this page