Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

crypto-price-data-guide

БесплатноБез исполняемых скриптовНе проверен

How cryptocurrency prices work — the complete data pipeline from CEX order books and DEX pools through oracle networks to aggregators. Covers free API…

nirholasот nirholas★ 289 звёзд на GitHub

Об этом скилле

Crypto Price Data Guide

Where do crypto prices actually come from? This guide breaks down the entire data pipeline — from raw exchange data to the numbers you see in apps.

The Price Data Pipeline

┌──────────────────────────────────────────────────────────┐
│  LAYER 1: Primary Sources (where prices originate)       │
│                                                          │
│  CEX Order Books          DEX AMM Pools                  │
│  ┌──────────────┐        ┌──────────────┐                │
│  │ Binance      │        │ Uniswap V3   │                │
│  │ Coinbase     │        │ Curve        │                │
│  │ Kraken       │        │ Camelot      │                │
│  │ OKX, Bybit   │        │ Balancer     │                │
│  └──────┬───────┘        └──────┬───────┘                │
│         │                       │                        │
├─────────┼───────────────────────┼────────────────────────┤
│  LAYER 2: Oracle Networks (aggregate + post on-chain)    │
│         │                       │                        │
│         ▼                       ▼                        │
│  ┌──────────────────────────────────────┐                │
│  │ Chainlink     Pyth     Redstone      │                │
│  │ (median of multiple data sources)    │                │
│  └──────────────────┬───────────────────┘                │
│                     │                                    │
├─────────────────────┼────────────────────────────────────┤
│  LAYER 3: Aggregators (combine everything)               │
│                     ▼                                    │
│  ┌──────────────────────────────────────┐                │
│  │ CoinGecko  DeFi Llama  CoinMarketCap │                │
│  │ DexScreener  CoinCap   CoinPaprika   │                │
│  └──────────────────┬───────────────────┘                │
│                     │                                    │
├─────────────────────┼────────────────────────────────────┤
│  LAYER 4: Consumer Apps                                  │
│                     ▼                                    │
│  Portfolio trackers, trading bots, DeFi protocols,       │
│  AI agents (like SperaxOS), wallets                      │
└──────────────────────────────────────────────────────────┘

Layer 1: Primary Price Sources

Centralized Exchange (CEX) APIs

CEXes are the dominant price source for high-cap tokens. Their order books determine the "true" price through supply/demand matching.

Exchange Public API Rate Limit WebSocket
Binance api.binance.com/api/v3/ 1200 req/min ✅ Real-time
Coinbase api.exchange.coinbase.com/ 10 req/sec ✅ Real-time
Kraken api.kraken.com/0/public/ 1 req/sec ✅ Real-time
OKX okx.com/api/v5/market/ 20 req/2sec ✅ Real-time
Bybit api.bybit.com/v5/market/ 120 req/sec ✅ Real-time

All of these are free, no API key required for public market data.

Example: Binance Spot Price

GET https://api.binance.com/api/v3/ticker/price?symbol=BTCUSDT

Response: { "symbol": "BTCUSDT", "price": "64523.45000000" }

Example: Binance 24h Ticker

GET https://api.binance.com/api/v3/ticker/24hr?symbol=ETHUSDT

Response: {
  "symbol": "ETHUSDT",
  "priceChange": "45.20",
  "priceChangePercent": "1.42",
  "lastPrice": "3245.67",
  "volume": "584231.45",
  "highPrice": "3289.00",
  "lowPrice": "3178.23"
}

DEX On-Chain Data

For tokens that aren't listed on CEXes (the long tail), DEX pools are the only price source.

Source Chains How Price Is Determined
Uniswap V2 ETH, Arbitrum, etc. Constant product: price = reserveB / reserveA
Uniswap V3 ETH, Arbitrum, etc. Square root price from pool slot0: sqrtPriceX96
Curve ETH, Arbitrum, etc. StableSwap invariant (optimized for pegged assets)
Camelot Arbitrum V2 + V3 pools (Arbitrum-native)

Reading DEX prices:

  1. Direct RPC — Call pool contracts to read reserves/sqrtPrice
  2. The Graph — Query indexed swap events via GraphQL
  3. DexScreener API — Aggregated DEX data across 80+ chains

DexScreener Example

GET https://api.dexscreener.com/latest/dex/tokens/0xD74f5255D557944cf7Dd0E45FF521520002D5748

Returns: SPA pair data across all DEXes

How CEX and DEX Prices Stay in Sync

Arbitrage bots. If ETH is $3,200 on Binance but $3,210 on Uniswap:

  1. Bot buys on Binance (cheaper)
  2. Bot sells on Uniswap (expensive)
  3. Price difference narrows until it's less than gas + bridge costs

This is why prices across venues are usually within 0.1–0.5% of each other.

Layer 2: Oracle Networks

Oracles aggregate CEX + DEX data and make it available on-chain for smart contracts.

Chainlink

The dominant oracle network. ~1000+ price feeds across EVM chains.

How it works:

  1. Multiple independent oracle nod
Полный SKILL.md на GitHub

Установить crypto-price-data-guide в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл crypto-price-data-guide?

How cryptocurrency prices work — the complete data pipeline from CEX order books and DEX pools through oracle networks to aggregators. Covers free API alternatives to CoinGecko, VWAP/TWAP calculations, and building price feeds without paid APIs. Use when explaining price sources, building market data features, or comparing data providers.

Как установить скилл crypto-price-data-guide?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл crypto-price-data-guide запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить crypto-price-data-guide с