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★ 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:
- Direct RPC — Call pool contracts to read reserves/sqrtPrice
- The Graph — Query indexed swap events via GraphQL
- 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:
- Bot buys on Binance (cheaper)
- Bot sells on Uniswap (expensive)
- 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:
- Multiple independent oracle nod
Установить 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), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic