<br />
<b>Deprecated</b>:  The each() function is deprecated. This message will be suppressed on further calls in <b>/home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php</b> on line <b>456</b><br />
{"openapi":"3.0.0","info":{"title":"Coincap OpenAPI","version":"3.0.0"},"servers":[{"url":"/v3","description":"Base path for all routes"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}}},"security":[{"bearerAuth":[]}],"paths":{"/price/bysymbol/{symbol}":{"get":{"summary":"Get USD prices by symbol(s) - supports up to 100 comma-separated symbols","description":"Get USD prices for one or more symbols (top market cap match for each).\nReturns an array of price strings in the same order as the requested symbols.\n","tags":["Price"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"path","name":"symbol","required":true,"description":"Single symbol (e.g., \"BTC\") or comma-separated symbols (e.g., \"BTC,ETH,ADA\"). Maximum 100 symbols.","schema":{"type":"string"}}],"responses":{"200":{"description":"Array of USD prices in the same order as requested symbols","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer","description":"Unix timestamp in milliseconds"},"data":{"type":"array","description":"Array of price strings (null for symbols not found/unavailable)","items":{"oneOf":[{"type":"string","description":"USD price as formatted string"},{"type":"null","description":"Symbol not found or price unavailable"}]}}}}}}},"400":{"description":"Bad request (invalid params or too many symbols)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"timestamp":{"type":"integer"}}},"examples":{"too_many_symbols":{"summary":"Too many symbols","value":{"error":"Maximum 100 symbols allowed","timestamp":1695651200000}},"missing_symbol":{"summary":"Missing symbol parameter","value":{"error":"symbol required","timestamp":1695651200000}}}}}}}}},"/price/byaddress":{"get":{"summary":"Get USD price by token address & network","tags":["Price"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"query","name":"tokenAddress","required":true,"schema":{"type":"string"}},{"in":"query","name":"network","required":true,"schema":{"type":"string","enum":["ethereum","base","arbitrum","optimism","polygon","xdai","fantom","bsc","avalanche","solana"]}}],"responses":{"200":{"description":"Price object","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"data":{"type":"object","properties":{"priceUsd":{"type":"string"}}}}}}}},"400":{"description":"Missing/invalid params"},"404":{"description":"Price not found"}}}},"/assets":{"get":{"summary":"Retrieve a list of assets","description":"Retrieve a list of assets with optional filters and pagination.","tags":["Assets"],"parameters":[{"in":"query","name":"search","schema":{"type":"string"},"description":"search by asset slug (bitcoin) or symbol (BTC)"},{"in":"query","name":"ids","schema":{"type":"string"},"description":"Comma-separated list of asset ids (e.g. bitcoin,ethereum)"},{"in":"query","name":"limit","schema":{"type":"integer"},"description":"Number of results to return (default is 100)"},{"in":"query","name":"offset","schema":{"type":"integer"},"description":"Number of results to skip (default is 0)"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"A list of assets","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"string","nullable":true},"symbol":{"type":"string"},"name":{"type":"string"},"supply":{"type":"string"},"maxSupply":{"type":"string"},"marketCapUsd":{"type":"string"},"volumeUsd24Hr":{"type":"string"},"priceUsd":{"type":"string"},"changePercent24Hr":{"type":"string","nullable":true},"vwap24Hr":{"type":"string","nullable":true},"explorer":{"type":"string"},"tokens":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}}},"500":{"description":"Internal server error"}}}},"/assets/{slug}":{"get":{"summary":"Retrieve a single asset","description":"Retrieve details for a specific asset by slug (id)","tags":["Assets"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"The slug of the asset to retrieve"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"A single asset","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"data":{"type":"object","properties":{"id":{"type":"string"},"rank":{"type":"string","nullable":true},"symbol":{"type":"string"},"name":{"type":"string"},"supply":{"type":"string"},"maxSupply":{"type":"string"},"marketCapUsd":{"type":"string"},"volumeUsd24Hr":{"type":"string"},"priceUsd":{"type":"string"},"changePercent24Hr":{"type":"string","nullable":true},"vwap24Hr":{"type":"string","nullable":true},"explorer":{"type":"string"},"tokens":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}}}},"404":{"description":"Asset not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"timestamp":{"type":"integer"}}}}}},"500":{"description":"Internal server error"}}}},"/assets/{slug}/markets":{"get":{"summary":"Retrieve markets for a specific asset","description":"Retrieve market details for a specific asset by slug (id)","tags":["Assets"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"The slug of the asset"},{"in":"query","name":"limit","schema":{"type":"integer"},"description":"Number of results to return (default is 100)"},{"in":"query","name":"offset","schema":{"type":"integer"},"description":"Number of results to skip (default is 0)"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Market details for the asset","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"exchangeId":{"type":"string"},"baseId":{"type":"string"},"quoteId":{"type":"string"},"baseSymbol":{"type":"string"},"quoteSymbol":{"type":"string"},"priceUsd":{"type":"string"},"volumeUsd24Hr":{"type":"string"},"volumePercent":{"type":"string"}}}}}}}}},"404":{"description":"Asset not found"},"500":{"description":"Internal server error"}}}},"/assets/{slug}/history":{"get":{"summary":"Retrieve historical data for a specific asset","description":"Retrieve historical data for a specific asset by slug (id)","tags":["Assets"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"The slug of the asset"},{"in":"query","name":"interval","required":true,"schema":{"type":"string"},"description":"interval choices m1 m5 m15 m30 h1 h2 h6 h12 d1"},{"in":"query","name":"start","schema":{"type":"integer"},"description":"UNIX time in milliseconds. Omitting will return the most recent asset history."},{"in":"query","name":"end","schema":{"type":"integer"},"description":"The end timestamp for the historical data."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Historical data for the asset","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"priceUsd":{"type":"string"},"time":{"type":"integer"},"date":{"type":"string","format":"date-time"}}}}}}}}},"404":{"description":"Asset not found"},"500":{"description":"Internal server error"}}}},"/assets/totals/total-marketcap-history":{"get":{"summary":"Retrieve total market cap history","description":"Retrieve the total market cap history for all assets.","tags":["Assets"],"responses":{"200":{"description":"Successfully retrieved market cap history"},"404":{"description":"Market cap history not found"},"500":{"description":"Internal server error"}}}},"/assets/{slug}/marketcap-history":{"get":{"summary":"Get market cap history for an asset","description":"Returns historical market cap (price * supply) data for the specified asset from the 2-hour interval table","tags":["Assets"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g., bitcoin, ethereum)"},{"in":"query","name":"start","schema":{"type":"integer"},"description":"Start timestamp in milliseconds"},{"in":"query","name":"end","schema":{"type":"integer"},"description":"End timestamp in milliseconds"}],"responses":{"200":{"description":"Market cap history data","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"marketCapUsd":{"type":"string"},"time":{"type":"integer"},"date":{"type":"string"}}}}}}}}},"400":{"description":"Invalid parameters"},"404":{"description":"Market cap history not found"},"500":{"description":"Internal server error"}}}},"/exchanges":{"get":{"summary":"Retrieve a list of exchanges","description":"Retrieve a list of exchanges with optional pagination","tags":["Exchanges"],"parameters":[{"in":"query","name":"limit","schema":{"type":"integer"},"description":"Number of results to return (default is 100)"},{"in":"query","name":"offset","schema":{"type":"integer"},"description":"Number of results to skip (default is 0)"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"A list of exchanges","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"exchangeId":{"type":"string"},"name":{"type":"string"},"rank":{"type":"string"},"percentTotalVolume":{"type":"string","nullable":true},"volumeUsd":{"type":"string","nullable":true},"tradingPairs":{"type":"string"},"socket":{"type":"boolean","nullable":true},"exchangeUrl":{"type":"string"},"updated":{"type":"integer"}}}}}}}}},"400":{"description":"Invalid query parameters"},"500":{"description":"Internal server error"}}}},"/exchanges/{exchange}":{"get":{"summary":"Retrieve details for a specific exchange","description":"Retrieve details for a specific exchange by its ID","tags":["Exchanges"],"parameters":[{"in":"path","name":"exchange","required":true,"schema":{"type":"string"},"description":"The ID of the exchange to retrieve"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Details of the exchange","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"data":{"type":"object","properties":{"exchangeId":{"type":"string"},"name":{"type":"string"},"rank":{"type":"string"},"percentTotalVolume":{"type":"string"},"volumeUsd":{"type":"string"},"tradingPairs":{"type":"string"},"socket":{"type":"boolean"},"exchangeUrl":{"type":"string"},"updated":{"type":"integer"}}}}}}}},"404":{"description":"Exchange not found"},"500":{"description":"Internal server error"}}}},"/markets":{"get":{"summary":"Retrieve a list of markets","description":"Retrieve a list of markets with optional filters and pagination","tags":["Markets"],"parameters":[{"in":"query","name":"exchangeId","schema":{"type":"string"},"description":"Filter by exchange ID"},{"in":"query","name":"baseSymbol","schema":{"type":"string"},"description":"Filter by base asset symbol"},{"in":"query","name":"baseId","schema":{"type":"string"},"description":"Filter by base asset ID"},{"in":"query","name":"quoteSymbol","schema":{"type":"string"},"description":"Filter by quote asset symbol"},{"in":"query","name":"quoteId","schema":{"type":"string"},"description":"Filter by quote asset ID"},{"in":"query","name":"assetSymbol","schema":{"type":"string"},"description":"Filter by asset symbol (matches base or quote)"},{"in":"query","name":"assetId","schema":{"type":"string"},"description":"Filter by asset ID (matches base or quote)"},{"in":"query","name":"limit","schema":{"type":"integer"},"description":"Number of results to return (default is 100)"},{"in":"query","name":"offset","schema":{"type":"integer"},"description":"Number of results to skip (default is 0)"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"A list of markets","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"data":{"type":"array","description":"List of markets","items":{"type":"object","properties":{"exchangeId":{"type":"string"},"rank":{"type":"string"},"baseSymbol":{"type":"string"},"baseId":{"type":"string"},"quoteSymbol":{"type":"string"},"quoteId":{"type":"string"},"priceQuote":{"type":"string"},"priceUsd":{"type":"string"},"volumeUsd24Hr":{"type":"string"},"percentExchangeVolume":{"type":"string"},"tradesCount24Hr":{"type":"number"},"updated":{"type":"integer"}}}}}}}}},"400":{"description":"Invalid query parameters"},"500":{"description":"Internal server error"}}}},"/rates":{"get":{"summary":"Retrieve conversion rates","description":"Retrieve a list of all conversion rates or filter by comma-separated slugs","tags":["Rates"],"security":[{"bearerAuth":[]}],"parameters":[{"in":"query","name":"ids","required":false,"description":"Comma-separated list of slugs to filter by (e.g. bitcoin,ethereum)","schema":{"type":"string"}}],"responses":{"200":{"description":"Details of the conversion rate(s)","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"symbol":{"type":"string"},"currencySymbol":{"type":"string"},"type":{"type":"string"},"rateUsd":{"type":"string"}}}}}}}}},"500":{"description":"Internal server error"}}}},"/rates/{slug}":{"get":{"summary":"Retrieve a conversion rate by slug","description":"Retrieve details for a specific conversion rate by its slug","tags":["Rates"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"The slug of the conversion rate to retrieve"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Details of the conversion rate","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"data":{"type":"object","properties":{"id":{"type":"string"},"symbol":{"type":"string"},"currencySymbol":{"type":"string"},"type":{"type":"string"},"rateUsd":{"type":"string"}}}}}}}},"404":{"description":"Conversion rate not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"500":{"description":"Internal server error"}}}},"/ta/{slug}/sma":{"get":{"summary":"Full SMA series","tags":["Technical Analysis"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g. bitcoin)"},{"in":"query","name":"start","schema":{"type":"integer"},"description":"Start timestamp in ms"},{"in":"query","name":"end","schema":{"type":"integer"},"description":"End timestamp in ms"},{"in":"query","name":"window","schema":{"type":"integer"},"description":"SMA window size (default: 5)"},{"in":"query","name":"fetchInterval","schema":{"type":"string","enum":["m1","m5","m15","m30","h1","h2","h6","h12","d1"]},"description":"Timeframe for price bars"},{"in":"query","name":"includeOriginal","schema":{"type":"string","enum":[true,false]},"description":"Include original price data"}],"responses":{"200":{"description":"Full SMA series"}}}},"/ta/{slug}/sma/latest":{"get":{"summary":"Latest SMA datapoint","tags":["Technical Analysis"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g. bitcoin)"},{"in":"query","name":"start","schema":{"type":"integer"},"description":"Start timestamp in ms"},{"in":"query","name":"end","schema":{"type":"integer"},"description":"End timestamp in ms"},{"in":"query","name":"window","schema":{"type":"integer"},"description":"SMA window size (default: 5)"},{"in":"query","name":"fetchInterval","schema":{"type":"string","enum":["m1","m5","m15","m30","h1","h2","h6","h12","d1"]},"description":"Timeframe for price bars"},{"in":"query","name":"includeOriginal","schema":{"type":"string","enum":[true,false]},"description":"Include original price data"}],"responses":{"200":{"description":"Latest SMA datapoint"}}}},"/ta/{slug}/ema":{"get":{"summary":"Full EMA series","tags":["Technical Analysis"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g. bitcoin)"},{"in":"query","name":"start","schema":{"type":"integer"},"description":"Start timestamp in ms"},{"in":"query","name":"end","schema":{"type":"integer"},"description":"End timestamp in ms"},{"in":"query","name":"period","schema":{"type":"integer"},"description":"EMA period (default: 5)"},{"in":"query","name":"fetchInterval","schema":{"type":"string","enum":["m1","m5","m15","m30","h1","h2","h6","h12","d1"]},"description":"Timeframe for price bars"},{"in":"query","name":"includeOriginal","schema":{"type":"string","enum":[true,false]},"description":"Include original price data"}],"responses":{"200":{"description":"Full EMA series"}}}},"/ta/{slug}/ema/latest":{"get":{"summary":"Latest EMA datapoint","tags":["Technical Analysis"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g. bitcoin)"},{"in":"query","name":"start","schema":{"type":"integer"},"description":"Start timestamp in ms"},{"in":"query","name":"end","schema":{"type":"integer"},"description":"End timestamp in ms"},{"in":"query","name":"period","schema":{"type":"integer"},"description":"EMA period (default: 5)"},{"in":"query","name":"fetchInterval","schema":{"type":"string","enum":["m1","m5","m15","m30","h1","h2","h6","h12","d1"]},"description":"Timeframe for price bars"},{"in":"query","name":"includeOriginal","schema":{"type":"string","enum":[true,false]},"description":"Include original price data"}],"responses":{"200":{"description":"Latest EMA datapoint"}}}},"/ta/{slug}/macd":{"get":{"summary":"Full MACD series","tags":["Technical Analysis"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g. bitcoin)"},{"in":"query","name":"start","schema":{"type":"integer"},"description":"Start timestamp in ms"},{"in":"query","name":"end","schema":{"type":"integer"},"description":"End timestamp in ms"},{"in":"query","name":"short","schema":{"type":"integer"},"description":"Short EMA period (default: 12)"},{"in":"query","name":"long","schema":{"type":"integer"},"description":"Long EMA period (default: 26)"},{"in":"query","name":"signal","schema":{"type":"integer"},"description":"Signal line EMA period (default: 9)"},{"in":"query","name":"fetchInterval","schema":{"type":"string","enum":["m1","m5","m15","m30","h1","h2","h6","h12","d1"]},"description":"Timeframe for price bars"},{"in":"query","name":"includeOriginal","schema":{"type":"string","enum":[true,false]},"description":"Include original price data"}],"responses":{"200":{"description":"Full MACD series"}}}},"/ta/{slug}/macd/latest":{"get":{"summary":"Latest MACD datapoint","tags":["Technical Analysis"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g. bitcoin)"},{"in":"query","name":"start","schema":{"type":"integer"},"description":"Start timestamp in ms"},{"in":"query","name":"end","schema":{"type":"integer"},"description":"End timestamp in ms"},{"in":"query","name":"short","schema":{"type":"integer"},"description":"Short EMA period (default: 12)"},{"in":"query","name":"long","schema":{"type":"integer"},"description":"Long EMA period (default: 26)"},{"in":"query","name":"signal","schema":{"type":"integer"},"description":"Signal line EMA period (default: 9)"},{"in":"query","name":"fetchInterval","schema":{"type":"string","enum":["m1","m5","m15","m30","h1","h2","h6","h12","d1"]},"description":"Timeframe for price bars"},{"in":"query","name":"includeOriginal","schema":{"type":"string","enum":[true,false]},"description":"Include original price data"}],"responses":{"200":{"description":"Latest MACD datapoint"}}}},"/ta/{slug}/vwap/latest":{"get":{"summary":"24h VWAP (latest)","tags":["Technical Analysis"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g. bitcoin)"}],"responses":{"200":{"description":"24h VWAP value"}}}},"/ta/{slug}/candlesticks":{"get":{"summary":"Candlestick data","tags":["Technical Analysis"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g. bitcoin)"},{"in":"query","name":"interval","schema":{"type":"string","enum":["m1","m5","m15","m30","h1","h2","h6","h12","d1"]},"description":"Timeframe interval"},{"in":"query","name":"start","schema":{"type":"integer"},"description":"Start timestamp in ms"},{"in":"query","name":"end","schema":{"type":"integer"},"description":"End timestamp in ms"}],"responses":{"200":{"description":"Candlestick data"}}}},"/ta/{slug}/rsi":{"get":{"summary":"Full RSI series","tags":["Technical Analysis"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g. bitcoin)"},{"in":"query","name":"start","schema":{"type":"integer"},"description":"Start timestamp in ms"},{"in":"query","name":"end","schema":{"type":"integer"},"description":"End timestamp in ms"},{"in":"query","name":"period","schema":{"type":"integer"},"description":"RSI calculation period (default: 5)"},{"in":"query","name":"smoothing","schema":{"type":"string","enum":["EMA","SMA","WMA"]},"description":"Smoothing method (default: EMA)"},{"in":"query","name":"fetchInterval","schema":{"type":"string","enum":["m1","m5","m15","m30","h1","h2","h6","h12","d1"]},"description":"Timeframe for price bars"},{"in":"query","name":"includeOriginal","schema":{"type":"string","enum":[true,false]},"description":"Include original price data"}],"responses":{"200":{"description":"Full RSI series"}}}},"/ta/{slug}/rsi/latest":{"get":{"summary":"Latest RSI datapoint","tags":["Technical Analysis"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g. bitcoin)"},{"in":"query","name":"start","schema":{"type":"integer"},"description":"Start timestamp in ms"},{"in":"query","name":"end","schema":{"type":"integer"},"description":"End timestamp in ms"},{"in":"query","name":"period","schema":{"type":"integer"},"description":"RSI calculation period (default: 5)"},{"in":"query","name":"smoothing","schema":{"type":"string","enum":["EMA","SMA","WMA"]},"description":"Smoothing method (default: EMA)"},{"in":"query","name":"fetchInterval","schema":{"type":"string","enum":["m1","m5","m15","m30","h1","h2","h6","h12","d1"]},"description":"Timeframe for price bars"},{"in":"query","name":"includeOriginal","schema":{"type":"string","enum":[true,false]},"description":"Include original price data"}],"responses":{"200":{"description":"Latest RSI datapoint"}}}},"/ta/{slug}/allLatest":{"get":{"summary":"Latest values for all indicators","tags":["Technical Analysis"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"}},{"in":"query","name":"fetchInterval","schema":{"type":"string"},"description":"Timeframe (e.g. d1, h1)"}],"responses":{"200":{"description":"Latest indicators combined"}}}},"/account":{"get":{"summary":"Retrieve account information for the current API key","description":"Returns wallet address, tier information, staked balances, available API keys, reward rates, and more.","tags":["Account"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Account info successfully retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"walletAddress":{"type":"string","example":"0xabc123..."},"tier":{"type":"integer","example":2},"stripeTier":{"type":"integer","example":0},"stakedTier":{"type":"integer","example":2},"stakedBalance":{"type":"string","example":"15.213"},"stakedArbitrumBalance":{"type":"string","example":"7.321"},"stakedBaseBalance":{"type":"string","example":"7.892"},"arbBalance":{"type":"string","example":"3.1204"},"baseBalance":{"type":"string","example":"5.5000"},"apiKeys":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","example":"xxxxxxxx"},"label":{"type":"string","example":"My Key"},"created_at":{"type":"string","example":"2024-06-01T15:00:00.000Z"},"status":{"type":"string","example":"enabled"}}}},"points":{"type":"number","example":3201},"pointsPerDay":{"type":"number","example":12.45},"morRewardsPerDay":{"type":"number","example":0.01321},"email":{"type":"string","example":"user@example.com"},"emailVerified":{"type":"boolean","example":true}}},"timestamp":{"type":"integer","example":1726084787747}}}}}},"403":{"description":"Invalid or unauthorized API key","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Forbidden: API key is disabled"}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Internal server error"}}}}}}}}},"/agentFriendly/history/{slug}":{"get":{"summary":"Get price history optimized for AI analysis","description":"Returns ~200 intelligently sampled price data points in CSV format for any custom time range. Automatically calculates optimal intervals and filters bad data for reliable analysis.","tags":["AgentFriendly"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g., bitcoin, ethereum)"},{"in":"query","name":"start","required":false,"schema":{"type":"integer"},"description":"Start timestamp in milliseconds (defaults to 30 days ago)"},{"in":"query","name":"end","required":false,"schema":{"type":"integer"},"description":"End timestamp in milliseconds (defaults to 1 day ago)"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Historical price data with approximately 200 data points","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"data":{"type":"object","properties":{"slug":{"type":"string"},"startTime":{"type":"integer"},"endTime":{"type":"integer"},"intervalMinutes":{"type":"integer"},"dataPoints":{"type":"integer"},"history":{"type":"string","description":"CSV format data \"timestamp,price\" (one per line)"}}}}}}}},"400":{"description":"Bad request - missing or invalid parameters"},"404":{"description":"Asset not found or no history data available"},"500":{"description":"Internal server error"}}}},"/agentFriendly/full_assets_by_slug":{"get":{"summary":"Get comprehensive asset data with all available fields","description":"Returns detailed asset information including price, market data, technical analysis, token addresses, news, and historical data. Optimized for AI agents with selective field inclusion.","tags":["AgentFriendly"],"parameters":[{"in":"query","name":"slugs","required":true,"schema":{"type":"string"},"description":"Comma-separated list of asset slugs (max 10)"},{"in":"query","name":"includeWebsite","schema":{"type":"boolean","default":false},"description":"Include website URL"},{"in":"query","name":"includeExplorer","schema":{"type":"boolean","default":false},"description":"Include explorer URL"},{"in":"query","name":"includeTaData","schema":{"type":"boolean","default":false},"description":"Include technical analysis data"},{"in":"query","name":"includeSupply","schema":{"type":"boolean","default":false},"description":"Include supply information"},{"in":"query","name":"includeTokens","schema":{"type":"boolean","default":false},"description":"Include token addresses"},{"in":"query","name":"includeNews","schema":{"type":"boolean","default":false},"description":"Include news headlines"},{"in":"query","name":"includeHistory","schema":{"type":"boolean","default":false},"description":"Include historical price data (5min/24h, daily/30d, weekly/365d)"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Extended asset data","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"price":{"type":"string"},"volume":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"marketCap":{"type":"string"},"changePercent24Hr":{"type":"string","nullable":true},"websiteUrl":{"type":"string"},"explorerUrl":{"type":"string"},"taData":{"type":"object","properties":{"vwap24Hr":{"type":"string"},"rsi":{"type":"number"},"sma":{"type":"number"},"ema":{"type":"number"},"macd":{"type":"number"}}},"supply":{"type":"string"},"maxSupply":{"type":"string"},"tokens":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string"},"chainId":{"type":"string"}}}},"news":{"type":"array","items":{"type":"string"}},"history":{"type":"object","properties":{"last24Hours":{"type":"string","description":"CSV format data \"timestamp,price\" (5-minute intervals for past day)"},"last30Days":{"type":"string","description":"CSV format data \"timestamp,price\" (daily intervals for past 30 days)"},"last365Days":{"type":"string","description":"CSV format data \"timestamp,price\" (weekly intervals for past year)"}}}}}}}}}}},"400":{"description":"Bad request - invalid parameters"},"500":{"description":"Internal server error"}}}},"/agentFriendly/assets_search":{"get":{"summary":"Search and discover crypto assets","description":"AI-optimized asset search with fuzzy matching on names, symbols, slugs, and token addresses. Returns up to 100 results with pagination and sorting options.","tags":["AgentFriendly"],"parameters":[{"in":"query","name":"search","schema":{"type":"string"},"description":"Search by asset symbol, name, slug, or token address (0x...)"},{"in":"query","name":"limit","schema":{"type":"integer","maximum":100,"default":100},"description":"Number of results to return (max 100)"},{"in":"query","name":"offset","schema":{"type":"integer","default":0},"description":"Number of results to skip for pagination"},{"in":"query","name":"sortBy","schema":{"type":"string","enum":["price","volume","marketCap","changePercent24Hr"],"default":"marketCap"},"description":"Field to sort by"},{"in":"query","name":"sortOrder","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Sort order"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Paginated list of assets","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"data":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"price":{"type":"string"},"volume":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"},"marketCap":{"type":"string"},"changePercent24Hr":{"type":"string","nullable":true}}}},"pagination":{"type":"object","properties":{"total":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}}}}}}}},"500":{"description":"Internal server error"}}}},"/agentFriendly/news_top":{"get":{"summary":"Get latest crypto news for market analysis","description":"Returns the top 10 most recent crypto news headlines from major sources. Perfect for sentiment analysis and market context in AI conversations.","tags":["AgentFriendly"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Top crypto news headlines","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"data":{"type":"array","items":{"type":"string"}}}}}}},"500":{"description":"Internal server error"}}}},"/agentFriendly/ta/{slug}/sma":{"get":{"summary":"Get Simple Moving Average for technical analysis","description":"Returns SMA indicator data optimized for AI trading analysis. Automatically samples to 200 data points for efficient processing while maintaining trend accuracy.","tags":["AgentFriendly"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g., bitcoin)"},{"in":"query","name":"window","schema":{"type":"integer","default":5},"description":"SMA window size"},{"in":"query","name":"fetchInterval","schema":{"type":"string","enum":["m1","m5","m15","m30","h1","h2","h6","h12","d1"],"default":"d1"},"description":"Timeframe for price bars"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"SMA data culled to 200 points","content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"integer"},"dataPoints":{"type":"integer"},"sma":{"type":"array","items":{"type":"object","properties":{"time":{"type":"integer"},"value":{"type":"number"}}}}}}}}}}}},"/agentFriendly/ta/{slug}/ema":{"get":{"summary":"Get Exponential Moving Average for trend analysis","description":"Returns EMA indicator data optimized for AI trading signals. More responsive than SMA, sampled to 200 points for efficient trend detection.","tags":["AgentFriendly"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g., bitcoin)"},{"in":"query","name":"period","schema":{"type":"integer","default":5},"description":"EMA period"},{"in":"query","name":"fetchInterval","schema":{"type":"string","enum":["m1","m5","m15","m30","h1","h2","h6","h12","d1"],"default":"d1"},"description":"Timeframe for price bars"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"EMA data culled to 200 points"}}}},"/agentFriendly/ta/{slug}/rsi":{"get":{"summary":"Get Relative Strength Index for momentum analysis","description":"Returns RSI oscillator data (0-100 scale) for identifying overbought/oversold conditions. Optimized for AI with 200 data points showing momentum trends.","tags":["AgentFriendly"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g., bitcoin)"},{"in":"query","name":"period","schema":{"type":"integer","default":14},"description":"RSI period"},{"in":"query","name":"fetchInterval","schema":{"type":"string","enum":["m1","m5","m15","m30","h1","h2","h6","h12","d1"],"default":"d1"},"description":"Timeframe for price bars"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"RSI data culled to 200 points"}}}},"/agentFriendly/ta/{slug}/macd":{"get":{"summary":"Get MACD for trend and momentum analysis","description":"Returns MACD line, signal line, and histogram data for identifying trend changes and momentum shifts. Sampled to 200 points for AI trading analysis.","tags":["AgentFriendly"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g., bitcoin)"},{"in":"query","name":"short","schema":{"type":"integer","default":12},"description":"Short EMA period"},{"in":"query","name":"long","schema":{"type":"integer","default":26},"description":"Long EMA period"},{"in":"query","name":"signal","schema":{"type":"integer","default":9},"description":"Signal line EMA period"},{"in":"query","name":"fetchInterval","schema":{"type":"string","enum":["m1","m5","m15","m30","h1","h2","h6","h12","d1"],"default":"d1"},"description":"Timeframe for price bars"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"MACD data culled to 200 points"}}}},"/agentFriendly/asset_mcap_history/{slug}":{"get":{"summary":"Get asset market cap history (direct from mcap_history table) optimized for AI analysis","description":"Returns ~200 intelligently sampled market cap data points with high/low tracking within the requested time range, sourced directly from pre-computed market cap values","tags":["AgentFriendly"],"parameters":[{"in":"path","name":"slug","required":true,"schema":{"type":"string"},"description":"Asset slug (e.g., bitcoin, ethereum)"},{"in":"query","name":"start","required":false,"schema":{"type":"integer"},"description":"Start timestamp in milliseconds (defaults to all time)"},{"in":"query","name":"end","required":false,"schema":{"type":"integer"},"description":"End timestamp in milliseconds (defaults to now)"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Asset market cap history with approximately 200 data points"},"400":{"description":"Bad request - invalid parameters"},"404":{"description":"Asset not found or no history data available"},"500":{"description":"Internal server error"}}}},"/agentFriendly/total_market_cap_history":{"get":{"summary":"Get total market cap history optimized for AI analysis","description":"Returns ~200 intelligently sampled total market cap data points with high/low tracking within the requested time range","tags":["AgentFriendly"],"parameters":[{"in":"query","name":"start","required":false,"schema":{"type":"integer"},"description":"Start timestamp in milliseconds (defaults to all time)"},{"in":"query","name":"end","required":false,"schema":{"type":"integer"},"description":"End timestamp in milliseconds (defaults to now)"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Total market cap history with approximately 200 data points"},"400":{"description":"Bad request - invalid parameters"},"500":{"description":"Internal server error"}}}},"/prepaid/create":{"post":{"summary":"Create a free prepaid API key","description":"Creates a new prepaid API key with 50 free starter credits. No payment or signup required.\nWhen credits run out, the API will return 402 with instructions to refill via /prepaid/refill.\n","tags":["Prepaid"],"security":[],"responses":{"200":{"description":"API key created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string","description":"Your new 64-char hex API key"},"credits":{"type":"integer","description":"Total credits available (50 free)"},"usage":{"type":"integer","description":"Credits used (0 for new key)"},"remaining":{"type":"integer","description":"Credits remaining"},"callsPerMinute":{"type":"integer","description":"Rate limit (600)"}}}}}}}}},"/prepaid/refill":{"post":{"summary":"Refill a prepaid API key (x402 payment)","description":"Adds credits to an existing prepaid API key via x402 USDC payment on Base.\n\n**Flow:**\n1. POST with just `apiKey` in body (no PAYMENT header) → returns 402 with payment instructions\n2. Sign an EIP-3009 `transferWithAuthorization` using EIP-712 typed data with domain `{name: \"USD Coin\", version: \"2\", chainId: 8453, verifyingContract: \"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913\"}`\n3. Base64-encode the JSON payload `{from, to, value, validAfter, validBefore, nonce, v, r, s}` and retry with `PAYMENT` header\n\n500 credits per $1 USDC. Minimum payment: $0.01 USDC.\n","tags":["Prepaid"],"security":[],"parameters":[{"in":"header","name":"PAYMENT","schema":{"type":"string"},"required":false,"description":"Base64-encoded JSON with EIP-3009 transferWithAuthorization signature.\nShape: { from: address, to: address, value: string (USDC smallest units, 6 decimals), validAfter: number, validBefore: number, nonce: bytes32, v: number, r: bytes32, s: bytes32 }\n"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["apiKey"],"properties":{"apiKey":{"type":"string","description":"The prepaid API key to refill"}}}}}},"responses":{"200":{"description":"Credits added successfully","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"type":"string"},"creditsAdded":{"type":"integer"},"totalCredits":{"type":"integer"},"usage":{"type":"integer"},"remaining":{"type":"integer"},"txHash":{"type":"string"}}}}}},"402":{"description":"Payment required. Response includes full x402 payment instructions.\n","content":{"application/json":{"schema":{"type":"object","properties":{"x402":{"type":"object","properties":{"version":{"type":"integer","example":1},"payTo":{"type":"string","description":"USDC recipient address — use as the `to` field when signing transferWithAuthorization (the server wallet only submits the tx and pays gas)"},"token":{"type":"string","description":"USDC contract address on Base"},"network":{"type":"string","example":"base"},"chainId":{"type":"integer","example":8453},"amountRequired":{"type":"string","description":"Amount in smallest USDC units (6 decimals)"},"amountRequiredFormatted":{"type":"string","example":"$1 USDC"},"scheme":{"type":"string","example":"eip-3009"},"eip712Domain":{"type":"object","description":"EIP-712 domain for signing transferWithAuthorization","properties":{"name":{"type":"string","example":"USD Coin"},"version":{"type":"string","example":"2"},"chainId":{"type":"integer","example":8453},"verifyingContract":{"type":"string","example":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"}}},"payloadFormat":{"type":"string","description":"Expected flat JSON shape for the PAYMENT header (base64-encoded)","example":"{ from, to, value, validAfter, validBefore, nonce, v, r, s }"},"instructions":{"type":"object","properties":{"summary":{"type":"string"},"steps":{"type":"array","items":{"type":"string"}}}}}}}}}}},"404":{"description":"Prepaid key not found"}}}},"/prepaid/info":{"get":{"summary":"Check prepaid key balance","description":"Returns credit balance, usage, and remaining credits for a prepaid API key. No payment or authentication required.","tags":["Prepaid"],"security":[],"parameters":[{"in":"query","name":"apiKey","required":true,"schema":{"type":"string"},"description":"The prepaid API key to check"}],"responses":{"200":{"description":"Key info returned","content":{"application/json":{"schema":{"type":"object","properties":{"credits":{"type":"integer"},"usage":{"type":"integer"},"remaining":{"type":"integer"},"callCount":{"type":"integer"},"callsPerMinute":{"type":"integer"},"enabled":{"type":"boolean"},"createdAt":{"type":"string"},"refillEndpoint":{"type":"string"},"creditsPerDollar":{"type":"integer"}}}}}},"404":{"description":"Prepaid key not found"}}}}},"tags":[{"name":"Price","description":"Minimal endpoints to fetch a USD price by address+network or by symbol."},{"name":"Assets","description":"The asset price is a volume-weighted average calculated by collecting ticker data from exchanges. Each exchange contributes to this price in relation to their volume. All values are translated into USD and can be converted through the /rates endpoint."},{"name":"Exchanges","description":"The /exchanges endpoint offers an understanding into where cryptocurrency is being exchanged and provides high-level information on those exchanges. CoinCap strives to provide transparency in the recency of our exchange data. For that purpose, you will find an \"updated\" key for each exchange. For more details into coin pairs and volume, see the /markets endpoint."},{"name":"Markets","description":"Take a closer look into exchanges with the /markets endpoint. Similar to the /exchanges endpoint, we strive to offer transparency into how real-time our data is with a key identifying when the market was last updated. For a historical view on how a market has performed, see the /candles endpoint."},{"name":"Rates","description":"All prices on the CoinCap API are standardized in USD (United States Dollar). To make translating to other values easy, CoinCap offers a Rates endpoint with fiat and top cryptocurrency translated rates. Fiat rates are available through OpenExchangeRates.org."},{"name":"Technical Analysis","description":"TA related endpoints for retrieving technical indicators and derived candlestick data."},{"name":"Account","description":"Returns wallet address, tier information, staked balances, available API keys, reward rates, and more. Staked balances are in terms of Morpheos Tokens (MOR) on either base or arbitrum chains."},{"name":"AgentFriendly (Beta)","description":"Experimental agent optimized endpoints for use by our chatbot and others.\n- Limits data points per response for optimal processing\n- Simplified JSON structures with clear field names\n\n** These endpoints are under development and may change without notice. Use at your own risk. **\n"},{"name":"Prepaid","description":"Accountless prepaid API keys via x402 USDC payments on Base. No signup required — pay with USDC to create or refill a key."}]}