Get gasless swap status¶
GET /gasless/status
Poll the status of a gasless swap by the swapId returned from POST /gasless/submit-swap. Status values are pending, submitted, executed, and failed; executed and failed are terminal. Once the relayed transaction lands, executionTxHash carries the on-chain transaction hash.
Authentication
Send your API key in the api-key header.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
query | string | yes | The swapId returned by POST /gasless/submit-swap. |
Responses
| Status | Description |
|---|---|
200 |
Current swap state. |
401 |
Missing or invalid API key. Plausible catalog codes behind the numeric status are AUTH_001 (unauthorized access) and AUTH_002 (invalid API key). |
404 |
No swap with that id. Plausible catalog code behind the numeric status is RESOURCE_001 (requested resource not found). |
500 |
Unexpected server-side failure. Plausible catalog codes behind the numeric status include SYSTEM_002 (internal server error) and SYSTEM_001 (database operation failed). |
200 response
{
"code": 0,
"message": "success",
"data": {
"swapId": "68fa3491b2e64d0a51c7d904",
"status": "executed",
"fromChain": 8453,
"toChain": 8453,
"fromToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"toToken": "0x4200000000000000000000000000000000000006",
"amountIn": "1000000000",
"amountOut": "398400000000000000",
"feeAmount": "1250000",
"executionTxHash": "0x5e1a7c3b9d2f4e6a8c0b1d3f5a7c9e0b2d4f6a8c1e3b5d7f9a0c2e4b6d8f0a1c",
"photonTxId": "68fa3450539a3c9d28bbca33",
"routeKind": "sameChainSwap"
}
}