# ADI Predictstreet > Institutional-grade prediction market API — trading, settlement, and on-chain custody. ## Docs - [Get event by id](https://docs.adipredictstreet.com/api-reference/events/get-event-by-id.md): 404 with `code=event_not_found` if the id does not exist or has no public-status markets. Same `saved` semantics as the list endpoint. - [List events](https://docs.adipredictstreet.com/api-reference/events/list-events.md): Filtered list of events with their tradable markets attached. Events with no public-status market are filtered out. All filters are optional and AND together. - [API Reference](https://docs.adipredictstreet.com/api-reference/introduction.md): Complete catalogue of PredictStreet's integrator HTTP endpoints — request / response schemas, example payloads, and a try-it-out panel for supported environments. - [Wallet leaderboard ranked by realised PnL or volume](https://docs.adipredictstreet.com/api-reference/leaderboard/wallet-leaderboard-ranked-by-realised-pnl-or-volume.md): Returns the leaderboard snapshot for the requested period plus the caller's own row when authenticated. - [List markets](https://docs.adipredictstreet.com/api-reference/markets/list-markets.md): Returns all non-draft markets (OPEN / PAUSED / PROPOSED / PRE_MARKET). Capped 500 rows. - [List top traders on a market](https://docs.adipredictstreet.com/api-reference/markets/list-top-traders-on-a-market.md): Returns distinct traders on a market with per-wallet aggregates ordered by USDC volume (descending). Both maker and taker sides of each fill are counted. Query: `limit` (default 50, max 200). Rate-limited per market. - [Market detail (by slug)](https://docs.adipredictstreet.com/api-reference/markets/market-detail-by-slug.md): Fetch a single market by its canonical `slug` (NOT `symbol`). **Breaking change 2026-05-16:** the path parameter changed from `{symbol}` to `{slug}` — clients passing a symbol receive `404 market_not_found`. Pull the slug from the `slug` field on the list endpoint response, or compute it from the pa… - [OHLC candles](https://docs.adipredictstreet.com/api-reference/markets/ohlc-candles.md): **Deprecated — use `/price-history` for new integrations.** Historical candles indexed from trades. Capped 2000 candles per request — clients paginate via overlapping `from` / `to` windows. - [Orderbook snapshot](https://docs.adipredictstreet.com/api-reference/markets/orderbook-snapshot.md): Aggregated top-of-book levels per outcome. For real-time updates use the `orderbook` WebSocket channel — polling this endpoint is rate-limited. - [Public trade tape](https://docs.adipredictstreet.com/api-reference/markets/public-trade-tape.md): Recent fill tape for a market — each trade carries the maker + taker EOAs so consumers can render "0xabc…1234 sold YES @ 0.62". Order ids and exact fees stay private. Filtered to `matched` / `settlement_pending` / `settled` (no PENDING / FAILED rows). - [Time-series price points for the chart UI](https://docs.adipredictstreet.com/api-reference/markets/time-series-price-points-for-the-chart-ui.md): Returns a gap-free series of `(ts, price)` tuples for the requested `range` and `outcome`. `price` is `(bestBid + bestAsk) / 2` when both book sides are populated, last-trade fallback otherwise, with carry-forward through inactive intervals — the FE never receives an empty `points` array on an activ… - [Get match by id](https://docs.adipredictstreet.com/api-reference/matches/get-match-by-id.md): 404 with `code=match_not_found` if the id does not exist or has no public-status markets. - [List matches](https://docs.adipredictstreet.com/api-reference/matches/list-matches.md): Returns all currently READY matches (the admin.matches aggregate that groups several events into a single 'card' — e.g. 'BRA vs ARG' wraps the 1X2 event + first-scorer event + over-under event). Each match nests its child events with their public-status markets. Empty matches (no public-status marke… - [Cancel a single order](https://docs.adipredictstreet.com/api-reference/orders/cancel-a-single-order.md): Idempotent — a never-existed or already-terminal id returns 200 with `status=not_found`, NOT 404. Authentication scope is checked against the order owner, not the JWT wallet alone. - [Cancel all open orders](https://docs.adipredictstreet.com/api-reference/orders/cancel-all-open-orders.md): Cancels every open order for the authenticated wallet, optionally scoped to a single market. Rate limited at 1 req/sec per wallet — intended for operational wind-down, not per-order cleanup. - [Fills for a specific order](https://docs.adipredictstreet.com/api-reference/orders/fills-for-a-specific-order.md): All trades that filled against the given `orderId`, in execution order. Returns `200 {orderId, trades: []}` for an order with no fills (PENDING / OPEN / unfilled CANCELLED) AND for nonexistent IDs — empty `trades` is not a 404 signal. To distinguish, use `/api/orders/{id}` (returns 404 for unknown I… - [List open orders](https://docs.adipredictstreet.com/api-reference/orders/list-open-orders.md): All orders for the authenticated wallet currently in a non-terminal status (`PENDING` / `OPEN` / `PARTIAL`). Wrapped envelope: `{walletAddress, orders: [...]}`. No pagination — open-set is bounded by per-wallet open-order caps; use `/api/orders/history` for terminal orders. - [Order detail](https://docs.adipredictstreet.com/api-reference/orders/order-detail.md): Single-order detail by `orderId`. Returns the full `Order` schema regardless of status (open or terminal). Returns `404 order_not_found` for unknown IDs and for IDs belonging to a different wallet (no authorization-vs-existence leak). - [Order history](https://docs.adipredictstreet.com/api-reference/orders/order-history.md): Paginated DESC by created_at. Capped 200 per request. - [Place a signed order](https://docs.adipredictstreet.com/api-reference/orders/place-a-signed-order.md): Submits an EIP-712-signed order to the matching engine. Strict balance lock runs inside a single PG transaction before the matcher is called. The signer (your key's associatedWallet) must equal the EIP-712 signer — impersonation is refused. Rate limited at 20 req/s per wallet. Sign the EIP-712 struc… - [Aggregate portfolio view](https://docs.adipredictstreet.com/api-reference/portfolio/aggregate-portfolio-view.md): Single-call dashboard payload: vault info, balances, positions, fee tier, and any active reality-check state for the caller. One-shot endpoint backing the user dashboard — saves a 4-request fan-out. Sub-endpoints (`/me/balances`, `/me/positions`, `/me/vault`, `/me/fee-tier`) remain available for tar… - [Balances per token](https://docs.adipredictstreet.com/api-reference/portfolio/balances-per-token.md): Each balance row splits the wallet's holdings into spendable (`available`), pending settlement (`unsettled`), order-locked (`locked`) and compliance-held (`quarantined`) buckets. Currently one row (USDC) but the response is a list to support future tokens. - [Current auto-redeem opt-out state](https://docs.adipredictstreet.com/api-reference/portfolio/current-auto-redeem-opt-out-state.md): Default `enabled=true` — exchange-service queues redemptions when a market resolves. Disabled means the user must re-enable or take the on-chain emergency-redeem path themselves. - [Current fee tier](https://docs.adipredictstreet.com/api-reference/portfolio/current-fee-tier.md): Authenticated fee-tier preview for the caller's wallet. Returns the bracket the wallet currently sits in (maker + taker bps at this tier), its trailing-30-day taker volume, and the volume threshold for the next tier. Read-only; call it before placing an order if your UI needs to preview the taker fe… - [Emergency-withdraw timelock status](https://docs.adipredictstreet.com/api-reference/portfolio/emergency-withdraw-timelock-status.md): 7-day timelock state for vault emergency withdrawal. - [Fee ledger](https://docs.adipredictstreet.com/api-reference/portfolio/fee-ledger.md): One row per fee event, joined to the originating trade by `tradeId`. `role=maker` rows are always amount=0 by platform policy; only `taker` rows carry value. Quadratic fee formula lives in platform compliance policy. - [Open positions](https://docs.adipredictstreet.com/api-reference/portfolio/open-positions.md): Returns the wallet's positions grouped by (market, outcome) with live currentPrice + weighted-average avgCost + realized/unrealized P&L. `accountingStatus=unavailable` flags positions whose pre-history isn't fully recoverable (chain re-org, missing trades) — the row is still returned but cost/PnL fi… - [Per-EOA rolling deposit caps + current usage](https://docs.adipredictstreet.com/api-reference/portfolio/per-eoa-rolling-deposit-caps-+-current-usage.md): Read-only mirror of `DepositLimitRegistry.{getEffectiveLimits,getUsage,isInitialized}` for the authenticated wallet. All amount fields are decimal USDC strings. `windowResetsAt.` is `windowStart + WINDOW` while the recorded window is open, or `null` once it has expired (the registry zeroes `… - [Toggle auto-redeem opt-in/opt-out](https://docs.adipredictstreet.com/api-reference/portfolio/toggle-auto-redeem-opt-inopt-out.md): Both directions apply immediately — opt-out never blocks platform operation, so there is no cooldown. Hard cap: 10 toggles per 24h to prevent automation flapping. - [Trade history](https://docs.adipredictstreet.com/api-reference/portfolio/trade-history.md): Reverse-chronological. `before` accepts an ISO-8601 cursor; `marketId` narrows to one market. `side` is the wallet's side on each fill (maker or taker mapped to buy/sell). - [Vault address + deployment status](https://docs.adipredictstreet.com/api-reference/portfolio/vault-address-+-deployment-status.md): Returns `VaultFactory.vaultOf(wallet)`. `deployed=false` means the user has not yet called `deployVault` on-chain — split/merge/withdraw endpoints will 400 with `vault_not_deployed` until they do. - [Global search preview — top results across users, events, and matches](https://docs.adipredictstreet.com/api-reference/search/global-search-preview-—-top-results-across-users-events-and-matches.md): Returns up to 5 hits per type for the header dropdown. If the query starts with `0x` we look up users by wallet (exact at length 42, prefix otherwise) and `events` / `matches` are empty. Otherwise three independent text searches run in parallel; events also surface tag-driven hits via `matchedVia: '… - [Paginated event search](https://docs.adipredictstreet.com/api-reference/search/paginated-event-search.md): Combines title / team / tag-driven hits, deduped by event id with the strongest match reason kept on `matchedVia`. Returns an empty page in `0x` mode. Within a rank bucket events that close soonest come first. - [Paginated match search](https://docs.adipredictstreet.com/api-reference/search/paginated-match-search.md): Filters to LIVE matches with at least one tradeable market. Returns an empty page in `0x` mode. Each hit carries `startTime` so the FE can render the kickoff badge directly without a follow-up `/api/matches/:id` call. - [Paginated user search](https://docs.adipredictstreet.com/api-reference/search/paginated-user-search.md): Same matching rules as the preview but with offset pagination. `limit` ≤ 50; total reachable rows ≤ 200. `hasMore=false` once the next page would cross that ceiling. Wallet branch (`0x…` query) returns vault address + username; the EOA never leaves the service. - [List active tags](https://docs.adipredictstreet.com/api-reference/tags/list-active-tags.md): Public tag taxonomy (admin-managed). Returns all currently active tags ordered by sortOrder, then name. Inactive tags are not surfaced. Use the slug as the value for /api/events?tag=. - [Co-sign a NegRisk position convert (NO-basket → USDC)](https://docs.adipredictstreet.com/api-reference/vault/co-sign-a-negrisk-position-convert-no-basket-→-usdc.md): NegRisk-only collapse of a NO-basket back to collateral. Routes through NegRiskAdapter on-chain rather than the vault CTF path. - [Get backend co-signature for vault.mergePositions](https://docs.adipredictstreet.com/api-reference/vault/get-backend-co-signature-for-vaultmergepositions.md): Inverse of split. Returns the backend co-signature needed to call `vault.mergePositions(...)` on-chain — burns equal units of every outcome ERC-1155 inside the vault and credits the corresponding USDC amount. The flow: (1) POST this endpoint with `{marketId, amount}` → server signs the MergePosition… - [Get backend co-signature for vault.splitPosition](https://docs.adipredictstreet.com/api-reference/vault/get-backend-co-signature-for-vaultsplitposition.md): Returns the backend co-signature needed to call `vault.splitPosition(...)` on-chain. The flow: (1) POST this endpoint with `{marketId, amount}` → server signs the SplitPosition typed-data and returns the cosig + salt + deadline. (2) Sign the same struct yourself with your EOA against the vault's EIP… - [Release an EXPIRED split / merge lock after verifying on-chain absence](https://docs.adipredictstreet.com/api-reference/vault/release-an-expired-split-merge-lock-after-verifying-on-chain-absence.md): User-initiated recovery for an EXPIRED dual-signed operation when the backend's automatic sweeper is disabled in observation-only mode. Releases the off-chain lock back to the caller's balance after PG-side chain verification that the operation did NOT execute on-chain. - [Commands](https://docs.adipredictstreet.com/api-reference/websocket/commands.md): Client → server commands: subscribe, update_subscription, unsubscribe, list_subscriptions, get_book_snapshot, ping. - [Server events](https://docs.adipredictstreet.com/api-reference/websocket/events.md): Push envelope and the per-channel event catalog. - [WSS /ws/market](https://docs.adipredictstreet.com/api-reference/websocket/market.md): Market-data WebSocket gateway. X-Api-Key at handshake. Channels: token_trade_matches, token_trade_settlements, token_book, token_ohlc, condition_lifecycle, system, plus all_* firehoses. - [WebSocket overview](https://docs.adipredictstreet.com/api-reference/websocket/overview.md): Two gateways — /ws/market and /ws/user, both authenticated — sharing one Kalshi-style command envelope. Channels keyed by tokenId / conditionId / vault address. - [WSS /ws/user](https://docs.adipredictstreet.com/api-reference/websocket/user.md): Authenticated WebSocket gateway for own order lifecycle and trade fills. X-Api-Key at handshake, portfolio:read scope. - [Cancel a pending withdrawal](https://docs.adipredictstreet.com/api-reference/withdrawals/cancel-a-pending-withdrawal.md): Only succeeds while the row is in `PENDING` / `MLRO_REVIEW` / `CO_SIGNED`. Once `SUBMITTED` on-chain the cancel is rejected — chain has irrevocable custody at that point. Returns the updated record with `status=CANCELLED` on success. - [Estimate the fee for a prospective withdrawal](https://docs.adipredictstreet.com/api-reference/withdrawals/estimate-the-fee-for-a-prospective-withdrawal.md): Read-only — does NOT submit. Use to show the user the total cost (`amount + protocolFee + gasEstimate`) before they sign the EIP-712 payload and POST `/api/withdrawals/request`. Gas estimate is at the current basefee; actual on-chain cost may differ marginally. - [Fetch a single withdrawal by id](https://docs.adipredictstreet.com/api-reference/withdrawals/fetch-a-single-withdrawal-by-id.md): `404` with `code=withdrawal_not_found` if the id does not belong to the authenticated wallet. - [Initiate a withdrawal](https://docs.adipredictstreet.com/api-reference/withdrawals/initiate-a-withdrawal.md): Submits a USDC withdrawal request signed by the user's EOA. The backend co-signs after compliance review. Funds movement on-chain requires BOTH the user signature in `userSig` and the backend co-signature — neither party can move funds alone. Rate-limited to 5 req/min per wallet. - [List allowed withdrawal destinations](https://docs.adipredictstreet.com/api-reference/withdrawals/list-allowed-withdrawal-destinations.md): A withdrawal destination must match a prior cleared deposit source — withdrawing to anything outside this allowlist either rejects (under high-value review threshold) or routes to compliance review (above the threshold). - [Paginated withdrawal history](https://docs.adipredictstreet.com/api-reference/withdrawals/paginated-withdrawal-history.md): Cursor-paginated, reverse-chronological. Returns the same record shape as `/api/me/withdrawals/{id}`. - [API keys](https://docs.adipredictstreet.com/auth/api-keys.md): The only way to authenticate against core-api.adipredictstreet.com. Every request sends X-Api-Key; every write additionally carries an EIP-712 signature. - [Authentication overview](https://docs.adipredictstreet.com/auth/overview.md): PredictStreet's integrator API authenticates every request with an X-Api-Key header. Every operation that moves money is additionally signed with EIP-712. - [Rate limits](https://docs.adipredictstreet.com/auth/rate-limits.md): Per-endpoint, per-IP, per-wallet rate-limit table and retry guidance. - [Addresses](https://docs.adipredictstreet.com/concepts/contracts/addresses.md): Production contract address registry. - [ConditionalTokens](https://docs.adipredictstreet.com/concepts/contracts/conditional-tokens.md): Polymarket-compatible ERC-1155 position tokens. - [CTFExchange](https://docs.adipredictstreet.com/concepts/contracts/ctf-exchange.md): Signed-order matching with the PS_QUADRATIC_V1 taker-fee curve. - [NegRiskAdapter](https://docs.adipredictstreet.com/concepts/contracts/neg-risk-adapter.md): Multi-outcome market adapter with convertPositions. - [PredictStreetOracle](https://docs.adipredictstreet.com/concepts/contracts/oracle.md): On-chain outcome proposal, challenge, and finalise contract. - [Contracts overview](https://docs.adipredictstreet.com/concepts/contracts/overview.md): The on-chain surface — vaults, exchanges, conditional tokens, oracle. - [VaultFactory + VaultImplementation](https://docs.adipredictstreet.com/concepts/contracts/vaults.md): Per-user custody with dual-sig withdrawals and emergency path. - [Deposit limits](https://docs.adipredictstreet.com/concepts/deposits/limits.md): Per-EOA daily / weekly / monthly caps enforced on-chain by DepositLimitRegistry. Defaults, rolling windows, and how to read your current usage. - [Deposits overview](https://docs.adipredictstreet.com/concepts/deposits/overview.md): How USDC moves from your associated EOA into your on-chain vault, and how long the platform takes to credit available balance. - [Events overview](https://docs.adipredictstreet.com/concepts/events/overview.md): Polymarket-style event grouping with football metadata, tags, and filters. - [Binary markets](https://docs.adipredictstreet.com/concepts/markets/binary.md): Two-outcome YES/NO markets settled through CTFExchange + ConditionalTokens. - [Market status](https://docs.adipredictstreet.com/concepts/markets/market-status.md): Every state in the market lifecycle and what it means for trading. - [Neg-risk markets](https://docs.adipredictstreet.com/concepts/markets/neg-risk.md): Multi-outcome markets (3+ mutually exclusive) settled through the NegRiskAdapter. - [Orderbook](https://docs.adipredictstreet.com/concepts/markets/orderbook.md): Snapshot + incremental update formats. - [Markets overview](https://docs.adipredictstreet.com/concepts/markets/overview.md): Binary and neg-risk markets, lifecycle, and how to query them. - [Partner Trades & Reconciliation](https://docs.adipredictstreet.com/concepts/partners/trades-and-recon.md): Cross-wallet executed-trade feed and window-aggregate reconciliation for auditor / regulator-tech integrations. - [Balances](https://docs.adipredictstreet.com/concepts/portfolio/balances.md): available + locked columns, append-only ledger, and how to read them. - [Positions](https://docs.adipredictstreet.com/concepts/portfolio/positions.md): Outcome-token holdings derived from trade history. - [Trades](https://docs.adipredictstreet.com/concepts/portfolio/trades.md): Trade history with filters and lifecycle status. - [Challenges](https://docs.adipredictstreet.com/concepts/settlement/challenges.md): Post a 10 USDC bond to dispute an oracle proposal; three possible outcomes (binary markets only). - [Settlement flow](https://docs.adipredictstreet.com/concepts/settlement/flow.md): Per-market-type timelines from event end to USDC distribution. - [Settlement & oracle overview](https://docs.adipredictstreet.com/concepts/settlement/overview.md): How outcomes are proposed, challenged, and finalised on-chain. - [Void & delayed markets](https://docs.adipredictstreet.com/concepts/settlement/void-delay.md): What happens when automated settlement cannot proceed safely. - [Cancelling orders](https://docs.adipredictstreet.com/concepts/trading/cancelling.md): Single-order cancel, cancel-all by market, and what happens under the hood. - [EIP-712 signing](https://docs.adipredictstreet.com/concepts/trading/eip712-signing.md): The Order typed-data struct PredictStreet uses, domain parameters, SignatureType modes, and signing examples. - [Order lifecycle](https://docs.adipredictstreet.com/concepts/trading/order-lifecycle.md): The 8-state journey an order takes from client signature to terminal state, with balance and matcher effects at every step. - [Placing orders](https://docs.adipredictstreet.com/concepts/trading/placing-orders.md): HTTP request schema, validation rules, and worked example for POST /api/orders. - [Time-in-force](https://docs.adipredictstreet.com/concepts/trading/time-in-force.md): GTC / IOC / FOK semantics for LIMIT and MARKET orders. - [Backend auto-deploy](https://docs.adipredictstreet.com/concepts/vaults/auto-deploy.md): The platform deploys every partner vault automatically — partners do not call deployVault, do not pay deploy gas, and do not coordinate the on-chain bootstrap. - [Vaults overview](https://docs.adipredictstreet.com/concepts/vaults/overview.md): Why every PredictStreet trader has their own on-chain vault, and what it does for you. - [Recovering expired split / merge locks](https://docs.adipredictstreet.com/concepts/vaults/recovery.md): How to reclaim a vault's off-chain balance lock when the on-chain split or merge tx never confirmed. - [Message shapes](https://docs.adipredictstreet.com/concepts/websocket/messages.md): Outbound event envelope and the per-channel event catalog. - [WebSocket overview](https://docs.adipredictstreet.com/concepts/websocket/overview.md): Two gateways (/ws/market and /ws/user), X-Api-Key at handshake, Kalshi-style command envelope, channels keyed by tokenId / conditionId. - [Reconnect & resync](https://docs.adipredictstreet.com/concepts/websocket/reconnect.md): How to recover from disconnects, ping/pong, sid lifecycle, orderbook gap detection. - [Subscriptions](https://docs.adipredictstreet.com/concepts/websocket/subscriptions.md): Per-channel subscription payloads + subscribe / update / unsubscribe / list / ping commands. - [Deposit sources & EDD](https://docs.adipredictstreet.com/concepts/withdrawals/deposit-sources.md): Why the first withdrawal to a new destination triggers enhanced due diligence, and how to whitelist destinations up-front. - [Dual-signature flow](https://docs.adipredictstreet.com/concepts/withdrawals/dual-sig.md): Why withdrawals require two EIP-712 signatures and how the co-sign works in practice. - [WithdrawERC20 EIP-712](https://docs.adipredictstreet.com/concepts/withdrawals/eip712.md): Typed-data struct for user signature on withdrawal requests. - [Withdrawals overview](https://docs.adipredictstreet.com/concepts/withdrawals/overview.md): Dual-signature withdrawal flow with AML / MLRO review and on-chain settlement. - [State machine](https://docs.adipredictstreet.com/concepts/withdrawals/state-machine.md): All withdrawal states, transitions, and balance effects. - [Environment](https://docs.adipredictstreet.com/environments.md): Base URLs, chain configuration, and contract addresses for the PredictStreet production deployment. - [Error codes](https://docs.adipredictstreet.com/errors/codes.md): Complete list of error codes across the PredictStreet API. - [Errors overview](https://docs.adipredictstreet.com/errors/overview.md): HTTP status code conventions + PredictStreet error codes. - [Introduction](https://docs.adipredictstreet.com/introduction.md): PredictStreet is an institutional-grade prediction-market platform with on-chain custody, an off-chain central-limit orderbook, and automated oracle settlement. - [Platform overview](https://docs.adipredictstreet.com/platform-overview.md): How PredictStreet splits responsibility between off-chain services for speed and on-chain contracts for custody. - [Quickstart](https://docs.adipredictstreet.com/quickstart.md): End-to-end production onboarding for integrators: mint USDC → deploy vault → deposit → place LIMIT/MARKET orders → split for SELL. Copy-paste TypeScript that takes your associatedWallet from zero to its first fill using a partner API key. ## OpenAPI Specs - [openapi](https://docs.adipredictstreet.com/api-reference/openapi.json)