跳至主要內容

Get intent status – Earn API

更新於
Jul 31, 2026

概覽

Poll the lifecycle of an intent returned by the calldata endpoints.

狀態 is derived:

  • 失敗: a failure reason was recorded (including pre-transaction failures); fulfilled_tx_hash is always null.
  • fulfilled: fulfilled_at is set and the intent did not fail.
  • expired: unfulfilled and past expires_at.
  • 待定: everything else.

404 intent_not_found covers both a missing intent and an intent belonging to another strategy. Raw calldata is never returned.

Endpoint

GET https://earn-api.quicknode.dev/functions/v1/api/v1/strategies/{id}/intents/{intentId}

Authorization

Include the published apikey header. This read request is public and does not require a SIWE signature.

參數

參數Location類型Required說明
id路徑字串是的Strategy UUID.
intentId路徑字串是的Intent id, returned as `intentId` by the calldata endpoints.

Example request

curl --request GET \
--url 'https://earn-api.quicknode.dev/functions/v1/api/v1/strategies/b7c1e2d3-0000-4000-8000-000000000001/intents/7f3a1c2b-0000-4000-8000-000000000abc' \
--header 'Accept: application/json' \
--header 'apikey: <EARN_PUBLIC_API_KEY>'

回應

領域類型Required說明
id字串是的Intent UUID.
strategy_id字串是的UUID of the strategy that owns the intent.
chain_id整數是的Chain on which the intent transaction is executed.
kind字串是的One of `deposit`, `close`, `emergency_claim` (from the calldata endpoints), or system-written `rebalance`, `withdraw_bridge`, `relay_deposit`.
created_at字串是的ISO 8601 timestamp when the intent was created.
expires_at字串是的The intent attribution TTL (30 days for user kinds), NOT the calldata plan-freshness bound.
狀態string (pending | fulfilled | failed | expired)是的Derived, not a stored column. `failed`: a failure reason was recorded (including pre-transaction failures; failed wins over fulfilled). `fulfilled`: `fulfilled_at` set and not failed. `expired`: unfulfilled and past `expires_at`. `pending`: everything else.
fulfilled_atstring | null是的When the intent was closed. Also set on some FAILED intents, so branch on `status`, never this field alone.
fulfilled_tx_hashstring | null是的The fulfilling transaction hash; always null on a failed intent.
submitted_tx_hashstring | null是的Broadcast-time hash set on rebalance intents before fulfillment, when known.
failure_reasonstring | null是的Human-readable failure detail when `status` is `failed`. Sanitized: URLs are redacted and the text is capped at 200 characters.

Example response

{
"id": "7f3a1c2b-0000-4000-8000-000000000abc",
"strategy_id": "b7c1e2d3-0000-4000-8000-000000000001",
"chain_id": 10,
"kind": "close",
"created_at": "2026-07-07T18:00:00.000Z",
"expires_at": "2026-08-06T18:00:00.000Z",
"status": "pending",
"fulfilled_at": null,
"fulfilled_tx_hash": null,
"submitted_tx_hash": null,
"failure_reason": null
}

HTTP responses

狀態說明
200The intent row with its derived status.
400The strategy id or intent id is not a UUID (`invalid_request`).
404No such intent for THIS strategy (`intent_not_found`; also returned when the intent belongs to another strategy).
429Rate limit exceeded. `Retry-After` (seconds) tells you when to retry. Reads, feedback, and push writes are keyed per IP; create/update/delete are keyed per wallet+IP; deposit/withdraw/claim calldata is keyed per strategy+IP.
500Internal server error.
OpenAPI source

This page is based on operation getIntentStatusEarn OpenAPI 3.1 specification.