{"openapi":"3.0.0","components":{"examples":{},"headers":{},"parameters":{},"requestBodies":{},"responses":{},"schemas":{"TokenResponse":{"properties":{"searchAliases":{"items":{"type":"string"},"type":"array"},"isStaking":{"type":"boolean"},"isPlatformTradingToken":{"type":"boolean"},"isPlatformToken":{"type":"boolean"},"isV1Available":{"type":"boolean"},"isChartDisabled":{"type":"boolean"},"isTempHidden":{"type":"boolean"},"isSynthetic":{"type":"boolean"},"isStable":{"type":"boolean"},"isShortable":{"type":"boolean"},"isWrapped":{"type":"boolean"},"isNative":{"type":"boolean"},"isUsdg":{"type":"boolean"},"contractVersion":{"type":"string"},"isPermitDisabled":{"type":"boolean"},"isPermitSupported":{"type":"boolean"},"categories":{"items":{"type":"string"},"type":"array"},"imageUrl":{"type":"string"},"reservesUrl":{"type":"string"},"explorerUrl":{"type":"string"},"explorerSymbol":{"type":"string"},"metamaskSymbol":{"type":"string"},"wrappedAddress":{"type":"string"},"visualPrefix":{"type":"string"},"visualMultiplier":{"type":"number","format":"double"},"address":{"type":"string"},"decimals":{"type":"number","format":"double"},"baseSymbol":{"type":"string"},"assetSymbol":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"}},"required":["address","decimals","symbol","name"],"type":"object"},"TokenInfoResponse":{"properties":{"hasPriceFeedProvider":{"type":"boolean"},"totalSupply":{"type":"string"},"balance":{"type":"string"},"balanceType":{"type":"number","format":"double"},"sourceChainBalance":{"type":"string"},"gmxAccountBalance":{"type":"string"},"walletBalance":{"type":"string"},"prices":{"properties":{"maxPrice":{"type":"string"},"minPrice":{"type":"string"}},"required":["maxPrice","minPrice"],"type":"object"},"searchAliases":{"items":{"type":"string"},"type":"array"},"isStaking":{"type":"boolean"},"isPlatformTradingToken":{"type":"boolean"},"isPlatformToken":{"type":"boolean"},"isV1Available":{"type":"boolean"},"isChartDisabled":{"type":"boolean"},"isTempHidden":{"type":"boolean"},"isSynthetic":{"type":"boolean"},"isStable":{"type":"boolean"},"isShortable":{"type":"boolean"},"isWrapped":{"type":"boolean"},"isNative":{"type":"boolean"},"isUsdg":{"type":"boolean"},"contractVersion":{"type":"string"},"isPermitDisabled":{"type":"boolean"},"isPermitSupported":{"type":"boolean"},"categories":{"items":{"type":"string"},"type":"array"},"imageUrl":{"type":"string"},"reservesUrl":{"type":"string"},"explorerUrl":{"type":"string"},"explorerSymbol":{"type":"string"},"metamaskSymbol":{"type":"string"},"wrappedAddress":{"type":"string"},"visualPrefix":{"type":"string"},"visualMultiplier":{"type":"number","format":"double"},"address":{"type":"string"},"decimals":{"type":"number","format":"double"},"baseSymbol":{"type":"string"},"assetSymbol":{"type":"string"},"symbol":{"type":"string"},"name":{"type":"string"}},"required":["prices","address","decimals","symbol","name"],"type":"object"},"SubaccountStatusResponse":{"properties":{"integrationId":{"type":"string","nullable":true},"multichainApprovalNonce":{"type":"string"},"approvalNonce":{"type":"string"},"expiresAt":{"type":"string"},"remainingActions":{"type":"string"},"currentActionsCount":{"type":"string"},"maxAllowedCount":{"type":"string"},"active":{"type":"boolean"}},"required":["integrationId","multichainApprovalNonce","approvalNonce","expiresAt","remainingActions","currentActionsCount","maxAllowedCount","active"],"type":"object"},"SubaccountStatusRequest":{"properties":{"subaccountAddress":{"type":"string"},"account":{"type":"string"}},"required":["subaccountAddress","account"],"type":"object"},"Record_string._name-string--type-string_-Array_":{"properties":{},"additionalProperties":{"items":{"properties":{"type":{"type":"string"},"name":{"type":"string"}},"required":["type","name"],"type":"object"},"type":"array"},"type":"object","description":"Construct a type with a set of properties K of type T"},"Record_string.any_":{"properties":{},"additionalProperties":{},"type":"object","description":"Construct a type with a set of properties K of type T"},"ApprovalPrepareResponse":{"properties":{"nonce":{"type":"string"},"relayRouterAddress":{"type":"string"},"primaryType":{"type":"string"},"message":{"$ref":"#/components/schemas/Record_string.any_"},"types":{"$ref":"#/components/schemas/Record_string._name-string--type-string_-Array_"},"domain":{"properties":{"verifyingContract":{"type":"string"},"chainId":{"type":"number","format":"double"},"version":{"type":"string"},"name":{"type":"string"}},"required":["verifyingContract","chainId","version","name"],"type":"object"}},"required":["nonce","relayRouterAddress","primaryType","message","types","domain"],"type":"object"},"ApprovalPrepareRequest":{"properties":{"signingNetwork":{"type":"string"},"maxAllowedCount":{"type":"string"},"expiresAt":{"type":"string"},"shouldAdd":{"type":"boolean"},"subaccountAddress":{"type":"string"},"account":{"type":"string"}},"required":["maxAllowedCount","expiresAt","shouldAdd","subaccountAddress","account"],"type":"object"},"BigIntToString_StakingPowerData_":{"properties":{"loyaltyTrackingStart":{"type":"number","format":"double"},"powerAccrualStart":{"type":"number","format":"double"},"treasuryGmxBalance":{"type":"string"},"projectedRewardShare":{"type":"string"},"powerResetCount":{"type":"number","format":"double"},"lastPowerResetAt":{"type":"number","format":"double"},"loyaltyRatio":{"type":"number","format":"double"},"currentStaked":{"type":"string"},"historicalMaxStaked":{"type":"string"},"userSharePercent":{"type":"number","format":"double"},"totalNetworkPower":{"type":"string"},"cumulativePower":{"type":"string"}},"required":["loyaltyTrackingStart","powerAccrualStart","treasuryGmxBalance","projectedRewardShare","powerResetCount","lastPowerResetAt","loyaltyRatio","currentStaked","historicalMaxStaked","userSharePercent","totalNetworkPower","cumulativePower"],"type":"object","description":"Recursively converts bigint types to string types in a type definition.\nHandles primitives, objects, arrays, and nested structures.\nPreserves Date type as-is."},"StakingPowerResponse":{"$ref":"#/components/schemas/BigIntToString_StakingPowerData_"},"RatesSnapshotResponse":{"properties":{"timestamp":{"type":"number","format":"double"},"borrowingRateShort":{"type":"string"},"borrowingRateLong":{"type":"string"},"fundingRateShort":{"type":"string"},"fundingRateLong":{"type":"string"},"netRateShort":{"type":"string"},"netRateLong":{"type":"string"}},"required":["timestamp","borrowingRateShort","borrowingRateLong","fundingRateShort","fundingRateLong","netRateShort","netRateLong"],"type":"object"},"MarketRatesResponse":{"properties":{"ratesSnapshots":{"items":{"$ref":"#/components/schemas/RatesSnapshotResponse"},"type":"array"},"marketAddress":{"type":"string"}},"required":["ratesSnapshots","marketAddress"],"type":"object"},"RatesResponse":{"items":{"$ref":"#/components/schemas/MarketRatesResponse"},"type":"array"},"ApiParameterPeriod":{"enum":["1d","7d","30d","90d","180d","1y","total"],"type":"string"},"OhlcvCandle":{"properties":{"close":{"type":"string"},"low":{"type":"string"},"high":{"type":"string"},"open":{"type":"string"},"timestamp":{"type":"number","format":"double"}},"required":["close","low","high","open","timestamp"],"type":"object"},"OrderResponse":{"properties":{"requestId":{"type":"string","nullable":true},"dataList":{"items":{"type":"string"},"type":"array"},"autoCancel":{"type":"boolean"},"isFrozen":{"type":"boolean"},"shouldUnwrapNativeToken":{"type":"boolean"},"isLong":{"type":"boolean"},"srcChainId":{"type":"string"},"validFromTime":{"type":"string"},"updatedAtTime":{"type":"string"},"minOutputAmount":{"type":"string"},"callbackGasLimit":{"type":"string"},"executionFee":{"type":"string"},"acceptablePrice":{"type":"string"},"triggerPrice":{"type":"string"},"initialCollateralDeltaAmount":{"type":"string"},"sizeDeltaUsd":{"type":"string"},"decreasePositionSwapType":{"type":"number","format":"double"},"orderType":{"type":"number","format":"double"},"swapPath":{"items":{"type":"string"},"type":"array"},"initialCollateralTokenAddress":{"type":"string"},"marketAddress":{"type":"string"},"uiFeeReceiver":{"type":"string"},"callbackContract":{"type":"string"},"cancellationReceiver":{"type":"string"},"receiver":{"type":"string"},"account":{"type":"string"},"key":{"type":"string"}},"required":["requestId","dataList","autoCancel","isFrozen","shouldUnwrapNativeToken","isLong","srcChainId","validFromTime","updatedAtTime","minOutputAmount","callbackGasLimit","executionFee","acceptablePrice","triggerPrice","initialCollateralDeltaAmount","sizeDeltaUsd","decreasePositionSwapType","orderType","swapPath","initialCollateralTokenAddress","marketAddress","uiFeeReceiver","callbackContract","cancellationReceiver","receiver","account","key"],"type":"object"},"PositionResponse":{"properties":{"relatedOrders":{"items":{"$ref":"#/components/schemas/OrderResponse"},"type":"array"},"pendingClaimableFundingFeesUsd":{"type":"string"},"pendingFundingFeesUsd":{"type":"string"},"uiFeeUsd":{"type":"string"},"closingFeeUsd":{"type":"string"},"netValue":{"type":"string"},"leverageWithoutPnl":{"type":"string"},"leverageWithPnl":{"type":"string"},"leverage":{"type":"string"},"closePriceImpactDeltaUsd":{"type":"string"},"pendingImpactUsd":{"type":"string"},"priceImpactDiffUsd":{"type":"string"},"netPriceImapctDeltaUsd":{"type":"string"},"pnlAfterFeesPercentage":{"type":"string"},"pnlAfterFees":{"type":"string"},"pnlPercentage":{"type":"string"},"hasLowCollateral":{"type":"boolean"},"remainingCollateralAmount":{"type":"string"},"remainingCollateralUsd":{"type":"string"},"collateralUsd":{"type":"string"},"liquidationPrice":{"type":"string"},"entryPrice":{"type":"string"},"markPrice":{"type":"string"},"poolName":{"type":"string"},"indexName":{"type":"string"},"data":{"type":"string"},"pendingImpactAmount":{"type":"string"},"uiFeeAmount":{"type":"string"},"traderDiscountAmount":{"type":"string"},"positionFeeAmount":{"type":"string"},"pnl":{"type":"string"},"isOpening":{"type":"boolean"},"claimableShortTokenAmount":{"type":"string"},"claimableLongTokenAmount":{"type":"string"},"fundingFeeAmount":{"type":"string"},"isLong":{"type":"boolean"},"decreasedAtTime":{"type":"string"},"increasedAtTime":{"type":"string"},"pendingBorrowingFeesUsd":{"type":"string"},"collateralAmount":{"type":"string"},"sizeInTokens":{"type":"string"},"sizeInUsd":{"type":"string"},"collateralTokenAddress":{"type":"string"},"marketAddress":{"type":"string"},"account":{"type":"string"},"contractKey":{"type":"string"},"key":{"type":"string"}},"required":["pendingClaimableFundingFeesUsd","pendingFundingFeesUsd","uiFeeUsd","closingFeeUsd","netValue","closePriceImpactDeltaUsd","pendingImpactUsd","priceImpactDiffUsd","netPriceImapctDeltaUsd","pnlAfterFeesPercentage","pnlAfterFees","pnlPercentage","hasLowCollateral","remainingCollateralAmount","remainingCollateralUsd","collateralUsd","markPrice","poolName","indexName","data","pendingImpactAmount","uiFeeAmount","traderDiscountAmount","positionFeeAmount","pnl","claimableShortTokenAmount","claimableLongTokenAmount","fundingFeeAmount","isLong","decreasedAtTime","increasedAtTime","pendingBorrowingFeesUsd","collateralAmount","sizeInTokens","sizeInUsd","collateralTokenAddress","marketAddress","account","contractKey","key"],"type":"object"},"PairResponse":{"properties":{"liquidity_in_usd":{"type":"number","format":"double"},"pool_id":{"type":"string"},"volume_usd":{"type":"number","format":"double"},"next_funding_rate_timestamp":{"type":"number","format":"double"},"next_funding_rate":{"type":"number","format":"double"},"funding_rate":{"type":"number","format":"double"},"short_open_interest":{"type":"number","format":"double"},"long_open_interest":{"type":"number","format":"double"},"open_interest":{"type":"number","format":"double"},"low":{"type":"number","format":"double"},"high":{"type":"number","format":"double"},"last_price":{"type":"number","format":"double"},"product_type":{"type":"string"},"target_volume":{"type":"number","format":"double"},"base_volume":{"type":"number","format":"double"},"target_currency":{"type":"string"},"base_currency":{"type":"string"},"ticker_id":{"type":"string"}},"required":["pool_id","last_price","product_type","target_volume","base_volume","target_currency","base_currency","ticker_id"],"type":"object"},"TransactionMode":{"enum":["express","classic"],"type":"string"},"PrepareResponse":{"properties":{"traceId":{"type":"string"},"warnings":{"items":{"type":"string"},"type":"array"},"expiresAt":{"type":"number","format":"double"},"estimates":{"properties":{"fundingFeeUsd":{"type":"string"},"borrowingFeeUsd":{"type":"string"},"positionFeeUsd":{"type":"string"},"sizeDeltaUsd":{"type":"string"},"acceptablePrice":{"type":"string"},"executionFeeAmount":{"type":"string"},"swapPriceImpactDeltaUsd":{"type":"string"},"positionPriceImpactDeltaUsd":{"type":"string"}},"required":["fundingFeeUsd","borrowingFeeUsd","positionFeeUsd","sizeDeltaUsd","acceptablePrice","executionFeeAmount","swapPriceImpactDeltaUsd","positionPriceImpactDeltaUsd"],"type":"object"},"payload":{"$ref":"#/components/schemas/Record_string.any_"},"requestId":{"type":"string"},"mode":{"$ref":"#/components/schemas/TransactionMode"},"payloadType":{"type":"string","enum":["transaction","typed-data"]}},"required":["payload","requestId","mode","payloadType"],"type":"object"},"OrderKind":{"enum":["increase","decrease","swap"],"type":"string"},"SimpleOrderType":{"enum":["market","limit","stop-market","take-profit","stop-loss","twap"],"type":"string"},"PrepareRequest":{"properties":{"subaccountApproval":{"$ref":"#/components/schemas/Record_string.any_"},"subaccountAddress":{"type":"string"},"from":{"type":"string"},"mode":{"$ref":"#/components/schemas/TransactionMode"},"autoCancel":{"type":"boolean"},"tpsl":{"items":{"properties":{"size":{"type":"string"},"triggerPrice":{"type":"string"},"type":{"type":"string","enum":["take-profit","stop-loss"]}},"required":["triggerPrice","type"],"type":"object"},"type":"array"},"twapConfig":{"properties":{"frequency":{"type":"number","format":"double"},"parts":{"type":"number","format":"double"},"duration":{"type":"number","format":"double"}},"required":["parts","duration"],"type":"object"},"gasPaymentToken":{"type":"string"},"manualSwapPath":{"items":{"type":"string"},"type":"array"},"keepLeverage":{"type":"boolean"},"receiveToken":{"type":"string"},"collateralToPay":{"properties":{"token":{"type":"string"},"amount":{"type":"string"}},"required":["token","amount"],"type":"object"},"executionFeeBufferBps":{"type":"number","format":"double"},"acceptablePriceImpactBps":{"type":"string"},"slippage":{"type":"number","format":"double"},"collateralToken":{"type":"string"},"triggerPrice":{"type":"string"},"size":{"type":"string"},"orderType":{"$ref":"#/components/schemas/SimpleOrderType"},"direction":{"type":"string","enum":["long","short"]},"symbol":{"type":"string"},"kind":{"$ref":"#/components/schemas/OrderKind"}},"required":["mode","orderType","kind"],"type":"object"},"OrderTransactionStatus":{"enum":["prepared","relay_accepted","relay_pending","relay_submitted","created","executed","cancelled","relay_failed","relay_reverted"],"type":"string"},"SubmitResponse":{"properties":{"traceId":{"type":"string"},"error":{"properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message","code"],"type":"object"},"taskId":{"type":"string"},"txHash":{"type":"string"},"status":{"$ref":"#/components/schemas/OrderTransactionStatus"},"requestId":{"type":"string"}},"required":["status","requestId"],"type":"object"},"SubmitRequest":{"properties":{"from":{"type":"string"},"signature":{"type":"string"},"eip712Data":{"$ref":"#/components/schemas/Record_string.any_"},"requestId":{"type":"string"},"mode":{"$ref":"#/components/schemas/TransactionMode"}},"type":"object"},"StatusResponse":{"properties":{"traceId":{"type":"string"},"updatedAt":{"type":"string"},"createdAt":{"type":"string"},"error":{"properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message","code"],"type":"object"},"gelatoStatusCode":{"type":"number","format":"double"},"taskId":{"type":"string"},"cancellationReason":{"type":"string"},"orderKeys":{"items":{"type":"string"},"type":"array"},"executionTxnHash":{"type":"string"},"createdTxnHash":{"type":"string"},"txHash":{"type":"string"},"status":{"$ref":"#/components/schemas/OrderTransactionStatus"},"requestId":{"type":"string"}},"required":["updatedAt","createdAt","status","requestId"],"type":"object"},"StatusRequest":{"properties":{"requestId":{"type":"string"}},"required":["requestId"],"type":"object"},"EditPrepareRequest":{"properties":{"subaccountApproval":{"$ref":"#/components/schemas/Record_string.any_"},"subaccountAddress":{"type":"string"},"from":{"type":"string"},"mode":{"$ref":"#/components/schemas/TransactionMode"},"executionFeeTopUp":{"type":"string"},"newAutoCancel":{"type":"boolean"},"newAcceptablePrice":{"type":"string"},"newTriggerPrice":{"type":"string"},"newSize":{"type":"string"},"orderIds":{"items":{"type":"string"},"type":"array"}},"required":["from","mode","orderIds"],"type":"object"},"CancelPrepareRequest":{"properties":{"subaccountApproval":{"$ref":"#/components/schemas/Record_string.any_"},"subaccountAddress":{"type":"string"},"from":{"type":"string"},"mode":{"$ref":"#/components/schemas/TransactionMode"},"all":{"type":"boolean"},"orderIds":{"items":{"type":"string"},"type":"array"},"orderId":{"type":"string"}},"required":["from","mode"],"type":"object"},"CollateralOperation":{"type":"string","enum":["deposit","withdraw"]},"CollateralPrepareRequest":{"properties":{"subaccountApproval":{"$ref":"#/components/schemas/Record_string.any_"},"subaccountAddress":{"type":"string"},"from":{"type":"string"},"mode":{"$ref":"#/components/schemas/TransactionMode"},"gasPaymentToken":{"type":"string"},"executionFeeBufferBps":{"type":"number","format":"double"},"slippage":{"type":"number","format":"double"},"amount":{"type":"string"},"positionKey":{"type":"string"},"operation":{"$ref":"#/components/schemas/CollateralOperation"}},"required":["from","mode","amount","positionKey","operation"],"type":"object"},"LeverageTierResponse":{"properties":{"maxPositionSize":{"type":"string"},"minCollateralFactor":{"type":"string"},"maxLeverage":{"type":"string"}},"required":["minCollateralFactor","maxLeverage"],"type":"object"},"MarketWithTiersResponse":{"properties":{"minCollateralUsd":{"type":"string"},"minPositionSizeUsd":{"type":"string"},"leverageTiers":{"items":{"$ref":"#/components/schemas/LeverageTierResponse"},"type":"array"},"isSpotOnly":{"type":"boolean"},"listingDate":{"type":"number","format":"double"},"isListed":{"type":"boolean"},"shortTokenAddress":{"type":"string"},"longTokenAddress":{"type":"string"},"indexTokenAddress":{"type":"string"},"marketTokenAddress":{"type":"string"},"symbol":{"type":"string"}},"required":["minCollateralUsd","minPositionSizeUsd","leverageTiers","isSpotOnly","isListed","shortTokenAddress","longTokenAddress","indexTokenAddress","marketTokenAddress","symbol"],"type":"object"},"MarketTickerResponse":{"properties":{"netRateShort":{"type":"string"},"netRateLong":{"type":"string"},"borrowingRateShort":{"type":"string"},"borrowingRateLong":{"type":"string"},"fundingRateShort":{"type":"string"},"fundingRateLong":{"type":"string"},"poolAmountShortUsd":{"type":"string"},"poolAmountLongUsd":{"type":"string"},"availableLiquidityShort":{"type":"string"},"availableLiquidityLong":{"type":"string"},"shortInterestUsdMark":{"type":"string"},"longInterestUsdMark":{"type":"string"},"shortInterestUsd":{"type":"string"},"longInterestUsd":{"type":"string"},"shortInterestInTokens":{"type":"string"},"longInterestInTokens":{"type":"string"},"priceChangePercent24hBps":{"type":"string"},"priceChange24h":{"type":"string"},"close24h":{"type":"string"},"open24h":{"type":"string"},"low24h":{"type":"string"},"high24h":{"type":"string"},"markPrice":{"type":"string"},"maxPrice":{"type":"string"},"minPrice":{"type":"string"},"marketTokenAddress":{"type":"string"},"symbol":{"type":"string"}},"required":["netRateShort","netRateLong","borrowingRateShort","borrowingRateLong","fundingRateShort","fundingRateLong","poolAmountShortUsd","poolAmountLongUsd","availableLiquidityShort","availableLiquidityLong","shortInterestUsdMark","longInterestUsdMark","shortInterestUsd","longInterestUsd","shortInterestInTokens","longInterestInTokens","priceChangePercent24hBps","priceChange24h","close24h","open24h","low24h","high24h","markPrice","maxPrice","minPrice","marketTokenAddress","symbol"],"type":"object"},"MarketInfoResponse":{"properties":{"borrowingFactorPerSecondForShorts":{"type":"string"},"borrowingFactorPerSecondForLongs":{"type":"string"},"fundingFactorPerSecond":{"type":"string"},"totalBorrowingFees":{"type":"string"},"virtualInventoryForPositions":{"type":"string"},"virtualPoolAmountForShortToken":{"type":"string"},"virtualPoolAmountForLongToken":{"type":"string"},"longsPayShorts":{"type":"boolean"},"shortInterestInTokens":{"type":"string"},"longInterestInTokens":{"type":"string"},"shortInterestUsd":{"type":"string"},"longInterestUsd":{"type":"string"},"positionImpactPoolAmount":{"type":"string"},"poolValueMin":{"type":"string"},"poolValueMax":{"type":"string"},"shortPoolAmount":{"type":"string"},"longPoolAmount":{"type":"string"},"virtualShortTokenId":{"type":"string"},"virtualLongTokenId":{"type":"string"},"virtualMarketId":{"type":"string"},"maxShortPoolUsdForDeposit":{"type":"string"},"maxLongPoolUsdForDeposit":{"type":"string"},"maxShortPoolAmount":{"type":"string"},"maxLongPoolAmount":{"type":"string"},"withdrawalFeeFactorBalanceWasNotImproved":{"type":"string"},"withdrawalFeeFactorBalanceWasImproved":{"type":"string"},"swapImpactExponentFactor":{"type":"string"},"swapImpactFactorNegative":{"type":"string"},"swapImpactFactorPositive":{"type":"string"},"atomicSwapFeeFactor":{"type":"string"},"swapFeeFactorForBalanceWasNotImproved":{"type":"string"},"swapFeeFactorForBalanceWasImproved":{"type":"string"},"useOpenInterestInTokensForBalance":{"type":"boolean"},"positionImpactExponentFactorNegative":{"type":"string"},"positionImpactExponentFactorPositive":{"type":"string"},"lentPositionImpactPoolAmount":{"type":"string"},"maxLendableImpactUsd":{"type":"string"},"maxLendableImpactFactorForWithdrawals":{"type":"string"},"maxLendableImpactFactor":{"type":"string"},"maxFundingFactorPerSecond":{"type":"string"},"minFundingFactorPerSecond":{"type":"string"},"thresholdForDecreaseFunding":{"type":"string"},"thresholdForStableFunding":{"type":"string"},"fundingDecreaseFactorPerSecond":{"type":"string"},"fundingIncreaseFactorPerSecond":{"type":"string"},"fundingExponentFactor":{"type":"string"},"fundingFactor":{"type":"string"},"borrowingExponentFactorShort":{"type":"string"},"borrowingExponentFactorLong":{"type":"string"},"borrowingFactorShort":{"type":"string"},"borrowingFactorLong":{"type":"string"},"maxPositionImpactFactorForLiquidations":{"type":"string"},"maxPositionImpactFactorNegative":{"type":"string"},"maxPositionImpactFactorPositive":{"type":"string"},"positionImpactFactorNegative":{"type":"string"},"positionImpactFactorPositive":{"type":"string"},"positionFeeFactorForBalanceWasNotImproved":{"type":"string"},"positionFeeFactorForBalanceWasImproved":{"type":"string"},"maxPnlFactorForWithdrawalsShort":{"type":"string"},"maxPnlFactorForWithdrawalsLong":{"type":"string"},"maxPnlFactorForDepositsShort":{"type":"string"},"maxPnlFactorForDepositsLong":{"type":"string"},"maxPnlFactorForTradersShort":{"type":"string"},"maxPnlFactorForTradersLong":{"type":"string"},"minCollateralFactorForOpenInterestShort":{"type":"string"},"minCollateralFactorForOpenInterestLong":{"type":"string"},"minCollateralFactorForLiquidation":{"type":"string"},"minCollateralFactor":{"type":"string"},"swapImpactPoolAmountShort":{"type":"string"},"swapImpactPoolAmountLong":{"type":"string"},"positionImpactPoolDistributionRate":{"type":"string"},"minPositionImpactPoolAmount":{"type":"string"},"maxOpenInterestShort":{"type":"string"},"maxOpenInterestLong":{"type":"string"},"openInterestReserveFactorShort":{"type":"string"},"openInterestReserveFactorLong":{"type":"string"},"reserveFactorShort":{"type":"string"},"reserveFactorLong":{"type":"string"},"data":{"type":"string"},"isDisabled":{"type":"boolean"},"isSpotOnly":{"type":"boolean"},"isSameCollaterals":{"type":"boolean"},"shortTokenAddress":{"type":"string"},"longTokenAddress":{"type":"string"},"indexTokenAddress":{"type":"string"},"marketTokenAddress":{"type":"string"},"name":{"type":"string"}},"required":["borrowingFactorPerSecondForShorts","borrowingFactorPerSecondForLongs","fundingFactorPerSecond","totalBorrowingFees","virtualInventoryForPositions","virtualPoolAmountForShortToken","virtualPoolAmountForLongToken","longsPayShorts","shortInterestInTokens","longInterestInTokens","shortInterestUsd","longInterestUsd","positionImpactPoolAmount","poolValueMin","poolValueMax","shortPoolAmount","longPoolAmount","virtualShortTokenId","virtualLongTokenId","virtualMarketId","maxShortPoolUsdForDeposit","maxLongPoolUsdForDeposit","maxShortPoolAmount","maxLongPoolAmount","swapImpactExponentFactor","swapImpactFactorNegative","swapImpactFactorPositive","atomicSwapFeeFactor","swapFeeFactorForBalanceWasNotImproved","swapFeeFactorForBalanceWasImproved","useOpenInterestInTokensForBalance","positionImpactExponentFactorNegative","positionImpactExponentFactorPositive","lentPositionImpactPoolAmount","maxLendableImpactUsd","maxLendableImpactFactorForWithdrawals","maxLendableImpactFactor","maxFundingFactorPerSecond","minFundingFactorPerSecond","thresholdForDecreaseFunding","thresholdForStableFunding","fundingDecreaseFactorPerSecond","fundingIncreaseFactorPerSecond","fundingExponentFactor","fundingFactor","borrowingExponentFactorShort","borrowingExponentFactorLong","borrowingFactorShort","borrowingFactorLong","maxPositionImpactFactorForLiquidations","maxPositionImpactFactorNegative","maxPositionImpactFactorPositive","positionImpactFactorNegative","positionImpactFactorPositive","positionFeeFactorForBalanceWasNotImproved","positionFeeFactorForBalanceWasImproved","maxPnlFactorForTradersShort","maxPnlFactorForTradersLong","minCollateralFactorForOpenInterestShort","minCollateralFactorForOpenInterestLong","minCollateralFactorForLiquidation","minCollateralFactor","swapImpactPoolAmountShort","swapImpactPoolAmountLong","positionImpactPoolDistributionRate","minPositionImpactPoolAmount","maxOpenInterestShort","maxOpenInterestLong","openInterestReserveFactorShort","openInterestReserveFactorLong","reserveFactorShort","reserveFactorLong","data","isDisabled","isSpotOnly","isSameCollaterals","shortTokenAddress","longTokenAddress","indexTokenAddress","marketTokenAddress","name"],"type":"object"},"GlvShiftParamsResponse":{"properties":{"minMarketTokens":{"type":"string"},"marketTokenAmount":{"type":"string"},"toMarket":{"type":"string"},"fromMarket":{"type":"string"},"glv":{"type":"string"}},"required":["minMarketTokens","marketTokenAmount","toMarket","fromMarket","glv"],"type":"object"},"JitLiquidityInfoItemResponse":{"properties":{"glvShiftParams":{"items":{"$ref":"#/components/schemas/GlvShiftParamsResponse"},"type":"array"},"maxReservedUsdWithJitShort":{"type":"string"},"maxReservedUsdWithJitLong":{"type":"string"},"market":{"type":"string"},"glv":{"type":"string"}},"required":["glvShiftParams","maxReservedUsdWithJitShort","maxReservedUsdWithJitLong","market","glv"],"type":"object"},"JitLiquidityInfoResponse":{"properties":{"liquidityInfos":{"items":{"$ref":"#/components/schemas/JitLiquidityInfoItemResponse"},"type":"array"}},"required":["liquidityInfos"],"type":"object"},"JitLiquiditySnapshotResponse":{"properties":{"shortLiquidityUsd":{"type":"string"},"longLiquidityUsd":{"type":"string"},"timestamp":{"type":"number","format":"double"},"glvAddress":{"type":"string"},"marketAddress":{"type":"string"}},"required":["shortLiquidityUsd","longLiquidityUsd","timestamp","glvAddress","marketAddress"],"type":"object"},"JitLiquidityHistoryResponse":{"properties":{"snapshots":{"items":{"$ref":"#/components/schemas/JitLiquiditySnapshotResponse"},"type":"array"}},"required":["snapshots"],"type":"object"},"JitLiquidityHistoryPeriod":{"type":"string","enum":["1h","1d"]},"BigIntToString_BuybackWeeklyStatsData_":{"properties":{"weeks":{"items":{"properties":{"cumulativeAccrued":{"type":"string"},"weeklyAccrued":{"type":"string"},"weekEnd":{"type":"number","format":"double"},"weekStart":{"type":"number","format":"double"}},"required":["cumulativeAccrued","weeklyAccrued","weekEnd","weekStart"],"type":"object"},"type":"array"},"summary":{"properties":{"weeksTracked":{"type":"number","format":"double"},"latestWeekAccrued":{"type":"string"},"totalAccrued":{"type":"string"}},"required":["weeksTracked","latestWeekAccrued","totalAccrued"],"type":"object"}},"required":["weeks","summary"],"type":"object","description":"Recursively converts bigint types to string types in a type definition.\nHandles primitives, objects, arrays, and nested structures.\nPreserves Date type as-is."},"BuybackWeeklyStatsResponse":{"$ref":"#/components/schemas/BigIntToString_BuybackWeeklyStatsData_"},"WalletBalance":{"properties":{"balance":{"type":"string"},"decimals":{"type":"number","format":"double"},"address":{"type":"string"},"symbol":{"type":"string"}},"required":["balance","decimals","address","symbol"],"type":"object"},"ApyEntry":{"properties":{"bonusApr":{"type":"number","format":"double"},"baseApy":{"type":"number","format":"double"},"apy":{"type":"number","format":"double"}},"required":["bonusApr","baseApy","apy"],"type":"object"},"Record_string.ApyEntry_":{"properties":{},"additionalProperties":{"$ref":"#/components/schemas/ApyEntry"},"type":"object","description":"Construct a type with a set of properties K of type T"},"ApyResponse":{"properties":{"glvs":{"$ref":"#/components/schemas/Record_string.ApyEntry_"},"markets":{"$ref":"#/components/schemas/Record_string.ApyEntry_"}},"required":["glvs","markets"],"type":"object"},"TokenAllowance":{"properties":{"allowance":{"type":"string"},"decimals":{"type":"number","format":"double"},"address":{"type":"string"},"symbol":{"type":"string"}},"required":["allowance","decimals","address","symbol"],"type":"object"}},"securitySchemes":{}},"info":{"title":"@gmx-io/gmx-public-api","version":"1.0.0","license":{"name":"Copyright"},"contact":{}},"paths":{"/tokens":{"get":{"operationId":"GetTokens","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TokenResponse"},"type":"array"}}}},"500":{"description":"Internal Server Error"}},"tags":["Tokens"],"security":[],"parameters":[]}},"/tokens/info":{"get":{"operationId":"GetTokensInfo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TokenInfoResponse"},"type":"array"}}}},"500":{"description":"Internal Server Error"}},"tags":["Tokens"],"security":[],"parameters":[]}},"/subaccounts/status":{"post":{"operationId":"FetchStatus","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubaccountStatusResponse"}}}},"400":{"description":"Bad Request"}},"tags":["Subaccounts"],"security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubaccountStatusRequest"}}}}}},"/subaccounts/approval/prepare":{"post":{"operationId":"PrepareApproval","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalPrepareResponse"}}}},"400":{"description":"Bad Request"}},"tags":["Subaccounts"],"security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalPrepareRequest"}}}}}},"/staking/power":{"get":{"operationId":"GetStakingPower","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StakingPowerResponse"}}}},"400":{"description":"Bad Request - Invalid address"},"500":{"description":"Internal Server Error"}},"tags":["Staking"],"security":[],"parameters":[{"in":"query","name":"address","required":true,"schema":{"type":"string"}}]}},"/rates":{"get":{"operationId":"GetRates","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatesResponse"}}}},"400":{"description":"Invalid period or averageBy"},"500":{"description":"Internal Server Error"}},"tags":["Rates"],"security":[],"parameters":[{"in":"query","name":"period","required":false,"schema":{"$ref":"#/components/schemas/ApiParameterPeriod"}},{"in":"query","name":"averageBy","required":false,"schema":{"$ref":"#/components/schemas/ApiParameterPeriod"}},{"in":"query","name":"address","required":false,"schema":{"type":"string"}}]}},"/prices/ohlcv":{"get":{"operationId":"GetOhlcv","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OhlcvCandle"},"type":"array"}}}},"400":{"description":"Bad Request - Invalid parameters"},"500":{"description":"Internal Server Error"}},"tags":["Prices"],"security":[],"parameters":[{"in":"query","name":"symbol","required":true,"schema":{"type":"string"}},{"in":"query","name":"timeframe","required":true,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"format":"double","type":"number"}},{"description":"Unix timestamp in milliseconds","in":"query","name":"since","required":false,"schema":{"format":"double","type":"number"}}]}},"/positions":{"get":{"operationId":"GetPositionsInfo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PositionResponse"},"type":"array"}}}},"400":{"description":"Bad Request - Invalid address"},"500":{"description":"Internal Server Error"}},"tags":["Positions"],"security":[],"parameters":[{"in":"query","name":"address","required":true,"schema":{"type":"string"}},{"in":"query","name":"includeRelatedOrders","required":false,"schema":{"type":"boolean"}}]}},"/positions/{key}":{"get":{"operationId":"GetPositionByKey","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PositionResponse"}}}},"400":{"description":"Bad Request - Invalid key"},"404":{"description":"Position not found"},"500":{"description":"Internal Server Error"}},"tags":["Positions"],"security":[],"parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"includeRelatedOrders","required":false,"schema":{"type":"boolean"}}]}},"/performance/annualized":{"get":{"operationId":"GetAnnualized","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"items":{"properties":{"entity":{"type":"string"},"performance":{"type":"string"},"address":{"type":"string"}},"required":["entity","address"],"type":"object"},"type":"array"}}}},"400":{"description":"Invalid period"},"500":{"description":"Internal Server Error"}},"tags":["Performance"],"security":[],"parameters":[{"in":"query","name":"period","required":false,"schema":{"$ref":"#/components/schemas/ApiParameterPeriod"}},{"in":"query","name":"address","required":false,"schema":{"type":"string"}}]}},"/performance/snapshots":{"get":{"operationId":"GetSnapshots","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"items":{"properties":{"snapshots":{"items":{"properties":{"performance":{"type":"string"},"snapshotTimestamp":{"type":"number","format":"double"}},"required":["snapshotTimestamp"],"type":"object"},"type":"array"},"entity":{"type":"string"},"address":{"type":"string"}},"required":["snapshots","entity","address"],"type":"object"},"type":"array"}}}},"400":{"description":"Invalid period"},"500":{"description":"Internal Server Error"}},"tags":["Performance"],"security":[],"parameters":[{"in":"query","name":"period","required":false,"schema":{"$ref":"#/components/schemas/ApiParameterPeriod"}},{"in":"query","name":"address","required":false,"schema":{"type":"string"}}]}},"/pairs":{"get":{"operationId":"GetPairs","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PairResponse"},"type":"array"}}}},"500":{"description":"Internal Server Error"}},"tags":["Pairs"],"security":[],"parameters":[]}},"/orders":{"get":{"operationId":"GetOrdersByAddress","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OrderResponse"},"type":"array"}}}},"400":{"description":"Bad Request - Invalid address"},"500":{"description":"Internal Server Error"}},"tags":["Orders"],"security":[],"parameters":[{"in":"query","name":"address","required":true,"schema":{"type":"string"}}]}},"/orders/{key}":{"get":{"operationId":"GetOrderByKey","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}},"400":{"description":"Bad Request - Invalid key"},"404":{"description":"Order not found"},"500":{"description":"Internal Server Error"}},"tags":["Orders"],"security":[],"parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}}]}},"/orders/txns/prepare":{"post":{"operationId":"Prepare","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareResponse"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}},"tags":["Order Transactions"],"security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareRequest"}}}}}},"/orders/txns/submit":{"post":{"operationId":"Submit","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitResponse"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}},"tags":["Order Transactions"],"security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRequest"}}}}}},"/orders/txns/status":{"post":{"operationId":"Status","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"Bad Request"},"404":{"description":"Not Found"}},"tags":["Order Transactions"],"security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusRequest"}}}}}},"/orders/txns/edit/prepare":{"post":{"operationId":"EditPrepare","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareResponse"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}},"tags":["Order Transactions"],"security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditPrepareRequest"}}}}}},"/orders/txns/cancel/prepare":{"post":{"operationId":"CancelPrepare","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareResponse"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}},"tags":["Order Transactions"],"security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelPrepareRequest"}}}}}},"/orders/txns/collateral/prepare":{"post":{"operationId":"CollateralPrepare","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareResponse"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}},"tags":["Order Transactions"],"security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollateralPrepareRequest"}}}}}},"/markets":{"get":{"operationId":"GetMarkets","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MarketWithTiersResponse"},"type":"array"}}}},"500":{"description":"Internal Server Error"}},"tags":["Markets"],"security":[],"parameters":[]}},"/markets/tickers":{"get":{"operationId":"GetMarketsTickers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MarketTickerResponse"},"type":"array"}}}},"400":{"description":"Bad Request - Invalid market addresses or symbols"},"500":{"description":"Internal Server Error"}},"tags":["Markets"],"security":[],"parameters":[{"in":"query","name":"addresses","required":false,"schema":{"type":"array","items":{"type":"string"}}},{"in":"query","name":"symbols","required":false,"schema":{"type":"array","items":{"type":"string"}}}]}},"/markets/info":{"get":{"operationId":"GetMarketsInfo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MarketInfoResponse"},"type":"array"}}}},"500":{"description":"Internal Server Error"}},"tags":["Markets"],"security":[],"parameters":[]}},"/jit/liquidity_info":{"get":{"operationId":"GetLiquidityInfo","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JitLiquidityInfoResponse"}}}},"500":{"description":"Internal Server Error"}},"tags":["JIT"],"security":[],"parameters":[]}},"/jit/liquidity_history":{"get":{"operationId":"GetLiquidityHistory","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JitLiquidityHistoryResponse"}}}},"400":{"description":"Bad Request - Invalid period"},"500":{"description":"Internal Server Error"}},"tags":["JIT"],"security":[],"parameters":[{"in":"query","name":"period","required":true,"schema":{"$ref":"#/components/schemas/JitLiquidityHistoryPeriod"}},{"in":"query","name":"from","required":false,"schema":{"format":"double","type":"number"}},{"in":"query","name":"to","required":false,"schema":{"format":"double","type":"number"}}]}},"/buyback/weekly-stats":{"get":{"operationId":"GetWeeklyStats","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BuybackWeeklyStatsResponse"}}}},"500":{"description":"Internal Server Error"}},"tags":["Buyback"],"security":[],"parameters":[]}},"/balances/wallet":{"get":{"operationId":"GetWalletBalances","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WalletBalance"},"type":"array"}}}},"400":{"description":"Bad Request - Invalid address"},"500":{"description":"Internal Server Error"}},"tags":["Balances"],"security":[],"parameters":[{"in":"query","name":"address","required":true,"schema":{"type":"string"}}]}},"/apy":{"get":{"operationId":"GetApy","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApyResponse"}}}},"400":{"description":"Invalid period"},"500":{"description":"Internal Server Error"}},"tags":["APY"],"security":[],"parameters":[{"in":"query","name":"period","required":false,"schema":{"$ref":"#/components/schemas/ApiParameterPeriod"}}]}},"/allowances":{"get":{"operationId":"GetAllowances","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TokenAllowance"},"type":"array"}}}},"400":{"description":"Bad Request - Invalid address or spender"},"500":{"description":"Internal Server Error"}},"tags":["Allowances"],"security":[],"parameters":[{"in":"query","name":"address","required":true,"schema":{"type":"string"}},{"in":"query","name":"spender","required":true,"schema":{"type":"string"}}]}}},"servers":[{"url":"/v1"}]}