Skip to main content
POST
/
api
/
{exchange}
/
buildOrder
curl --request POST \
  --url https://api.pmxt.dev/api/{exchange}/buildOrder \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "args": [
    {
      "marketId": "<string>",
      "outcomeId": "<string>",
      "side": "buy",
      "type": "market",
      "amount": 123,
      "price": 123,
      "fee": 123,
      "tickSize": 123,
      "negRisk": true
    }
  ],
  "credentials": {
    "apiKey": "<string>",
    "apiSecret": "<string>",
    "passphrase": "<string>",
    "apiToken": "<string>",
    "privateKey": "<string>",
    "signatureType": 123,
    "funderAddress": "<string>"
  }
}
'
{
  "success": true,
  "error": {
    "message": "<string>"
  },
  "data": {
    "exchange": "<string>",
    "params": {
      "marketId": "<string>",
      "outcomeId": "<string>",
      "side": "buy",
      "type": "market",
      "amount": 123,
      "price": 123,
      "fee": 123,
      "tickSize": 123,
      "negRisk": true
    },
    "raw": "<unknown>",
    "signedOrder": {},
    "tx": {
      "to": "<string>",
      "data": "<string>",
      "value": "<string>",
      "chainId": 123
    }
  }
}

Authorizations

Authorization
string
header
required

Required when calling the hosted API directly (curl, requests, fetch). SDK users pass credentials via constructor params instead.

Path Parameters

exchange
enum<string>
required

The prediction market exchange to target.

Available options:
polymarket,
kalshi,
kalshi-demo,
limitless,
probable,
baozi,
myriad,
opinion,
metaculus,
smarkets,
polymarket_us

Body

application/json
args
object[]
required
Required array length: 1 element
credentials
object

Optional authentication credentials for exchange operations.

Response

200 - application/json

Build Order response

success
boolean
Example:

true

error
object
data
object