{"uid":"cap_XfGAd_VJlhrC8JZK0Ffj6","slug":"chainhilt-polymarket-quote-fb9440b3","name":"ChainHilt Polymarket Quote","description":"Deterministic prediction-market quote from the live order book: integer micro-unit book walk (buys round principal up, sells round proceeds down). `estimatedVenueFee` is Polymarket's own taker fee at the average price (shares × rate × p × (1 − p), from the market's live fee schedule; null when the venue reports a fee type this API cannot price). Informational only — nothing is reserved. Errors: 400 invalid input, 422 untradable market, wrong token or thin book, 502 venue failure.","url":"https://chainhilt.ai/api/v1/predict/polymarket/quotes?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"side":{"enum":["buy","sell"],"type":"string","description":"buy walks the asks, sell walks the bids."},"amount":{"type":"string","pattern":"^[0-9]+(\\.[0-9]{1,6})?$","description":"Shares or pUSD per `amountType`, up to 6 decimals."},"marketId":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,128}$","description":"Polymarket market id from markets/search."},"maxPrice":{"type":"string","pattern":"^0\\.[0-9]{1,6}$","description":"Worst acceptable price per share (0-1): a ceiling for buys, a floor for sells."},"amountType":{"enum":["shares","collateral"],"type":"string","description":"Whether `amount` counts shares or pUSD (spent on a buy, received on a sell)."},"outcomeTokenId":{"type":"string","minLength":1,"description":"The outcome's `tokenId` from the market's `outcomes`; must belong to `marketId`."}}},"responseSchema":{"type":"json","example":{"quote":{"side":"buy","marketId":"512329","validUntil":"2026-01-01T00:00:30.000Z","worstPrice":"0.44","averagePrice":"0.4312","outcomeTokenId":"111","priceImpactBps":12,"estimatedShares":"10","estimatedVenueFee":{"asset":"pUSD","amount":"0.098107"},"estimatedPrincipal":{"asset":"pUSD","amount":"4.312"}}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wg9afMgxC2p4-STV2ld9E","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a deterministic, order-book-walked price quote for buying or selling shares on a Polymarket prediction market, including estimated venue fees, without reserving any position.","exampleAgentPrompt":"What's the current buy quote for 50 shares of the 'Yes' outcome on Polymarket market abc123 using outcome token xyz789 — tell me the total collateral cost and estimated fee, with a max price of 0.72 per share.","exampleUseCases":[{"title":"Pre-trade slippage check for large buy","prompt":"Before I commit, can you simulate buying 200 shares of the 'Yes' token on Polymarket market def456 (outcome token tok789) and tell me the total pUSD cost and estimated venue fee? My ceiling price is 0.65 per share."},{"title":"Sell quote for position exit","prompt":"I want to exit my Polymarket position — quote me selling 100 shares of outcome token abc321 on market mkt999, with a price floor of 0.40 per share, and tell me how much pUSD I'd receive."},{"title":"Collateral-based buy estimation","prompt":"If I spend exactly 50 pUSD buying into the 'No' outcome token tok111 on Polymarket market mar222, how many shares would I get and what's the average price? Max price 0.55."}],"resultDescription":"Returns a deterministic order-book-walked quote including: the average fill price per share, total cost in micro-units (collateral for buys or shares for sells rounded per side), estimated Polymarket taker fee (estimatedVenueFee, null if unpriced fee type), and depth consumed from the live order book. Nothing is reserved or executed.","failureModes":["400 Bad Request: invalid input parameters (malformed amount, bad pattern for marketId, maxPrice out of 0-1 range)","422 Unprocessable Entity: untradable market, mismatched outcomeTokenId for given marketId, or order book too thin to fill the requested amount","502 Bad Gateway: Polymarket venue is unreachable or returning errors","maxPrice constraint not satisfiable causes rejection rather than partial fill","null estimatedVenueFee when the market uses a fee type the API cannot price"],"whenToPreferThis":"Use this endpoint when you need a deterministic, order-book-accurate price quote for a Polymarket trade before committing to execution. Prefer it over generic market data endpoints when you need slippage-aware pricing (book walk), Polymarket-specific taker fee estimation, and support for both share-denominated and collateral-denominated sizing. Ideal for pre-trade validation, position sizing, and max-price feasibility checks without side effects.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-17T18:45:56.843Z","isFirstParty":false,"canonicalSlug":"chainhilt-polymarket-quote-fb9440b3"}