Gala DeFi Backend API

The backend behind GalaSwap: trade quotes, pools and composite pools, positions, add and remove liquidity, swaps, bundles, slot0 and transaction status, plus explore analytics, price oracle, CoinGecko ticker feeds, pairs, incentives, competitions, leaderboards and marketplace endpoints. Admin endpoints are guarded by an X-Api-Key header.

OpenAPI Specification

gala-games-defi-backend-openapi.json Raw ↑
{"openapi":"3.0.0","paths":{"/onboarding/is-registered":{"get":{"description":"Check if a user is registered in the system.","operationId":"OnboardingController_getUser","parameters":[{"name":"address","required":true,"in":"query","description":"Wallet address (eth|... or client|...)","schema":{"pattern":".*","example":"eth|0xabc123... or client|1234567890abcdef12345678","type":"string"}}],"responses":{"200":{"description":""}},"summary":"Check if user is registered","tags":["onboarding"]}},"/user/token-list":{"get":{"description":"Returns all supported tokens + the user's balance for each (even if 0).","operationId":"UserController_fetchTokens","parameters":[{"name":"search","required":false,"in":"query","description":"Search term for filtering tokens","schema":{"example":"GALA","type":"string"}},{"name":"tokenName","required":false,"in":"query","description":"Filter by specific token name","schema":{"example":"GALA","type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number for pagination (starts at 1)","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of items per page; omit to return all","schema":{"minimum":1,"maximum":1000,"example":10,"type":"number"}},{"name":"address","required":false,"in":"query","description":"User wallet address","schema":{"pattern":"^(eth\\|[a-fA-F0-9]{40}|client\\|[a-fA-F0-9]{24})$","example":"eth|6742903677106B3156434F61f2731c3516B1aD68","type":"string"}}],"responses":{"200":{"description":""}},"summary":"Fetch user token balances","tags":["user"]}},"/user/fetch-gala-balance":{"get":{"description":"Fetches the GALA token balance for a user.","operationId":"UserController_fetchGalaBalance","parameters":[{"name":"userAddress","required":false,"in":"query","description":"User wallet address","schema":{"pattern":"^(eth\\|[a-fA-F0-9]{40}|client\\|[a-fA-F0-9]{24})$","example":"eth|6742903677106B3156434F61f2731c3516B1aD68","type":"string"}}],"responses":{"200":{"description":""}},"summary":"Fetch user GALA balance","tags":["user"]}},"/user/assets":{"get":{"description":"Returns ONLY the tokens where the user has a positive balance (quantity > 0).","operationId":"UserController_fetchAssets","parameters":[{"name":"search","required":false,"in":"query","description":"Search term for filtering tokens","schema":{"example":"GALA","type":"string"}},{"name":"tokenName","required":false,"in":"query","description":"Filter by specific token name","schema":{"example":"GALA","type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number for pagination (starts at 1)","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Maximum number of items per page; omit to return all","schema":{"minimum":1,"maximum":1000,"example":10,"type":"number"}},{"name":"address","required":true,"in":"query","description":"User wallet address","schema":{"pattern":"^(eth\\|[a-fA-F0-9]{40}|client\\|[a-fA-F0-9]{24})$","example":"eth|6742903677106B3156434F61f2731c3516B1aD68","type":"string"}}],"responses":{"200":{"description":""}},"summary":"Fetch user assets","tags":["user"]}},"/price-oracle/fetch-price":{"get":{"description":"Fetch the current price of a token from the oracle.","operationId":"PriceOracleController_fetchPrice","parameters":[{"name":"token","required":true,"in":"query","description":"Token symbol to fetch the price for","schema":{"pattern":".*","example":"GALA$Unit$none$none","type":"string"}},{"name":"at","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"from","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"to","required":false,"in":"query","schema":{"format":"date-time","type":"string"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"minimum":1,"maximum":50,"type":"number"}},{"name":"order","required":false,"in":"query","schema":{"type":"string","enum":["asc","desc"]}},{"name":"checkMutualExclusion","required":true,"in":"query","schema":{"default":true,"allOf":[{"$ref":"#/components/schemas/Object"}]}}],"responses":{"200":{"description":""}},"summary":"Fetch price from oracle","tags":["price-oracle"]}},"/v1/trade/quote":{"get":{"description":"Get a quote for a potential trade.","operationId":"TradeController_quote","parameters":[{"name":"tokenIn","required":true,"in":"query","schema":{"type":"string"}},{"name":"tokenOut","required":true,"in":"query","schema":{"type":"string"}},{"name":"amountIn","required":false,"in":"query","schema":{"type":"string"}},{"name":"amountOut","required":false,"in":"query","schema":{"type":"string"}},{"name":"fee","required":false,"in":"query","schema":{"type":"number","enum":[500,3000,10000]}},{"name":"onlyOneAmountCheck","required":false,"in":"query","schema":{"default":true,"allOf":[{"$ref":"#/components/schemas/Object"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Get a quote for a trade","tags":["trade"]}},"/v1/trade/pool":{"get":{"description":"Get detailed information about a specific liquidity pool.","operationId":"TradeController_getPoolDetails","parameters":[{"name":"token0","required":true,"in":"query","description":"First token in the pool (format: collection$category$type$additionalKey)","schema":{"example":{"collection":"GALA","category":"Unit","type":"none","additionalKey":"none"},"allOf":[{"$ref":"#/components/schemas/TokenDTO"}]}},{"name":"token1","required":true,"in":"query","description":"Second token in the pool (format: collection$category$type$additionalKey)","schema":{"example":{"collection":"GUSDC","category":"Unit","type":"none","additionalKey":"none"},"allOf":[{"$ref":"#/components/schemas/TokenDTO"}]}},{"name":"fee","required":true,"in":"query","description":"Fee tier: 500 (0.05%), 3000 (0.3%), or 10000 (1%)","schema":{"example":3000,"type":"number","enum":[500,3000,10000]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Get details of a liquidity pool","tags":["trade"]}},"/v1/trade/composite-pool":{"get":{"description":"Returns the raw on-chain GetCompositePool payload (pool state + full tick data map), front-cached and shared with the quote path. Concurrent requests for the same pool collapse to one chain read. Query params: token0, token1 (format: collection$category$type$additionalKey), fee (500 | 3000 | 10000).","operationId":"TradeController_getCompositePool","parameters":[{"name":"token0","required":true,"in":"query","description":"First token (format: collection$category$type$additionalKey)","schema":{"example":"GALA$Unit$none$none","type":"string"}},{"name":"token1","required":true,"in":"query","description":"Second token (format: collection$category$type$additionalKey)","schema":{"example":"GUSDC$Unit$none$none","type":"string"}},{"name":"fee","required":true,"in":"query","description":"Fee tier: 500 (0.05%), 3000 (0.3%), or 10000 (1%)","schema":{"example":3000,"type":"number","enum":[500,3000,10000]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Get the composite pool (state + tick data) for a pair","tags":["trade"]}},"/v1/trade/composite-pool/batch":{"post":{"description":"Batch variant of GET /composite-pool. Body: { pairs: [{ token0, token1, fee }, ...] } (max 50). Returns one result envelope per input pair, in order; a missing pool yields that item its own 404 envelope without failing the batch. Duplicate pairs share a single chain read.","operationId":"TradeController_getCompositePoolBatch","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompositePoolBatchDTO"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Get composite pools for many pairs in one request","tags":["trade"]}},"/v1/trade/composite-pool/direct":{"post":{"description":"Chain-native drop-in: send the exact body you would POST to <chain>/GetCompositePool ({ token0, token1, fee } with object-form token class keys) and receive the raw GalaChainResponse ({ Status, Data }) verbatim — front-cached (shared with /quote), so switching to this URL adds caching transparently. A missing pool mirrors chain with a 404 { Status: 0, Message }.","operationId":"TradeController_getCompositePoolDirect","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompositePoolDirectDTO"}}}},"responses":{"200":{"description":"Raw chain GetCompositePool response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Drop-in for a direct chain GetCompositePool call","tags":["trade"]}},"/v1/trade/positions":{"get":{"description":"Get all liquidity positions for a user","operationId":"TradeController_getUserPositions","parameters":[{"name":"user","required":true,"in":"query","description":"User wallet address (format: eth|<address> or client|<id>)","schema":{"example":"eth|6742903677106B3156434F61f2731c3516B1aD68","type":"string"}},{"name":"limit","required":true,"in":"query","description":"Maximum number of positions to return (1-10)","schema":{"minimum":1,"maximum":10,"example":10,"type":"number"}},{"name":"bookmark","required":false,"in":"query","description":"Bookmark for pagination (from previous response)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Get all positions for a user","tags":["trade"]}},"/v1/trade/position":{"get":{"description":"Get details of a specific liquidity position.","operationId":"TradeController_getUserPosition","parameters":[{"name":"token0","required":true,"in":"query","description":"First token in the position (format: collection$category$type$additionalKey)","schema":{"example":{"collection":"GALA","category":"Unit","type":"none","additionalKey":"none"},"allOf":[{"$ref":"#/components/schemas/TokenDTO"}]}},{"name":"token1","required":true,"in":"query","description":"Second token in the position (format: collection$category$type$additionalKey)","schema":{"example":{"collection":"GUSDC","category":"Unit","type":"none","additionalKey":"none"},"allOf":[{"$ref":"#/components/schemas/TokenDTO"}]}},{"name":"fee","required":true,"in":"query","description":"Fee tier: 500 (0.05%), 3000 (0.3%), or 10000 (1%)","schema":{"example":3000,"type":"number","enum":[500,3000,10000]}},{"name":"tickUpper","required":true,"in":"query","description":"Upper tick boundary of the position","schema":{"example":886800,"type":"number"}},{"name":"tickLower","required":true,"in":"query","description":"Lower tick boundary of the position","schema":{"example":-886800,"type":"number"}},{"name":"tickRangeCheck","required":false,"in":"query","schema":{"default":true,"type":"boolean"}},{"name":"owner","required":false,"in":"query","description":"Owner wallet address (format: eth|<address> or client|<id>)","schema":{"example":"eth|6742903677106B3156434F61f2731c3516B1aD68","type":"string"}},{"name":"positionId","required":false,"in":"query","description":"Position ID (for existing positions)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Get a specific position","tags":["trade"]}},"/v1/trade/add-liq-estimate":{"get":{"description":"Estimate gas and price impact for adding liquidity.","operationId":"TradeController_addLiquidityEsimate","parameters":[{"name":"amount","required":true,"in":"query","schema":{"type":"string"}},{"name":"tickUpper","required":true,"in":"query","schema":{"type":"number"}},{"name":"tickLower","required":true,"in":"query","schema":{"type":"number"}},{"name":"isToken0","required":true,"in":"query","schema":{"type":"boolean"}},{"name":"tickRangeCheck","required":false,"in":"query","schema":{"default":true,"type":"boolean"}},{"name":"token0","required":true,"in":"query","description":"First token in the pool (format: collection$category$type$additionalKey)","schema":{"example":{"collection":"GALA","category":"Unit","type":"none","additionalKey":"none"},"allOf":[{"$ref":"#/components/schemas/TokenDTO"}]}},{"name":"token1","required":true,"in":"query","description":"Second token in the pool (format: collection$category$type$additionalKey)","schema":{"example":{"collection":"GUSDC","category":"Unit","type":"none","additionalKey":"none"},"allOf":[{"$ref":"#/components/schemas/TokenDTO"}]}},{"name":"fee","required":true,"in":"query","description":"Fee tier: 500 (0.05%), 3000 (0.3%), or 10000 (1%)","schema":{"example":3000,"type":"number","enum":[500,3000,10000]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Estimate gas and impact for adding liquidity","tags":["trade"]}},"/v1/trade/remove-liq-estimate":{"get":{"description":"Estimate gas and price impact for removing liquidity. Query params: token0, token1 (format: GALA$Unit$none$none), fee, tickLower, tickUpper, liquidity, owner. Example: ?token0=GALA$Unit$none$none&token1=GUSDC$Unit$none$none&fee=3000&tickLower=-886800&tickUpper=886800&liquidity=1000&owner=eth|6742903677106B3156434F61f2731c3516B1aD68","operationId":"TradeController_removeLiquidityEsimate","parameters":[{"name":"token0","required":true,"in":"query","description":"First token in the pool (format: collection$category$type$additionalKey)","schema":{"example":{"collection":"GALA","category":"Unit","type":"none","additionalKey":"none"},"allOf":[{"$ref":"#/components/schemas/TokenDTO"}]}},{"name":"token1","required":true,"in":"query","description":"Second token in the pool (format: collection$category$type$additionalKey)","schema":{"example":{"collection":"GUSDC","category":"Unit","type":"none","additionalKey":"none"},"allOf":[{"$ref":"#/components/schemas/TokenDTO"}]}},{"name":"fee","required":true,"in":"query","description":"Fee tier: 500 (0.05%), 3000 (0.3%), or 10000 (1%)","schema":{"example":3000,"type":"number","enum":[500,3000,10000]}},{"name":"tickUpper","required":true,"in":"query","schema":{"type":"number"}},{"name":"tickLower","required":true,"in":"query","schema":{"type":"number"}},{"name":"tickRangeCheck","required":false,"in":"query","schema":{"default":true,"type":"boolean"}},{"name":"amount","required":true,"in":"query","schema":{"type":"string"}},{"name":"owner","required":true,"in":"query","description":"Owner wallet address (format: eth|<address> or client|<id>)","schema":{"example":"eth|6742903677106B3156434F61f2731c3516B1aD68","type":"string"}},{"name":"positionId","required":false,"in":"query","description":"Position ID (for existing positions)","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Estimate gas and impact for removing liquidity","tags":["trade"]}},"/v1/trade/price":{"get":{"description":"Get real-time token price information based on liquidity pool reserves from the Gala blockchain. Query param: token (format: GALA$Unit$none$none). Example: ?token=GALA$Unit$none$none","operationId":"TradeController_getPrice","parameters":[{"name":"token","required":true,"in":"query","description":"Token to get price for (format: collection$category$type$additionalKey)","schema":{"example":{"collection":"GALA","category":"Unit","type":"none","additionalKey":"none"},"allOf":[{"$ref":"#/components/schemas/TokenDTO"}]}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Get current price of a token","tags":["trade"]}},"/v1/trade/liquidity":{"post":{"description":"Add liquidity to a pool.","operationId":"TradeController_addLiquidity","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddLiquidityDTO"}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Add liquidity to a pool","tags":["trade"]},"delete":{"description":"Remove liquidity from a pool","operationId":"TradeController_removeLiquidity","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BurnDTO"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Remove liquidity from a pool","tags":["trade"]}},"/v1/trade/swap":{"post":{"description":"Execute a token swap","operationId":"TradeController_swap","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapDTO"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Execute a token swap","tags":["trade"]}},"/v1/trade/create-pool":{"post":{"description":"Create a new liquidity pool. Body params: token0, token1 (format: GALA$Unit$none$none), fee (500, 3000, or 10000), initialSqrtPrice, uniqueKey.","operationId":"TradeController_createPool","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePoolDTO"}}}},"responses":{"201":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Create a new liquidity pool","tags":["trade"]}},"/v1/trade/collect":{"post":{"description":"Collect accrued fees from a position.","operationId":"TradeController_collect","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectDTO"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Collect fees from a position","tags":["trade"]}},"/v1/trade/exec":{"post":{"deprecated":true,"description":"DEPRECATED: This endpoint is no longer in use. Use the specific endpoints instead: /swap, /liquidity (POST/DELETE), /create-pool, /collect.","operationId":"TradeController_exec","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecuteDTO"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"[DEPRECATED] Execute a generic transaction","tags":["trade"]}},"/v1/trade/bundle":{"post":{"description":"Process a single transaction bundle. Body params: type (swap | addLiquidity | removeLiquidity | collectFee | createPool), payload, signature, user. The payload is obtained from: swap - POST /v1/trade/swap response data object, addLiquidity - POST /v1/trade/liquidity response data object, removeLiquidity - DELETE /v1/trade/liquidity response data object, collectFee - POST /v1/trade/collect response data object, createPool - POST /v1/trade/create-pool response data object.","operationId":"TradeController_bundle","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BundleDTO"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Process a single bundle","tags":["trade"]}},"/v1/trade/bundle-multiple":{"post":{"description":"Process multiple transaction bundles (max 10). Request body accepts an array of bundle objects. Example: [{ \"type\": \"swap\", \"payload\": {}, \"signature\": \"string\", \"user\": \"eth|...\" }]. Types: swap | addLiquidity | removeLiquidity | collectFee | createPool. Payloads are obtained from respective endpoint response data objects.","operationId":"TradeController_bundleMultiple","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Process multiple bundles","tags":["trade"]}},"/v1/trade/price-multiple":{"post":{"description":"Get prices for multiple tokens at once.","operationId":"TradeController_getPriceMultiple","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPriceMultipleDTO"}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Get prices for multiple tokens","tags":["trade"]}},"/v1/trade/slot0":{"get":{"operationId":"TradeController_getSlot0","parameters":[{"name":"token0","required":true,"in":"query","description":"First token in the pool (format: collection$category$type$additionalKey)","schema":{"example":{"collection":"GALA","category":"Unit","type":"none","additionalKey":"none"},"allOf":[{"$ref":"#/components/schemas/TokenDTO"}]}},{"name":"token1","required":true,"in":"query","description":"Second token in the pool (format: collection$category$type$additionalKey)","schema":{"example":{"collection":"GUSDC","category":"Unit","type":"none","additionalKey":"none"},"allOf":[{"$ref":"#/components/schemas/TokenDTO"}]}},{"name":"fee","required":true,"in":"query","description":"Fee tier: 500 (0.05%), 3000 (0.3%), or 10000 (1%)","schema":{"example":3000,"type":"number","enum":[500,3000,10000]}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["trade"]}},"/v1/trade/transaction-status":{"get":{"description":"Check the status of a transaction. Query param: id (transaction ID obtained from POST /v1/trade/bundle or POST /v1/trade/bundle-multiple response).","operationId":"TradeController_transactionStatus","parameters":[{"name":"id","required":true,"in":"query","description":"Transaction ID (obtained from /v1/trade/bundle or /v1/trade/bundle-multiple response)","schema":{"example":"txn_abc123def456","type":"string"}}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseResponseDto"}}}},"400":{"description":"Bad Request"}},"summary":"Get status of a transaction","tags":["trade"]}},"/explore/volume":{"get":{"description":"Get volume details for the protocol.","operationId":"ExploreController_volumeDetails","parameters":[],"responses":{"200":{"description":""}},"summary":"Get volume details","tags":["explore"]}},"/explore/pools":{"get":{"description":"Get details of all liquidity pools.","operationId":"ExploreController_poolsDetails","parameters":[{"name":"sortBy","required":false,"in":"query","description":"Sort by field","schema":{"example":"tvl","type":"string","enum":["tvl","volume30d","volume1d"]}},{"name":"sortOrder","required":false,"in":"query","description":"Sort order","schema":{"example":"desc","type":"string","enum":["asc","desc"]}},{"name":"search","required":false,"in":"query","description":"Search term for filtering pools","schema":{"maxLength":64,"example":"GALA","type":"string"}},{"name":"page","required":true,"in":"query","description":"Page number for pagination (starts at 1)","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"limit","required":true,"in":"query","description":"Maximum number of pools to return per page","schema":{"minimum":1,"maximum":1000,"example":10,"type":"number"}}],"responses":{"200":{"description":""}},"summary":"Get pools details","tags":["explore"]}},"/explore/opportunities":{"get":{"description":"Authoritative \"best opportunities\" feed: pools carrying a distinguishing bot-ready signal, ranked by composite opportunityScore (desc), plus any campaign-boosted pools. Top-N only — no pagination.","operationId":"ExploreController_opportunities","parameters":[{"name":"limit","required":false,"in":"query","description":"Maximum ranked pools to return (1-100, default 20)","schema":{"minimum":1,"maximum":100,"example":20,"type":"number"}}],"responses":{"200":{"description":""}},"summary":"Get ranked opportunity pools","tags":["explore"]}},"/explore/pool":{"get":{"description":"Get details of a specific pool by its hash.","operationId":"ExploreController_poolDetailByHash","parameters":[{"name":"poolHash","required":true,"in":"query","description":"The 64-character hexadecimal hash identifying the pool","schema":{"minLength":64,"maxLength":64,"pattern":"^(0x|0h)?[0-9A-F]+$","example":"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2","type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get pool details by hash","tags":["explore"]}},"/explore/transactions":{"get":{"description":"Get a list of transactions.","operationId":"ExploreController_transactionsDetails","parameters":[{"name":"limit","required":true,"in":"query","description":"Maximum number of transactions to return per page","schema":{"minimum":1,"example":10,"type":"number"}},{"name":"page","required":true,"in":"query","description":"Page number for pagination (starts at 1)","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"poolHash","required":false,"in":"query","description":"The 64-character hexadecimal hash identifying the pool (optional)","schema":{"minLength":64,"maxLength":64,"pattern":"^(0x|0h)?[0-9A-F]+$","example":"632e14d63876b38674ec7944ebad71f31857412305abba8b2adb921c92f90b2a","type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get transactions details","tags":["explore"]}},"/explore/graph-data":{"get":{"description":"Get graph data for a specific period.","operationId":"ExploreController_graphData","parameters":[{"name":"actualDate","required":true,"in":"query","description":"The reference date for the graph data (ISO 8601 format)","schema":{"example":"2026-01-26T18:18:27.115Z","type":"string"}},{"name":"duration","required":true,"in":"query","description":"The time period for the graph data","schema":{"enum":["1d","1w","1M","1y"],"type":"string"}},{"name":"poolHash","required":true,"in":"query","description":"The 64-character hexadecimal hash identifying the pool","schema":{"minLength":64,"maxLength":64,"pattern":"^(0x|0h)?[0-9A-F]+$","example":"632e14d63876b38674ec7944ebad71f31857412305abba8b2adb921c92f90b2a","type":"string"}}],"responses":{"200":{"description":""}},"summary":"Get graph data for a period","tags":["explore"]}},"/coin-gecko/tickers":{"get":{"description":"Get ticker data for CoinGecko integration.","operationId":"CoinGeckoController_getTickerData","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}}}}}},"summary":"Get ticker data for CoinGecko","tags":["coin-gecko"]}},"/coin-gecko/terminal/latest-block":{"get":{"description":"Get the latest block number from the Gala blockchain.","operationId":"TerminalController_getLatestBlock","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestBlockResponseDto"}}}}},"summary":"Get the latest block","tags":["coin-gecko"]}},"/coin-gecko/terminal/asset":{"get":{"description":"Get details of a specific asset.","operationId":"TerminalController_getAsset","parameters":[{"name":"id","required":true,"in":"query","description":"The ID of the asset to retrieve (Base58-encoded TokenClassKey)","schema":{"example":"E3bVbsc7viP1A8tn3ayChk3BAt","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAssetResponseDto"}}}}},"summary":"Get asset details","tags":["coin-gecko"]}},"/coin-gecko/terminal/pair":{"get":{"description":"Get details of a specific trading pair. The pair ID can be obtained from GET /coin-gecko/terminal/events response.","operationId":"TerminalController_getPair","parameters":[{"name":"id","required":true,"in":"query","description":"The pair ID (64-character hexadecimal hash)","schema":{"example":"5c0e402911c2c9151656e440d15ee96ceb0501d6af90a5e3cbdb04a2a51d4de3","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPairResponseDto"}}}}},"summary":"Get pair details","tags":["coin-gecko"]}},"/coin-gecko/terminal/events":{"get":{"description":"Get events within a specified block range.","operationId":"TerminalController_getEvents","parameters":[{"name":"fromBlock","required":true,"in":"query","description":"The starting block number (inclusive)","schema":{"example":100,"type":"number"}},{"name":"toBlock","required":true,"in":"query","description":"The ending block number (inclusive)","schema":{"example":200,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetEventsResponseDto"}}}}},"summary":"Get events within a block range","tags":["coin-gecko"]}},"/coin-gecko/terminal/liquidity-operations":{"get":{"description":"Get liquidity operations for a specific position.","operationId":"TerminalController_getLiquidityOperations","parameters":[{"name":"positionId","required":true,"in":"query","description":"The unique identifier for a liquidity position (assigned when liquidity is first added to a pool)","schema":{"example":"1","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"}}}}}},"summary":"Get liquidity operations for a position","tags":["coin-gecko"]}},"/leaderboard":{"get":{"description":"Get the leaderboard for a specific season.","operationId":"LeaderboardController_getLeaderboard","parameters":[{"name":"seasonId","required":true,"in":"query","description":"The unique identifier for the leaderboard season","schema":{"minimum":1,"example":1,"type":"number"}}],"responses":{"200":{"description":""}},"summary":"Get leaderboard for a season","tags":["leaderboard"]}},"/leaderboard/seasons":{"get":{"description":"Get a list of all available leaderboard seasons.","operationId":"LeaderboardController_getLeaderboardSeasons","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LeaderboardSeason"}}}}}},"summary":"Get all leaderboard seasons","tags":["leaderboard"]}},"/leaderboard/{wallet}/position/{seasonId}":{"get":{"description":"Get the rank and position of a user in a specific season.","operationId":"LeaderboardController_getUserPosition","parameters":[{"name":"wallet","required":true,"in":"path","schema":{"type":"string"}},{"name":"seasonId","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"summary":"Get user position in leaderboard","tags":["leaderboard"]}},"/leaderboard/{wallet}/breakdown/{seasonId}":{"get":{"description":"Get a detailed breakdown of a user's score in a specific season.","operationId":"LeaderboardController_getUserBreakdown","parameters":[{"name":"wallet","required":true,"in":"path","schema":{"type":"string"}},{"name":"seasonId","required":true,"in":"path","schema":{"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"minimum":1,"default":1,"type":"number"}},{"name":"limit","required":f

# --- truncated at 32 KB (143 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/gala-games/refs/heads/main/openapi/gala-games-defi-backend-openapi.json