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} — Read the terminal result of a queued RequestTrade
- POST /v1/chain/{channel}/{contract}/{method} — Submit a signed chain write
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: []
unique key
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| uniqueKey | path | yes | string | RequestTrade correlation key (maximum 128 characters) |
| channel | query | yes | string | |
| contract | query | yes | string |
Responses
200 —
Content type: application/json
Schema: object
| Field | Type | Required | Description |
|---|---|---|---|
| * | free-form object | no | Additional properties allowed |
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
[]
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
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| channel | path | yes | string | |
| contract | path | yes | string | |
| method | path | yes | string | |
| x-wallet-address | header | yes | string | |
| x-shadow | header | yes | string | |
| X-Shadow | header | no | string | Set to true to mark a supported dex-contract RequestTrade as private. |
| X-Wallet-Address | header | no | string | Wallet address for transaction attribution. |
Request body
Required: yes
application/json
Schema: object
| Field | Type | Required | Description |
|---|---|---|---|
| * | free-form object | no | Additional properties allowed |
Responses
201 — The chain write was accepted synchronously or queued for application.
Content type: application/json
Schema: ChainSubmissionResponseDto
| Field | Type | Required | Description |
|---|---|---|---|
| status | number | yes | |
| error | boolean | yes | |
| message | string | yes | |
| data | oneOf: ChainSyncWriteDataResponseDto | ChainQueuedWriteDataResponseDto | 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 request
[]
Example response
[]
Previous group: trade-v2 · Next group: coin-gecko