Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ostium.com/llms.txt

Use this file to discover all available pages before exploring further.

The SDK exposes four write-enabled execution modes plus a read-only mode. Each mode answers three questions:
  • whose address owns the USDC and positions
  • who signs the transaction payload
  • whether submission happens as a normal EOA transaction or a gasless Safe user operation

Mode matrix

ModeTrader funds live inSignerSubmitterTypical use
self-selftrader EOAtrader EOAtrader EOAwallet-driven apps, bots, simple scripts
self-gaslesstrader EOAtrader EOAtrader Safeclient apps that want gasless trading after one-time setup
delegated-selftrader EOAdelegate EOAdelegate EOAbackend execution on behalf of users
delegated-gaslesstrader EOAdelegate EOAdelegate Safegasless backend execution on behalf of users
read-onlyn/anonenonedashboards, analytics, price and account views

Build-only vs submit-capable clients

Every mode can be created in two ways:
  • submit-capable: pass a private key and let the SDK sign and submit
  • build-only: pass addresses only and use get*Tx() to return unsigned transaction data for your own wallet or Safe flow

Choose the right mode

  • Use Self + Self when the trader signs and pays gas directly.
  • Use Self + Gasless when the trader still owns the account but you want a gasless UX after setup.
  • Use Delegated + Self when your backend executes for users and a delegate EOA pays gas.
  • Use Delegated + Gasless when your backend executes for users but you want sponsored Safe submission.
  • Use Read-only when your app only needs data.
  • Testnet explains how testnet: true changes the SDK defaults.