Gains Network — On-Chain Stocks, Forex & Crypto
Decentralized leveraged trading across 461 pairs, 12 groups, 4 chains. Up to 1000x leverage. Market data proxied through onimbus; trade execution goes direct to chain via GNSMultiCollatDiamond.
Arbitrum: /api/gains/*
Base: /api/gains-base/*
Polygon: /api/gains-polygon/*
Solana: /api/gains-solana/*
Crypto (150x)
Forex (100x)
Stocks (100x)
Commodities (100x)
Indices (100x)
WS: wss://backend-arbitrum.gains.trade
All REST endpoints below are available on ALL 4 chains. Prefix paths with the chain prefix:
/api/gains/... (Arbitrum), /api/gains-base/..., /api/gains-polygon/..., /api/gains-solana/.... Solana routes through the Base backend.Trading Variables
Chains: All
| Method | Endpoint | Description |
|---|---|---|
| GET | /trading-variables | All pairs, groups, fees, collaterals, OI |
| GET | /core-trading-variables | Core variables for integrators |
| GET | /core-trading-variables-all | All cached trading variables |
| GET | /core-trading-variable-keys | Available variable keys |
| GET | /user-trading-variables/{addr} | Fee tiers, pending orders, collateral |
Open Trades
Chains: All
| Method | Endpoint | Description |
|---|---|---|
| GET | /open-trades | All open trades across protocol |
| GET | /open-trades/{address} | Open trades per wallet |
| GET | /core-open-trades | All open trades (alias) |
| GET | /core-open-trades/{address} | Open trades per wallet (alias) |
Trading History
Chains: Arbitrum, Base, Polygon (Solana: personal-trading-history only)
| Method | Endpoint | Description |
|---|---|---|
| GET | /personal-trading-history/{addr} | Paginated trade history per wallet |
| GET | /personal-trading-stats/{addr} | All-time & 30-day stats |
| GET | /personal-trading-history-table/{addr} | Open & closed trades for one wallet |
| POST | /batch-personal-trading-history | History for multiple wallets |
| POST | /batch-personal-trading-stats | Stats for multiple wallets |
| GET | /trading-history | All trades in recent window |
| GET | /trading-history-stats | Precomputed stats for recent window |
Market Data
| Method | Endpoint | Chains | Description |
|---|---|---|---|
| GET | /holding-rates | Arb, Base, Poly | Borrowing & funding rates per pair |
| GET | /apr | Arb, Base, Poly | APR & TVL: staking, vaults, burn, collateral |
| GET | /stats/{chain} | All | Protocol and trading stats per chain |
Leaderboard & Contests
| Method | Endpoint | Chains | Description |
|---|---|---|---|
| GET | /leaderboard | All | Trader leaderboard by period |
| GET | /contests | Arb, Base, Poly | Active trading contests |
| GET | /contest-details/{id} | Arb, Base, Poly | Contest details & aggregate stats |
| GET | /contest-leaderboard/{id} | Arb, Base, Poly | Contest leaderboard |
| GET | /contest-trader-stats/{id}/{addr} | Arb, Base, Poly | Trader stats within contest |
On-Chain Trading (Smart Contracts)
Direct to GNSMultiCollatDiamond — not proxied through onimbus. SDK: @gainsnetwork/sdk.
openTrade(order)
closeTradeMarket(order)
updateSl(order)
updateTp(order)
updateLeverage(order)
increasePositionSize(order)
decreasePositionSize(order)
updateOpenOrder(order)
cancelOpenOrder(order)
cancelOrderAfterTimeout(order)
openTradeNative(order)
Transaction execution is wallet-based. Nimbus proxies market data only; trading transactions go direct to chain.
Quick examples
# Get 461 trading pairs (Arbitrum)
curl -s https://api.onimbus.cloud/api/gains/trading-variables | jq '.pairs | length'
# Check open trades for a wallet (Base)
curl -s https://api.onimbus.cloud/api/gains-base/open-trades/0xWALLET_ADDRESS
# Get trading stats for a wallet (Polygon)
curl -s https://api.onimbus.cloud/api/gains-polygon/personal-trading-stats/0xWALLET_ADDRESS
# Get protocol stats on Solana
curl -s https://api.onimbus.cloud/api/gains-solana/stats/solana
# Fetch leaderboard (Arbitrum)
curl -s https://api.onimbus.cloud/api/gains/leaderboard