Skip to main content

HTTP API reference › GalaSwap DEX › trade-v2

GalaSwap DEX — trade-v2

16 operations in this group.

GET /v2/trade/quote​

TradeV2Controller_quote

Offline-simulated quote against new-contract pools

Offline-simulated quote against new-contract pools

Parameters​

NameInRequiredTypeDescription
tokenInqueryrequiredstringInput token class key or SDK trading symbol.
tokenOutqueryrequiredstringOutput token class key or SDK trading symbol.
amountInqueryoptionalstringInput amount as a decimal string.
amountOutqueryoptionalstringOutput amount as a decimal string.
feequeryoptionalnumber enum: 0, 500, 3000, 10000Fee tier in basis points.

Responses​

200 —​

Content type: application/json

Schema: QuoteResponseDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataQuoteDataResponseDtoyes

400 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

GET /v2/trade/symbols​

TradeV2Controller_symbols

Registered trading symbols (class key ↔ symbol) for the new contract

Registered trading symbols (class key ↔ symbol) for the new contract

Responses​

200 —​

Content type: application/json

Schema: SymbolsResponseDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataarray<TradingSymbolResponseDto>yes

400 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

GET /v2/trade/pools​

TradeV2Controller_pools

All new-contract pools with price and TVL (chain-direct)

search/sortBy/sortOrder/page/limit are optional — omit all of them for the original unsorted full array (SDK/bot contract, unchanged); pass any of them for the same search+sort+paginate behavior /explore/pools offered its v2 rows.

Parameters​

NameInRequiredTypeDescription
sortByqueryoptionalstring enum: tvl, volume30d, volume1dSort by field
sortOrderqueryoptionalstring enum: asc, descSort order
searchqueryoptionalstringSearch term for filtering pools
pagequeryoptionalnumberPage number for pagination (starts at 1)
limitqueryoptionalnumberMaximum number of pools per page; omit to return all
poolVersionqueryoptionalstring enum: v1, v2, allWhich 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: PoolsResponseDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataarray<PoolListRowResponseDto>yes

400 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

GET /v2/trade/pool​

TradeV2Controller_pool

Single pool metadata

Single pool metadata

Parameters​

NameInRequiredTypeDescription
token0queryrequiredstring
token1queryrequiredstring
feequeryrequirednumber enum: 0, 500, 3000, 10000

Responses​

200 —​

Content type: application/json

Schema: PoolResponseDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataPoolResponseDataDtoyes

400 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

404 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

GET /v2/trade/slot0​

TradeV2Controller_slot0

Current price / sqrtPrice / tick

Current price / sqrtPrice / tick

Parameters​

NameInRequiredTypeDescription
token0queryrequiredstring
token1queryrequiredstring
feequeryrequirednumber enum: 0, 500, 3000, 10000

Responses​

200 —​

Content type: application/json

Schema: Slot0ResponseDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataSlot0ResponseDataDtoyes

400 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

404 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

GET /v2/trade/composite-pool​

TradeV2Controller_compositePool

Full composite pool snapshot (FetchCompositePoolData)

Full composite pool snapshot (FetchCompositePoolData)

Parameters​

NameInRequiredTypeDescription
token0queryrequiredstring
token1queryrequiredstring
feequeryrequirednumber enum: 0, 500, 3000, 10000

Responses​

200 —​

Content type: application/json

Schema: CompositePoolResponseDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataCompositePoolResponseDataDtoyes

400 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

GET /v2/trade/positions​

TradeV2Controller_positions

A wallet's positions across all new-contract pools

A wallet's positions across all new-contract pools

Parameters​

NameInRequiredTypeDescription
userqueryrequiredstring

Responses​

200 —​

Content type: application/json

Schema: PositionsResponseDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataarray<PositionResponseDataDto>yes

400 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

GET /v2/trade/position​

TradeV2Controller_position

One position incl. uncollected fees (escrow balance)

One position incl. uncollected fees (escrow balance)

Parameters​

NameInRequiredTypeDescription
token0queryrequiredstring
token1queryrequiredstring
feequeryrequirednumber enum: 0, 500, 3000, 10000
ownerqueryrequiredstring
tickLowerqueryrequirednumber
tickUpperqueryrequirednumber

Responses​

200 —​

Content type: application/json

Schema: PositionResponseDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataSinglePositionResponseDataDtoyes

400 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

404 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

GET /v2/trade/add-liq-estimate​

TradeV2Controller_addLiquidityEstimate

Other-side amount + liquidity for a deposit

Other-side amount + liquidity for a deposit

Parameters​

NameInRequiredTypeDescription
token0queryrequiredstring
token1queryrequiredstring
feequeryrequirednumber enum: 0, 500, 3000, 10000
tickLowerqueryrequirednumber
tickUpperqueryrequirednumber
amountqueryrequiredstring
amountIsToken0queryrequiredboolean

Responses​

200 —​

Content type: application/json

Schema: AddLiquidityEstimateResponseEnvelopeDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataAddLiquidityEstimateResponseDtoyes

400 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

GET /v2/trade/remove-liq-estimate​

TradeV2Controller_removeLiquidityEstimate

Token amounts released by burning liquidity

Token amounts released by burning liquidity

Parameters​

NameInRequiredTypeDescription
token0queryrequiredstring
token1queryrequiredstring
feequeryrequirednumber enum: 0, 500, 3000, 10000
tickLowerqueryrequirednumber
tickUpperqueryrequirednumber
liquidityqueryrequiredstring

Responses​

200 —​

Content type: application/json

Schema: RemoveLiquidityEstimateResponseEnvelopeDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataRemoveLiquidityEstimateResponseDtoyes

400 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

GET /v2/trade/pool-by-hash​

TradeV2Controller_poolByHash

Single pool by its v2:<poolRef> hash (or bare poolRef)

Single pool by its v2:<poolRef> hash (or bare poolRef)

Parameters​

NameInRequiredTypeDescription
poolHashqueryrequiredstringThe 64-character hexadecimal hash or v2 pool reference identifying the pool

Responses​

200 —​

Content type: application/json

Schema: TradeV2PoolByHashResponseDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataPoolListRowResponseDtoyes

400 —​

Content type: application/json

Schema: oneOf: TradeV2ErrorResponseDto | TradeV2ValidationErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno
statusCodenumberyes
messageoneOf: string | array<string>yes
errorstringno

404 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

GET /v2/trade/volume​

TradeV2Controller_volume

Aggregate new-contract protocol volume/TVL

Aggregate new-contract protocol volume/TVL

Responses​

200 —​

Content type: application/json

Schema: VolumeSummaryResponseEnvelopeDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataVolumeSummaryResponseDtoyes

400 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

GET /v2/trade/opportunities​

TradeV2Controller_opportunities

Ranked new-contract opportunity pools

Ranked new-contract opportunity pools

Parameters​

NameInRequiredTypeDescription
limitqueryoptionalnumberMaximum ranked pools to return (default 20)

Responses​

200 —​

Content type: application/json

Schema: TradeV2OpportunitiesResponseDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataTradeV2OpportunitiesDataResponseDtoyes

400 —​

Content type: application/json

Schema: oneOf: TradeV2ErrorResponseDto | TradeV2ValidationErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno
statusCodenumberyes
messageoneOf: string | array<string>yes
errorstringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

GET /v2/trade/transactions​

TradeV2Controller_transactions

Paged transaction history for a new-contract pool

Paged transaction history for a new-contract pool

Parameters​

NameInRequiredTypeDescription
limitqueryrequirednumberMaximum number of transactions per page
pagequeryrequirednumberPage number for pagination (starts at 1)
poolHashqueryoptionalstringThe 64-character hexadecimal hash or v2 pool reference identifying the pool (optional filter)

Responses​

200 —​

Content type: application/json

Schema: TradeV2TransactionsResponseDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataTradeV2TransactionsDataResponseDtoyes

400 —​

Content type: application/json

Schema: oneOf: TradeV2ErrorResponseDto | TradeV2ValidationErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno
statusCodenumberyes
messageoneOf: string | array<string>yes
errorstringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

GET /v2/trade/transaction​

TradeV2Controller_transaction

One indexed transaction by its durable correlation key

One indexed transaction by its durable correlation key

Parameters​

NameInRequiredTypeDescription
uniqueKeyqueryrequiredstringThe durable correlation key assigned to the submitted transaction

Responses​

200 —​

Content type: application/json

Schema: TradeV2TransactionByUniqueKeyResponseDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataTradeV2IndexedTransactionResponseDtoyes

400 —​

Content type: application/json

Schema: oneOf: TradeV2ErrorResponseDto | TradeV2ValidationErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno
statusCodenumberyes
messageoneOf: string | array<string>yes
errorstringno

404 —​

Content type: application/json

Schema: TradeV2ErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

GET /v2/trade/graph-data​

TradeV2Controller_graphData

Time-bucketed volume for a new-contract pool

Time-bucketed volume for a new-contract pool

Parameters​

NameInRequiredTypeDescription
actualDatequeryrequiredstringThe reference date for the graph data (ISO 8601 format)
durationqueryrequiredstring enum: 1d, 1w, 1M, 1yTime period for the graph data
poolHashqueryrequiredstringThe 64-character hexadecimal hash or v2 pool reference identifying the pool

Responses​

200 —​

Content type: application/json

Schema: TradeV2GraphDataResponseDto

FieldTypeRequiredDescription
statusnumberyes
messagestringyes
errorbooleanyes
dataarray<TradeV2GraphDataPointResponseDto>yes

400 —​

Content type: application/json

Schema: oneOf: TradeV2ErrorResponseDto | TradeV2ValidationErrorResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
errorKeystringno
statusCodenumberyes
messageoneOf: string | array<string>yes
errorstringno

default — An error response using the shared backend error envelope.​

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

Previous group: trade · Next group: chain