Skip to content

Overview

You have an app with its own accounts

Your users log in to your app as they do today, then link their STX account once.

You're building a new app with no login yet

People register or log in with their STX account.

You use a login service like Auth0 or Clerk

Keep your login and link STX accounts, or add STX as a login option in the service.

Your app can act for STX members: read their balance, positions and orders, and trade for them, with access each member approves on STX and can take back at any time. You never see their password, and nothing your app holds can move their money.

All three share the same scopes, the same handling of members still being verified, and the same discovery documents and errors. If you are building a product for STX members, Apps covers how to get access.

STX supports two ways to authenticate. An API key signs requests for your own account. OAuth lets an app act for other STX members: a member signs in on STX, approves the access your app asks for, and your app calls the API for them with a scoped token they can revoke at any time.

STX uses standard OAuth 2.0: the authorization code flow with PKCE (Proof Key for Code Exchange), with OpenID Connect on the same flow when the STX account is the login. A standard client library works against it.

API key OAuth
Who acts You, on your own account Your app, for a member, or as itself
Credential Your Ed25519 key A member’s scoped access token, or an app token
The member’s secrets You hold your own key You never see them
Consent Not applicable The member grants it once and can revoke it
Good for Your own trading, bots, market making A product used by STX members; a site showing prices

Trading your own account needs only an API key; see Authentication.

  • Client: your application, registered once with STX as one of four application types. It has a public client_id and, for a Web app or Server-to-server app, a client_secret.
  • Member: an STX account holder using your app. They sign in to STX directly; you never handle their credentials.
  • Grant: a member’s standing consent for your client, the set of scopes they approved. One active grant per member per client. Revoking it cuts your access.
  • Scope: a named slice of access, such as balance.read or orders.write. See Scopes. Deposits and withdrawals are never delegable.

A member token (authorization code with PKCE) proves your app may act for one member within a scope. A refresh token gets a new one without the member. An app token (client_credentials) authenticates the app itself, with no member, for the public market and event catalogue. All are opaque strings. Hold tokens on your server where you have one. A Browser app or Mobile or desktop app keeps them in memory or the platform’s secure storage, never in a URL, a log or a shipped bundle.

Endpoint Method Auth Purpose
/oauth/authorize GET member’s browser session Send the member to consent (Authorization code flow)
/oauth/token POST client_secret_basic, or client_id for a Browser app or Mobile or desktop app Code exchange, refresh, client credentials
/oauth/revoke POST same Revoke a token pair, or the whole grant with a refresh token (Revoking)
/oauth/introspect POST client_secret_basic Check one of your own tokens (Checking a token)
/oauth/register POST none Dynamic client registration, off by default (Dynamic registration)
/oauth/userinfo GET member access token with openid The signed-in member’s id and email (UserInfo)
/.well-known/oauth-authorization-server, /.well-known/openid-configuration GET none Server metadata, RFC 8414 and OpenID Connect Discovery (Discovery)
/.well-known/jwks.json GET none The keys that verify an ID token (Signing keys)
/.well-known/oauth-protected-resource GET none Resource metadata, RFC 9728 (Discovery)

An access token is a bearer on the same REST API a signed request uses, sent as Authorization: Bearer <token> on /api/v1. On the WebSocket, send it in the handshake header x-stx-oauth-token. Every call is limited to the scopes the member approved; see effective scope.

The rate limit guidance applies to calls made with an OAuth token as it does to signed requests.

STX is operated by XV Exchange, LLC, a Designated Contract Market regulated by the U.S. Commodity Futures Trading Commission (CFTC). Contracts traded on STX are cleared by XV Clearing, LLC, a CFTC-registered Derivatives Clearing Organization. Trading involves substantial risk of loss and may not be appropriate for everyone. Members risk losing the cost to enter any transaction, including fees. Consider whether trading is appropriate for you in light of your experience and financial resources. Nothing on this site is investment advice or a recommendation to trade. Past performance is not indicative of future results.

© 2026 STX. All rights reserved.llms.txtllms-full.txtView as Markdown
Docs version v1.10.5