Skip to content
Fourohtwo

Construct a prediction-market order

chainhilt.ai/api/v1/predict/polymarket/orders/construct

Construct a prediction-market order; never submits. Needs a `credentialToken` from /predict/polymarket/credentials. Returns `construction` and a signature action the chainhilt wallet signs and POSTs to /predict/polymarket/orders/submit. Review orderSummary and warnings before signing: `estimatedBuilderFee` (ours) and `estimatedVenueFee` (Polymarket's) are pUSD on top of the principal. Errors: 400

BaseAnswering
POSThttps://chainhilt.ai/api/v1/predict/polymarket/orders/construct

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://chainhilt.ai/api/v1/predict/polymarket/orders/construct", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"account":"0xE4934BB19E0B97109033dBfDcCc6957E32F9Cc60","credentialToken":"pcr1.…","marketId":"512329","orderType":"GTC","outcomeTokenId":"111","postOnly":false,"price":"0.42","side":"buy","size":"10","walletType":"deposit_wallet"}),
});
console.log(await res.json());

Example input

{
  "account": "0xE4934BB19E0B97109033dBfDcCc6957E32F9Cc60",
  "credentialToken": "pcr1.…",
  "marketId": "512329",
  "orderType": "GTC",
  "outcomeTokenId": "111",
  "postOnly": false,
  "price": "0.42",
  "side": "buy",
  "size": "10",
  "walletType": "deposit_wallet"
}

More from chainhilt-x402Provider status