CoinOFut compute API
Pay-per-call computations on the market data you send: a rule-based market reading and an estimated liquidation map for perpetual futures. No market data is supplied or stored. Payment by the x402 protocol, in USDC on Base. Same input, same output.
POST /x402/compute/reading — $0.02 per call
Market regime reading for a perpetual futures market, computed from the candles and open interest YOU send (no market data is supplied). Returns the price x open interest regime, spot vs perp taker flow, funding class, perp/spot basis, move quality and robust z-scores, with the thresholds used. Deterministic and rule-based: same input, same output. Not investment advice. No charge on invalid input or insufficient history.
| Field | Type | Rules |
|---|---|---|
tf (required) | 1m | 5m | 15m | 1h | 4h | Candle interval |
perp (required) | array | Perpetual candles, contiguous, oldest first. 2 to 1000 rows |
oi (required) | array | Open interest points, strictly increasing time. 2 to 5000 rows |
asOf | integer | Computation time (ms UTC), within the last candle; default: its close time |
lookback | integer | Window in candles. min 3, max 96, default 12 |
spot | array | Spot candles on the same grid (optional). 11 to 1000 rows |
spotMult | number | Contract multiplier vs spot (e.g. 1000), requires spot |
funding | object | |
liquidations | object |
curl -i -X POST https://coinofut-compute.fly.dev/x402/compute/reading \
-H "Content-Type: application/json" \
-d '{"tf":"1h","perp":[[1793664000000,68000,68400,67900,68250,152000000,80100000],[1793667600000,68250,68600,68100,68500,141000000,75300000],[1793671200000,68500,68700,68200,68300,120000000,57800000]],"oi":[[1793667600000,81250.4],[1793671200000,81710.9]]}'POST /x402/compute/liqmap — $0.03 per call
Estimated liquidation map for a perpetual futures market, computed from the candles and open interest YOU send (no market data is supplied). Returns notional by price bin for longs and shorts, the largest clusters above and below price, and a min-max range across three leverage distributions, flagging fragile clusters. A model estimate, not observed orders. Not investment advice. No charge on invalid input or insufficient history.
| Field | Type | Rules |
|---|---|---|
tf (required) | 1m | 5m | 15m | 1h | 4h | Candle interval |
perp (required) | array | Perpetual candles, contiguous, oldest first. 2 to 1000 rows |
oi (required) | array | Open interest points, strictly increasing time. 2 to 5000 rows |
asOf | integer | Computation time (ms UTC), within the last candle; default: its close time |
price | number | Reference price; default: last close |
maxLev | number | Highest leverage allowed on the market. min 1, max 200 |
mmr | number | Maintenance margin rate, below 1 / highest leverage. min 0, default 0.004 |
bins | integer | min 16, max 128, default 64 |
weights | array | Custom weights of the 10x, 25x, 50x, 100x tiers, summing to 1. 4 to 4 rows |
curl -i -X POST https://coinofut-compute.fly.dev/x402/compute/liqmap \
-H "Content-Type: application/json" \
-d '{"tf":"1h","perp":[[1793664000000,68000,68400,67900,68250,152000000,80100000],[1793667600000,68250,68600,68100,68500,141000000,75300000],[1793671200000,68500,68700,68200,68300,120000000,57800000]],"oi":[[1793667600000,81250.4],[1793671200000,81710.9]]}'Status codes
| Status | Case | Charged |
|---|---|---|
| 200 | Computation done | yes |
| 400 | invalid_input (path and message), invalid_json | no |
| 402 | No payment, payment refused, settlement failed | no |
| 405 | Method other than POST | no |
| 413 | Body larger than 1,048,576 bytes | no |
| 415 | Content type or encoding not supported | no |
| 422 | insufficient_history, insufficient_open_interest (have, need) | no |
| 429 | More than 300 requests per minute per IP | no |
| 502, 503 | Payment facilitator error or unreachable | no |
Terms
By calling this API you declare that you have the right to use the data you send. Nothing you send is kept. Results are statistical estimates, not investment advice. Null values mean “not available”.
Privacy
Request bodies are never logged. The settlement transaction is logged for accounting; the payer is not.