# STX Prediction API Documentation

> Build on the STX Prediction Platform, an order book for binary contracts, with REST, WebSocket channels and Ed25519 request signing.

Source: https://docs.stxapp.io/

<Hero />

## One order, end to end

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

<OrderFlow />

## Core operations

  - [Markets and events](/api/rest/markets/): Query markets and events, filter by competition and status.
  - [Orders](/api/rest/orders/): Place and cancel orders; list your resting book. Re-quoting is cancel-then-place, with no atomic replace.
  - [WebSocket channels](/websockets/): Phoenix channels for live market data, and your own orders, fills and positions.
  - [Portfolio](/api/rest/portfolio/): Settlements, deposits, withdrawals and loyalty.

## Reference and tools

  - [Live markets](/explore/live-markets/): A real order book, streaming, with no API key. See current spreads and depth before deciding whether to build.
  - [Postman collection](/downloads/stx-rest-api.postman_collection.json): Every REST endpoint, with the Ed25519 signing script already wired in.
  - [Authentication](/api/authentication/): How to sign a request with your Ed25519 key, in five languages, with a known key and signature to check your code against.
  - [OAuth](/oauth/): How an app gets a member's consent: the authorization code flow, scopes, tokens and discovery.
  - [SDKs](/sdks/): Official TypeScript, Python and C# clients: typed calls, signed requests and live channels, ready to install.
  - [Examples on GitHub](https://github.com/stxapp/stx-api-examples): Signed requests, order placement and live channel watchers in Python and JavaScript.
