Autopilot API
This document describes the basic auth flow and Autopilot endpoints (Stable model only).
Basics
All protected endpoints require the
x-wallet-addressheader with the wallet address.JWT is sent in
Authorization: Bearer <token>.chain_idis part of the path as a number (for example,1).
Authorization flow
Request a challenge (nonce)
GET /auth/challengeResponse
{
"nonce": "<uuid>"
}Wallet builds and signs a SIWE message
Use the response
noncein the lineNonce: <uuid>.The message must contain the wallet address on the 2nd line and a valid
Chain ID.SIWE spec: https://docs.login.xyz/
Example format
Exchange signature for a JWT
Headers
HeaderValueDescription
x-wallet-address
<0xWalletAddress>
Wallet address for the signature
Body
Response
Check JWT validity
Options:
Call
POST /auth/checkwithx-wallet-addressandAuthorization: Bearer <jwt>headers.Any protected endpoint returns
401if the JWT is invalid or the address does not match.
Environment (tokens, limits, allowances vault)
Headers
HeaderValueDescription
x-wallet-address
<0xWalletAddress>
Wallet address for auth
Authorization
Bearer <jwt>
JWT access token
Response
Notes
vaultis the contract address to approve allowances for.known_limitsare per-token merged limits from the user's existing positions (useful for UI defaults).strategieslists supported strategies and their allowed tokens.
Token approvals
After fetching env, the wallet should grant infinite approvals for each strategy token to the vault address. Those approved tokens are then used when creating a new position.
Create a Stable Autopilot
Headers
HeaderValueDescription
x-wallet-address
<0xWalletAddress>
Wallet address for auth
Authorization
Bearer <jwt>
JWT access token
Body
Response
Notes
tokensandlimitsmust have the same length.limits.minis the minimum token amount that must remain in the wallet (reserved amount).deadlineis optional (unix timestamp,u64).Only
Stableis described here, do not useAdvanced.ruleacceptsBarter. Other options will be added soon.u256fields are sent/returned as strings (hex).
List positions
Headers
HeaderValueDescription
x-wallet-address
<0xWalletAddress>
Wallet address for auth
Authorization
Bearer <jwt>
JWT access token
Response
type defaults to active.
Position details by id
Headers
HeaderValueDescription
x-wallet-address
<0xWalletAddress>
Wallet address for auth
Authorization
Bearer <jwt>
JWT access token
Response (includes transactions)
Statuses (status): Active, Paused, Completed, Deadline, ApprovalGone, LowBalance.
Last updated