Skip to main content

Installation

Packages

API Client

All methods accept a context.Context for cancellation and timeouts.
Optional fields in the Go SDK use pointer types (*int, *string). The intPtr and strPtr helpers above are not part of the SDK. Define them in your own code or use inline expressions like &[]int{2000}[0].

Custom Options

Exit Intelligence Stream Session

Liquidity Snapshots and Partial Sells

Tier 1+ only. Requires a Professional or Advanced subscription. See the announcement for full details.
StreamSession caches the latest liquidity snapshot per position. Query slippage bands, maximum sellable amounts, and liquidity trends:
Use BuildPartialSellTx() to sell a portion of a position based on slippage data:

Mirror Trading

Configure watch wallets to mirror trades from other wallets. When a watched wallet opens a position on a supported market, the stream sends a MirrorBuySignalServerMessage with an unsigned transaction for your wallet to execute.
The WatchWallets slice specifies which wallets to mirror. Each WatchWalletConfig includes an AutoBuy configuration that controls how much to spend when mirroring a trade, and a MirrorSell flag that determines whether to also mirror sell transactions. The MirrorConfig struct sets global limits: MaxPositionsPerWallet caps concurrent mirrored positions, CooldownSec enforces a delay between mirror buys, MaxActiveSOL limits total SOL exposure, and BuySlippageBps sets the slippage tolerance for mirror buy transactions.

Transaction Helpers

The second parameter to SendTransaction is an *http.Client. Pass nil to use the SDK’s default HTTP client.

Error Handling

context.Context Patterns

All Go SDK methods accept context.Context as their first argument. Use this to control:
  • Timeouts: context.WithTimeout(ctx, 5*time.Second)
  • Cancellation: context.WithCancel(ctx) for graceful shutdown
  • Deadlines: context.WithDeadline(ctx, time.Now().Add(30*time.Second))

Complete Example

See the Quickstart for a full working example.