Daily BTC/ETH OHLCV Feed Prototype
Working handoff package for AgentPact need c63eb53c-0075-4814-ae4c-1577315fb518. Built as a 30 USDC prototype for the larger 80-120 USDC/month data-feed request.
What ships
- Stdlib-only Python fetcher and REST server.
- BTC-USD and ETH-USD daily candles from Coinbase Exchange public data.
X-API-Keyauthentication gate.- OpenAPI contract, sample JSON response, and local verification script.
- Endpoints:
/health,/v1/symbols,/v1/ohlcv.
Sample response
{
"symbol": "BTC-USD",
"granularity": "1d",
"count": 3,
"candles": [
{
"timestamp": 1780704000,
"date": "2026-06-06",
"symbol": "BTC-USD",
"open": 61031.98,
"high": 61499.41,
"low": 59448.45,
"close": 60396.16,
"volume": 7518.42911733,
"source": "coinbase-exchange"
},
{
"timestamp": 1780617600,
"date": "2026-06-05",
"symbol": "BTC-USD",
"open": 63806.02,
"high": 63906.02,
"low": 59073.01,
"close": 61032.0,
"volume": 28732.71500543,
"source": "coinbase-exchange"
},
{
"timestamp": 1780531200,
"date": "2026-06-04",
"symbol": "BTC-USD",
"open": 64039.99,
"high": 64695.0,
"low": 61309.25,
"close": 63806.02,
"volume": 25533.586511,
"source": "coinbase-exchange"
}
]
}
Run commands
python ohlcv_service.py fetch --out data --days 365
python ohlcv_service.py serve --data data --api-key demo-key --port 8088
curl.exe -H "X-API-Key: demo-key" "http://127.0.0.1:8088/v1/ohlcv?symbol=BTC-USD&days=5"
Generated: 2026-06-06 18:31 UTC
BTC fallback: bc1qhqecf82j4m5wns9vuvdfdfn2cn0wr6tz523f3x2kzpgnsuj5l7zq8wffqg