API Reference
API Overview Complete REST API reference for PAPI
The PAPI REST API provides authenticated access to prediction market data and trading across Polymarket and Kalshi. All exchange responses are normalized into unified types.
https://papi.tylerthebuildor.com
All endpoints (except /health and /auth/*) require a Bearer token in the Authorization header:
curl https://papi.tylerthebuildor.com/polymarket/markets \
-H "Authorization: Bearer papi_sk_live_a1b2c3d4e5f6..."
Two token types are supported:
API keys (papi_sk_*) -- For SDK and programmatic access. Scoped to read, trade, or admin.
JWT tokens -- For dashboard sessions. Issued via /auth/login or OAuth callbacks.
See Authentication for details.
Method Endpoint Description GET/healthHealth check (no auth required)
Method Endpoint Description POST/auth/signupCreate a new account POST/auth/loginSign in with email/password POST/auth/verify-emailVerify email address POST/auth/forgot-passwordRequest password reset POST/auth/reset-passwordReset password with token POST/auth/google/callbackGoogle OAuth callback POST/auth/github/callbackGitHub OAuth callback POST/auth/refreshRefresh JWT (reads cookie) POST/auth/logoutSign out (clears cookie, requires auth)
Method Endpoint Scope Description GET/meany Current user info and scopes
Method Endpoint Scope Description GET/polymarket/marketsreadList markets GET/polymarket/markets/{id}readGet a single market GET/polymarket/eventsreadList events GET/polymarket/orderbooksreadGet order book for a token GET/polymarket/tradesreadGet trades for a token GET/polymarket/candlesticksreadGet OHLCV candles GET/polymarket/walletreadGet wallet info GET/polymarket/wallet/pnl/{address}readGet wallet PnL
Method Endpoint Scope Description POST/polymarket/orderstradeCreate an order GET/polymarket/orderstradeList open orders GET/polymarket/orders/{order_id}tradeGet a single order DELETE/polymarket/orders/{order_id}tradeCancel an order GET/polymarket/positionstradeGet positions GET/polymarket/balancetradeGet balance
Method Endpoint Scope Description GET/kalshi/marketsreadList markets GET/kalshi/markets/{ticker}readGet a single market GET/kalshi/eventsreadList events GET/kalshi/orderbooksreadGet order book for a ticker GET/kalshi/tradesreadGet trades for a ticker GET/kalshi/candlesticksreadGet OHLCV candles
Method Endpoint Scope Description POST/kalshi/orderstradeCreate an order GET/kalshi/orderstradeList open orders GET/kalshi/orders/{order_id}tradeGet a single order DELETE/kalshi/orders/{order_id}tradeCancel an order GET/kalshi/positionstradeGet positions GET/kalshi/balancetradeGet balance GET/kalshi/trades/metradeGet your fills/trades
Method Endpoint Scope Description GET/matching-marketsreadFind matching markets across exchanges
Method Endpoint Description GET/account/profileGet account profile PATCH/account/profileUpdate profile GET/account/api-keysList API keys POST/account/api-keysCreate an API key (limit: 1 per user) DELETE/account/api-keys/{key_prefix}Revoke an API key GET/account/credentialsCheck credential status PUT/account/credentials/polymarketStore Polymarket credentials PUT/account/credentials/kalshiStore Kalshi credentials DELETE/account/credentials/{exchange}Remove exchange credentials
Method Endpoint Description GET/admin/access/modeGet current access mode PUT/admin/access/modeSet access mode GET/admin/access/rulesList access rules POST/admin/access/rulesCreate access rule DELETE/admin/access/rules/{id}Delete access rule GET/admin/usersList all users PUT/admin/users/{id}/statusUpdate user status
Successful responses return data directly. Market list endpoints return raw arrays , not wrapped objects.
Error responses use a consistent format:
{
"error" : {
"code" : "unauthorized" ,
"message" : "Invalid or expired API key"
}
}
All financial values (prices, volumes, balances) are serialized as strings to preserve decimal precision. Kalshi prices are converted from cents to decimals (e.g., 62 cents becomes "0.62").
All authenticated endpoints are rate limited to 60 requests per minute per API key. Response headers include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. See Errors for details.