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=.
Request
- Base URLhttps://swap-backend.stage.defi.ovh.gala.com
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Headers
Wallet address for transaction attribution.
Set to true to mark a supported dex-contract RequestTrade as private.
Request body
Response
The chain write was accepted synchronously or queued for application.
Example response
{
"status": 201,
"message": "Transaction submitted successfully",
"data": {
"mode": "sync",
"transactionId": "test-tx-0001",
"blockNumber": 12345
}
}Changes
No recorded changes to this operation across all 1 revision of this API.