Skip to content

Environments

Describes @stxapp/stx-typescript 0.12.1, the current release.

The exchanges, their hosts and which one to start with are listed on Environments. In the SDK, pick one with environment, or with region and env (as options, as STX_REGION and STX_ENV, or in a credentials profile):

Exchange environment region env
STX US demo Environments.USDemo "us" "demo"
STX Ontario demo Environments.OntarioDemo "ontario" "demo"
STX Ontario Environments.OntarioProduction "ontario" "production"
import { Environments, STX } from "@stxapp/stx-typescript";
const client = new STX({ environment: Environments.USDemo, keyId, privateKey });
// same exchange:
const same = new STX({ region: "us", env: "demo", keyId, privateKey });

An API key works on one exchange only, so keep one credentials profile per exchange and switch with profile.

To reach any other host, such as a local server, pass host: "http://localhost:4000" (or set STX_HOST). The URL’s scheme is kept for both HTTP and the socket.

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