POST /leokit/save-transaction
Save the transaction hash after signing and broadcasting the unsigned transaction.Request Body
Success Response
Status Code:200 OK
Error Response
Status Code:400 Bad Request
Database Behavior
- Upserts to
tx_statustable - Links transaction to deposit via quote_id
- Initial status:
"indexing" - Used by status endpoint to track swap progress
POST /leokit/status
Get the current status of a swap transaction.Request Body
Response
Status Code:200 OK
Response Fields
Status Values
Status Flow
The status endpoint follows this flow:- Check Cache: Queries
tx_statustable for cached status - If Completed: Returns cached data immediately
- If Pending: Fetches from protocol-specific API
- Update Database: Saves new status to cache
Protocol-Specific Status URLs
Each protocol provides its own tracking interface:- THORChain:
https://track.ninerealms.com/tx/{req_id} - MAYAChain:
https://track.mayachain.info/tx/{req_id} - Chainflip:
https://scan.chainflip.io/tx/{tx_hash} - Relay:
https://relay.link/status/{req_id} - NEAR:
https://1click.chaindefuser.com/status/{req_id}
Example Usage
Complete Transaction Flow
-
Get Quote:
-
Generate Deposit:
- Sign & Broadcast Transaction (client-side)
-
Save Transaction Hash:
-
Check Status (polling):
Status Polling Best Practices
- Initial Poll: Wait 10-15 seconds after broadcast before first status check
- Polling Interval: Check every 15-30 seconds for pending transactions
- Stop Condition: Stop polling when status is
completedorfailed - Timeout: Consider transaction failed if status remains
indexingfor > 30 minutes