{"uid":"cap_PqS9qkzan8DYZ-QNP52Z6","slug":"cn-data-chinese-stock-k-line-candlestick-history-53a7446f","name":"CN Data – Chinese Stock K-Line (Candlestick) History","description":"Chinese market and China-focused public data over the x402 protocol. No API key and no signup: call any endpoint, receive HTTP 402 with payment terms, pay the listed amount in USDC on Base and retry. Every response is JSON. Some Chinese-language sources are published only as web pages — these endpoints return them as clean, machine-readable JSON.","url":"https://cn-data-x402.cn-data-x402-worker.workers.dev/cn/kline?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{"adj":{"type":"string","description":"复权：qfq（前复权，默认）/ hfq（后复权）/ none（不复权）"},"days":{"type":"integer","description":"返回多少根 K 线 2-500，默认 60"},"period":{"type":"string","description":"周期：day（日线，默认）/ week（周线）/ month（月线）"},"symbol":{"type":"string","description":"代码：600519 / sh600519 / 000001.SZ / 00700.HK / AAPL（美股自动配交易所后缀）/ sh000300 指数"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"ok":true,"data":{"ma":{"ma5":1258.084,"ma10":null,"ma20":null,"ma60":null},"bars":[{"low":1255.42,"date":"2026-10-09","high":1282,"open":1255.42,"close":1263,"volume":35111,"volumeShares":3511100,"changePercent":0.5741},{"low":1261,"date":"2026-10-12","high":1284.44,"open":1262.95,"close":1277.43,"volume":9405,"volumeShares":940500,"changePercent":1.1425}],"code":"600519","name":"贵州茅台","range":{"low":1228.1,"high":1284.44,"changePercent":3.3519},"market":"A","period":"day","source":"历史行情来自腾讯证券公开接口（web.ifzq.gtimg.cn，前复权/后复权由 ?adj= 选择）。","symbol":"SH600519","lastDate":"2026-10-12","returned":6,"firstDate":"2026-09-28","requested":5,"adjustment":"qfq","volumeUnit":"lot (手，1 手 = 100 股)","latestQuote":{"name":"贵州茅台","open":1262.95,"price":1277.43,"previousClose":1263}},"endpoint":"/cn/kline"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_6iBF4c1Ti_Icc_LIq-IXt","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns OHLCV candlestick bars and moving averages for Chinese A-share, H-share, US-listed, and index symbols, with optional price adjustment (forward/backward split)","exampleAgentPrompt":"Pull the last 90 daily forward-adjusted (qfq) candlestick bars for 贵州茅台 (symbol 600519) from the CN Data kline endpoint, including moving averages.","exampleUseCases":[{"title":"Daily chart for A-share momentum strategy","prompt":"Get me the last 120 daily K-line bars for BYD (002594) with forward price adjustment so I can run a momentum backtest — I need open, high, low, close, and volume."},{"title":"Weekly trend check on CSI 300 index","prompt":"Fetch 52 weeks of weekly candlestick data for the CSI 300 index (sh000300) with no price adjustment, so I can see the year-long trend."},{"title":"Hong Kong H-share price history","prompt":"I need 60 daily OHLCV bars for Tencent (00700.HK) with backward adjustment (hfq) — can you grab that from the CN Data kline service?"}],"resultDescription":"A JSON object with: an array of OHLCV bar objects (date, open, high, low, close, volume in lots, volume in shares, change percent), a moving averages object (MA5/MA10/MA20/MA60), a range summary (overall high/low/change%), the latest real-time quote (price, open, previous close), stock name and code, market identifier, period type, adjustment method, and data source attribution in Chinese.","failureModes":["Missing or invalid symbol returns an error JSON with ok:false","Symbol not found on the upstream Tencent data source returns empty bars","Requesting more bars than available history returns fewer bars than requested (returned < requested)","Unsupported adj value or period string may result in default fallback or error","HTTP 402 returned if payment has not been completed — agent must pay USDC on Base and retry","Network timeout from upstream Tencent endpoint causes delayed or failed response"],"whenToPreferThis":"Choose this endpoint when you need structured OHLCV candlestick history for Chinese A-share, H-share, or index symbols without requiring an API key or subscription — payment is per-call in USDC via x402. Prefer it over generic global stock APIs when you specifically need Chinese market data with split-adjusted prices, Chinese-language metadata (stock names), and moving averages bundled in one call. It also handles Hong Kong and US-listed symbols with automatic exchange suffix resolution.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-16T12:42:49.409Z","isFirstParty":false,"canonicalSlug":"cn-data-chinese-stock-k-line-candlestick-history-53a7446f"}