Intents
List intents, newest first
GET
/v1/intentsParameters
walletin query,stringlimitin query,integeroffsetin query,integer,null
Responses
200Intents (paged: limit ≤ 200, default 50)
intentsobject[](required)
Example
curl -X GET https://api.cofferline.com/v1/intents \ -H "authorization: Bearer $TOKEN"
Create a conversion intent (enforced against the wallet's active policy)
POST
/v1/intentsRequest body
walletstring(required)kind"conversion" | "gas_topup"(required)sell_tokenstring(required)buy_tokenstring(required)sell_amountstring(required)max_slippage_bpsintegervenuesstring[]
Responses
201Planned intent
idstring(required)walletstring(required)kind"conversion" | "gas_topup"(required)status"planned" | "executing" | "filled" | "cancelled" | "aborted"(required)policy_versioninteger(required)policy_hashstring(required)paramsobject(required)created_atobject(required)updated_atobject(required)reportobject(required)
400INVALID_REQUEST — a token is not supported on this chain
402Payment required — prepaid balance below the intent fee (when metering is enforced)
403EXECUTION_DISABLED — wallet-specific platform switch
404No policy exists for the wallet
422POLICY_VIOLATION — request exceeds the active policy
503UNAVAILABLE — the executor queue refused the dispatch; the intent was aborted, not admitted
Example
curl -X POST https://api.cofferline.com/v1/intents \
-H "authorization: Bearer $TOKEN" \
-H "content-type: application/json" \
-d '{"wallet":"…","kind":"conversion","sell_token":"…","buy_token":"…","sell_amount":"…"}'
Fetch an intent
GET
/v1/intents/{id}Parameters
idin path,string(required)
Responses
200The intent
idstring(required)walletstring(required)kind"conversion" | "gas_topup"(required)status"planned" | "executing" | "filled" | "cancelled" | "aborted"(required)policy_versioninteger(required)policy_hashstring(required)paramsobject(required)created_atobject(required)updated_atobject(required)reportobject(required)
404Unknown intent
Example
curl -X GET https://api.cofferline.com/v1/intents/{id} \
-H "authorization: Bearer $TOKEN"
Cancel a planned intent
POST
/v1/intents/{id}/cancelParameters
idin path,string(required)
Responses
200Cancelled
idstring(required)walletstring(required)kind"conversion" | "gas_topup"(required)status"planned" | "executing" | "filled" | "cancelled" | "aborted"(required)policy_versioninteger(required)policy_hashstring(required)paramsobject(required)created_atobject(required)updated_atobject(required)reportobject(required)
403The intent's wallet is outside the key's wallet scope (#289)
404Unknown intent or not cancellable
Example
curl -X POST https://api.cofferline.com/v1/intents/{id}/cancel \
-H "authorization: Bearer $TOKEN"