# Blink ## Docs - [Get balance and allowance for a user - GET /balance-allowance](https://docs.blink15.com/api-reference/account/get-balance-and-allowance-for-a-user--get-balance-allowance.md): Query params: - asset_type: "COLLATERAL" (USDC) or "CONDITIONAL" (CTF tokens) - token_id: Required for CONDITIONAL type, the token ID to check - [GET /wallet-status?address=0x...](https://docs.blink15.com/api-reference/account/get-wallet-status?address=0x.md): Returns USDC balance, USDC allowance (for exchange), and CTF approval status for the given wallet address. All values are publicly readable on-chain, so no authentication is required. - [Create new API credentials (L1 EIP-712 auth)](https://docs.blink15.com/api-reference/auth/create-new-api-credentials-l1-eip-712-auth.md): POST /auth/api-key - [Derive existing API credentials (L1 EIP-712 auth)](https://docs.blink15.com/api-reference/auth/derive-existing-api-credentials-l1-eip-712-auth.md): GET /auth/derive-api-key - [POST /faucet/claim — mint TestUSDC to a user address](https://docs.blink15.com/api-reference/faucet/post-faucetclaim-—-mint-testusdc-to-a-user-address.md) - [POST /v1/permit — relay a signed EIP-2612 permit to set USDC allowance](https://docs.blink15.com/api-reference/faucet/post-v1permit-—-relay-a-signed-eip-2612-permit-to-set-usdc-allowance.md): The user signs the permit off-chain (no gas). This endpoint submits it on-chain using the operator/faucet wallet (which pays gas). This enables gasless USDC approvals for users. - [POST /v1/prefund-ctf-approval — sponsor ETH so user can call setApprovalForAll](https://docs.blink15.com/api-reference/faucet/post-v1prefund-ctf-approval-—-sponsor-eth-so-user-can-call-setapprovalforall.md): 1. Check if CTF is already approved → return early 2. Check if user has enough ETH → return early 3. Send ETH from faucet wallet, wait for receipt 4. Return confirmation so frontend can immediately send the approval TX - [Get time](https://docs.blink15.com/api-reference/health/get-time.md) - [Health check - GET /](https://docs.blink15.com/api-reference/health/health-check--get-.md) - [Liveness probe - just checks if the process is running](https://docs.blink15.com/api-reference/health/liveness-probe--just-checks-if-the-process-is-running.md): GET /health - [Readiness probe - checks if the service can handle traffic](https://docs.blink15.com/api-reference/health/readiness-probe--checks-if-the-service-can-handle-traffic.md): GET /health/ready - [Get book](https://docs.blink15.com/api-reference/market-data/get-book.md) - [Get last trade price](https://docs.blink15.com/api-reference/market-data/get-last-trade-price.md) - [Get midpoint](https://docs.blink15.com/api-reference/market-data/get-midpoint.md) - [Get price](https://docs.blink15.com/api-reference/market-data/get-price.md) - [Get spread](https://docs.blink15.com/api-reference/market-data/get-spread.md) - [Get tick size](https://docs.blink15.com/api-reference/market-data/get-tick-size.md) - [Get unified orderbook - GET /book/unified](https://docs.blink15.com/api-reference/market-data/get-unified-orderbook--get-bookunified.md): Returns both direct and implied liquidity (from cross-book MINT/MERGE opportunities) with visual distinction between sources. - [Get market by ID](https://docs.blink15.com/api-reference/markets/get-market-by-id.md) - [Get order book for a market](https://docs.blink15.com/api-reference/markets/get-order-book-for-a-market.md): Query params: - `token_id`: Optional hex string (no 0x prefix). Defaults to YES token. - [List markets](https://docs.blink15.com/api-reference/markets/list-markets.md) - [Get order by ID](https://docs.blink15.com/api-reference/orders/get-order-by-id.md) - [List orders with filters](https://docs.blink15.com/api-reference/orders/list-orders-with-filters.md) - [Submit a signed order](https://docs.blink15.com/api-reference/orders/submit-a-signed-order.md) - [Cancel multiple orders by ID - DELETE /orders](https://docs.blink15.com/api-reference/trading/cancel-multiple-orders-by-id--delete-orders.md): SDK sends JSON array of order ID strings: ["id1", "id2", ...] - [Cancel order - DELETE /order](https://docs.blink15.com/api-reference/trading/cancel-order--delete-order.md): Accepts both: - JSON body: {"orderID": "..."} or {"order_id": "..."} (Polymarket client) - Query param: ?order_id=... (backward compatibility) - [Delete cancel all](https://docs.blink15.com/api-reference/trading/delete-cancel-all.md) - [Get dataorders](https://docs.blink15.com/api-reference/trading/get-dataorders.md) - [Get datatrades](https://docs.blink15.com/api-reference/trading/get-datatrades.md) - [Get single order - GET /data/order/:id](https://docs.blink15.com/api-reference/trading/get-single-order--get-dataorder:id.md) - [Get user orders from DATABASE (our matching engine state)](https://docs.blink15.com/api-reference/users/get-user-orders-from-database-our-matching-engine-state.md): Orders are off-chain until matched, so we query our database. - [Get user profile summary (public)](https://docs.blink15.com/api-reference/users/get-user-profile-summary-public.md): GET /users/:address - [Get user redemption history from DATABASE](https://docs.blink15.com/api-reference/users/get-user-redemption-history-from-database.md): Returns redemptions based on settled trades for resolved markets. We track settlements in our DB. - [Get user trades from DATABASE (our matching engine history)](https://docs.blink15.com/api-reference/users/get-user-trades-from-database-our-matching-engine-history.md): GET /users/:address/trades - [Get user's on-chain history from blockchain indexer](https://docs.blink15.com/api-reference/users/get-users-on-chain-history-from-blockchain-indexer.md): Returns all indexed on-chain events (fills, transfers, redemptions) for a user. This is the authoritative history — derived directly from blockchain events. - [GET /users/:address/activity — unified activity feed](https://docs.blink15.com/api-reference/users/get-users:addressactivity-—-unified-activity-feed.md) - [GET /users/:address/portfolio-history — portfolio milestones for frontend chart](https://docs.blink15.com/api-reference/users/get-users:addressportfolio-history-—-portfolio-milestones-for-frontend-chart.md): Returns position-changing events (buy/sell/mint/redemption) with running USDC balance. The frontend combines these milestones with live position valuations to render a smooth portfolio chart. - [GET /users/:address/positions — on-chain CTF token balances for active markets.](https://docs.blink15.com/api-reference/users/get-users:addresspositions-—-on-chain-ctf-token-balances-for-active-markets.md): Returns non-zero positions only. Public endpoint (on-chain data). Uses the existing ctf_balance_cache (5s TTL) to avoid redundant RPC calls. - [Core Concepts](https://docs.blink15.com/guides/concepts.md): How prediction markets, binary tokens, and settlement work on Blink - [GLFT Model](https://docs.blink15.com/guides/glft-model.md): Market making with the Guéant-Lehalle-Fernandez-Tapia optimal quoting model - [Market Making](https://docs.blink15.com/guides/market-making.md): Build a market maker for Blink prediction markets - [Quickstart](https://docs.blink15.com/guides/quickstart.md): Place your first prediction market trade in 5 minutes - [Blink Developer Docs](https://docs.blink15.com/index.md): Trade prediction markets on Base. Polymarket-compatible API. - [Python SDK](https://docs.blink15.com/sdk/python-quickstart.md): Install and configure py-blink-client for trading on Blink - [Trading (Python)](https://docs.blink15.com/sdk/python-trading.md): Place orders, manage positions, and query market data with py-blink-client - [WebSocket Streams (Python)](https://docs.blink15.com/sdk/python-websocket.md): Real-time orderbook, trades, price ticks, and user events ## OpenAPI Specs - [openapi](https://docs.blink15.com/openapi.json)