Submit swap
Requires scope transactions:create.
ApiKeyAuthorizationBearer <sk_test_ or sk_live_ key>Your sk_live_ / sk_test_ API key
application/json- body
chain*stringOnly ethereum is routable for USDT/XAUT today.
"ethereum""base""arbitrum""polygon""celo""optimism""plasma"fromToken*stringToken being sold.
"usdt""xaut"toToken*stringToken being bought.
"usdt""xaut"amount*stringAmount of fromToken to sell, in token units (for example "100" USDT).
^\d+(\.\d{1,6})?$length <= 80safeAddress*stringThe Safe doing the swap.
^0x[0-9a-fA-F]{40}$passkeyPublicKey*passkeyData*The passkey assertion over the userOpHash returned by POST /v1/swaps/prepare.
userOp*The userOperation returned verbatim by POST /v1/swaps/prepare.
userOpHash*stringThe userOpHash returned by POST /v1/swaps/prepare, which the passkey assertion signs.
^0x[0-9a-fA-F]{64}$Response Body
200application/json
Swap submitted
TypeScript Definitions
Use the response body type in TypeScript.
401application/json
The Authorization header is missing, malformed, or the API key is unknown or revoked
TypeScript Definitions
Use the response body type in TypeScript.
429application/json
The API key exceeded its request budget for the window
TypeScript Definitions
Use the response body type in TypeScript.
Language
curl -X POST 'https://api.pilot.shiga.io/v1/swaps' \ -H 'Authorization: Bearer sk_test_...' \ -H 'Content-Type: application/json' \ -d '{ "chain": "ethereum", "fromToken": "usdt", "toToken": "usdt", "amount": "string", "safeAddress": "string", "passkeyPublicKey": { "x": "string", "y": "string" }, "passkeyData": { "property1": null, "property2": null }, "userOp": { "property1": null, "property2": null }, "userOpHash": "string"}'{ "data": { "chain": "ethereum", "safeAddress": "string", "userOpHash": "string", "fromToken": "usdt", "toToken": "xaut", "amountIn": "string", "transactionHash": "string", "pendingUserOp": true }, "status": 200, "success": true}