Skip to content

STX Prediction API Documentation

Build on the STX Prediction Platform

Trade programmatically or build apps for STX members. Real markets, real-time data, developer-first.

Trade

Trade with your own account

An API key, signed requests and live fills. Use the REST API, WebSockets or an SDK.

Quick start
POST /api/v1/orders
// signed: X-STX-ACCESS-* headers
{
  "market_id": "9d42e9c9-…",
  "action": "buy",
  "order_type": "limit",
  "price": "0.42",
  "quantity": "10"
}
STXPrediction
Platform

Build

Build an app for STX members

Your users connect their STX accounts, and your app trades for them with the access they approve.

Start with ISV
  1. Your app
  2. OAuth
  3. STX memberAccounts and permissions
  4. STX Prediction Platform

New to prediction markets? Concepts covers binary contracts, matching, liability and settlement.

Place it over REST, get the response, then watch the fill arrive on your socket.

1Place an order

curl -X POST https://demo.stxapp.io/api/v1/orders \
  -H "X-STX-ACCESS-KEY: $KEY_ID" \
  -H "X-STX-ACCESS-TIMESTAMP: $TS" \
  -H "X-STX-ACCESS-SIGNATURE: $SIG" \
  -H "Content-Type: application/json" \
  -d '{"market_id":"2bc3d8d8-…",
      "action":"buy","order_type":"limit",
      "price":"0.42","quantity":"10"}'

2REST · 200accepted

{
  "order": {
    "id": "7dc6671e-2852-…",
    "status": "accepted",
    "price": "0.4200",
    "quantity": "10.00",
    "filled": "0.00",
    "avg_price": null, …
  }
}

3Socket · ordersfilled

[null, null, "orders:<user_id>",
 "new_open_order", {
   "id": "7dc6671e-2852-…",
   "status": "filled",
   "quantity": "10.00",
   "filled": "10.00",
   "filled_percentage": 100,
   "avg_price": "0.4200", …
 }]
v1.5.9Changelogllms.txtllms-full.txt