Skip to main content

HTTP API reference › GalaSwap DEX › chain

GalaSwap DEX — chain

Source commit: unknown. Generated: 2026-10-26T22:08:07.604Z.

2 operations in this group.

GET /v1/chain/apply-results/{uniqueKey}​

ChainGatewayController_applyResult

Read the terminal result of a queued RequestTrade

Proxies the allowlisted operation-api apply result without exposing the internal ops API hostname.

Security: []

Parameters​

NameInRequiredTypeDescription
uniqueKeypathyesstringRequestTrade correlation key (maximum 128 characters)
channelqueryyesstring
contractqueryyesstring

Responses​

200 —​

Content type: application/json

Schema: object

FieldTypeRequiredDescription
*free-form objectnoAdditional properties allowed

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

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example response​

[]

POST /v1/chain/{channel}/{contract}/{method}​

ChainGatewayController_submit

Submit a signed chain write

Mirrors the chain path: POST the signed DTO to the same {channel}/{contract}/{method} tail you would call directly. The method comes from the URL, never the body. Registered paths: asset/dexv3-contract/RemoveLiquidity, asset/dexv3-contract/CollectPositionFees, asset/dex-contract/RequestTrade, asset/dex-contract/AddLiquidity, asset/dex-contract/RemoveLiquidity, asset/dex-contract/CollectPositionFees, asset/dex-contract/CreatePool, */token-contract/TransferToken, */fee-contract/AuthorizeFee. Optional X-Shadow: true header marks a dex-contract RequestTrade private before dispatch (Shadow Mode, enabled in every environment): any other dex-contract method sent with it is refused 400 SHADOW_UNSUPPORTED_TYPE, a mark that cannot be confirmed is refused 503 SHADOW_UNAVAILABLE (the swap is never relayed un-shadowed), and the header is ignored for dexv3-contract, token-contract and fee-contract. A dispatch failure of a shadow swap is answered 400 SHADOW_RELAY_REJECTED (chain refused, do not retry) or 503 SHADOW_UNAVAILABLE (transient); a replay of an already-consumed uniqueKey is instead answered 409 CHAIN_DISPATCH_FAILED (errorKey UNIQUE_TRANSACTION_CONFLICT, original transaction id in message): confirm the key, it may be applied. A refused write answers { status, error: true, code, message }; when the chain itself refused it the code is CHAIN_DISPATCH_FAILED and the body also carries the chain's machine-readable errorKey (e.g. CONFLICT 409, OBJECT_NOT_FOUND 404, NOT_FOUND 404, PAYMENT_REQUIRED 402, VALIDATION_FAILED 400) whenever the chain supplied one; branch on errorKey, never on message. Gateway-side refusals (BOUNDS_VIOLATION, SIGNATURE_INVALID, ...) never carry errorKey. A queued RequestTrade is acknowledged with data.mode "queued" and the request uniqueKey; confirm it via GET /v1/chain/apply-results/{uniqueKey} or GET /v2/trade/transaction?uniqueKey=.

Security: []

Parameters​

NameInRequiredTypeDescription
channelpathyesstring
contractpathyesstring
methodpathyesstring
x-wallet-addressheaderyesstring
x-shadowheaderyesstring
X-ShadowheadernostringSet to true to mark a supported dex-contract RequestTrade as private.
X-Wallet-AddressheadernostringWallet address for transaction attribution.

Request body​

Required: yes

application/json​

Schema: object

FieldTypeRequiredDescription
*free-form objectnoAdditional properties allowed

Responses​

201 — The chain write was accepted synchronously or queued for application.​

Content type: application/json

Schema: ChainSubmissionResponseDto

FieldTypeRequiredDescription
statusnumberyes
errorbooleanyes
messagestringyes
dataoneOf: ChainSyncWriteDataResponseDto | ChainQueuedWriteDataResponseDtoyes

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

Content type: application/json

Schema: ApiErrorEnvelope

FieldTypeRequiredDescription
statusintegeryes
errorbooleanyes
messagestringyes
errorKeystringno

Example request​

[]

Example response​

[]

Previous group: trade-v2 · Next group: coin-gecko