{"uid":"cap_-F0raCbTYC6jxorKMwNw2","slug":"cn-data-china-margin-trading-short-selling-data-c0faa917","name":"CN Data – China Margin Trading & Short Selling Data","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/margin?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":{"date":{"type":"string","description":"交易日 YYYY-MM-DD，默认最近一个交易日"},"sort":{"type":"string","description":"排序：net（融资净买入，默认）/ balance（融资余额）/ buy（融资买入额）/ net5d（5 日净买入）/ ratio（占流通市值比）/ short（融券余额）"},"limit":{"type":"integer","description":"返回条数 1-300，默认 50"},"market":{"type":"string","description":"市场：sh（沪市）/ sz（深市），不传是两市合并"},"symbol":{"type":"string","description":"6 位股票代码，传了就是该股的历史（按日期倒序），如 600519"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"ok":true,"data":{"date":"2026-10-09","sort":"net","items":[{"code":"600519","date":"2026-10-09","name":"贵州茅台","board":"上交所主板","symbol":"600519.SH","closePrice":1263,"changePercent":0.5741,"marginBuyYuan":250134331,"marketCapYuan":1578853062063,"marginRepayYuan":393467744,"marginNetBuyYuan":-143333413,"shortBalanceYuan":258217824,"totalBalanceYuan":17344870437,"marginBalanceYuan":17086652613,"shortVolumeShares":204448,"marginNetBuy5dYuan":-139569268,"shortNetSellShares":-1000,"marginNetBuy10dYuan":26916683,"shortSellVolumeShares":1800,"marginBalanceChange5dPercent":2.1019,"marginBalanceChange10dPercent":-0.3141,"marginBalanceToMarketCapPercent":1.0822193}],"market":null,"source":"融资融券数据来自东方财富数据中心公开接口（RPTA_WEB_RZRQ_GGMX）。","symbol":"600519","returned":1,"totalMatching":3994,"returnedTotals":{"marginNetBuyYuan":-143333413,"marginBalanceYuan":17086652613}},"endpoint":"/cn/margin"}},"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_LhayO_jE7eE0kyLPWlCqu","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 Chinese A-share margin trading (融资融券) data including margin balances, net buy amounts, short positions, and rankings, for a given trading date or historical series for a specific stock.","exampleAgentPrompt":"Pull today's margin trading data for Chinese A-shares, sorted by 5-day net margin buying (net5d), showing the top 30 stocks across both Shanghai and Shenzhen markets.","exampleUseCases":[{"title":"Daily margin flow leaderboard","prompt":"Give me today's top 50 A-share stocks ranked by margin net buy amount — I want to see which ones are seeing the most margin money flow in right now across both markets."},{"title":"Single-stock margin history","prompt":"Show me the historical margin trading data for Kweichow Moutai (stock code 600519) — I want to track how its margin balance and short position have changed over recent trading days."},{"title":"Shenzhen market margin ratio screen","prompt":"Fetch margin trading data for the Shenzhen market (sz), sorted by margin-to-market-cap ratio (ratio), and return the top 100 stocks — I want to find which Shenzhen stocks are most heavily leveraged relative to their float."}],"resultDescription":"A JSON object with ok:true, a date field, sort method used, market filter, total matching records count, and an items array where each element contains: stock code, name, board, symbol, close price, percent change, margin buy amount, margin repay amount, margin net buy, 5-day and 10-day net buy, short balance, short volume, margin balance, margin balance 5-day and 10-day percent change, and margin-to-market-cap ratio. Also includes aggregate totals for margin net buy and balance across returned items, and a source attribution string.","failureModes":["HTTP 402 returned before payment — must pay $0.02 USDC on Base and retry","Invalid date (non-trading day or future date) may return empty items array","Invalid symbol (non-existent stock code) returns empty or single-item result","Invalid sort value or market value may result in default fallback or error","limit out of range (outside 1-300) may cause validation error","Network timeout from upstream Eastmoney data source"],"whenToPreferThis":"Use this endpoint when you need structured, machine-readable Chinese A-share margin trading (融资融券) data that is otherwise only available as web pages or proprietary data terminals. It is ideal for agents that need daily margin flow rankings, stock-level margin balance history, or short position screening across Shanghai and Shenzhen markets without requiring an API key or subscription — just a $0.02 USDC micropayment per call via the x402 protocol.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-16T12:42:32.768Z","isFirstParty":false,"canonicalSlug":"cn-data-china-margin-trading-short-selling-data-c0faa917"}