keydata.shop: Polymarket and exchange order flow

v0.1.0
io.github.RabbitGo777/keydata Checked 15 hours ago Published 1 day ago

Free SQL over Polymarket 5/15-min crypto up/down markets with Binance, Bybit, OKX, Coinbase data

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_tables List tables

List the tables, the period covered and the limits per query. Call it first.

describe_table Describe a table

Columns of a table: type, how the 10-second bar was rolled up, and what the column means. Numbered book levels (bid_price_00 .. bid_price_09) are listed once.

ParameterTypeDescription
table *string

exchange_bars Exchange OHLC bars

OHLC bars of one exchange instrument: mid open/high/low/close, time-weighted spread (bps), trade OHLC, base and quote volume, taker-buy share of the quote volume, trades and messages. Times are UTC; the default window is the last day. Coinbase has spot only.

ParameterTypeDescription
coin *string
end
exchangestring
instrument_classstring
intervalstring
start

compare_venues Compare exchange venues

Side-by-side market quality of every exchange instrument of a coin: mean and median spread (bps), quote volume, trades, mean depth within 5 bps (both sides), book reach, share of silent bars and of bars with a provably valid book. Default window: every day served.

ParameterTypeDescription
coin *string
end
start

polymarket_markets Polymarket markets

Markets of one up/down series in a window (default: the last day): start and end, the settled outcome, the Up token's mid at the start, 60 s before the end (the last bar that closed by then) and at the end, its mean spread (probability points), and volume and trades of both tokens.

ParameterTypeDescription
coin *string
end
interval_mininteger
limitinteger
start

expiry_calibration Expiry calibration

How well the Polymarket price predicts the outcome: the Up token's mid N seconds before each market's end (from the last 10-second bar that had closed by then, so no look-ahead), grouped into probability buckets, against the share of markets that settled Up. Also the Brier score. coin and interval_min narrow the set; default: every market served.

ParameterTypeDescription
bucketsinteger
coin
end
interval_min
seconds_before_endinteger
start

sample_rows Sample rows

First rows of a table from `start` (UTC; default: the first bar). limit 1-50. `columns` picks columns by name; default all (the exchange tables are 83 columns wide).

ParameterTypeDescription
table *string
columns
limitinteger
start

run_sql Run read-only SQL

Run one read-only DuckDB SELECT over the tables of list_tables (cex, polymarket, chainlink and the per-source views such as binance_btc or polymarket_btc_5m). Filter on ts and aggregate in SQL: at most max_rows rows come back (up to the server's cap), and the query is stopped at the timeout. DuckDB functions such as time_bucket, arg_max, quantile_cont, corr, regr_slope and window functions are available; file and network access are not.

ParameterTypeDescription
sql *string
max_rowsinteger