# Developer

- [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): Details how to interact with trading contracts
- [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)
- [Price Feed](https://docs.gains.trade/developer/integrators/price-feed.md): Details how to read and follow price updates
- [Guides](https://docs.gains.trade/developer/integrators/guides.md): Examples of common use cases
- [Mark + Index Introduction](https://docs.gains.trade/developer/integrators/guides/mark-+-index-introduction.md)
- [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)
- [v10 migration](https://docs.gains.trade/developer/integrators/guides/v10-migration.md)
- [v9 migration](https://docs.gains.trade/developer/integrators/guides/v9-migration.md)
- [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)
- [History Endpoints Migration](https://docs.gains.trade/developer/integrators/guides/history-endpoints-migration.md)
- [Technical Reference](https://docs.gains.trade/developer/technical-reference.md)
- [Contracts](https://docs.gains.trade/developer/technical-reference/contracts.md): Natspec for gTrade's Contracts
- [Changelogs](https://docs.gains.trade/developer/technical-reference/contracts/changelogs.md)
- [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)
- [Core](https://docs.gains.trade/developer/technical-reference/contracts/core.md)
- [Abstract](https://docs.gains.trade/developer/technical-reference/contracts/core/abstract.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)
- [Facets](https://docs.gains.trade/developer/technical-reference/contracts/core/facets.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)
- [Interfaces](https://docs.gains.trade/developer/technical-reference/contracts/interfaces.md)
- [Libraries](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/libraries.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)
- [Types](https://docs.gains.trade/developer/technical-reference/contracts/interfaces/types.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)
- [Libraries](https://docs.gains.trade/developer/technical-reference/contracts/libraries.md)
- [updateLeverage](https://docs.gains.trade/developer/technical-reference/contracts/libraries/updateleverage.md)
- [UpdateLeverageLifecycles](https://docs.gains.trade/developer/technical-reference/contracts/libraries/updateleverage/updateleveragelifecycles.md)
- [updatePositionSize](https://docs.gains.trade/developer/technical-reference/contracts/libraries/updatepositionsize.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)
- [Misc](https://docs.gains.trade/developer/technical-reference/contracts/misc.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)
- [Tokens](https://docs.gains.trade/developer/technical-reference/contracts/tokens.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](https://docs.gains.trade/developer/technical-reference/backend.md): gTrade's backend technical reference
- [Backend Types](https://docs.gains.trade/developer/technical-reference/backend/backend-types.md): gTrade's backend return types
- [SDK](https://docs.gains.trade/developer/technical-reference/sdk.md): gTrade's SDK technical reference
- [Client Types](https://docs.gains.trade/developer/technical-reference/sdk/client-types.md): Typescript types used within SDK


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gains.trade/developer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
