Connect
GammaSwap provides separate endpoints for HTTP requests, market updates, oracle prices, and on-chain deposit operations.
Service URLs
Exchange HTTP API
https://exchange-api.gammaswap.com/api
InfoClient, ExchangeClient
Market WebSocket
wss://exchange-api.gammaswap.com/ws/
ExchangeWebSocketClient
Oracle WebSocket
wss://exchange-api.gammaswap.com/oracle-ws/
OracleWebSocketClient
Chain RPC
Your RPC provider URL
DepositClient
Local service defaults:
Exchange HTTP API
http://localhost:3000
Market WebSocket
ws://127.0.0.1:4000
Oracle WebSocket
ws://127.0.0.1:8082
Environment configuration
A server-side application can store connection settings in environment variables:
EXCHANGE_API_URL=https://exchange-api.gammaswap.com/api
MARKET_WS_URL=wss://exchange-api.gammaswap.com/ws/
ORACLE_WS_URL=wss://exchange-api.gammaswap.com/oracle-ws/
CHAIN_ID=84532
RPC_URL=https://your-rpc-provider.example
PRIVATE_KEY=0x...Do not expose PRIVATE_KEY in frontend code, public environment variables, logs, or source control.
Connect to the HTTP API
Read-only requests use InfoClient.
Signed exchange actions use ExchangeClient.
Connect to the market WebSocket
Calling connect() is optional before subscribing. Subscription methods establish the connection when necessary.
Connect to the oracle WebSocket
Connect to the chain
DepositClient connects to an EVM JSON-RPC provider.
The client verifies that the RPC network matches the configured chainId before performing contract reads or transactions.
Chain IDs and contracts
The supplied SDK examples use Base Sepolia:
Base Sepolia
84532
When the SDK includes default contract addresses for a chain, it resolves those contracts automatically.
For a custom or unsupported deployment, provide contract overrides:
For deposits, the deposit-ledger address can be supplied directly:
The production chain ID and production RPC provider are not specified in the supplied developer documentation.
Last updated