Skip to content

Installation

Describes github.com/stxapp/stx-go v0.3.1, the current release.

go get github.com/stxapp/stx-go

Requires Go 1.24 or newer. The module depends on the standard library and one WebSocket library, github.com/coder/websocket.

The package name is stx:

package main
import (
"fmt"
stx "github.com/stxapp/stx-go"
)
func main() {
fmt.Println("stx-go", stx.Version)
}
stx-go 0.1.0

OAuth for apps lives in its own package, github.com/stxapp/stx-go/oauth. Import it only if you build an app that acts for other STX members; see Apps.

The examples in this guide are complete programs or fragments of one. Save a complete program as main.go in a module that requires the SDK, and run it:

go mod init example.com/stx-quickstart
go get github.com/stxapp/stx-go
go run .

Fragments assume a ctx (a context.Context) and a client from stx.New(), as in the overview.

Pin a version in production. Before 1.0.0, a minor release can change the API.

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