---
name: market-data
description: Access real-time and historical market data from Tetrac. Get tickers, funding rates, open interest, and volume across 30+ exchanges. Use when you need price data, market analysis, or trading signals.
license: Proprietary
compatibility: Designed for Claude Code (or similar products)
metadata:
  author: tetrac
  version: "2.2"
  category: "market-data"
  emoji: "📊"
---

## Skill Files

| File                     | URL                                                  |
| ------------------------ | ---------------------------------------------------- |
| **SKILL.md** (this file) | `https://www.tetrac.xyz/skills/market-data/SKILL.md` |

## Overview

This skill provides access to market data endpoints:

1. **Tickers** - Real-time perpetual futures tickers aggregated across venues
2. **Funding Rates** - Perpetual futures funding rates, comparable across venues
3. **Open Interest** - Per-venue open interest
4. **Volume** - Per-exchange volume snapshots and perp DEX volume history
5. **Tetrac Scanner** - Single-symbol technical analysis with trade signals (plus a cached all-markets snapshot)
6. **Symbol Venues** - Which venues list each symbol
7. **Solana Perps** - Long/short open interest across Solana perp venues, and a Pacifica trader watchlist
8. **News** - Market news from Alpha Vantage
9. **Calendar** - Macro economic calendar events
10. **Insights** - Top movers with funding-rate context
11. **Listings** - New market listing detection
12. **Quakes** - Significant earthquakes from USGS

Every endpoint accepts a registered session (`ttc-auth-token` + `ttc-public-key`, see the [onboarding skill](https://www.tetrac.xyz/skills/onboarding/SKILL.md)) or a per-call payment ([x402](https://www.tetrac.xyz/skills/x402-agent-payments/SKILL.md) or [MPP](https://www.tetrac.xyz/skills/mpp-payments/skill.md)). The examples below use session headers.

---

## Discovery Index (Free)

`GET /api/v1/markets` needs no payment and no session (it is rate-limited). It returns `{ success, status, code, pricing, methods }`, where `methods` lists each market-data endpoint with its price. Read it before paying for anything.

```bash
curl https://www.tetrac.xyz/api/v1/markets
```

---

## Get Tickers

Real-time **perpetual futures** tickers, aggregated per symbol across venues. Spot markets are not tracked.

### Basic Request

```bash
curl https://www.tetrac.xyz/api/v1/markets/hybrid-tickers \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

### Filter by Volume

```bash
# Markets with at least $1M of 24h quote volume
curl "https://www.tetrac.xyz/api/v1/markets/hybrid-tickers?minimumVolume=1000000" \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

### Filter by Price Change

```bash
# Markets up 5% or more
curl "https://www.tetrac.xyz/api/v1/markets/hybrid-tickers?up=5" \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"

# Markets down 5% or more
curl "https://www.tetrac.xyz/api/v1/markets/hybrid-tickers?down=5" \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

### Filter by Symbol or Exchange

```bash
# A single market
curl "https://www.tetrac.xyz/api/v1/markets/hybrid-tickers?symbol=BTCUSDT" \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"

# Markets listed on one venue
curl "https://www.tetrac.xyz/api/v1/markets/hybrid-tickers?exchange=binance" \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

### Query Parameters

All parameters are optional.

| Parameter       | Type   | Description                                                    |
| --------------- | ------ | -------------------------------------------------------------- |
| `symbol`        | string | Exact symbol match (e.g., `BTCUSDT`)                           |
| `exchange`      | string | Keep markets whose `source` or `sources` include this venue id |
| `minimumVolume` | number | Minimum `quoteVolume` in USD                                   |
| `minimumPrice`  | number | Minimum last price                                             |
| `maximumPrice`  | number | Maximum last price                                             |
| `up`            | number | Minimum % gain (e.g., `5` for +5%)                             |
| `down`          | number | Minimum % loss (e.g., `5` for -5%)                             |
| `type`          | string | Only `futures` is accepted; it is also the default             |

### Response Example

```json
{
  "success": true,
  "data": {
    "futures": {
      "data": [
        {
          "symbol": "BTCUSDT",
          "lastPrice": "97520.00",
          "priceChange": "2520.00",
          "priceChangePercent": "2.65",
          "highPrice": "98520.00",
          "lowPrice": "94520.00",
          "volume": "125000",
          "quoteVolume": "12125000000",
          "totalQuoteVolume": "36375000000",
          "volumeByExchange": {
            "binance": "18000000000",
            "bybit": "9000000000"
          },
          "openPrice": "95000.00",
          "funding": "0.0001",
          "nextFunding": 1738454400000,
          "openInterest": 12500000000,
          "source": "binance",
          "sources": ["binance", "bybit"]
        }
      ]
    }
  },
  "timestamp": 1738435234567,
  "cached": true,
  "cacheInfo": { "futures": true }
}
```

`quoteVolume` is the **average** 24h USD volume across the venues listing the market; `totalQuoteVolume` is the sum, and `volumeByExchange` holds each venue's own figure.

---

## Get Funding Rates

```bash
# Every venue's funding rates
curl https://www.tetrac.xyz/api/v1/markets/funding-rates \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"

# One symbol on two venues
curl "https://www.tetrac.xyz/api/v1/markets/funding-rates?symbol=BTCUSDT&exchange=binance,hyperliquid" \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"

# Arbitrage candidates: the 50 highest + 50 lowest rates
curl "https://www.tetrac.xyz/api/v1/markets/funding-rates?arb=50" \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

### Query Parameters

| Parameter  | Type   | Description                                                                  |
| ---------- | ------ | ---------------------------------------------------------------------------- |
| `symbol`   | string | One symbol (e.g., `BTCUSDT`); also reaches venues that cannot answer in bulk |
| `exchange` | string | Comma-separated venue ids to include                                         |
| `arb`      | number | Return only the N highest and N lowest rates, ranked by `hourlyRate`         |

### Response Example

```json
{
  "success": true,
  "data": [
    {
      "exchange": "binance",
      "symbol": "BTCUSDT",
      "fundingRate": 0.0001,
      "intervalHours": 8,
      "hourlyRate": 0.0000125,
      "dailyRoi": 0.0003,
      "nextFundingTime": 1738454400000,
      "timestamp": 1738435234567
    }
  ],
  "cached": true,
  "timestamp": 1738435234567
}
```

`fundingRate` is each venue's native per-interval rate, and intervals differ (1h, 4h, 8h). **Compare venues with `hourlyRate`**, never `fundingRate`. `hourlyRate` is omitted when a market's interval is unknown.

---

## Get Open Interest

Open interest for every market from **one venue per call**, joined onto the Binance futures market list.

```bash
curl "https://www.tetrac.xyz/api/v1/markets/open-interest?source=bybit" \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

| Parameter | Type   | Description                                                                                  |
| --------- | ------ | -------------------------------------------------------------------------------------------- |
| `source`  | string | Venue id to read open interest from. Default `bybit`; an unsupported venue falls back to it. |

Response: `{ success, data: [{ symbol, openInterest, openInterestUsd, price, volumeUsd, timestamp }], timestamp, source }`. Check `source` to confirm which venue answered.

---

## Get Volume Snapshot

Real-time per-exchange volume, open interest, TVL, and per-market breakdowns.

```bash
curl https://www.tetrac.xyz/api/v1/markets/volume-snapshot \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

### Filter by Exchange

```bash
curl "https://www.tetrac.xyz/api/v1/markets/volume-snapshot?exchange=variational" \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

| Parameter  | Type   | Description                                           |
| ---------- | ------ | ----------------------------------------------------- |
| `exchange` | string | Filter by exchange name (e.g., `variational`, `dydx`) |

---

## Get Perp DEX Volume History

Daily history (last 30 days) of combined 24h volume across a set of perp DEXes. Each day stores that day's **peak** reading.

```bash
curl https://www.tetrac.xyz/api/v1/markets/swap-volume \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

Response: `{ success, data: [{ date, volume, timestamp }] }`. `data` can be empty before the first daily reading is recorded.

---

## Tetrac Scanner (TA Analysis)

Scan one market through technical analysis at one timeframe. Returns swing-based setups, scoring, a composite trade signal with entry, stop-loss, and up to 3 take-profit levels, and a Bollinger-squeeze breakout signal.

Klines come from **Binance USDT-M futures**, so the symbol must be listed there — other symbols return an error.

### Basic Request

```bash
curl "https://www.tetrac.xyz/api/v1/markets/ttc-scanner?symbol=BTCUSDT" \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

### Custom Timeframe & Parameters

```bash
curl "https://www.tetrac.xyz/api/v1/markets/ttc-scanner?symbol=ETHUSDT&timeframe=4h&bars=500&swingStrength=15" \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

### Query Parameters

| Parameter       | Type   | Required | Default | Description                                         |
| --------------- | ------ | -------- | ------- | --------------------------------------------------- |
| `symbol`        | string | Yes      | —       | Market symbol (e.g., `BTCUSDT`)                     |
| `timeframe`     | string | No       | `1h`    | Kline interval (e.g., `1m`, `5m`, `1h`, `4h`, `1d`) |
| `bars`          | number | No       | `1000`  | Number of bars to analyze (max 1000, min 50)        |
| `swingStrength` | number | No       | `10`    | Lookback period for swing detection                 |

### Response Example

```json
{
  "success": true,
  "timestamp": 1738435234567,
  "params": {
    "symbol": "BTCUSDT",
    "timeframe": "1h",
    "bars": 1000,
    "swingStrength": 10
  },
  "data": {
    "symbol": "BTCUSDT",
    "price": 97500.0,
    "scans": {},
    "scoring": {
      "currentPrice": 97500.0,
      "long": { "score": 72 },
      "short": { "score": 35 }
    },
    "signal": {
      "direction": "LONG",
      "strength": 68,
      "confidence": "MEDIUM",
      "entry": 97500.0,
      "stopLoss": 95200.0,
      "takeProfit1": 99000.0,
      "takeProfit2": 101500.0,
      "takeProfit3": 104000.0,
      "riskRewardRatio": 2.85,
      "reasoning": "bull composite 68.2 (score 72, R/R 2.85) vs opposite 38.1"
    },
    "breakout": {}
  }
}
```

`scans` holds the raw swing setups and `breakout` the Bollinger-squeeze signal; both are abbreviated above.

### Signal Fields

| Field             | Type   | Description                                        |
| ----------------- | ------ | -------------------------------------------------- |
| `direction`       | string | `LONG`, `SHORT`, or `NEUTRAL`                      |
| `strength`        | number | Composite score (0–100)                            |
| `confidence`      | string | `HIGH` (≥70), `MEDIUM` (≥50), or `LOW` (<50)       |
| `entry`           | number | Current price as entry point                       |
| `stopLoss`        | number | Suggested stop-loss level (null if no clear level) |
| `takeProfit1–3`   | number | Up to 3 take-profit targets (null if unavailable)  |
| `riskRewardRatio` | number | Risk/reward ratio of the chosen direction          |
| `reasoning`       | string | Human-readable explanation of the signal           |

### All-Markets Snapshot (Cached)

Every scanned market's latest signal in one call. Priced at **$0.50** (vs $0.05 for the per-symbol scan) because one call covers the whole universe.

> **Always pass `?full=1`.** Without it the endpoint returns only freshness timestamps (`{ success, timestamp, generatedAt, staleAtMs }`) — and a paid call is still charged $0.50.

```bash
curl "https://www.tetrac.xyz/api/v1/markets/ttc-scanner-cache?full=1" \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

Returns `{ success, timestamp, staleAtMs, data: { generatedAt, universe, symbols: [{ symbol, quoteVolume, signal }], meta } }`, where each `signal` matches the per-symbol shape above. The snapshot refreshes at most hourly; `staleAtMs` says when the next refresh is due.

---

## Get Symbol Venues

Which venues list each symbol — a listings index, not a price feed. Rebuilt at most every 24 hours.

```bash
curl https://www.tetrac.xyz/api/v1/markets/symbol-venues \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

Response: `{ success, data: { symbolVenues, updatedAt, venueCount }, timestamp, cached }`.

---

## Solana Perps

### Long/Short Open Interest

Long/short open-interest snapshot across Solana perp venues, with per-venue reachability.

```bash
curl https://www.tetrac.xyz/api/v1/solana-perps/long-short \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

| Parameter | Type   | Description                                                   |
| --------- | ------ | ------------------------------------------------------------- |
| `venues`  | string | Optional comma-separated venue ids (e.g., `gmtrade,pacifica`) |

Response (no `success` wrapper): `{ fetchedAt, rows, totals, venueStatus }`. `venueStatus` maps each venue to `ok` or `error`.

### Pacifica Watchlist

Top Pacifica trader accounts by open interest, for subscribing on Pacifica's public WebSocket.

```bash
curl "https://www.tetrac.xyz/api/v1/solana-perps/pacifica-watchlist?limit=250" \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

| Parameter | Type   | Description                                |
| --------- | ------ | ------------------------------------------ |
| `limit`   | number | Accounts to return (default 250, max 1000) |

Response (no `success` wrapper): `{ accounts: [{ address, label, oiUsd }], totalRanked, fetchedAt }`.

---

## Get News

The top 10 items from Alpha Vantage's news feed (technology, IPO, earnings, and financial-markets topics).

```bash
curl https://www.tetrac.xyz/api/v1/markets/news \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

### Response Example

```json
{
  "success": true,
  "items": [
    {
      "title": "Bitcoin Hits New High...",
      "url": "https://...",
      "time_published": "20260328T120000",
      "summary": "...",
      "source": "Reuters",
      "impact_score": 18.5,
      "sentiment": "Neutral"
    }
  ],
  "timestamp": 1738435234567
}
```

`items` sits at the top level (there is no `data` wrapper).

---

## Get Economic Calendar

Medium- and high-impact macro events for this week and next, from the Forex Factory calendar. Refreshed every 24 hours.

### Basic Request

```bash
curl https://www.tetrac.xyz/api/v1/markets/calendar \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

### Filter by Currency and Impact

```bash
curl "https://www.tetrac.xyz/api/v1/markets/calendar?currency=USD,EUR&impact=High" \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

### Query Parameters

| Parameter  | Type   | Description                                                       |
| ---------- | ------ | ----------------------------------------------------------------- |
| `currency` | string | Comma-separated currency codes (e.g., `USD,EUR`); alias `country` |
| `impact`   | string | `Medium` or `High` (case-insensitive)                             |
| `search`   | string | Text search across event names                                    |
| `from`     | string | Start date (YYYY-MM-DD, UTC); within this week and next           |
| `to`       | string | End date (YYYY-MM-DD, UTC, inclusive)                             |

Response: `{ success, data: { events, source, fromCache, fetchedAt, expiresAt, ageSeconds, truncated }, timestamp, cached }`.

---

## Get Market Insights

Top movers with funding-rate context: perpetual futures up at least 1% with at least $1M of 24h quote volume, each annotated with `fundingArb` entries (`"exchange: rate%"`) from the 50 highest and 50 lowest funding rates. Takes no parameters; `GET` and `POST` return the same result.

```bash
curl https://www.tetrac.xyz/api/v1/markets/insights \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

Response: `{ success, data: { tickers, tickersCount, fundingArbCount, cached, timestamp }, timestamp, cached }`.

---

## Get New Listings

Markets that appeared since the previous snapshot. The result is re-served for up to an hour so every caller in that window sees the same listings.

```bash
curl https://www.tetrac.xyz/api/v1/markets/listings \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

Response: `{ success, data: { data: { newListings, totalCount, previousCount }, timestamp, cached }, timestamp, cached }` — note the nested `data.data`.

---

## Get Quakes

Significant earthquakes from the USGS feed (past 24 hours) — a natural-disaster risk signal, not a market metric.

```bash
curl https://www.tetrac.xyz/api/v1/markets/quakes \
  -H "ttc-auth-token: YOUR_AUTH_TOKEN" \
  -H "ttc-public-key: YOUR_PUBLIC_KEY"
```

Response: `{ success, data: <GeoJSON FeatureCollection>, timestamp }`, with magnitude, location, tsunami flag, and alert level on each feature.

---

## Supported Exchanges

The supported-venue roster changes as venues are added, suspended, or delisted, so it is not reproduced here. See the live list on the home page (https://www.tetrac.xyz), or read the `supportedExchanges` array returned by `GET /api/v1/exchanges`. Not every venue feeds every market-data endpoint.

---

## Rate Limits

Limits are per identity (your `ttc-public-key`, or the paying wallet for x402) and scale with your subscription tier. x402 pay-per-call requests use the Free limit.

| Endpoint                                      | Free   | Pro    | Elite   |
| --------------------------------------------- | ------ | ------ | ------- |
| `/api/v1/markets/*`, `/api/v1/solana-perps/*` | 30/min | 90/min | 300/min |

A `429` response includes a `Retry-After` header — wait that many seconds before retrying.

---

## Next Steps

- Learn [trading operations](https://www.tetrac.xyz/skills/trading/SKILL.md)
- Set up [x402 agent payments](https://www.tetrac.xyz/skills/x402-agent-payments/SKILL.md)

---

**API contract (machine-readable):** https://www.tetrac.xyz/openapi.json · **For humans:** https://www.tetrac.xyz/docs
