Executions
Executions represent attempted cross-chain transfers. Each deposit triggers an execution that tracks the transaction from start to finish, including status, amounts, fees, and any errors.Get User Executions
Retrieve execution history for a specific user. Endpoint:GET /api/users/:userId/executions
Authentication: Required (API Key)
Request
Headers:| Parameter | Type | Description |
|---|---|---|
userId | string | User identifier |
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | number | No | 20 | Number of executions to return (max: 100) |
offset | number | No | 0 | Number of executions to skip (for pagination) |
status | string | No | - | Filter by status (e.g., “SUCCESS”, “FAILED”) |
Response
Status:200 OK
| Field | Type | Description |
|---|---|---|
id | string | Unique execution identifier |
routeId | string | Deterministic route identifier (idempotency key) |
userId | string | User identifier |
status | string | Current execution status (see Error Codes) |
fromChainId | number | Source chain ID |
fromChainKey | string | Source chain key (human-readable) |
fromTokenSymbol | string | Source token symbol |
fromTokenAddress | string | Source token contract address |
toChainId | number | Destination chain ID |
toChainKey | string | Destination chain key |
toTokenSymbol | string | Destination token symbol |
toTokenAddress | string | Destination token contract address |
amountIn | string | Deposit amount in atomic units |
amountOutExpected | string | Expected output in atomic units |
txHash | string | Transaction hash on source chain (if available) |
retryable | boolean | Whether execution can be retried automatically |
retryCount | number | Number of retry attempts |
lastErrorCode | string|null | Error code if failed |
lastErrorMessage | string|null | Human-readable error message |
createdAt | string | ISO 8601 timestamp of creation |
updatedAt | string | ISO 8601 timestamp of last update |
completedAt | string|null | ISO 8601 timestamp of completion (success or terminal failure) |
Examples
Get all executions for a user:Error Responses
Unauthorized Status:401 Unauthorized
400 Bad Request
Understanding Executions
Execution Lifecycle
Every execution moves through a lifecycle:SUCCESS- Transfer completeDEAD_LETTER- Failed permanentlyTOKEN_BLACKLISTED- Token blockedFAILED_UNROUTABLE_MAIN- No route availableFAILED_INVALID_INPUT- Invalid parametersFAILED_NO_FUNDS- Insufficient balanceFAILED_INSUFFICIENT_AFTER_FEES- Fees exceed depositQUOTA_EXCEEDED- Quota limit reached
Automatic Retries
When an execution fails with a retryable error:- Status changes to
FAILED retryableis set totrueretryCountincrements- System automatically retries with exponential backoff
- On success, status changes to
SUCCESS - On repeated failure, eventually becomes
DEAD_LETTER
Transaction Hashes
ThetxHash field contains the transaction hash on the source chain:
- Available when
statusisRUNNINGorSUCCESS nullforPENDINGor early failures- Use this to link to block explorers
- Base:
https://basescan.org/tx/{txHash} - Ethereum:
https://etherscan.io/tx/{txHash} - Polygon:
https://polygonscan.com/tx/{txHash} - Arbitrum:
https://arbiscan.io/tx/{txHash} - Avalanche:
https://snowtrace.io/tx/{txHash}
Route ID (Idempotency)
TherouteId is a deterministic identifier based on:
- User ID
- Deposit details
- Routing configuration
Polling for Updates
For active executions (PENDING, RUNNING, or FAILED with retryable: true), poll for status updates:
Example Polling Implementation
Polling Best Practices
- Use appropriate intervals - 5-10 seconds for most cases
- Set timeouts - Don’t poll forever (5-10 minutes is reasonable)
- Handle all statuses - Check for both success and failure
- Respect rate limits - Don’t poll too aggressively
- Update UI - Show users the current status
Displaying Executions
Status Messages for Users
Map execution statuses to user-friendly messages:Display Components
Execution Card:Amount Conversion
Always convert atomic units to human-readable format for display:Filtering and Searching
Filter by Status
Get only successful executions:Pagination
For users with many executions, use pagination:Client-Side Filtering
Get executions from API and filter locally:Best Practices
For Integrators
- Poll active executions - Check status every 5-10 seconds for PENDING/RUNNING
- Show transaction hashes - Link to block explorers when available
- Handle all statuses - Build UI for every possible execution status
- Display amounts clearly - Convert atomic units to human-readable format
- Provide context - Show source/destination chains and tokens
- Support pagination - Handle users with many executions
- Cache results - Don’t fetch the same executions repeatedly
Error Handling
Performance Tips
- Limit results - Only fetch what you need to display
- Use status filters - Don’t fetch all executions if you only need one status
- Cache terminal executions - Success/failed executions won’t change
- Poll only active - Don’t poll executions with terminal statuses
Next Steps
- Review Error Codes for handling execution failures
- Learn about Deposit Intents to understand execution triggers
- See Routing to simulate executions before they happen