# Gains Trade - [Start trading on Gains](https://docs.gains.trade/index.md): Your first trade on Gains, step by step: log in, fund your wallet, open a position, follow it and close it. - [Setting up to trade](https://docs.gains.trade/gtrade-leveraged-trading/setting-up-to-trade.md): Set up your wallet, fund it, and connect to supported Gains networks. - [Polygon Network Setup](https://docs.gains.trade/gtrade-leveraged-trading/setting-up-to-trade/polygon-network-setup.md): Add Polygon to your wallet and fund it to trade on Gains. - [Arbitrum Network Setup](https://docs.gains.trade/gtrade-leveraged-trading/setting-up-to-trade/arbitrum-network-setup.md): Add Arbitrum to your wallet and fund it to trade on Gains. - [Opening / Closing trades](https://docs.gains.trade/gtrade-leveraged-trading/opening-closing-trades.md): Step-by-step guide to opening and closing trades on the Gains interface. - [How Orders Execute](https://docs.gains.trade/gtrade-leveraged-trading/how-orders-execute.md): How Gains prices and executes market orders, stop losses, take profits and liquidations, and what still works when a pair or the protocol is restricted. - [Trade Collaterals](https://docs.gains.trade/gtrade-leveraged-trading/trade-collaterals.md): Gains offers multiple collateral options - [Spotlight: WETH](https://docs.gains.trade/gtrade-leveraged-trading/trade-collaterals/spotlight-weth.md): Execution differences between Gains and a traditional centralized exchange. - [Cryptocurrencies](https://docs.gains.trade/gtrade-leveraged-trading/asset-classes/cryptocurrencies.md): Leverage trading on crypto pair prices. - [Forex](https://docs.gains.trade/gtrade-leveraged-trading/asset-classes/forex.md): Leverage trading on forex pair prices. - [Commodities](https://docs.gains.trade/gtrade-leveraged-trading/asset-classes/commodities.md): Leverage trading on commodity prices. - [Stocks](https://docs.gains.trade/gtrade-leveraged-trading/asset-classes/stocks.md): Leverage trading on stock prices. - [Indices](https://docs.gains.trade/gtrade-leveraged-trading/asset-classes/indices.md): Leverage trading on index prices. - [Fees & Spread](https://docs.gains.trade/gtrade-leveraged-trading/fees-and-spread.md): Full breakdown of Gains fees, spread, price impact, the protection close factor, holding fees (funding + borrowing), liquidation thresholds, and the closing fee decay. - [Pair List](https://docs.gains.trade/gtrade-leveraged-trading/pair-list.md): All trading pairs available on Gains, with their pairIndex, asset class, and max leverage. - [How to use Practice Mode](https://docs.gains.trade/gtrade-leveraged-trading/how-to-use-practice-mode.md): Try Gains risk-free with practice mode on testnet funds. - [One-Click Trading (1CT)](https://docs.gains.trade/gtrade-leveraged-trading/one-click-trading-1ct.md): Reduce repeated wallet confirmations with one-click trading. - [Gasless trading](https://docs.gains.trade/gtrade-leveraged-trading/gasless-trading.md): Trade from an instant wallet with no transaction confirmations and no gas fees. - [Gains Solana](https://docs.gains.trade/gtrade-leveraged-trading/gtrade-solana.md): Trade supported pairs directly from a Solana wallet. - [Video tutorials](https://docs.gains.trade/gtrade-leveraged-trading/video-tutorials.md): Watch step-by-step tutorials on trading and managing positions on Gains. - [Gains Credits](https://docs.gains.trade/loyalty-programs/gtrade-credits.md): Earn Gains Credits as you trade and cut your trading fees by up to 25%, or more with a $GNS discount on top. - [Gains Bonus](https://docs.gains.trade/loyalty-programs/gains-bonus.md): Bonus is USDC you trade with but never withdraw. Your trades use it first, profit goes to your wallet, and a closed trade pays out on its own. - [Moving to the new referral program](https://docs.gains.trade/referrals/transition.md): The referral program is now self-serve. What changed, why the new terms pay more, and how to move an older affiliate arrangement across. - [FAQ](https://docs.gains.trade/help/faq.md): Frequently asked questions on the protocol. - [Eligibility and Restricted Regions](https://docs.gains.trade/help/eligibility-and-restricted-regions.md): Who can use Gains, how regional restrictions work in the app, and what they mean for your funds. - [Chain congestion](https://docs.gains.trade/help/chain-congestion.md): What to do when the network is congested: gas settings, RPC switching, and monitoring. - [Glossary](https://docs.gains.trade/help/glossary.md): Definitions of the key terms used across the Gains documentation. - [Trading API](https://docs.gains.trade/developer/trading-api/overview.md): Trade on Gains from anywhere: a resource-oriented REST and WebSocket API, one signing scheme, your own keys, your own gas. - [Quickstart](https://docs.gains.trade/developer/trading-api/quickstart.md): From zero to a filled test order on Arbitrum Sepolia, with the TypeScript SDK or plain HTTP. - [Authentication](https://docs.gains.trade/developer/trading-api/authentication.md): Non-custodial by construction: agents delegated on-chain, one EIP-712 request signature, scoped permissions, read-only keys. - [Orders and positions](https://docs.gains.trade/developer/trading-api/orders.md): Order types, units and precision, the oracle-backed lifecycle, and how to manage open positions. - [Market data](https://docs.gains.trade/developer/trading-api/market-data.md): Markets, prices, the virtual order book, candles, recent trades and funding. All public, no credentials. - [WebSocket](https://docs.gains.trade/developer/trading-api/websocket.md): One connection per chain, JSON messages, snapshot then deltas, heartbeats, and private channels with the same signature as REST. - [Errors and limits](https://docs.gains.trade/developer/trading-api/errors.md): One envelope, stable machine-readable codes, proper HTTP statuses, and the rate limits. - [SDKs](https://docs.gains.trade/developer/trading-api/sdks.md): The OpenAPI document is the contract. TypeScript ships first; every other language is generated from the same file. - [Hyperliquid compatibility](https://docs.gains.trade/developer/trading-api/hyperliquid-compatibility.md): Every Hyperliquid request type the facade accepts, what it maps to, and every difference an unmodified client will meet. - [Liveness](https://docs.gains.trade/api-reference/system/liveness.md) - [Readiness per chain](https://docs.gains.trade/api-reference/system/readiness-per-chain.md) - [Chain identity and signing domain](https://docs.gains.trade/api-reference/system/chain-identity-and-signing-domain.md): Everything a client needs to sign requests for this chain without hard-coding addresses. - [List markets](https://docs.gains.trade/api-reference/markets/list-markets.md) - [Get one market](https://docs.gains.trade/api-reference/markets/get-one-market.md) - [Virtual order book](https://docs.gains.trade/api-reference/markets/virtual-order-book.md): Gains has no resting order book. Levels are derived from the on-chain depth bands: the size at each level is the liquidity available at that price impact. - [Historical candles](https://docs.gains.trade/api-reference/markets/historical-candles.md) - [Recent executed trades](https://docs.gains.trade/api-reference/markets/recent-executed-trades.md) - [Current funding and borrowing rates](https://docs.gains.trade/api-reference/markets/current-funding-and-borrowing-rates.md) - [Mark and index price of every market](https://docs.gains.trade/api-reference/markets/mark-and-index-price-of-every-market.md) - [Balances, fee tier and agents](https://docs.gains.trade/api-reference/account/balances-fee-tier-and-agents.md) - [Open positions](https://docs.gains.trade/api-reference/account/open-positions.md) - [Open orders](https://docs.gains.trade/api-reference/account/open-orders.md): Pending market requests and resting limit/stop orders. - [Orders placed through the API, newest first](https://docs.gains.trade/api-reference/account/orders-placed-through-the-api-newest-first.md) - [Fill history](https://docs.gains.trade/api-reference/account/fill-history.md) - [Order lifecycle status](https://docs.gains.trade/api-reference/orders/order-lifecycle-status.md) - [Cancel a resting order, or reclaim a timed-out market request](https://docs.gains.trade/api-reference/orders/cancel-a-resting-order-or-reclaim-a-timed-out-market-request.md) - [Update a resting limit or stop order](https://docs.gains.trade/api-reference/orders/update-a-resting-limit-or-stop-order.md) - [Place an order](https://docs.gains.trade/api-reference/orders/place-an-order.md): Validates the order, checks the agent scope, simulates it from the agent and returns the transaction the agent signs and broadcasts (`transaction`) together with the order in `prepared` state and its final id. After broadcasting, `POST /orders/{id}/submit` with the hash; the order becomes `pending`… - [Report the broadcast transaction of a prepared order](https://docs.gains.trade/api-reference/orders/report-the-broadcast-transaction-of-a-prepared-order.md): Records the transaction hash the agent broadcast for a prepared order. When the receipt is already available the order moves to `pending` or `open` (and is re-keyed if the Diamond assigned another index); otherwise it stays `prepared` with the hash until the chain watcher sees it. - [Close a position at market](https://docs.gains.trade/api-reference/positions/close-a-position-at-market.md) - [Update stop loss, take profit, leverage or collateral](https://docs.gains.trade/api-reference/positions/update-stop-loss-take-profit-leverage-or-collateral.md) - [Authorise an agent](https://docs.gains.trade/api-reference/agents/authorise-an-agent.md): Registers the agent and its scope, signed by the trader's master wallet (EIP-712 `AgentAuthorization`). The response carries the `setTradingDelegate` transaction the master wallet must send; the agent becomes `active` once it is mined. - [Agent status and delegation transaction](https://docs.gains.trade/api-reference/agents/agent-status-and-delegation-transaction.md) - [Revoke an agent](https://docs.gains.trade/api-reference/agents/revoke-an-agent.md): Disables the agent immediately in the API and returns the `removeTradingDelegate` transaction for the master wallet. - [Issue a read-only API key](https://docs.gains.trade/api-reference/agents/issue-a-read-only-api-key.md): Signed by the master wallet (EIP-712 `ApiKeyIssue`). The key is returned once and never stored in clear. - [Hyperliquid-shaped /info](https://docs.gains.trade/api-reference/hyperliquid-compatibility/hyperliquid-shaped-info.md): Accepts the Hyperliquid `POST /info` request types (`meta`, `metaAndAssetCtxs`, `allMids`, `l2Book`, `candleSnapshot`, `clearinghouseState`, `openOrders`, `frontendOpenOrders`, `userFills`, `userFillsByTime`, `orderStatus`, `historicalOrders`, `userFunding`, `fundingHistory`, `userRateLimit`, `userF… - [Hyperliquid-shaped /exchange](https://docs.gains.trade/api-reference/hyperliquid-compatibility/hyperliquid-shaped-exchange.md): Accepts the Hyperliquid `POST /exchange` envelope `{action, nonce, signature, vaultAddress?, expiresAfter?}` with Hyperliquid's exact signing (msgpack action hash, phantom agent EIP-712 on chain id 1337; user-signed actions on the `HyperliquidSignTransaction` domain). The signing agent must be a Gai… - [Backend API Reference](https://docs.gains.trade/developer/api-reference/introduction.md): REST reference for Gains Network backend services. - [Health Check](https://docs.gains.trade/developer/api-reference/endpoint/health.md): Check backend service health. - [Get Chain Stats](https://docs.gains.trade/developer/api-reference/endpoint/stats.md): Returns protocol and trading statistics for a chain. - [Get APR Info](https://docs.gains.trade/developer/api-reference/endpoint/apr.md): Returns APR and TVL data for staking, vault, burn, and collateral rewards. - [Get GNS Total Supply](https://docs.gains.trade/developer/api-reference/endpoint/total-supply.md): Returns the latest GNS total supply from cached stats. - [Get Trading History Window](https://docs.gains.trade/developer/api-reference/endpoint/trading-history.md): Returns all trades for a recent time window. - [Get Trading History Stats](https://docs.gains.trade/developer/api-reference/endpoint/trading-history-stats.md): Returns precomputed trading stats for a recent time window. - [Get Wallet Trading Stats](https://docs.gains.trade/developer/api-reference/endpoint/personal-trading-stats.md): Returns all-time and 30-day trading statistics for a wallet. - [Get Batch Wallet Trading Stats](https://docs.gains.trade/developer/api-reference/endpoint/batch-personal-trading-stats.md): Returns trading statistics for multiple wallet addresses. - [Get Wallet Trading History](https://docs.gains.trade/developer/api-reference/endpoint/personal-trading-history.md): Returns paginated trading history for one wallet. - [Get Batch Wallet Trading History](https://docs.gains.trade/developer/api-reference/endpoint/batch-personal-trading-history.md): Returns paginated trading history for multiple wallets. - [Get Trader Leaderboard](https://docs.gains.trade/developer/api-reference/endpoint/leaderboard.md): Returns trader leaderboard for a period or all supported periods. - [Get Holding Rates](https://docs.gains.trade/developer/api-reference/endpoint/holding-rates.md): Returns historical borrowing and funding rates for a collateral and pair. - [List Contests](https://docs.gains.trade/developer/api-reference/endpoint/contests.md): Lists trading contests. - [Get Contest Details](https://docs.gains.trade/developer/api-reference/endpoint/contest-details.md): Returns details, rewards, and aggregate stats for a contest. - [Get Contest Leaderboard](https://docs.gains.trade/developer/api-reference/endpoint/contest-leaderboard.md): Returns a contest leaderboard sorted by PnL or volume. - [Get Contest Trader Stats](https://docs.gains.trade/developer/api-reference/endpoint/contest-trader-stats.md): Returns stats, rankings, and estimated rewards for a trader in a contest. - [Get Latest Dapp Version](https://docs.gains.trade/developer/api-reference/endpoint/latest-dapp.md): Returns latest frontend version metadata for a dapp mode. - [Get Latest Dapp Version By Mode](https://docs.gains.trade/developer/api-reference/endpoint/latest-dapp-by-mode.md): Returns latest frontend version metadata for a mode path parameter. - [Get Wallet Associations](https://docs.gains.trade/developer/api-reference/endpoint/wallet-associations.md): Returns wallets associated with an address. - [Associate Wallet](https://docs.gains.trade/developer/api-reference/endpoint/associate-wallet.md): Creates a wallet association after signature verification. - [Get Circle Messages](https://docs.gains.trade/developer/api-reference/endpoint/circle-messages.md): Returns Circle CCTP messages for a transaction. - [Get Solana Token Balance](https://docs.gains.trade/developer/api-reference/endpoint/solana-usdc-balance.md): Returns a Solana SPL token balance and token account using backend RPC fallbacks. - [Create Transak Widget URL](https://docs.gains.trade/developer/api-reference/endpoint/transak-widget-url.md): Creates a Transak on-ramp widget URL. - [Create Bridge Flow](https://docs.gains.trade/developer/api-reference/endpoint/create-bridge-flow.md): Creates a cross-chain bridge flow record. - [Get Bridge Flows By Address](https://docs.gains.trade/developer/api-reference/endpoint/bridge-flows-by-address.md): Returns bridge flows associated with a wallet address. - [Get Pending Bridge Flows](https://docs.gains.trade/developer/api-reference/endpoint/pending-bridge-flows.md): Returns non-finalized bridge flows associated with a wallet address. - [Get Bridge Flow By Hash](https://docs.gains.trade/developer/api-reference/endpoint/bridge-flow-by-hash.md): Returns one bridge flow by source transaction hash. - [Update Bridge Flow](https://docs.gains.trade/developer/api-reference/endpoint/update-bridge-flow.md): Updates fields on a bridge flow record. - [Finalize Bridge Flow](https://docs.gains.trade/developer/api-reference/endpoint/finalize-bridge-flow.md): Marks a bridge flow as finalized. - [Delete Bridge Flow](https://docs.gains.trade/developer/api-reference/endpoint/delete-bridge-flow.md): Deletes a bridge flow record. - [Check Campaign Eligibility](https://docs.gains.trade/developer/api-reference/endpoint/campaign-eligibility.md): Checks broad EVM address eligibility across active campaigns. - [Check Campaign Eligibility By ID](https://docs.gains.trade/developer/api-reference/endpoint/campaign-eligibility-by-id.md): Checks EVM address eligibility for a specific campaign. - [Check Solana Campaign Eligibility](https://docs.gains.trade/developer/api-reference/endpoint/solana-campaign-eligibility.md): Checks broad Solana address eligibility across active campaigns. - [Check Solana Campaign Eligibility By ID](https://docs.gains.trade/developer/api-reference/endpoint/solana-campaign-eligibility-by-id.md): Checks Solana address eligibility for a specific campaign. - [Get VIP Status](https://docs.gains.trade/developer/api-reference/endpoint/vip-status.md): Returns VIP status for a wallet. - [Acknowledge VIP Status](https://docs.gains.trade/developer/api-reference/endpoint/ack-vip-status.md): Acknowledges that the wallet has seen the VIP prompt. - [Get Notifications](https://docs.gains.trade/developer/api-reference/endpoint/notifications.md): Returns active notifications for a wallet. - [Dismiss Notification](https://docs.gains.trade/developer/api-reference/endpoint/dismiss-notification.md): Marks one notification as acknowledged. - [Referral Config](https://docs.gains.trade/developer/api-reference/endpoint/referral-config.md): Returns the EIP-712 domain values and the standard reward rates. - [Register Code](https://docs.gains.trade/developer/api-reference/endpoint/referral-register-code.md): Registers a referral code from an EIP-712 signature. - [Bind Code](https://docs.gains.trade/developer/api-reference/endpoint/referral-bind-code.md): Attaches a referrer to a wallet from an EIP-712 signature. - [Resolve Binding](https://docs.gains.trade/developer/api-reference/endpoint/referral-binding.md): The referrer this address is bound to. - [Resolve Code Owner](https://docs.gains.trade/developer/api-reference/endpoint/referral-code-owner.md): The address that owns a referral code. - [Resolve Address Code](https://docs.gains.trade/developer/api-reference/endpoint/referral-owner-code.md): The referral code owned by an address. - [Referral Summary](https://docs.gains.trade/developer/api-reference/endpoint/referral-summary.md): Dashboard composite for one address. - [Referral Rewards](https://docs.gains.trade/developer/api-reference/endpoint/referral-rewards.md): Earnings totals for one address. - [Referred Wallets](https://docs.gains.trade/developer/api-reference/endpoint/referral-referred.md): The referrer of this address, and the addresses referred at level 1 and level 2. - [Referred Wallet Detail](https://docs.gains.trade/developer/api-reference/endpoint/referral-referred-detail.md): Per-wallet rows for the referred set. - [Referral History](https://docs.gains.trade/developer/api-reference/endpoint/referral-history.md): Daily accruals and payments received. - [Claim Proof](https://docs.gains.trade/developer/api-reference/endpoint/referral-proof.md): Merkle proof against the batch currently active on the distributor. - [Resolve Referral Link](https://docs.gains.trade/developer/api-reference/endpoint/referral-link-address.md): Resolves a referral slug to an address. - [Resolve Referral Address](https://docs.gains.trade/developer/api-reference/endpoint/referral-address-link.md): Resolves a referral address to a slug. - [Get Trading Variables](https://docs.gains.trade/developer/api-reference/endpoint/core-trading-variables.md): Returns core trading variables needed by integrators. - [Get All Trading Variables](https://docs.gains.trade/developer/api-reference/endpoint/core-trading-variables-all.md): Returns all cached trading variables. - [Get Trading Variables By Keys](https://docs.gains.trade/developer/api-reference/endpoint/core-trading-variables-by-keys.md): Returns selected trading variable keys. - [Get Trading Variable Keys](https://docs.gains.trade/developer/api-reference/endpoint/core-trading-variable-keys.md): Returns available trading variable keys. - [Get Open Trades](https://docs.gains.trade/developer/api-reference/endpoint/core-open-trades.md): Returns all known open trades. - [Get Open Trades By Address](https://docs.gains.trade/developer/api-reference/endpoint/core-open-trades-by-address.md): Returns known open trades for one address. - [Get Open Trades Info](https://docs.gains.trade/developer/api-reference/endpoint/core-open-trades-info.md): Returns metadata and indexes for known open trades. - [Get Pending Events](https://docs.gains.trade/developer/api-reference/endpoint/core-pending-events.md): Returns pending backend event queue data. - [Get User Trading Variables](https://docs.gains.trade/developer/api-reference/endpoint/core-user-trading-variables.md): Returns user-specific trading variables, pending market orders, fee tiers, and price impact data. - [Get Legacy Contest Leaderboard](https://docs.gains.trade/developer/api-reference/endpoint/legacy-contest-leaderboard.md): Returns legacy contest leaderboard cache. - [Get Legacy Contest PnL](https://docs.gains.trade/developer/api-reference/endpoint/legacy-contest-pnl.md): Returns legacy contest PnL history cache. - [Get Legacy Contest PnL Percent](https://docs.gains.trade/developer/api-reference/endpoint/legacy-contest-pnl-percent.md): Returns legacy contest percentage PnL history cache. - [Get Legacy Final Open PnL](https://docs.gains.trade/developer/api-reference/endpoint/legacy-contest-final-open-pnl.md): Returns final open PnL snapshots for legacy contests. - [Get Legacy Contest](https://docs.gains.trade/developer/api-reference/endpoint/legacy-contest.md): Returns legacy contest metadata. - [Get Legacy Contest Rewards](https://docs.gains.trade/developer/api-reference/endpoint/legacy-contest-rewards.md): Returns legacy contest rewards data. - [Get Legacy Contest Results](https://docs.gains.trade/developer/api-reference/endpoint/legacy-contest-results.md): Returns legacy contest results data. - [Update Legacy Contest Cache](https://docs.gains.trade/developer/api-reference/endpoint/legacy-contest-cache-update.md): Updates legacy contest cache data. - [Get Rewards Root](https://docs.gains.trade/developer/api-reference/endpoint/rewards-root.md): Returns the rewards Merkle root for a config and epoch. - [Get All Rewards Roots](https://docs.gains.trade/developer/api-reference/endpoint/rewards-root-all.md): Returns all rewards Merkle roots matching a config and epoch. - [Get Rewards By Address](https://docs.gains.trade/developer/api-reference/endpoint/rewards-by-address.md): Returns rewards for one address. - [Get All Rewards By Address](https://docs.gains.trade/developer/api-reference/endpoint/rewards-all-by-address.md): Returns all rewards for one address. - [Integrators](https://docs.gains.trade/developer/integrators.md): Overview for dApp and contract integrations - [Trading Contracts](https://docs.gains.trade/developer/integrators/trading-contracts.md): How to interact with Gains trading contracts. - [Delegated Trading](https://docs.gains.trade/developer/integrators/delegated-trading.md): Use an agent wallet or backend signer to submit trades for a trader - [Backend](https://docs.gains.trade/developer/integrators/backend.md): Details how to fetch trade data from off-chain services - [Contests](https://docs.gains.trade/developer/integrators/contests.md): API endpoints for building trading contests and leaderboards on Gains data. - [Live prices and OHLC snapshots](https://docs.gains.trade/developer/integrators/price-feed.md): How to stream live prices and fetch current OHLC snapshots. This endpoint does not provide historical OHLCV candles. - [Referrals](https://docs.gains.trade/developer/integrators/referrals.md): Attribute traders to a referrer and let them claim USDC rewards - [Guides](https://docs.gains.trade/developer/integrators/guides.md): Examples of common use cases - [Listing all assets](https://docs.gains.trade/developer/integrators/guides/listed-assets.md): Fetch every asset listed on Gains, with its pair index, asset class, leverage bounds, and spread. - [Mark + Index Introduction](https://docs.gains.trade/developer/integrators/guides/mark-+-index-introduction.md): How the v4 pricing API separates mark prices from index prices, and how to migrate from v3. - [Building the virtual order book](https://docs.gains.trade/developer/integrators/guides/building-the-virtual-order-book.md): How to derive the gTrade virtual order book from public trading variables, live prices, and SDK price-impact helpers. - [Support Endpoints Migration](https://docs.gains.trade/developer/integrators/guides/support-endpoints-migration.md): Support endpoint migration Dec 2025 -> Jan 2026 - [v10.2 migration](https://docs.gains.trade/developer/integrators/guides/v10.2-migration.md): What changed for integrators in v10.2: the 30-band depth system for price impact. - [v10 migration](https://docs.gains.trade/developer/integrators/guides/v10-migration.md): Integrator migration guide for v10: funding fees, borrowing v2, partial closes, and more. - [Calculating borrowing fees](https://docs.gains.trade/developer/integrators/guides/calculating-borrowing-fees.md): Learn how to calculate trader's borrowing fees - [Calculating liquidation price](https://docs.gains.trade/developer/integrators/guides/calculating-liquidation-price.md): Learn how to calculate any trade's liquidation price - [Backend Endpoint Refactor](https://docs.gains.trade/developer/integrators/guides/backend-endpoint-refactor.md): Backend endpoint refactor (Oct 2025): leaner trading-variables and the new open-trades endpoints. - [History Endpoints Migration](https://docs.gains.trade/developer/integrators/guides/history-endpoints-migration.md): Migration to the new trading history endpoints with cursor-based pagination (Dec 2025). - [v10.2 Update](https://docs.gains.trade/developer/technical-reference/contracts/changelogs/v10.2-update.md) - [v10.1 Update](https://docs.gains.trade/developer/technical-reference/contracts/changelogs/v10.1-update.md) - [v10 Update](https://docs.gains.trade/developer/technical-reference/contracts/changelogs/v10-update.md) - [v9.2.1 Update](https://docs.gains.trade/developer/technical-reference/contracts/changelogs/v9.2.1-update.md) - [v9.1 Update](https://docs.gains.trade/developer/technical-reference/contracts/changelogs/v9.1-update.md) - [v9.1.1 Update](https://docs.gains.trade/developer/technical-reference/contracts/changelogs/v9.1.1-update.md) - [v9 Update](https://docs.gains.trade/developer/technical-reference/contracts/changelogs/v9-update.md) - [GNSAddressStore](https://docs.gains.trade/developer/technical-reference/contracts/core/abstract/gnsaddressstore.md) - [GNSDiamondCut](https://docs.gains.trade/developer/technical-reference/contracts/core/abstract/gnsdiamondcut.md) - [GNSDiamondLoupe](https://docs.gains.trade/developer/technical-reference/contracts/core/abstract/gnsdiamondloupe.md) - [GNSDiamondStorage](https://docs.gains.trade/developer/technical-reference/contracts/core/abstract/gnsdiamondstorage.md) - [GNSBorrowingFees](https://docs.gains.trade/developer/technical-reference/contracts/core/facets/gnsborrowingfees.md) - [GNSOtc](https://docs.gains.trade/developer/technical-reference/contracts/core/facets/gnsotc.md) - [GNSPriceAggregator](https://docs.gains.trade/developer/technical-reference/contracts/core/facets/gnspriceaggregator.md) - [GNSTradingInteractions](https://docs.gains.trade/developer/technical-reference/contracts/core/facets/gnstradinginteractions.md) - [GNSTriggerRewards](https://docs.gains.trade/developer/technical-reference/contracts/core/facets/gnstriggerrewards.md) - [GNSFeeTiers](https://docs.gains.trade/developer/technical-reference/contracts/core/facets/gnsfeetiers.md) - [GNSPairsStorage](https://docs.gains.trade/developer/technical-reference/contracts/core/facets/gnspairsstorage.md) - [GNSPriceImpact](https://docs.gains.trade/developer/technical-reference/contracts/core/facets/gnspriceimpact.md) - [GNSReferrals](https://docs.gains.trade/developer/technical-reference/contracts/core/facets/gnsreferrals.md) - [GNSTradingCallbacks](https://docs.gains.trade/developer/technical-reference/contracts/core/facets/gnstradingcallbacks.md) - [GNSTradingStorage](https://docs.gains.trade/developer/technical-reference/contracts/core/facets/gnstradingstorage.md) - [GNSMultiCollatDiamond](https://docs.gains.trade/developer/technical-reference/contracts/core/gnsmulticollatdiamond.md) - [GNSStaking](https://docs.gains.trade/developer/technical-reference/contracts/core/gnsstaking.md) - [GToken](https://docs.gains.trade/developer/technical-reference/contracts/core/gtoken.md) - [GTokenOpenPnlFeed](https://docs.gains.trade/developer/technical-reference/contracts/core/gtokenopenpnlfeed.md) - [IBorrowingFeesUtils](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries/iborrowingfeesutils.md) - [IOtcUtils](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries/iotcutils.md) - [IPriceAggregatorUtils](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries/ipriceaggregatorutils.md) - [ITriggerRewardsUtils](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries/itriggerrewardsutils.md) - [IFeeTiersUtils](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries/ifeetiersutils.md) - [IPairsStorageUtils](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries/ipairsstorageutils.md) - [IPriceImpactUtils](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries/ipriceimpactutils.md) - [IReferralsUtils](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries/ireferralsutils.md) - [ITradingCallbacksUtils](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries/itradingcallbacksutils.md) - [ITradingCommonUtils](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries/itradingcommonutils.md) - [ITradingInteractionsUtils](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries/itradinginteractionsutils.md) - [ITradingStorageUtils](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries/itradingstorageutils.md) - [IUpdateLeverageUtils](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries/iupdateleverageutils.md) - [IUpdatePositionSizeUtils](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries/iupdatepositionsizeutils.md) - [IAddressStore](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/iaddressstore.md) - [IBorrowingFees](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/iborrowingfees.md) - [IDiamondStorage](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/idiamondstorage.md) - [IOtc](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/iotc.md) - [IPriceAggregator](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/ipriceaggregator.md) - [ITradingStorage](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/itradingstorage.md) - [ITradingInteractions](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/itradinginteractions.md) - [ITriggerRewards](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/itriggerrewards.md) - [ITypes](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/itypes.md) - [IUpdateLeverage](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/iupdateleverage.md) - [IPairsStorage](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/ipairsstorage.md) - [IFeeTiers](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/ifeetiers.md) - [IPriceImpact](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/ipriceimpact.md) - [IReferrals](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/ireferrals.md) - [ITradingCallbacks](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/itradingcallbacks.md) - [IUpdatePositionSize](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types/iupdatepositionsize.md) - [IChainlinkFeed](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/ichainlinkfeed.md) - [IArbSys](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/iarbsys.md) - [IChainlinkOracle](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/ichainlinkoracle.md) - [IERC20](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/ierc20.md) - [IERC721](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/ierc721.md) - [IERC721Design](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/ierc721design.md) - [IGeneralErrors](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/igeneralerrors.md) - [IGNSAddressStore](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/ignsaddressstore.md) - [IGNSDiamond](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/ignsdiamond.md) - [IGNSDiamondCut](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/ignsdiamondcut.md) - [IGNSMultiCollatDiamond](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/ignsmulticollatdiamond.md) - [IGNSDiamondLoupe](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/ignsdiamondloupe.md) - [IGNSStaking](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/ignsstaking.md) - [IGToken](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/igtoken.md) - [IGTokenLockedDepositNft](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/igtokenlockeddepositnft.md) - [IGTokenOpenPnlFeed](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/igtokenopenpnlfeed.md) - [IGTokenLockedDepositNftDesign](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/igtokenlockeddepositnftdesign.md) - [ILiquidityPool](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/iliquiditypool.md) - [IRateProvider](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/irateprovider.md) - [IOwnable](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/iownable.md) - [UpdateLeverageLifecycles](https://docs.gains.trade/developer/technical-reference/contracts/libraries/updateleverage/updateleveragelifecycles.md) - [IncreasePositionSizeUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/updatepositionsize/increasepositionsizeutils.md) - [DecreasePositionSizeUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/updatepositionsize/decreasepositionsizeutils.md) - [UpdatePositionSizeLifecycles](https://docs.gains.trade/developer/technical-reference/contracts/libraries/updatepositionsize/updatepositionsizelifecycles.md) - [AddressStoreUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/addressstoreutils.md) - [ChainlinkClientUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/chainlinkclientutils.md) - [ChainUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/chainutils.md) - [ConstantsUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/constantsutils.md) - [CollateralUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/collateralutils.md) - [DiamondUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/diamondutils.md) - [LiquidityPoolUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/liquiditypoolutils.md) - [OtcUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/otcutils.md) - [PackingUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/packingutils.md) - [StorageUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/storageutils.md) - [TriggerRewardsUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/triggerrewardsutils.md) - [ArrayGetters](https://docs.gains.trade/developer/technical-reference/contracts/libraries/arraygetters.md) - [BorrowingFeesUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/borrowingfeesutils.md) - [FeeTiersUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/feetiersutils.md) - [PriceAggregatorUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/priceaggregatorutils.md) - [PriceImpactUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/priceimpactutils.md) - [ReferralsUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/referralsutils.md) - [TradingCallbacksUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/tradingcallbacksutils.md) - [PairsStorageUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/pairsstorageutils.md) - [TradingCommonUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/tradingcommonutils.md) - [TradingStorageUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/tradingstorageutils.md) - [TradingInteractionsUtils](https://docs.gains.trade/developer/technical-reference/contracts/libraries/tradinginteractionsutils.md) - [EpochBasedTokenClaim](https://docs.gains.trade/developer/technical-reference/contracts/misc/epochbasedtokenclaim.md) - [GNSCompensationHandler](https://docs.gains.trade/developer/technical-reference/contracts/misc/gnscompensationhandler.md) - [GTokenRateProvider](https://docs.gains.trade/developer/technical-reference/contracts/misc/gtokenrateprovider.md) - [GTokenLockedDepositNftDesign](https://docs.gains.trade/developer/technical-reference/contracts/misc/gtokenlockeddepositnftdesign.md) - [ManagerTimelock](https://docs.gains.trade/developer/technical-reference/contracts/misc/managertimelock.md) - [OwnerTimelock](https://docs.gains.trade/developer/technical-reference/contracts/misc/ownertimelock.md) - [VotingDelegator](https://docs.gains.trade/developer/technical-reference/contracts/misc/votingdelegator.md) - [GainsNetworkToken](https://docs.gains.trade/developer/technical-reference/contracts/tokens/gainsnetworktoken.md) - [GTokenLockedDepositNft](https://docs.gains.trade/developer/technical-reference/contracts/tokens/gtokenlockeddepositnft.md) - [Backend Types](https://docs.gains.trade/developer/technical-reference/backend/backend-types.md): Gains' backend return types - [SDK](https://docs.gains.trade/developer/technical-reference/sdk.md): Gains' SDK technical reference - [Client Types](https://docs.gains.trade/developer/technical-reference/sdk/client-types.md): Typescript types used within SDK - [Overview](https://docs.gains.trade/what-is-gains-network/summary.md): What Gains Network is and the vision behind the protocol. - [GNS Token](https://docs.gains.trade/what-is-gains-network/gns-token.md): The $GNS utility token powers the Gains ecosystem. - [Contract Addresses](https://docs.gains.trade/what-is-gains-network/contract-addresses.md): Official Gains Network contract addresses on every supported chain. - [Arbitrum Mainnet](https://docs.gains.trade/what-is-gains-network/contract-addresses/arbitrum-mainnet.md): Gains Network contract addresses on Arbitrum One. - [Base Mainnet](https://docs.gains.trade/what-is-gains-network/contract-addresses/base-mainnet.md): Gains Network contract addresses on Base. - [MegaETH Mainnet](https://docs.gains.trade/what-is-gains-network/contract-addresses/megaeth-mainnet.md): Gains Network contract addresses on MegaETH. - [Polygon Mainnet](https://docs.gains.trade/what-is-gains-network/contract-addresses/polygon-mainnet.md): Gains Network contract addresses on Polygon. - [GNS Staking](https://docs.gains.trade/liquidity-farming-pools/gns-staking.md): Stake $GNS and review the current staking reward status. - [gToken Vaults](https://docs.gains.trade/liquidity-farming-pools/gtoken-vaults.md): Collateral vaults supporting trading liquidity - [Staker Functions](https://docs.gains.trade/liquidity-farming-pools/gtoken-vaults/staker-functions.md): https://gains.trade/vault - [Staker FAQ](https://docs.gains.trade/liquidity-farming-pools/gtoken-vaults/staker-faq.md): Answers to common staking questions - [Upgrades, updates, and timelocks](https://docs.gains.trade/liquidity-farming-pools/gtoken-vaults/upgrades-updates-and-timelocks.md): Contract security measures - [Active Pools & Incentives](https://docs.gains.trade/liquidity-farming-pools/active-pools-and-incentives.md): This page contains up-to-date information on $GNS and gToken pools & incentives - [Arbitrum <-> Polygon Bridge](https://docs.gains.trade/bridges/arbitrum-less-than-greater-than-polygon-bridge.md): Bridge your $GNS tokens or NFTs between Arbitrum and Polygon - [gFARM2 NFTs](https://docs.gains.trade/archived/nfts.md): Historical reference for the deprecated gFARM2 NFTs and their redemption. - [Changelog](https://docs.gains.trade/changelog.md): What changed on Gains Trade, newest first: new markets, features, limits and fixes you can see. ## OpenAPI Specs - [openapi](/developer/api-reference/openapi.yaml) - [openapi](/developer/trading-api/openapi.json) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.