{"api":{"id":"api_122287e792439585ce59750e","slug":"okx-long-short-ratio","name":"OKX Long Short Account Ratio API","description":"Time series of the ratio of accounts holding long versus short positions on OKX contracts, for one or several coins at 5-minute, hourly or daily buckets, with ISO timestamps. A sentiment indicator.","kind":"ready_made","visibility":"public","domain":"okx.com","source_url":"https://www.okx.com/api/v5/rubik/stat/contracts/long-short-account-ratio","category":"finance","record_type":"generic","active_version":"1.0","units_per_1k":500,"health":"unknown","auto_repair":false,"last_checked_at":null,"last_run_at":null,"fields_count":3,"created_at":"2026-12-06T04:45:48.384Z","updated_at":"2026-12-06T04:45:48.384Z","runnable":true,"egress":null,"repairs":[],"repairs_total":0,"how":"Runs on a reader we built and maintain by hand for this site.","fields":[{"name":"currency","type":"string","description":"Coin symbol.","required":true,"coverage":1,"example":"BTC"},{"name":"bucket_at","type":"datetime","description":"Start of the bucket (UTC).","required":true,"coverage":1,"example":"2026-12-06T04:00:00.000Z"},{"name":"long_short_ratio","type":"number","description":"Accounts long divided by accounts short.","required":false,"coverage":1,"example":2.39}],"inputs":[{"name":"currencies","type":"array","description":"Coin symbols such as BTC and ETH.","example":["BTC","ETH"],"required":true},{"name":"period","type":"string","description":"Bucket size: 5m, 1H or 1D.","default":"1H","example":"1H","enum":["5m","1H","1D"]}],"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":true,"properties":{"bucket_at":{"description":"Start of the bucket (UTC).","format":"date-time","type":"string"},"currency":{"description":"Coin symbol.","type":"string"},"long_short_ratio":{"description":"Accounts long divided by accounts short.","type":"number"}},"required":["currency","bucket_at"],"title":"OKX Long Short Account Ratio API","type":"object"},"samples":[{"currency":"BTC","bucket_at":"2026-12-06T04:00:00.000Z","long_short_ratio":2.39},{"currency":"BTC","bucket_at":"2026-12-06T03:00:00.000Z","long_short_ratio":2.42},{"currency":"BTC","bucket_at":"2026-12-06T02:00:00.000Z","long_short_ratio":2.51}],"validation":{"checked_at":"2026-12-06T04:45:48.335Z","field_coverage":{"bucket_at":1,"currency":1,"long_short_ratio":1},"fresh_read":false,"identity_unique":true,"issues":["Imported from a hand-built source. Field names and types come from its published schema; no live read was made for this check."],"level":"preview","pages_checked":0,"passed":true,"records_checked":3},"links":{"run":"https://pullrow.dev/v1/apis/api_122287e792439585ce59750e/run","openapi":"https://pullrow.dev/v1/apis/api_122287e792439585ce59750e/openapi.json","contract":"https://pullrow.dev/v1/apis/api_122287e792439585ce59750e/contract.json","page":"https://pullrow.dev/catalog/okx-long-short-ratio"},"runs_30d":0,"success_rate_30d":null,"price_per_1k_usd":0.5,"featured":false,"reliability":{"window_days":30,"runs":0,"completed":0,"succeeded":0,"failed":0,"success_rate":null,"last_run_at":null},"demo":{"available":false,"max_records":0,"reason":"Every run of this API costs us money, so it has no free live demo. The sample records on its page show what it returns.","code":"demo_not_available"},"meta":{"limitations":["OKX returns only its most recent window per coin (hundreds of points at 1H); older history is not available.","Newest points first; the latest bucket may still change.","One request per coin, spaced out to stay within OKX's public rate limits.","Data comes from OKX's public market data; check OKX's terms before redistributing it."]},"plain":{"summary":null,"source":"rules","fields":[{"name":"currency","label":"Currency","description":"Coin symbol.","group":"Pay","shown":true,"written":false},{"name":"bucket_at","label":"Bucket at","description":"Start of the bucket (UTC).","group":"Dates","shown":true,"written":false},{"name":"long_short_ratio","label":"Long short ratio","description":"Accounts long divided by accounts short.","group":"Basics","shown":true,"written":false}],"inputs":[{"name":"currencies","label":"Currencies","help":"Coin symbols such as BTC and ETH.","example":"BTC, ETH","written":false},{"name":"period","label":"Period","help":"Bucket size: 5m, 1H or 1D.","example":"1H","written":false}]}},"incidents":[]}