HTTP API reference › GalaSwap DEX › trade
GalaSwap DEX — trade
13 operations in this group.
- GET /v1/trade/pool — Get details of a liquidity pool
- GET /v1/trade/positions — Get all positions for a user
- GET /v1/trade/position — Get a specific position
- GET /v1/trade/remove-liq-estimate — Estimate gas and impact for removing liquidity
- GET /v1/trade/slot0 — GET /v1/trade/slot0
- GET /v1/trade/transaction-status — Get launchpad transaction status
- GET /v1/trade/pools — Get legacy DexV3Contract pools
- GET /v1/trade/pool-by-hash — Get a legacy pool by hash
- GET /v1/trade/volume — Get legacy protocol volume
- GET /v1/trade/opportunities — Get ranked legacy opportunity pools
- GET /v1/trade/transactions — Get transactions for a pool
- GET /v1/trade/transaction — Get an indexed transaction by unique key
- GET /v1/trade/graph-data — Get volume graph data for a pool
GET /v1/trade/pool
TradeController_getPoolDetails
Get details of a liquidity pool
Get detailed information about a specific liquidity pool.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| token0 | query | required | TokenDTO | First token in the pool (format: collection$category$type$additionalKey) |
| token1 | query | required | TokenDTO | Second token in the pool (format: collection$category$type$additionalKey) |
| fee | query | required | number enum: 500, 3000, 10000 | Fee tier: 500 (0.05%), 3000 (0.3%), or 10000 (1%) |
Responses
200 — Successful response
Content type: application/json
Schema: BaseResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| message | string | yes | |
| error | object | yes | |
| data | object | yes |
400 — Bad Request
No body.
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]
GET /v1/trade/positions
TradeController_getUserPositions
Get all positions for a user
Get all liquidity positions for a user
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| user | query | required | string | User wallet address (format: eth|<address> or client|<id>) |
| limit | query | required | number | Maximum number of positions to return (1-10) |
| bookmark | query | optional | string | Bookmark for pagination (from previous response) |
Responses
200 — Successful response
Content type: application/json
Schema: BaseResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| message | string | yes | |
| error | object | yes | |
| data | object | yes |
400 — Bad Request
No body.
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]
GET /v1/trade/position
TradeController_getUserPosition
Get a specific position
Get details of a specific liquidity position.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| token0 | query | required | TokenDTO | First token in the position (format: collection$category$type$additionalKey) |
| token1 | query | required | TokenDTO | Second token in the position (format: collection$category$type$additionalKey) |
| fee | query | required | number enum: 500, 3000, 10000 | Fee tier: 500 (0.05%), 3000 (0.3%), or 10000 (1%) |
| tickUpper | query | required | number | Upper tick boundary of the position |
| tickLower | query | required | number | Lower tick boundary of the position |
| tickRangeCheck | query | optional | boolean | |
| owner | query | optional | string | Owner wallet address (format: eth|<address> or client|<id>) |
| positionId | query | optional | string | Position ID (for existing positions) |
Responses
200 — Successful response
Content type: application/json
Schema: BaseResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| message | string | yes | |
| error | object | yes | |
| data | object | yes |
400 — Bad Request
No body.
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]
GET /v1/trade/remove-liq-estimate
TradeController_removeLiquidityEsimate
Estimate gas and impact for removing liquidity
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
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| token0 | query | required | TokenDTO | First token in the pool (format: collection$category$type$additionalKey) |
| token1 | query | required | TokenDTO | Second token in the pool (format: collection$category$type$additionalKey) |
| fee | query | required | number enum: 500, 3000, 10000 | Fee tier: 500 (0.05%), 3000 (0.3%), or 10000 (1%) |
| tickUpper | query | required | number | |
| tickLower | query | required | number | |
| tickRangeCheck | query | optional | boolean | |
| amount | query | required | string | |
| owner | query | required | string | Owner wallet address (format: eth|<address> or client|<id>) |
| positionId | query | optional | string | Position ID (for existing positions) |
Responses
200 — Successful response
Content type: application/json
Schema: BaseResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| message | string | yes | |
| error | object | yes | |
| data | object | yes |
400 — Bad Request
No body.
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]
GET /v1/trade/slot0
TradeController_getSlot0
GET /v1/trade/slot0
GET /v1/trade/slot0
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| token0 | query | required | TokenDTO | First token in the pool (format: collection$category$type$additionalKey) |
| token1 | query | required | TokenDTO | Second token in the pool (format: collection$category$type$additionalKey) |
| fee | query | required | number enum: 500, 3000, 10000 | Fee tier: 500 (0.05%), 3000 (0.3%), or 10000 (1%) |
Responses
200 —
Content type: application/json
Schema: TradeSlot0ResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean enum: false | yes | |
| message | string | no | |
| data | oneOf: TradeSlot0ChainResponseDto | object | yes |
400 —
Content type: application/json
Schema: oneOf: TradeCustomErrorResponseDto | TradeValidationErrorResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean | yes | |
| message | string | yes | |
| statusCode | number | yes | |
| message | oneOf: string | array<string> | yes | |
| error | string | no |
403 —
Content type: application/json
Schema: TradeCustomErrorResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean | yes | |
| message | string | yes |
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]
GET /v1/trade/transaction-status
TradeController_transactionStatus
Get launchpad transaction status
Looks up a launchpad bundler transaction by ID. This read does not relay DEX writes.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| id | query | required | string | Transaction ID returned by the launchpad bundler for status lookup |
Responses
200 — Successful response
Content type: application/json
Schema: BaseResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| message | string | yes | |
| error | object | yes | |
| data | object | yes |
400 — Bad Request
No body.
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]
GET /v1/trade/pools
TradeController_legacyPools
Get legacy DexV3Contract pools
Pools on the legacy contract only.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sortBy | query | optional | string enum: tvl, volume30d, volume1d | Sort by field |
| sortOrder | query | optional | string enum: asc, desc | Sort order |
| search | query | optional | string | Search term for filtering pools |
| page | query | optional | number | Page number for pagination (starts at 1) |
| limit | query | optional | number | Maximum number of pools per page; omit to return all |
| poolVersion | query | optional | string enum: v1, v2, all | Which contract's pools to include. Comma-separated: "v1" (legacy DexV3Contract), "v2" (new GalaChainDex), "all", or a combination such as "v1,v2" (equivalent to "all"). Omit to include both. |
Responses
200 —
Content type: application/json
Schema: TradePoolListResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean enum: false | yes | |
| message | string | no | |
| data | TradePoolListDataResponseDto | yes |
400 —
Content type: application/json
Schema: oneOf: TradeCustomErrorResponseDto | TradeValidationErrorResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean | yes | |
| message | string | yes | |
| statusCode | number | yes | |
| message | oneOf: string | array<string> | yes | |
| error | string | no |
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]
GET /v1/trade/pool-by-hash
TradeController_legacyPoolByHash
Get a legacy pool by hash
Legacy DexV3Contract pool detail by hash.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| poolHash | query | required | string | The 64-character hexadecimal hash or v2 pool reference identifying the pool |
Responses
200 —
Content type: application/json
Schema: TradePoolDetailResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean enum: false | yes | |
| message | string | no | |
| data | TradePoolAttributesResponseDto | yes |
400 —
Content type: application/json
Schema: oneOf: TradeCustomErrorResponseDto | TradeValidationErrorResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean | yes | |
| message | string | yes | |
| statusCode | number | yes | |
| message | oneOf: string | array<string> | yes | |
| error | string | no |
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]
GET /v1/trade/volume
TradeController_legacyVolume
Get legacy protocol volume
Aggregate volume/TVL for legacy pools.
Responses
200 —
Content type: application/json
Schema: TradeVolumeResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean enum: false | yes | |
| message | string | no | |
| data | TradeVolumeDataResponseDto | yes |
400 —
Content type: application/json
Schema: TradeCustomErrorResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean | yes | |
| message | string | yes |
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]
GET /v1/trade/opportunities
TradeController_legacyOpportunities
Get ranked legacy opportunity pools
Curated feed, legacy pools only.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | optional | number | Maximum ranked pools to return (default 20) |
Responses
200 —
Content type: application/json
Schema: TradePoolListResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean enum: false | yes | |
| message | string | no | |
| data | TradePoolListDataResponseDto | yes |
400 —
Content type: application/json
Schema: oneOf: TradeCustomErrorResponseDto | TradeValidationErrorResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean | yes | |
| message | string | yes | |
| statusCode | number | yes | |
| message | oneOf: string | array<string> | yes | |
| error | string | no |
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]
GET /v1/trade/transactions
TradeController_explorerTransactions
Get transactions for a pool
Paged transaction history. poolHash accepts either a legacy hash or a v2:<ref> pool reference.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| limit | query | required | number | Maximum number of transactions per page |
| page | query | required | number | Page number for pagination (starts at 1) |
| poolHash | query | optional | string | The 64-character hexadecimal hash or v2 pool reference identifying the pool (optional filter) |
Responses
200 —
Content type: application/json
Schema: TradeTransactionsResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean enum: false | yes | |
| message | string | no | |
| data | TradeTransactionsDataResponseDto | yes |
400 —
Content type: application/json
Schema: oneOf: TradeCustomErrorResponseDto | TradeValidationErrorResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean | yes | |
| message | string | yes | |
| statusCode | number | yes | |
| message | oneOf: string | array<string> | yes | |
| error | string | no |
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]
GET /v1/trade/transaction
TradeController_explorerTransaction
Get an indexed transaction by unique key
Works for a transaction on either contract.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| uniqueKey | query | required | string | The durable correlation key assigned to the submitted transaction |
Responses
200 —
Content type: application/json
Schema: TradeIndexedTransactionEnvelopeResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean enum: false | yes | |
| message | string | no | |
| data | TradeIndexedTransactionResponseDto | yes |
400 —
Content type: application/json
Schema: TradeValidationErrorResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| statusCode | number | yes | |
| message | oneOf: string | array<string> | yes | |
| error | string | no |
404 —
Content type: application/json
Schema: TradeCustomErrorResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean | yes | |
| message | string | yes |
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]
GET /v1/trade/graph-data
TradeController_explorerGraphData
Get volume graph data for a pool
Works for a pool on either contract (poolHash accepts a legacy hash or v2:<ref>).
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| actualDate | query | required | string | The reference date for the graph data (ISO 8601 format) |
| duration | query | required | string enum: 1d, 1w, 1M, 1y | Time period for the graph data |
| poolHash | query | required | string | The 64-character hexadecimal hash or v2 pool reference identifying the pool |
Responses
200 —
Content type: application/json
Schema: TradeGraphDataResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean enum: false | yes | |
| message | string | no | |
| data | array<TradeGraphDataPointResponseDto> | yes |
400 —
Content type: application/json
Schema: oneOf: TradeCustomErrorResponseDto | TradeValidationErrorResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean | yes | |
| message | string | yes | |
| statusCode | number | yes | |
| message | oneOf: string | array<string> | yes | |
| error | string | no |
default — An error response using the shared backend error envelope.
Content type: application/json
Schema: ApiErrorEnvelope
| Field | Type | Required | Description |
|---|---|---|---|
| status | integer | yes | |
| error | boolean | yes | |
| message | string | yes | |
| errorKey | string | no |
Example response
[]