{"openapi":"3.1.0","info":{"title":"K-Data x402","version":"1.1.0","summary":"Korean market data for AI agents — kimchi premium on a tradeable USDT basis, premium history and percentiles, Korean news translated to English, Upbit KRW quotes. Pay per request with USDC via x402. No account, no API key.","description":"Korean market data for AI agents — kimchi premium on a tradeable USDT basis, premium history and percentiles, Korean news translated to English, Upbit KRW quotes. Pay per request with USDC via x402. No account, no API key.\n\nWhy this service:\n- Dual-basis kimchi premium: the official USD/KRW figure everyone quotes, plus the Upbit KRW/USDT basis that an arbitrageur can actually realize. The two often disagree in sign — official can read negative while the tradeable basis is positive.\n- Premium history and percentile context, continuously archived. No free source and no competing x402 seller offers this; it cannot be reconstructed after the fact.\n- Korean headlines translated to English, so a non-Korean agent can actually use them.\n\nEvery endpoint below is metered per request with x402 (HTTP 402). No account, API key, or signup is required — an x402-capable client pays in USDC and retries automatically."},"servers":[{"url":"https://k-data-x402-production.theblack1022.workers.dev"}],"paths":{"/api/kimchi-premium":{"get":{"summary":"Kimchi premium on two bases: premium_official_pct (official USD/KRW rate — the quoted figure) and premium_usdt_pct (Upbit KRW/USDT rate — the margin actually realizable, since the KRW exit leg goes through USDT rather than banks). Costs $0.03 per call.","description":"Kimchi premium on two bases: premium_official_pct (official USD/KRW rate — the quoted figure) and premium_usdt_pct (Upbit KRW/USDT rate — the margin actually realizable, since the KRW exit leg goes through USDT rather than banks). The two frequently disagree in sign. Optional ?symbols=BTC,ETH (max 10).\n\nPayment: $0.03 in USDC via the x402 protocol (network eip155:8453). Calling without payment returns HTTP 402 with the payment requirements in the PAYMENT-REQUIRED header.","operationId":"api_kimchi_premium","parameters":[{"name":"symbols","in":"query","required":false,"description":"Comma-separated coin tickers, e.g. BTC,ETH,XRP. Default: BTC,ETH,XRP,SOL,DOGE","schema":{"type":"string"}}],"responses":{"200":{"description":"Payment accepted; data returned.","content":{"application/json":{"example":{"usdkrw_official":1443.61,"usdkrw_usdt":1437,"usdt_premium_pct":-0.458,"entries":[{"ticker":"BTC","upbit_krw":90731000,"global_usd":63017.37,"premium_official_pct":-0.265,"premium_usdt_pct":0.193}],"as_of":"2026-08-01T00:00:00.000Z"}}}},"402":{"description":"Payment required. The PAYMENT-REQUIRED header carries base64-encoded x402 payment requirements."},"404":{"description":"Requested resource or symbol is not available."}}}},"/api/kimchi-premium/stats":{"get":{"summary":"Where the current kimchi premium sits inside its own recent distribution: percentile, mean, stdev, z-score, min/max/median, and a plain-language read. Costs $0.12 per call.","description":"Where the current kimchi premium sits inside its own recent distribution: percentile, mean, stdev, z-score, min/max/median, and a plain-language read. Answers 'is this premium unusual right now?' in one call. Built from a continuous archive that cannot be reconstructed from any free source. Params: ?symbol=BTC &window=1h|6h|24h|7d|30d|90d &basis=usdt|official.\n\nPayment: $0.12 in USDC via the x402 protocol (network eip155:8453). Calling without payment returns HTTP 402 with the payment requirements in the PAYMENT-REQUIRED header.","operationId":"api_kimchi_premium_stats","parameters":[{"name":"symbol","in":"query","required":false,"description":"Archived tickers: BTC, ETH, XRP, SOL, DOGE, USDT","schema":{"type":"string"}},{"name":"window","in":"query","required":false,"description":"Lookback window (default 24h)","schema":{"type":"string","enum":["1h","6h","24h","7d","30d","90d"]}},{"name":"basis","in":"query","required":false,"description":"Which premium basis to analyse (default usdt)","schema":{"type":"string","enum":["usdt","official"]}}],"responses":{"200":{"description":"Payment accepted; data returned.","content":{"application/json":{"example":{"symbol":"BTC","window":"7d","basis":"usdt","samples":2016,"current_pct":0.193,"percentile":92.4,"mean_pct":0.041,"stdev_pct":0.118,"zscore":1.288,"interpretation":"unusually high versus this window"}}}},"402":{"description":"Payment required. The PAYMENT-REQUIRED header carries base64-encoded x402 payment requirements."},"404":{"description":"Requested resource or symbol is not available."}}}},"/api/kimchi-premium/history":{"get":{"summary":"Time series of the kimchi premium from the continuous archive, both bases, newest-last. Costs $0.08 per call.","description":"Time series of the kimchi premium from the continuous archive, both bases, newest-last. Params: ?symbol=BTC &window=1h|6h|24h|7d|30d|90d &points=500 (max 2000). Archive depth is reported as first_recorded.\n\nPayment: $0.08 in USDC via the x402 protocol (network eip155:8453). Calling without payment returns HTTP 402 with the payment requirements in the PAYMENT-REQUIRED header.","operationId":"api_kimchi_premium_history","parameters":[{"name":"symbol","in":"query","required":false,"description":"Archived tickers: BTC, ETH, XRP, SOL, DOGE, USDT","schema":{"type":"string"}},{"name":"window","in":"query","required":false,"description":"Lookback window (default 24h)","schema":{"type":"string","enum":["1h","6h","24h","7d","30d","90d"]}},{"name":"points","in":"query","required":false,"description":"Max points returned (default 500, max 2000)","schema":{"type":"integer"}}],"responses":{"200":{"description":"Payment accepted; data returned.","content":{"application/json":{"example":{"symbol":"BTC","window":"24h","points":288,"first_recorded":"2026-08-01T14:20:00.000Z","series":[{"ts":"2026-08-01T14:25:00.000Z","upbit_krw":90731000,"global_usd":63017.37,"premium_official_pct":-0.265,"premium_usdt_pct":0.193}]}}}},"402":{"description":"Payment required. The PAYMENT-REQUIRED header carries base64-encoded x402 payment requirements."},"404":{"description":"Requested resource or symbol is not available."}}}},"/api/news/headlines/en":{"get":{"summary":"Latest Korean headlines with English translations attached (title_en), from Yonhap, Maeil Business and Hankyung — deduplicated, newest first. Costs $0.05 per call.","description":"Latest Korean headlines with English translations attached (title_en), from Yonhap, Maeil Business and Hankyung — deduplicated, newest first. Use this instead of the Korean-only route when the consuming agent does not read Korean. Optional ?category=top|economy|tech|politics and ?limit=20 (max 50).\n\nPayment: $0.05 in USDC via the x402 protocol (network eip155:8453). Calling without payment returns HTTP 402 with the payment requirements in the PAYMENT-REQUIRED header.","operationId":"api_news_headlines_en","parameters":[{"name":"category","in":"query","required":false,"description":"Filter by category","schema":{"type":"string","enum":["top","economy","tech","politics"]}},{"name":"limit","in":"query","required":false,"description":"Max items (default 20, max 50)","schema":{"type":"integer"}}],"responses":{"200":{"description":"Payment accepted; data returned.","content":{"application/json":{"example":{"category":"economy","translated":true,"items":[{"title":"7월 수출 989억달러 역대 2위…반도체 두달째 400억달러대","title_en":"July exports at $98.9bn, second highest ever; chips above $40bn for a second month","link":"https://www.yna.co.kr/view/...","published_at":"2026-08-01T01:35:11.000Z","source":"연합뉴스 (Yonhap)"}]}}}},"402":{"description":"Payment required. The PAYMENT-REQUIRED header carries base64-encoded x402 payment requirements."},"404":{"description":"Requested resource or symbol is not available."}}}},"/api/korea/market-snapshot":{"get":{"summary":"One-call Korea briefing: dual-basis kimchi premium + top Upbit KRW markets + USD/KRW + latest economy headlines translated to English. Costs $0.08 per call.","description":"One-call Korea briefing: dual-basis kimchi premium + top Upbit KRW markets + USD/KRW + latest economy headlines translated to English. Everything needed for a Korea market read in a single paid request.\n\nPayment: $0.08 in USDC via the x402 protocol (network eip155:8453). Calling without payment returns HTTP 402 with the payment requirements in the PAYMENT-REQUIRED header.","operationId":"api_korea_market_snapshot","responses":{"200":{"description":"Payment accepted; data returned.","content":{"application/json":{"example":{"kimchi_premium":{"usdkrw_official":1443.61,"usdkrw_usdt":1437,"entries":[]},"krw_markets":{"markets_total":277,"top_by_volume":[]},"fx":{"pair":"USD/KRW","rate":1443.61},"news_economy":{"translated":true,"items":[]},"as_of":"2026-08-01T00:00:00.000Z"}}}},"402":{"description":"Payment required. The PAYMENT-REQUIRED header carries base64-encoded x402 payment requirements."},"404":{"description":"Requested resource or symbol is not available."}}}},"/api/crypto/krw/markets":{"get":{"summary":"Snapshot of all Upbit KRW crypto markets: top by 24h traded value, top gainers, top losers. Costs $0.01 per call.","description":"Snapshot of all Upbit KRW crypto markets: top by 24h traded value, top gainers, top losers. Optional ?limit=30 (max 100) for the volume ranking.\n\nPayment: $0.01 in USDC via the x402 protocol (network eip155:8453). Calling without payment returns HTTP 402 with the payment requirements in the PAYMENT-REQUIRED header.","operationId":"api_crypto_krw_markets","parameters":[{"name":"limit","in":"query","required":false,"description":"How many top-volume markets to return (default 30, max 100)","schema":{"type":"integer"}}],"responses":{"200":{"description":"Payment accepted; data returned.","content":{"application/json":{"example":{"markets_total":277,"top_by_volume":[{"market":"KRW-BTC","ticker":"BTC","price_krw":90731000,"change_24h_pct":1.2}],"top_gainers":[],"top_losers":[]}}}},"402":{"description":"Payment required. The PAYMENT-REQUIRED header carries base64-encoded x402 payment requirements."},"404":{"description":"Requested resource or symbol is not available."}}}},"/api/news/headlines":{"get":{"summary":"Latest Korean headlines from Yonhap, Maeil Business and Hankyung, deduplicated and newest-first. Costs $0.01 per call.","description":"Latest Korean headlines from Yonhap, Maeil Business and Hankyung, deduplicated and newest-first. Titles stay in Korean — use /api/news/headlines/en for English. Optional ?category=top|economy|tech|politics and ?limit=30 (max 100).\n\nPayment: $0.01 in USDC via the x402 protocol (network eip155:8453). Calling without payment returns HTTP 402 with the payment requirements in the PAYMENT-REQUIRED header.","operationId":"api_news_headlines","parameters":[{"name":"category","in":"query","required":false,"description":"Filter by category","schema":{"type":"string","enum":["top","economy","tech","politics"]}},{"name":"limit","in":"query","required":false,"description":"Max items (default 30, max 100)","schema":{"type":"integer"}}],"responses":{"200":{"description":"Payment accepted; data returned.","content":{"application/json":{"example":{"category":"economy","items":[{"title":"코스피, 외국인 매수세에 상승 마감","link":"https://www.yna.co.kr/view/...","published_at":"2026-08-01T00:00:00.000Z","source":"연합뉴스 (Yonhap)"}]}}}},"402":{"description":"Payment required. The PAYMENT-REQUIRED header carries base64-encoded x402 payment requirements."},"404":{"description":"Requested resource or symbol is not available."}}}},"/api/crypto/krw/{ticker}":{"get":{"summary":"Live quote for one Upbit KRW market by ticker symbol (e. Costs $0.005 per call.","description":"Live quote for one Upbit KRW market by ticker symbol (e.g. BTC, ETH, XRP): price, 24h change, 24h high/low, 24h traded value in KRW.\n\nPayment: $0.005 in USDC via the x402 protocol (network eip155:8453). Calling without payment returns HTTP 402 with the payment requirements in the PAYMENT-REQUIRED header.","operationId":"api_crypto_krw_ticker","parameters":[{"name":"ticker","in":"path","required":true,"description":"Coin ticker symbol, e.g. BTC","schema":{"type":"string"}}],"responses":{"200":{"description":"Payment accepted; data returned.","content":{"application/json":{"example":{"market":"KRW-BTC","ticker":"BTC","name_en":"Bitcoin","price_krw":90731000,"change_24h_pct":1.204,"volume_24h_krw":250000000000,"as_of":"2026-08-01T00:00:00.000Z"}}}},"402":{"description":"Payment required. The PAYMENT-REQUIRED header carries base64-encoded x402 payment requirements."},"404":{"description":"Requested resource or symbol is not available."}}}},"/api/fx/usdkrw":{"get":{"summary":"Current USD/KRW exchange rate (ECB reference via Frankfurter, fallback open. Costs $0.005 per call.","description":"Current USD/KRW exchange rate (ECB reference via Frankfurter, fallback open.er-api.com).\n\nPayment: $0.005 in USDC via the x402 protocol (network eip155:8453). Calling without payment returns HTTP 402 with the payment requirements in the PAYMENT-REQUIRED header.","operationId":"api_fx_usdkrw","responses":{"200":{"description":"Payment accepted; data returned.","content":{"application/json":{"example":{"pair":"USD/KRW","rate":1443.61,"as_of":"2026-08-01","source":"frankfurter.dev (ECB)"}}}},"402":{"description":"Payment required. The PAYMENT-REQUIRED header carries base64-encoded x402 payment requirements."},"404":{"description":"Requested resource or symbol is not available."}}}}}}