Skip to content

STX API Documentation

Build on STX

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"
}
STXExchange

Build

Build an app for STX members

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

Build an app
  1. Your app
  2. OAuth
  3. STX memberAccounts and permissions
  4. STX exchange

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

Not sure? Which path is yours?

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", …
 }]