Search by name, SuiNS, address, digest, object ID, coin type or checkpoint.

API
agentPass.precheck

agentPass.precheck

Will this Agent Pass accept the action? Each rule checked before anything is signed.

Details

Endpoint
POST /v1/agent-pass/precheck
Credits
2
Rate class
Light. Counts against your light requests per second.

Reads the pass now and checks one action against it: pass active and not expired, the signer is its agent, a rule for the coin or pair, per-action and daily limits with today's usage, listed pools and the price floor, named recipients, listed validators, and the budget left. Returns accept and every check in one sentence; `refusal` names the rule that would stop it. The chain is the final word: a dry run of the built bytes (tx.receipt) confirms it.

Parameters

NameTypeDescription
passrequiredstringPass object id.
senderstringThe signer (should be the pass's agent).
steprequiredobjectThe action.
step.actionstringswap, transfer, stake or supply.
step.coin_instringswap: coin sold.
step.coin_outstringswap: coin bought.
step.coinstringtransfer or supply: the coin.
step.amountstring or numberWhole coins.
step.min_outstring or numberswap: least to receive.
step.recipientstringtransfer: a recipient NAME the owner listed.
step.validatorstringstake: validator address.

Request

Send your key in the x-api-key header, or leave it out to use the keyless tier.

curl
curl -X POST "https://api.tide.ad/v1/agent-pass/precheck" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "pass": "0x03c7bd6a3d4910f56fea05dedb632efd9824c82f22ef274180b7b8756ce47bac",
  "step": {
    "action": "swap",
    "coin_in": "USDC",
    "coin_out": "SUI",
    "amount": "0.2"
  }
}'
TypeScript
const res = await fetch("https://api.tide.ad/v1/agent-pass/precheck", {
  method: "POST",
  headers: {
    "x-api-key": process.env.TIDE_API_KEY!,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "pass": "0x03c7bd6a3d4910f56fea05dedb632efd9824c82f22ef274180b7b8756ce47bac",
    "step": {
      "action": "swap",
      "coin_in": "USDC",
      "coin_out": "SUI",
      "amount": "0.2"
    }
  }),
});
const data = await res.json();

Response

JSON
{
  "accept": true,
  "refusal": null,
  "checks": [
    {
      "rule": "pass",
      "ok": true,
      "text": "Active. The agent can act until 2026-11-06."
    },
    {
      "rule": "config",
      "ok": true,
      "text": "Agent Pass is not paused."
    },
    {
      "rule": "rule",
      "ok": true,
      "text": "Swap USDC for SUI on DeepBook SUI/USDC or Cetus USDC/SUI, up to 0.5 USDC a trade and 0.5 USDC a day, at no worse than 1 SUI per USDC."
    }
  ],
  "pass": {
    "id": "0x03c7bd6a3d4910f56fea05dedb632efd9824c82f22ef274180b7b8756ce47bac",
    "name": "Buy SUI daily",
    "owner": "0x1eb7c57e3f2bd0fc6cb9dcffd143ea957e4d98f805c358733f76dee0667fe0b1",
    "agent": "0xb569f5371380e339038c0cdce2729621d36bfc89e740c28e3976bf04357edab6",
    "status": "active"
  }
}

Long lists are cut to a few items here.