BETA

ChainHilt is in beta. Use at your own discretion.

chainhilt

Polymarket

Trade Polymarket from your agent

Search markets, read order books and positions, and place limit orders on Polymarket. Reads need only a payment client. Trading adds the wallet, which signs on your machine while ChainHilt submits to the venue. Nothing is held for you: no keys and no funds.

Read the market, no wallet needed

Market search, market detail, order books, events, positions and activity cost $0.001 each.

GET https://chainhilt.ai/api/v1/predict/polymarket/markets/search?query=bitcoin&limit=5

A market's detail lists its outcomes with their token IDs and its resolution rules. Its book shows bids and asks per outcome. Short-horizon markets, such as the 5-minute crypto slots, never match a text query: list them with sort=closingTime and closingBefore instead.

Set up a trading account, once

  1. Mint venue credentials (free)

    POST /api/v1/predict/polymarket/credentials/prepare with your account, then process_action, returns a credentialToken. It is your venue API credentials, sealed: the server stores nothing. Treat it as a secret, and revoke it with credentials/revoke when you are done.

  2. Set up the deposit wallet ($0.01 per step)

    Orders come from a deposit wallet derived from your signer. wallet/{signer}/onboard/prepare then process_action deploys it; call it again for the trading approvals. Both steps are gasless.

  3. Fund it

    GET /api/v1/predict/polymarket/wallet/{signer} is free and returns the next onboarding step and the bridge deposit addresses. Send USDC on Base, Ethereum, Arbitrum or Polygon; it arrives as pUSD, the venue's collateral.

Place an order

  1. Quote ($0.001)

    POST /api/v1/predict/polymarket/quotes walks the live book and returns the average and worst price for your size. Nothing is reserved.

  2. Construct ($0.01)

    Authorize, then send POST /api/v1/predict/polymarket/orders/construct with the credentialToken in the body. Review the order summary and both fees, ChainHilt's builder fee and Polymarket's taker fee, which are paid on top of the principal.

  3. Sign

    process_action signs the order and ChainHilt submits it to the venue. The result carries the order ID and its status.

Orders are limits only (GTC or GTD). To trade right away, construct a GTC at the quote's worst price and cancel any remainder.

Manage orders and positions

  • Open orders, order status, cancel, cancel a market, and cancel everything are free. Each takes the credentialToken in the request body.
  • Positions and activity show holdings, fills and redemptions. Resolved winning positions are usually redeemed into pUSD automatically within seconds.
  • Funding and withdrawals are not reversible.

Endpoints

Polymarket endpoints and their prices
EndpointPriceWhat it does
GET /api/v1/predict/polymarket/wallet/{signer}FreeOnboarding and funding status for a venue trading wallet
POST /api/v1/predict/polymarket/wallet/{signer}/deposit/prepareFreePrepare the transfer that funds a venue trading wallet
POST /api/v1/predict/polymarket/credentials/prepareFreeStart the venue credential handshake (returns a signature action)
POST /api/v1/predict/polymarket/credentialsFreeExchange the signed credential challenge for a sealed credentialToken
POST /api/v1/predict/polymarket/credentials/revokeFreeRevoke the venue API credentials behind a credentialToken
POST /api/v1/predict/polymarket/orders/submitFreeSubmit a signed construction to the venue (wallet submitPath)
POST /api/v1/predict/polymarket/orders/cancelFreeCancel one resting order
POST /api/v1/predict/polymarket/orders/cancel-allFreeKill switch: cancel every resting order and confirm the book is flat
POST /api/v1/predict/polymarket/orders/cancel-marketFreeCancel every resting order in one market and confirm that scope is flat
POST /api/v1/predict/polymarket/orders/openFreeList resting orders for the credentialed account
POST /api/v1/predict/polymarket/orders/statusFreeRead one order by id for the credentialed account
POST /api/v1/predict/polymarket/wallet/batch/submitFreeRelay a signed wallet batch (wallet submitPath)
GET /api/v1/predict/polymarket/wallet/{signer}/transactions/{transactionID}FreeRelayer transaction status
GET /api/v1/predict/polymarket/markets/search$0.001Search prediction markets.
GET /api/v1/predict/polymarket/markets/{marketId}$0.001Prediction market detail: resolution rules, outcomes with their tokenIds, tick size, fees and the raw venue payload.
GET /api/v1/predict/polymarket/markets/{marketId}/book$0.001Live order book for each outcome of a prediction market: bids and asks (price, size) per outcome tokenId, read from the venue at observedAt.
GET /api/v1/predict/polymarket/events/{eventId}$0.001An event and every market under it.
GET /api/v1/predict/polymarket/positions/{address}$0.001Held outcome-token positions with PnL and redeemability.
GET /api/v1/predict/polymarket/activity/{address}$0.001Trade and settlement history of a venue account, newest first and cursor-paged: fills (TRADE, with the pUSD that actually moved, fees included), REDEEM, SPLIT/MERGE, CONVERSION and rewards, each with its Polygon transaction hash.
POST /api/v1/predict/polymarket/quotes$0.001Deterministic prediction-market quote from the live order book: integer micro-unit book walk (buys round principal up, sells round proceeds down).
POST /api/v1/predict/polymarket/orders/construct$0.01Construct a prediction-market order; never submits.
POST /api/v1/predict/polymarket/wallet/{signer}/onboard/prepare$0.01Deploy the deposit wallet, then add its missing trading approvals, one step per call.
POST /api/v1/predict/polymarket/wallet/{signer}/fund/prepare$0.001Prepare a batch moving native USDC held by the deposit wallet to the bridge (credited as pUSD).
POST /api/v1/predict/polymarket/wallet/{signer}/withdraw/prepare$0.001Prepare a pUSD withdrawal batch to the bridge routing address.
POST /api/v1/predict/polymarket/wallet/{signer}/redeem/prepare$0.01Prepare a batch redeeming resolved positions to pUSD; conditionId narrows it to one condition.

Next

  • New here? Start with the quickstart; its first paid call is a market search.
  • skills.md covers withdrawals, redemption and error handling in the detail your agent needs.