Approve an action
Records the user's approval and resumes the paused run, which then carries out the action. Returns the approval. For a money action, send authorization with the user's signature of authorization.message from Get an approval. Approving does not mean the action succeeded: follow the run, or the trade (Get a trade), for the result.
Authentication
Both headers are required.
- Header:
X-Api-Key: YOUR_API_KEY - Header:
Authorization: Bearer YOUR_USER_TOKEN— A user's session token, from Create a session.
Path parameters
userIdstringrequiredYour id for the user: the userId you sent to Create a user. It must be the session's user.
Validation rules
- Pattern
"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
approvalIdstring · uuidrequiredThe approval's id.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
Request body required
application/json · object
Additional properties are not allowed.
authorizationobjectoptionalFor a money action: the user's signature of authorization.message from Get an approval, with its controllerId and expiresAt unchanged. Not needed for other actions.
Show attributes
For a money action: the user's signature of authorization.message from Get an approval, with its controllerId and expiresAt unchanged. Not needed for other actions.
Additional properties are not allowed.
controllerIdstring · uuidrequiredThe controllerId returned with the message, unchanged: the wallet that signed.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
expiresAtstring · date-timerequiredThe expiresAt returned with the message, unchanged, character for character.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
signatureoneOfrequiredThe user's signature of the message, exactly as the API returned it.
Show attributes
The user's signature of the message, exactly as the API returned it.
oneOf · 7 variants
Variant 1 · kind: evm
Additional properties are not allowed.
kindstringrequiredAn EIP-191 personal-message signature by the current controller.
Validation rules
- Allowed values
["evm"]
signaturestringrequiredThe 65-byte hexadecimal signature over the exact supplied message.
Validation rules
- Pattern
"^0x[0-9a-fA-F]{130}$"
Variant 2 · kind: webauthn
Additional properties are not allowed.
kindstringrequiredA user-verified WebAuthn assertion over the message digest.
Validation rules
- Allowed values
["webauthn"]
credentialIdstringrequiredThe signing credential identifier encoded as base64url.
Validation rules
- Minimum length
1- Maximum length
8192- Pattern
"^[A-Za-z0-9_-]+$"
clientDataJSONstringrequiredThe authenticator's client-data JSON bytes encoded as base64url.
Validation rules
- Minimum length
1- Maximum length
8192- Pattern
"^[A-Za-z0-9_-]+$"
authenticatorDatastringrequiredThe authenticator data bytes encoded as base64url.
Validation rules
- Minimum length
1- Maximum length
8192- Pattern
"^[A-Za-z0-9_-]+$"
signaturestringrequiredThe authenticator's signature encoded as base64url.
Validation rules
- Minimum length
1- Maximum length
8192- Pattern
"^[A-Za-z0-9_-]+$"
userHandleanyOfoptionalThe optional authenticator user handle encoded as base64url.
Show attributes
The optional authenticator user handle encoded as base64url.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Minimum length
1- Maximum length
8192- Pattern
"^[A-Za-z0-9_-]+$"
Variant 2 · null
Variant 3 · kind: near
Additional properties are not allowed.
kindstringrequiredA NEP-413 signMessage result over {message, nonce, recipient}, where recipient is the host of Fin's audience.
Validation rules
- Allowed values
["near"]
publicKeystringrequiredThe signing key as the wallet reports it (ed25519: then base58).
Validation rules
- Pattern
"^ed25519:[1-9A-HJ-NP-Za-km-z]{32,44}$"
signaturestringrequiredThe 64-byte Ed25519 signature in padded standard base64.
Validation rules
- Pattern
"^[A-Za-z0-9+/]{86}==$"
noncestringrequiredThe 32-byte nonce the caller gave the wallet, in padded standard base64.
Validation rules
- Pattern
"^[A-Za-z0-9+/]{42}[AEIMQUYcgkosw048]=$"
Variant 4 · kind: solana
Additional properties are not allowed.
kindstringrequiredA Solana signMessage Ed25519 signature over the exact UTF-8 message bytes.
Validation rules
- Allowed values
["solana"]
signaturestringrequiredThe 64-byte Ed25519 signature in padded standard base64.
Validation rules
- Pattern
"^[A-Za-z0-9+/]{86}==$"
Variant 5 · kind: stellar
Additional properties are not allowed.
kindstringrequiredA SEP-53 signature: Ed25519 over sha256("Stellar Signed Message:\n" + message).
Validation rules
- Allowed values
["stellar"]
signaturestringrequiredThe 64-byte Ed25519 signature in padded standard base64.
Validation rules
- Pattern
"^[A-Za-z0-9+/]{86}==$"
Variant 6 · kind: ton
Additional properties are not allowed.
kindstringrequiredA TON Connect signData result for a text payload that is exactly the message.
Validation rules
- Allowed values
["ton"]
signaturestringrequiredThe 64-byte Ed25519 signature in padded standard base64.
Validation rules
- Pattern
"^[A-Za-z0-9+/]{86}==$"
addressstringrequiredThe signing wallet's address exactly as the wallet returned it.
Validation rules
- Minimum length
1- Maximum length
128
domainstringrequiredThe dApp domain the wallet attested; it must be a partner-registered origin's host.
Validation rules
- Minimum length
1- Maximum length
253
timestampintegerrequiredThe wallet's signing time in UNIX seconds; it must be within five minutes.
Validation rules
- Minimum
0- Maximum
9007199254740991
Variant 7 · kind: tron
Additional properties are not allowed.
kindstringrequiredA TIP-191 signMessageV2 signature over the exact message.
Validation rules
- Allowed values
["tron"]
signaturestringrequiredThe 65-byte recoverable secp256k1 signature in hexadecimal.
Validation rules
- Pattern
"^0x[0-9a-fA-F]{130}$"
reasonstringoptionalWhy the call was approved, for the record.
Validation rules
- Maximum length
1024
attestationobjectoptionalA partner-side confirmation reference, recorded on the journal event; never verified by fin.
Show attributes
A partner-side confirmation reference, recorded on the journal event; never verified by fin.
Additional properties are not allowed.
referencestringrequiredThe partner's own reference for this confirmation.
Validation rules
- Minimum length
1- Maximum length
256
Request example
Illustrative request. Replace the host, credentials and resource IDs with your own. If a request file is shown, create it from the schema above. Review the requested action before sending it.
curl --request POST 'https://api.example.test/v1/users/YOUR_USER_ID/approvals/YOUR_APPROVAL_ID/approve' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'Authorization: Bearer YOUR_USER_TOKEN' \
--header 'Content-Type: application/json' \
--data '{}'
Responses
200 The approval, now approved.
The approval, now approved.
application/json · anyOf
An action the agent wants to take that needs the user's OK: what it would do, and whether the user decided.
anyOf · 2 variants
Variant 1 · object
idstring · uuidrequiredThe approval's id.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
toolstringrequiredThe tool the agent wants to use.
fingerprintstringrequiredThe SHA-256 digest, as 64 lowercase hexadecimal characters, of the tool and its exact input in canonical JSON, with the deployment's no-signing restriction when it set one: the decision applies to exactly this action, and the action that runs must match it.
inputanyOfrequiredThe tool's input, exactly as it would run: show it to the user.
Show attributes
The tool's input, exactly as it would run: show it to the user.
anyOf · 6 variants
Variant 1 · string
Variant 2 · number
Variant 3 · boolean
Variant 4 · null
Variant 5 · array
Array items · anyOf
Recursive reference: #/components/schemas/JsonValue. See the complete schema below.
Variant 6 · object
Validation rules
- propertyNames
{"type":"string"}
Additional property values
Recursive reference: #/components/schemas/JsonValue. See the complete schema below.
contractanyOfrequiredFor a money action, the amounts, assets, destinations and limits approving it allows; null for other actions.
Show attributes
For a money action, the amounts, assets, destinations and limits approving it allows; null for other actions.
anyOf · 2 variants
Variant 1 · oneOf
oneOf · 20 variants
Variant 1 · type: near_intents_transfer
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"near_intents_transfer"
actionsarrayrequiredThe actions this contract authorizes, executed in order.
Show attributes
The actions this contract authorizes, executed in order.
Validation rules
- Minimum items
1- Maximum items
16
Array items · oneOf
oneOf · 4 variants
Variant 1 · kind: swap
kindstringrequiredExchange one asset for another; custody never leaves the agent wallet.
Validation rules
- Exact value
"swap"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
exitoneOfoptionalOptional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
Show attributes
Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
oneOf · 3 variants
Variant 1 · kind: take_profit
A take-profit exit: sell once the price is up this much on average cost.
kindstringrequiredSell when the asset is this far ABOVE the automation's average cost.
Validation rules
- Exact value
"take_profit"
gainBpsstringrequiredHow far above the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 2 · kind: stop_loss
A stop-loss exit: sell once the price is down this much on average cost.
kindstringrequiredSell when the asset is this far BELOW the automation's average cost.
Validation rules
- Exact value
"stop_loss"
lossBpsstringrequiredHow far below the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 3 · kind: harvest_every
A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every days days it sells only the gain, if there is any, and the automation keeps running.
kindstringrequiredTake profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled.
Validation rules
- Exact value
"harvest_every"
daysstringrequiredHow many days apart harvests are, 7 to 365, as a decimal string: "7" weekly, "30" monthly.
Validation rules
- Pattern
"^[1-9]\\d{0,2}$"
Variant 2 · kind: withdraw_to_owner
kindstringrequiredReturn an asset to the account that owns the agent wallet.
Validation rules
- Exact value
"withdraw_to_owner"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
Variant 3 · kind: withdraw_transfer
kindstringrequiredPay the exact approved destination through the provider’s chain or Intents transfer route.
Validation rules
- Exact value
"withdraw_transfer"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe exact approved payout rail, network and address.
Show attributes
The exact approved payout rail, network and address.
railstringrequiredA native blockchain transfer or a signed transfer within an Intents ledger.
Validation rules
- Allowed values
["chain","intents"]
networkstringrequiredExact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain.
Validation rules
- Pattern
"^[a-z][a-z0-9-]{0,63}$"
addressstringrequiredExact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,256}$"
memonullrequiredStandalone routing memos are unsupported; routing must be encoded in the approved address.
minimumReceivedRawanyOfrequiredMinimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
Show attributes
Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
maxFeeRawanyOfrequiredOptional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
Show attributes
Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
Variant 4 · kind: send
kindstringrequiredNot executable, and refused in new contracts: pay an address with withdraw_transfer.
Validation rules
- Exact value
"send"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe pinned destination this action pays.
Show attributes
The pinned destination this action pays.
chainstringrequiredWhich chain the destination address is on.
Validation rules
- Minimum length
1- Maximum length
32
addressstringrequiredThe destination address on that chain.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,128}$"
validUntilstring · date-timerequiredWhen this contract's authority expires.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
maxExecutionsintegerrequiredHow many times this contract may be executed before it is exhausted.
Validation rules
- Minimum
1- Maximum
10000
maxTotalInputarrayoptionalOptional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Show attributes
Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
boundsobjectrequiredThe value-loss and signature-lifetime limits every execution must respect.
Show attributes
The value-loss and signature-lifetime limits every execution must respect.
maxValueLossBpsstringrequiredThe most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
maxSignatureLifetimeSecondsintegerrequiredExplicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity.
Validation rules
- Minimum
1- Maximum
259500
executionanyOfoptionalOptional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
Show attributes
Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
anyOf · 2 variants
Variant 1 · object
modestringrequiredOrdered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved.
Validation rules
- Allowed values
["ordered","parallel_independent"]
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · object
modestringrequiredValidation rules
- Exact value
"dependency_graph"
dependenciesarrayrequiredOne row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Show attributes
One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Validation rules
- Minimum items
1- Maximum items
16
Array items · array
Validation rules
- Maximum items
16
Array items · integer
Validation rules
- Minimum
0- Maximum
15
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · type: limit_order
Owner-signed authority for one resting limit order: the exact approved placement, created and funded once by the policy worker before the approval expires.
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"limit_order"
orderobjectrequiredThe exact approved placement request.
Show attributes
The exact approved placement request.
inputobjectrequiredThe input (base) asset this order sells.
Show attributes
The input (base) asset this order sells.
pinnedobjectrequiredThe exact asset the order sells: token id and decimals.
Show attributes
The exact asset the order sells: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
outputobjectrequiredThe output (quote) asset this order buys.
Show attributes
The output (quote) asset this order buys.
pinnedobjectrequiredThe exact asset the order buys: token id and decimals.
Show attributes
The exact asset the order buys: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
quantitystringrequiredThe exact input amount to sell, in the input asset's smallest unit. 1 NEAR with verified decimals 24 is "1000000000000000000000000". Scale decimal digits with the verified decimals and reject excess fractional digits; no floating-point arithmetic or bash.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
limitPricestringrequiredThe minimum price the fill must reach, as output-asset units per ONE input unit, written as a plain human decimal: "5" means at least 5 output tokens per 1 input token. Never scale it by decimals.
Validation rules
- Maximum length
80- Pattern
"^(0|[1-9]\\d{0,38})(\\.\\d{1,38})?$"
expiresInHoursintegerrequiredHow long the order may rest before it expires, in whole hours. Use the user's duration within this wallet's maximum, or the wallet's default from the latest request's host context when none is given. The schema permits up to 720 hours (30 days); a wallet may have a lower maximum. Never shorten a requested duration to fit.
Validation rules
- Minimum
1- Maximum
720
validUntilstring · date-timerequiredThe latest instant the order may be created and funded under this consent.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 3 · type: perps_transfer
One approved perps transfer in exactly the named direction.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_transfer"
directionstringrequiredFund the own perps account from the agent wallet, or withdraw back to the same agent wallet.
Validation rules
- Allowed values
["fund","withdraw"]
transferobjectrequiredThe exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact amount in six-decimal atomic units in either direction: 5 USDC is "5000000". A withdrawal returns USDC. A funding spends it from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it; Hyperliquid receives USDC. Never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalA funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
Show attributes
A funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 4 · type: perps_order
One approved Hyperliquid order, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_order"
orderobjectrequiredThe exact approved order.
Show attributes
The exact approved order.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
sidestringrequiredThe position this order opens, adds to, reduces or protects. A reduce-only entry on a long position sells.
Validation rules
- Allowed values
["long","short"]
sizestringrequiredExact size in the coin, at most the market's szDecimals places.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
leverageanyOfrequiredLeverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
Show attributes
Leverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
100
Variant 2 · null
marginModestringoptionalHow the position is margined, which the user chose with the leverage: cross shares the account's margin with every cross position, isolated puts only this position's own margin at risk (perps_margin_update adds or removes it later). Present exactly when leverage is; an isolated-only market (perps_markets onlyIsolated) takes isolated. Never assume it: ask the user. Absent on orders approved before margin modes existed, which were cross.
Validation rules
- Allowed values
["cross","isolated"]
entryanyOfrequiredThe order itself; null for take-profit and stop-loss on the existing position only.
Show attributes
The order itself; null for take-profit and stop-loss on the existing position only.
anyOf · 2 variants
Variant 1 · object
pricestringrequiredThe limit price; for an immediate (Ioc) order, the worst price it may fill at.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
timeInForcestringrequiredIoc fills now within price and cancels the rest (a market order), Gtc rests until filled or cancelled, Alo rests only as a maker order.
Validation rules
- Allowed values
["Gtc","Ioc","Alo"]
reduceOnlybooleanrequiredTrue to only reduce or close the existing position, never open or add.
Variant 2 · null
takeProfitanyOfrequiredA reduce-only take-profit, or null.
Show attributes
A reduce-only take-profit, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
stopLossanyOfrequiredA reduce-only stop-loss, or null.
Show attributes
A reduce-only stop-loss, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
trailingStopanyOfoptionalA reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
Show attributes
A reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size that follows the mark price as it moves in the position's favour and fires once it reverses by the retracement.
retracementanyOfrequiredHow far the mark price may reverse from its best before the stop fires.
Show attributes
How far the mark price may reverse from its best before the stop fires.
anyOf · 2 variants
Variant 1 · object
Trail by a percentage of the best mark price.
percentstringrequiredHow far the mark price may reverse from its best since activation, in percent: 2 is 2%.
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · object
Trail by a fixed price distance.
pricestringrequiredHow far the mark price may reverse from its best since activation, in price units.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
activationPriceanyOfrequiredThe mark price that starts the trailing; null to trail from placement.
Show attributes
The mark price that starts the trailing; null to trail from placement.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
Variant 2 · null
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 5 · type: perps_cancel
One approved cancellation of one resting Hyperliquid order.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_cancel"
cancelobjectrequiredThe exact order approved for cancelling.
Show attributes
The exact order approved for cancelling.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
oidintegerrequiredThe resting order's id exactly as perps_orders lists it.
Validation rules
- Greater than
0- Maximum
9007199254740991
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 6 · type: perps_automation
A standing approval for one perps automation: open the agent's own position while it holds nothing on the coin, reduce or close it, or add margin to its own account, each time its rule fires, up to its limits.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_automation"
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
positionstringrequiredThe position the action is for. open acts only while the agent holds nothing on this coin; reduce and add_margin act only while it holds this side, and nothing happens otherwise.
Validation rules
- Allowed values
["long","short"]
actiononeOfrequiredWhat a perps automation does each time its rule fires: open the named position while the agent holds nothing on its coin, reduce the named position, or add margin to the agent's own perps account.
Show attributes
What a perps automation does each time its rule fires: open the named position while the agent holds nothing on its coin, reduce the named position, or add margin to the agent's own perps account.
oneOf · 3 variants
Variant 1 · kind: reduce
Close part or all of the position with a reduce-only market order.
kindstringrequiredReduce or close the position.
Validation rules
- Exact value
"reduce"
fractionBpsintegerrequiredHow much of the position to close, in basis points: 10000 closes it all.
Validation rules
- Minimum
1- Maximum
10000
maxSlippageBpsintegerrequiredThe worst fill allowed, in basis points from the mark when it fires.
Validation rules
- Minimum
1- Maximum
500
Variant 2 · kind: add_margin
Fund the agent's own perps account from its agent wallet.
kindstringrequiredAdd margin to the perps account.
Validation rules
- Exact value
"add_margin"
amountRawstringrequiredExact USDC moved from the agent wallet into the perps account, six decimals: 5 USDC is "5000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredMaximum value lost to fees moving it, in basis points.
Validation rules
- Minimum
0- Maximum
300
Variant 3 · kind: open
Open the position with a market order, only while the agent holds nothing on this coin, optionally protected by a native take-profit and stop-loss.
kindstringrequiredOpen the position at market.
Validation rules
- Exact value
"open"
notionalUsdstringrequiredThe position's size in US dollars at the mark when it fires, at most two places: a $200 position is "200". The size in the coin is this over the mark, rounded down to the market's size precision.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,2})?$"
leverageintegerrequiredLeverage the user chose for this market, at most the market's maximum. Never assume it: ask the user.
Validation rules
- Minimum
1- Maximum
100
marginModestringrequiredHow the position is margined, which the user chose with the leverage: cross shares the account's margin, isolated risks only this position's own. An isolated-only market takes isolated. Never assume it: ask the user.
Validation rules
- Allowed values
["cross","isolated"]
maxSlippageBpsintegerrequiredThe worst fill allowed, in basis points from the mark when it fires; the take-profit and stop-loss fill within the same bound of their trigger.
Validation rules
- Minimum
1- Maximum
500
takeProfitPercentanyOfrequiredA native take-profit this far from the mark when it opens, in percent of price in the position's favour ("10" is 10%), or null for none.
Show attributes
A native take-profit this far from the mark when it opens, in percent of price in the position's favour ("10" is 10%), or null for none.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · null
stopLossPercentanyOfrequiredA native stop-loss this far from the mark when it opens, in percent of price against the position ("5" is 5%), or null for none.
Show attributes
A native stop-loss this far from the mark when it opens, in percent of price against the position ("5" is 5%), or null for none.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · null
maxExecutionsintegerrequiredHow many firings may act under this approval.
Validation rules
- Minimum
1- Maximum
100
validUntilstring · date-timerequiredThe deadline after which this approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 7 · type: perps_margin
One approved change to one isolated position's margin, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_margin"
marginobjectrequiredThe exact approved margin change.
Show attributes
The exact approved margin change.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
changestringrequiredadd moves USDC from the account into the position's isolated margin, lowering its liquidation risk; remove takes it back out, raising that risk. A strict isolated market never lets margin be removed while the position is open.
Validation rules
- Allowed values
["add","remove"]
amountstringrequiredExact USDC to move, at most six decimal places, such as 25 or 12.5.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,8})(\\.[0-9]{0,5}[1-9])?$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 8 · type: prediction_fund
One exact USDC or USDT debit delivered as native Base USDC to Polymarket's bridge for the agent's own account; the final pUSD amount is not bounded.
typestringrequiredOne approved Polymarket funding transfer.
Validation rules
- Exact value
"prediction_fund"
transferobjectrequiredThe exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact debit in six-decimal atomic units: 5 USDC or USDT is "5000000", spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it. The host resolves the agent’s own Polymarket Deposit Wallet and its bridge address; never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxFirstLegLossBpsintegerrequiredExplicit maximum loss, in basis points, of the first leg only: the wallet's USDC, USDT or coin delivered as native Base USDC to Polymarket's bridge, fees and any cross-chain hop included. It does not bound the bridge's conversion to pUSD on Polygon, whose fees and output are variable and estimated. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
Show attributes
Approved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 9 · type: solana_buy
An approved Solana buy, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_buy"
buyobjectrequiredThe exact approved token, payment, all-in loss bound and SOL top-up cap, and, for a buy whose funding pays with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved token, payment, all-in loss bound and SOL top-up cap, and, for a buy whose funding pays with a coin, that coin and the most of it it may spend.
tokenobjectrequiredThe exact token to buy.
Show attributes
The exact token to buy.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
payoneOfrequiredWhat the buy spends, as an exact input amount. Buying an exact number of tokens is not supported.
Show attributes
What the buy spends, as an exact input amount. Buying an exact number of tokens is not supported.
oneOf · 2 variants
Variant 1 · kind: usdc
Spend an exact amount of USDC or USDT from the agent wallet.
kindstringrequiredPay from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT), moved to Solana as SOL first.
Validation rules
- Exact value
"usdc"
amountRawstringrequiredExact USDC or USDT to spend, in six-decimal atomic units: $50 is "50000000". At least 5 ("5000000"); a smaller buy is refused.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: sol
Spend an exact amount of SOL the agent's Solana account already holds.
kindstringrequiredPay with SOL already in the agent's Solana account.
Validation rules
- Exact value
"sol"
lamportsstringrequiredExact SOL to spend, in lamports (nine decimals): 0.5 SOL is "500000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
maxSolTopUpUsdcRawstringrequiredThe most extra USDC or USDT the funding may add to keep SOL in the Solana account for network fees, in six-decimal atomic units: "0" for none, at most "1000000" (1 USDC). Must be "0" when paying with SOL.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
payWithobjectoptionalA buy paid in dollars and approved in chat as one call: the coin its funding pays with instead of a USDC or USDT holding, and the most of it it may spend, the SOL top-up included. Never SOL. A buy from a token's page refuses it.
Show attributes
A buy paid in dollars and approved in chat as one call: the coin its funding pays with instead of a USDC or USDT holding, and the most of it it may spend, the SOL top-up included. Never SOL. A buy from a token's page refuses it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 10 · type: solana_sell
An approved Solana sell, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_sell"
sellobjectrequiredThe exact approved token, amount, proceeds and all-in loss bound.
Show attributes
The exact approved token, amount, proceeds and all-in loss bound.
tokenobjectrequiredThe exact token to sell.
Show attributes
The exact token to sell.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
amountoneOfrequiredHow much of the token to sell.
Show attributes
How much of the token to sell.
oneOf · 2 variants
Variant 1 · kind: exact
Sell an exact amount of the token.
kindstringrequiredSell an exact amount of the token.
Validation rules
- Exact value
"exact"
amountRawstringrequiredExact amount of the token to sell, in its smallest unit (scaled by the token's decimals).
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: fraction
Sell a share of the account's balance of the token.
kindstringrequiredSell a share of what the Solana account holds of the token.
Validation rules
- Exact value
"fraction"
bpsintegerrequiredThe share to sell, in basis points of the account's balance of the token: all of it is 10000, half is 5000.
Validation rules
- Minimum
1- Maximum
10000
receivestringrequiredusdc returns the proceeds to the agent wallet as USDC on NEAR, which is what selling means; sol keeps them as SOL in the agent's Solana account.
Validation rules
- Allowed values
["usdc","sol"]
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 11 · type: solana_fund
An approved move of USDC or USDT, or a coin, into the agent's own Solana account.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_fund"
fundobjectrequiredThe exact approved amount and loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact USDC or USDT to move from the agent wallet into the agent's Solana account as SOL, in six-decimal atomic units: 5 USDC is "5000000". Spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees: at most 300. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call: the coin this funding pays with instead of a USDC or USDT holding, and the most of it it may spend. Never SOL.
Show attributes
Approved in chat as one call: the coin this funding pays with instead of a USDC or USDT holding, and the most of it it may spend. Never SOL.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 12 · type: solana_withdraw
An approved move of SOL from the agent's own Solana account back to its agent wallet.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_withdraw"
withdrawobjectrequiredThe exact approved amount, what returns and the loss bound.
Show attributes
The exact approved amount, what returns and the loss bound.
amountoneOfrequiredHow much SOL to withdraw from the agent's Solana account.
Show attributes
How much SOL to withdraw from the agent's Solana account.
oneOf · 2 variants
Variant 1 · kind: exact
Withdraw an exact amount of SOL.
kindstringrequiredWithdraw an exact amount of SOL.
Validation rules
- Exact value
"exact"
lamportsstringrequiredExact SOL to withdraw, in lamports (nine decimals): 0.5 SOL is "500000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: all_spendable
Withdraw all the spendable SOL.
kindstringrequiredWithdraw all the SOL above the reserve the account keeps for rent and network fees.
Validation rules
- Exact value
"all_spendable"
receivestringrequiredusdc returns it to the agent wallet as USDC on NEAR; sol returns it to the agent wallet as SOL.
Validation rules
- Allowed values
["usdc","sol"]
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees: at most 300. Required; no default.
Validation rules
- Minimum
0- Maximum
300
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 13 · type: prediction_order
typestringrequiredValidation rules
- Exact value
"prediction_order"
orderobjectrequiredShow attributes
marketIdstringrequiredValidation rules
- Pattern
"^[1-9][0-9]{0,19}$"
assetIdstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,77})$"
marketQuestionstringrequiredValidation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredValidation rules
- Minimum length
1- Maximum length
256
sidestringrequiredValidation rules
- Allowed values
["BUY","SELL"]
limitPriceUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
quantityoneOfrequiredShow attributes
oneOf · 2 variants
Variant 1 · kind: shares
kindstringrequiredValidation rules
- Exact value
"shares"
sizeSharesDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
Variant 2 · kind: budget
kindstringrequiredValidation rules
- Exact value
"budget"
amountUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
orderTypestringrequiredValidation rules
- Allowed values
["GTC","GTD","FOK","FAK"]
expiresAtintegeroptionalValidation rules
- Minimum
0- Maximum
253402300799
maxFeeUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
maxSpendUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 14 · type: prediction_withdraw
typestringrequiredValidation rules
- Exact value
"prediction_withdraw"
withdrawalobjectrequiredWithdraw pUSD through Polymarket’s conversion service as native USDC on Polygon to a unique verified 1Click address crediting only the agent’s own confidential Intents wallet. Funding remains a separate USDC route.
Show attributes
Withdraw pUSD through Polymarket’s conversion service as native USDC on Polygon to a unique verified 1Click address crediting only the agent’s own confidential Intents wallet. Funding remains a separate USDC route.
amountRawstringrequiredExact pUSD debit in six-decimal atomic units: 5 pUSD is "5000000". Only the agent’s own Deposit Wallet is spent.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 15 · type: composite
One owner signature over several exact one-shot grants and the order they run in.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"composite"
piecesarrayrequiredShow attributes
Validation rules
- Minimum items
1- Maximum items
6
Array items · object
toolstringrequiredThe tool whose one-shot call this piece is.
Validation rules
- Allowed values
["intents_execute","perps_fund","perps_order_place","prediction_fund","prediction_order_place","perps_withdraw","prediction_withdraw"]
contractanyOfrequiredShow attributes
anyOf · 7 variants
Variant 1 · type: near_intents_transfer
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"near_intents_transfer"
actionsarrayrequiredThe actions this contract authorizes, executed in order.
Show attributes
The actions this contract authorizes, executed in order.
Validation rules
- Minimum items
1- Maximum items
16
Array items · oneOf
oneOf · 4 variants
Variant 1 · kind: swap
kindstringrequiredExchange one asset for another; custody never leaves the agent wallet.
Validation rules
- Exact value
"swap"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
exitoneOfoptionalOptional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
Show attributes
Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
oneOf · 3 variants
Variant 1 · kind: take_profit
A take-profit exit: sell once the price is up this much on average cost.
kindstringrequiredSell when the asset is this far ABOVE the automation's average cost.
Validation rules
- Exact value
"take_profit"
gainBpsstringrequiredHow far above the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 2 · kind: stop_loss
A stop-loss exit: sell once the price is down this much on average cost.
kindstringrequiredSell when the asset is this far BELOW the automation's average cost.
Validation rules
- Exact value
"stop_loss"
lossBpsstringrequiredHow far below the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 3 · kind: harvest_every
A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every days days it sells only the gain, if there is any, and the automation keeps running.
kindstringrequiredTake profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled.
Validation rules
- Exact value
"harvest_every"
daysstringrequiredHow many days apart harvests are, 7 to 365, as a decimal string: "7" weekly, "30" monthly.
Validation rules
- Pattern
"^[1-9]\\d{0,2}$"
Variant 2 · kind: withdraw_to_owner
kindstringrequiredReturn an asset to the account that owns the agent wallet.
Validation rules
- Exact value
"withdraw_to_owner"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
Variant 3 · kind: withdraw_transfer
kindstringrequiredPay the exact approved destination through the provider’s chain or Intents transfer route.
Validation rules
- Exact value
"withdraw_transfer"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe exact approved payout rail, network and address.
Show attributes
The exact approved payout rail, network and address.
railstringrequiredA native blockchain transfer or a signed transfer within an Intents ledger.
Validation rules
- Allowed values
["chain","intents"]
networkstringrequiredExact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain.
Validation rules
- Pattern
"^[a-z][a-z0-9-]{0,63}$"
addressstringrequiredExact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,256}$"
memonullrequiredStandalone routing memos are unsupported; routing must be encoded in the approved address.
minimumReceivedRawanyOfrequiredMinimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
Show attributes
Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
maxFeeRawanyOfrequiredOptional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
Show attributes
Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
Variant 4 · kind: send
kindstringrequiredNot executable, and refused in new contracts: pay an address with withdraw_transfer.
Validation rules
- Exact value
"send"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe pinned destination this action pays.
Show attributes
The pinned destination this action pays.
chainstringrequiredWhich chain the destination address is on.
Validation rules
- Minimum length
1- Maximum length
32
addressstringrequiredThe destination address on that chain.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,128}$"
validUntilstring · date-timerequiredWhen this contract's authority expires.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
maxExecutionsintegerrequiredHow many times this contract may be executed before it is exhausted.
Validation rules
- Minimum
1- Maximum
10000
maxTotalInputarrayoptionalOptional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Show attributes
Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
boundsobjectrequiredThe value-loss and signature-lifetime limits every execution must respect.
Show attributes
The value-loss and signature-lifetime limits every execution must respect.
maxValueLossBpsstringrequiredThe most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
maxSignatureLifetimeSecondsintegerrequiredExplicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity.
Validation rules
- Minimum
1- Maximum
259500
executionanyOfoptionalOptional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
Show attributes
Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
anyOf · 2 variants
Variant 1 · object
modestringrequiredOrdered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved.
Validation rules
- Allowed values
["ordered","parallel_independent"]
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · object
modestringrequiredValidation rules
- Exact value
"dependency_graph"
dependenciesarrayrequiredOne row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Show attributes
One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Validation rules
- Minimum items
1- Maximum items
16
Array items · array
Validation rules
- Maximum items
16
Array items · integer
Validation rules
- Minimum
0- Maximum
15
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · type: perps_transfer
One approved perps transfer in exactly the named direction.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_transfer"
directionstringrequiredFund the own perps account from the agent wallet, or withdraw back to the same agent wallet.
Validation rules
- Allowed values
["fund","withdraw"]
transferobjectrequiredThe exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact amount in six-decimal atomic units in either direction: 5 USDC is "5000000". A withdrawal returns USDC. A funding spends it from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it; Hyperliquid receives USDC. Never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalA funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
Show attributes
A funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 3 · type: perps_order
One approved Hyperliquid order, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_order"
orderobjectrequiredThe exact approved order.
Show attributes
The exact approved order.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
sidestringrequiredThe position this order opens, adds to, reduces or protects. A reduce-only entry on a long position sells.
Validation rules
- Allowed values
["long","short"]
sizestringrequiredExact size in the coin, at most the market's szDecimals places.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
leverageanyOfrequiredLeverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
Show attributes
Leverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
100
Variant 2 · null
marginModestringoptionalHow the position is margined, which the user chose with the leverage: cross shares the account's margin with every cross position, isolated puts only this position's own margin at risk (perps_margin_update adds or removes it later). Present exactly when leverage is; an isolated-only market (perps_markets onlyIsolated) takes isolated. Never assume it: ask the user. Absent on orders approved before margin modes existed, which were cross.
Validation rules
- Allowed values
["cross","isolated"]
entryanyOfrequiredThe order itself; null for take-profit and stop-loss on the existing position only.
Show attributes
The order itself; null for take-profit and stop-loss on the existing position only.
anyOf · 2 variants
Variant 1 · object
pricestringrequiredThe limit price; for an immediate (Ioc) order, the worst price it may fill at.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
timeInForcestringrequiredIoc fills now within price and cancels the rest (a market order), Gtc rests until filled or cancelled, Alo rests only as a maker order.
Validation rules
- Allowed values
["Gtc","Ioc","Alo"]
reduceOnlybooleanrequiredTrue to only reduce or close the existing position, never open or add.
Variant 2 · null
takeProfitanyOfrequiredA reduce-only take-profit, or null.
Show attributes
A reduce-only take-profit, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
stopLossanyOfrequiredA reduce-only stop-loss, or null.
Show attributes
A reduce-only stop-loss, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
trailingStopanyOfoptionalA reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
Show attributes
A reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size that follows the mark price as it moves in the position's favour and fires once it reverses by the retracement.
retracementanyOfrequiredHow far the mark price may reverse from its best before the stop fires.
Show attributes
How far the mark price may reverse from its best before the stop fires.
anyOf · 2 variants
Variant 1 · object
Trail by a percentage of the best mark price.
percentstringrequiredHow far the mark price may reverse from its best since activation, in percent: 2 is 2%.
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · object
Trail by a fixed price distance.
pricestringrequiredHow far the mark price may reverse from its best since activation, in price units.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
activationPriceanyOfrequiredThe mark price that starts the trailing; null to trail from placement.
Show attributes
The mark price that starts the trailing; null to trail from placement.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
Variant 2 · null
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 4 · type: prediction_fund
One exact USDC or USDT debit delivered as native Base USDC to Polymarket's bridge for the agent's own account; the final pUSD amount is not bounded.
typestringrequiredOne approved Polymarket funding transfer.
Validation rules
- Exact value
"prediction_fund"
transferobjectrequiredThe exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact debit in six-decimal atomic units: 5 USDC or USDT is "5000000", spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it. The host resolves the agent’s own Polymarket Deposit Wallet and its bridge address; never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxFirstLegLossBpsintegerrequiredExplicit maximum loss, in basis points, of the first leg only: the wallet's USDC, USDT or coin delivered as native Base USDC to Polymarket's bridge, fees and any cross-chain hop included. It does not bound the bridge's conversion to pUSD on Polygon, whose fees and output are variable and estimated. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
Show attributes
Approved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 5 · type: prediction_order
typestringrequiredValidation rules
- Exact value
"prediction_order"
orderobjectrequiredShow attributes
marketIdstringrequiredValidation rules
- Pattern
"^[1-9][0-9]{0,19}$"
assetIdstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,77})$"
marketQuestionstringrequiredValidation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredValidation rules
- Minimum length
1- Maximum length
256
sidestringrequiredValidation rules
- Allowed values
["BUY","SELL"]
limitPriceUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
quantityoneOfrequiredShow attributes
oneOf · 2 variants
Variant 1 · kind: shares
kindstringrequiredValidation rules
- Exact value
"shares"
sizeSharesDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
Variant 2 · kind: budget
kindstringrequiredValidation rules
- Exact value
"budget"
amountUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
orderTypestringrequiredValidation rules
- Allowed values
["GTC","GTD","FOK","FAK"]
expiresAtintegeroptionalValidation rules
- Minimum
0- Maximum
253402300799
maxFeeUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
maxSpendUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 6 · type: perps_freed_withdrawal
One withdrawal home of what a cash-out's exit freed on Hyperliquid, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_freed_withdrawal"
withdrawalobjectrequiredThe signed maximum and all-in loss bound of the withdrawal home.
Show attributes
The signed maximum and all-in loss bound of the withdrawal home.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic USDC: what the exit before it frees, sized by the host before the approval opens. Never more than the exit freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 7 · type: prediction_freed_withdrawal
One withdrawal home of what a cash-out's sale freed on Polymarket, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredValidation rules
- Exact value
"prediction_freed_withdrawal"
withdrawalobjectrequiredWithdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
Show attributes
Withdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic pUSD: what the sale before it frees, sized by the host before the approval opens. Never more than the sale freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
startBystring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
dependenciesarrayrequiredShow attributes
Array items · array
Validation rules
- Maximum items
6
Array items · integer
Validation rules
- Minimum
0- Maximum
9007199254740991
walletDebitanyOfrequiredThe sum of every piece's debit from the agent wallet, per token, in raw units. Empty when the pieces are venue orders paid from money already on their venues, as when finishing a basket, or a cash-out, which closes a position and brings home what that freed.
Show attributes
The sum of every piece's debit from the agent wallet, per token, in raw units. Empty when the pieces are venue orders paid from money already on their venues, as when finishing a basket, or a cash-out, which closes a position and brings home what that freed.
anyOf · 2 variants
Variant 1 · array
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · array
Validation rules
- prefixItems
[]- Maximum items
0
Array items · never
No value is allowed.
validUntilstring · date-timerequiredWhen every piece that has not started loses its authority.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 16 · type: prediction_automation
A standing approval for one Polymarket automation: buy one outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price, each time its rule fires, up to its limits.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"prediction_automation"
marketobjectrequiredThe one Polymarket outcome this automation trades.
Show attributes
The one Polymarket outcome this automation trades.
marketIdstringrequiredThe market's id exactly as prediction_market returns it.
Validation rules
- Pattern
"^[1-9][0-9]{0,19}$"
conditionIdstringrequiredThe market's conditionId exactly as prediction_market returns it.
Validation rules
- Pattern
"^0x[0-9a-fA-F]{64}$"
assetIdstringrequiredThe outcome's CLOB token id, exactly the assetId prediction_market lists for that outcome. Yes and No are different tokens.
Validation rules
- Pattern
"^[1-9][0-9]{0,77}$"
marketQuestionstringrequiredThe market's question exactly as prediction_market returns it.
Validation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredThe outcome's name exactly as prediction_market returns it.
Validation rules
- Minimum length
1- Maximum length
256
actiononeOfrequiredWhat a Polymarket automation does each time its rule fires: buy the outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price.
Show attributes
What a Polymarket automation does each time its rule fires: buy the outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price.
oneOf · 2 variants
Variant 1 · kind: buy
Buy the outcome with a USD budget at no more than a maximum price.
kindstringrequiredBuy shares of the outcome.
Validation rules
- Exact value
"buy"
amountUsdDecimalstringrequiredThe USD each firing spends before fees, to the cent: "50" is $50. Each buy is an immediate order that fills what it can at once and cancels the rest.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,2})?$"
maxPriceUsdDecimalstringrequiredThe most a share may cost, as the market's chance: "0.32" never pays more than 32¢ a share. Use a price on the market's tick.
Validation rules
- Pattern
"^0\\.[0-9]{1,4}$"
maxFeeUsdDecimalstringrequiredThe most each firing may pay Polymarket in fees, in USD: "1" is $1.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,6})?$"
Variant 2 · kind: sell
Sell a share of the agent's holding of the outcome at no less than a minimum price.
kindstringrequiredSell shares of the outcome.
Validation rules
- Exact value
"sell"
fractionBpsintegerrequiredHow much of the agent's holding of the outcome each firing sells, in basis points: 10000 sells it all.
Validation rules
- Minimum
1- Maximum
10000
minPriceUsdDecimalstringrequiredThe least a share may sell for, as the market's chance: "0.7" never sells below 70¢ a share. Use a price on the market's tick.
Validation rules
- Pattern
"^0\\.[0-9]{1,4}$"
maxFeeUsdDecimalstringrequiredThe most each firing may pay Polymarket in fees, in USD: "1" is $1.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,6})?$"
maxExecutionsintegerrequiredHow many firings may trade under this approval; a buy spends at most maxExecutions × amountUsdDecimal in all.
Validation rules
- Minimum
1- Maximum
100
validUntilstring · date-timerequiredThe deadline after which this approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 17 · type: solana_sell_many
An approved multi-coin Solana sale, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_sell_many"
sellManyobjectrequiredThe exact approved coins, amounts and loss bounds, in order, and where the proceeds go.
Show attributes
The exact approved coins, amounts and loss bounds, in order, and where the proceeds go.
sellsarrayrequiredThe coins to sell, in the order they are sold: 2 to 6, each a different mint, none of them SOL itself.
Show attributes
The coins to sell, in the order they are sold: 2 to 6, each a different mint, none of them SOL itself.
Validation rules
- Minimum items
2- Maximum items
6
Array items · object
One coin of a multi-coin sale, sold through the agent's own Solana account.
tokenobjectrequiredThe exact token to sell.
Show attributes
The exact token to sell.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
amountoneOfrequiredHow much of the token to sell.
Show attributes
How much of the token to sell.
oneOf · 2 variants
Variant 1 · kind: exact
Sell an exact amount of the token.
kindstringrequiredSell an exact amount of the token.
Validation rules
- Exact value
"exact"
amountRawstringrequiredExact amount of the token to sell, in its smallest unit (scaled by the token's decimals).
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: fraction
Sell a share of the account's balance of the token.
kindstringrequiredSell a share of what the Solana account holds of the token.
Validation rules
- Exact value
"fraction"
bpsintegerrequiredThe share to sell, in basis points of the account's balance of the token: all of it is 10000, half is 5000.
Validation rules
- Minimum
1- Maximum
10000
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
receivestringrequiredusdc returns the summed proceeds of every sale that went through to the agent wallet as USDC on NEAR, in one transfer once the last sale ran; sol keeps them as SOL in the agent's Solana account.
Validation rules
- Allowed values
["usdc","sol"]
maxExecutionsnumberrequiredA multi-coin sale is approved once and runs once: always 1.
Validation rules
- Exact value
1
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 18 · type: grid
Owner-signed authority for one grid: the resting cell orders its terms derive, until it ends.
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"grid"
gridobjectrequiredA grid's exact terms: pair, levels, quantity and starting sides.
Show attributes
A grid's exact terms: pair, levels, quantity and starting sides.
baseobjectrequiredThe asset the grid buys low and sells high.
Show attributes
The asset the grid buys low and sells high.
pinnedobjectrequiredThe exact base asset: token id and decimals.
Show attributes
The exact base asset: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
quoteobjectrequiredThe asset prices are in and buys are paid with.
Show attributes
The asset prices are in and buys are paid with.
pinnedobjectrequiredThe exact quote asset: token id and decimals.
Show attributes
The exact quote asset: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
levelsarrayrequiredThe 2 to 20 grid prices, strictly ascending: quote units per ONE base unit, plain human decimals.
Show attributes
The 2 to 20 grid prices, strictly ascending: quote units per ONE base unit, plain human decimals.
Validation rules
- Minimum items
2- Maximum items
20
Array items · string
Validation rules
- Maximum length
80- Pattern
"^(0|[1-9]\\d{0,38})(\\.\\d{1,38})?$"
quantityPerCellstringrequiredThe exact base amount every cell buys and sells, in the base asset's smallest unit. Fixed: profits never compound.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
cellsarrayrequiredOne entry per cell, lowest first (levels.length - 1 of them): cells wholly below the start price and the one straddling it buy, cells wholly above it stay idle.
Show attributes
One entry per cell, lowest first (levels.length - 1 of them): cells wholly below the start price and the one straddling it buy, cells wholly above it stay idle.
Validation rules
- Minimum items
1- Maximum items
19
Array items · object
startstringrequiredThe side the cell's first order is on: buy at its low level, or idle (the cell never places).
Validation rules
- Allowed values
["buy","idle"]
validUntilstring · date-timerequiredWhen the grid ends: no order is placed, and none rests, after it. At most 720 hours after the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 19 · type: perps_freed_withdrawal
One withdrawal home of what a cash-out's exit freed on Hyperliquid, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_freed_withdrawal"
withdrawalobjectrequiredThe signed maximum and all-in loss bound of the withdrawal home.
Show attributes
The signed maximum and all-in loss bound of the withdrawal home.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic USDC: what the exit before it frees, sized by the host before the approval opens. Never more than the exit freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 20 · type: prediction_freed_withdrawal
One withdrawal home of what a cash-out's sale freed on Polymarket, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredValidation rules
- Exact value
"prediction_freed_withdrawal"
withdrawalobjectrequiredWithdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
Show attributes
Withdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic pUSD: what the sale before it frees, sized by the host before the approval opens. Never more than the sale freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 2 · null
authorizationanyOfrequiredFor a money action waiting for a decision: the message the user signs to approve it, and the request it covers. null for other actions, once decided, and for withdrawals the user starts with Withdraw funds, which approves them itself.
Show attributes
For a money action waiting for a decision: the message the user signs to approve it, and the request it covers. null for other actions, once decided, and for withdrawals the user starts with Withdraw funds, which approves them itself.
anyOf · 2 variants
Variant 1 · object
What the user signs to approve a money action. Sign message exactly as returned and send the signature to Approve an action with controllerId and expiresAt unchanged.
purposestringrequiredAlways financial.approval: the signature approves this one money action.
Validation rules
- Exact value
"financial.approval"
walletIdstring · uuidrequiredThe agent wallet the action spends from.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
requestKeystring · uuidrequiredThe approval's id, which the signature names, so it approves this approval and no other.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
requestobjectrequiredThe exact terms the signature covers, including the permission they grant. Shown for review; the signed message already contains them.
Show attributes
The exact terms the signature covers, including the permission they grant. Shown for review; the signed message already contains them.
approvalIdstring · uuidrequiredThe approval being decided.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
fingerprintstringrequiredFingerprint of the immutable approval bytes.
toolstringrequiredThe exact trusted tool receiving the approved terms.
inputanyOfrequiredThe complete persisted tool arguments to approve.
Show attributes
The complete persisted tool arguments to approve.
anyOf · 6 variants
Variant 1 · string
Variant 2 · number
Variant 3 · boolean
Variant 4 · null
Variant 5 · array
Array items · anyOf
Recursive reference: #/components/schemas/JsonValue. See the complete schema below.
Variant 6 · object
Validation rules
- propertyNames
{"type":"string"}
Additional property values
Recursive reference: #/components/schemas/JsonValue. See the complete schema below.
contractoneOfrequiredExact financial actions, quantity, allowance, validity and loss bounds authorized by this approval: swap actions, one limit order, one perps transfer/order/cancellation or margin change, one Polymarket funding/order/withdrawal, the exact Solana actions, or one grid's terms.
Show attributes
Exact financial actions, quantity, allowance, validity and loss bounds authorized by this approval: swap actions, one limit order, one perps transfer/order/cancellation or margin change, one Polymarket funding/order/withdrawal, the exact Solana actions, or one grid's terms.
oneOf · 20 variants
Variant 1 · type: near_intents_transfer
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"near_intents_transfer"
actionsarrayrequiredThe actions this contract authorizes, executed in order.
Show attributes
The actions this contract authorizes, executed in order.
Validation rules
- Minimum items
1- Maximum items
16
Array items · oneOf
oneOf · 4 variants
Variant 1 · kind: swap
kindstringrequiredExchange one asset for another; custody never leaves the agent wallet.
Validation rules
- Exact value
"swap"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
exitoneOfoptionalOptional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
Show attributes
Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
oneOf · 3 variants
Variant 1 · kind: take_profit
A take-profit exit: sell once the price is up this much on average cost.
kindstringrequiredSell when the asset is this far ABOVE the automation's average cost.
Validation rules
- Exact value
"take_profit"
gainBpsstringrequiredHow far above the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 2 · kind: stop_loss
A stop-loss exit: sell once the price is down this much on average cost.
kindstringrequiredSell when the asset is this far BELOW the automation's average cost.
Validation rules
- Exact value
"stop_loss"
lossBpsstringrequiredHow far below the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 3 · kind: harvest_every
A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every days days it sells only the gain, if there is any, and the automation keeps running.
kindstringrequiredTake profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled.
Validation rules
- Exact value
"harvest_every"
daysstringrequiredHow many days apart harvests are, 7 to 365, as a decimal string: "7" weekly, "30" monthly.
Validation rules
- Pattern
"^[1-9]\\d{0,2}$"
Variant 2 · kind: withdraw_to_owner
kindstringrequiredReturn an asset to the account that owns the agent wallet.
Validation rules
- Exact value
"withdraw_to_owner"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
Variant 3 · kind: withdraw_transfer
kindstringrequiredPay the exact approved destination through the provider’s chain or Intents transfer route.
Validation rules
- Exact value
"withdraw_transfer"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe exact approved payout rail, network and address.
Show attributes
The exact approved payout rail, network and address.
railstringrequiredA native blockchain transfer or a signed transfer within an Intents ledger.
Validation rules
- Allowed values
["chain","intents"]
networkstringrequiredExact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain.
Validation rules
- Pattern
"^[a-z][a-z0-9-]{0,63}$"
addressstringrequiredExact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,256}$"
memonullrequiredStandalone routing memos are unsupported; routing must be encoded in the approved address.
minimumReceivedRawanyOfrequiredMinimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
Show attributes
Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
maxFeeRawanyOfrequiredOptional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
Show attributes
Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
Variant 4 · kind: send
kindstringrequiredNot executable, and refused in new contracts: pay an address with withdraw_transfer.
Validation rules
- Exact value
"send"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe pinned destination this action pays.
Show attributes
The pinned destination this action pays.
chainstringrequiredWhich chain the destination address is on.
Validation rules
- Minimum length
1- Maximum length
32
addressstringrequiredThe destination address on that chain.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,128}$"
validUntilstring · date-timerequiredWhen this contract's authority expires.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
maxExecutionsintegerrequiredHow many times this contract may be executed before it is exhausted.
Validation rules
- Minimum
1- Maximum
10000
maxTotalInputarrayoptionalOptional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Show attributes
Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
boundsobjectrequiredThe value-loss and signature-lifetime limits every execution must respect.
Show attributes
The value-loss and signature-lifetime limits every execution must respect.
maxValueLossBpsstringrequiredThe most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
maxSignatureLifetimeSecondsintegerrequiredExplicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity.
Validation rules
- Minimum
1- Maximum
259500
executionanyOfoptionalOptional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
Show attributes
Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
anyOf · 2 variants
Variant 1 · object
modestringrequiredOrdered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved.
Validation rules
- Allowed values
["ordered","parallel_independent"]
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · object
modestringrequiredValidation rules
- Exact value
"dependency_graph"
dependenciesarrayrequiredOne row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Show attributes
One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Validation rules
- Minimum items
1- Maximum items
16
Array items · array
Validation rules
- Maximum items
16
Array items · integer
Validation rules
- Minimum
0- Maximum
15
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · type: limit_order
Owner-signed authority for one resting limit order: the exact approved placement, created and funded once by the policy worker before the approval expires.
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"limit_order"
orderobjectrequiredThe exact approved placement request.
Show attributes
The exact approved placement request.
inputobjectrequiredThe input (base) asset this order sells.
Show attributes
The input (base) asset this order sells.
pinnedobjectrequiredThe exact asset the order sells: token id and decimals.
Show attributes
The exact asset the order sells: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
outputobjectrequiredThe output (quote) asset this order buys.
Show attributes
The output (quote) asset this order buys.
pinnedobjectrequiredThe exact asset the order buys: token id and decimals.
Show attributes
The exact asset the order buys: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
quantitystringrequiredThe exact input amount to sell, in the input asset's smallest unit. 1 NEAR with verified decimals 24 is "1000000000000000000000000". Scale decimal digits with the verified decimals and reject excess fractional digits; no floating-point arithmetic or bash.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
limitPricestringrequiredThe minimum price the fill must reach, as output-asset units per ONE input unit, written as a plain human decimal: "5" means at least 5 output tokens per 1 input token. Never scale it by decimals.
Validation rules
- Maximum length
80- Pattern
"^(0|[1-9]\\d{0,38})(\\.\\d{1,38})?$"
expiresInHoursintegerrequiredHow long the order may rest before it expires, in whole hours. Use the user's duration within this wallet's maximum, or the wallet's default from the latest request's host context when none is given. The schema permits up to 720 hours (30 days); a wallet may have a lower maximum. Never shorten a requested duration to fit.
Validation rules
- Minimum
1- Maximum
720
validUntilstring · date-timerequiredThe latest instant the order may be created and funded under this consent.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 3 · type: perps_transfer
One approved perps transfer in exactly the named direction.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_transfer"
directionstringrequiredFund the own perps account from the agent wallet, or withdraw back to the same agent wallet.
Validation rules
- Allowed values
["fund","withdraw"]
transferobjectrequiredThe exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact amount in six-decimal atomic units in either direction: 5 USDC is "5000000". A withdrawal returns USDC. A funding spends it from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it; Hyperliquid receives USDC. Never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalA funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
Show attributes
A funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 4 · type: perps_order
One approved Hyperliquid order, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_order"
orderobjectrequiredThe exact approved order.
Show attributes
The exact approved order.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
sidestringrequiredThe position this order opens, adds to, reduces or protects. A reduce-only entry on a long position sells.
Validation rules
- Allowed values
["long","short"]
sizestringrequiredExact size in the coin, at most the market's szDecimals places.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
leverageanyOfrequiredLeverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
Show attributes
Leverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
100
Variant 2 · null
marginModestringoptionalHow the position is margined, which the user chose with the leverage: cross shares the account's margin with every cross position, isolated puts only this position's own margin at risk (perps_margin_update adds or removes it later). Present exactly when leverage is; an isolated-only market (perps_markets onlyIsolated) takes isolated. Never assume it: ask the user. Absent on orders approved before margin modes existed, which were cross.
Validation rules
- Allowed values
["cross","isolated"]
entryanyOfrequiredThe order itself; null for take-profit and stop-loss on the existing position only.
Show attributes
The order itself; null for take-profit and stop-loss on the existing position only.
anyOf · 2 variants
Variant 1 · object
pricestringrequiredThe limit price; for an immediate (Ioc) order, the worst price it may fill at.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
timeInForcestringrequiredIoc fills now within price and cancels the rest (a market order), Gtc rests until filled or cancelled, Alo rests only as a maker order.
Validation rules
- Allowed values
["Gtc","Ioc","Alo"]
reduceOnlybooleanrequiredTrue to only reduce or close the existing position, never open or add.
Variant 2 · null
takeProfitanyOfrequiredA reduce-only take-profit, or null.
Show attributes
A reduce-only take-profit, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
stopLossanyOfrequiredA reduce-only stop-loss, or null.
Show attributes
A reduce-only stop-loss, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
trailingStopanyOfoptionalA reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
Show attributes
A reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size that follows the mark price as it moves in the position's favour and fires once it reverses by the retracement.
retracementanyOfrequiredHow far the mark price may reverse from its best before the stop fires.
Show attributes
How far the mark price may reverse from its best before the stop fires.
anyOf · 2 variants
Variant 1 · object
Trail by a percentage of the best mark price.
percentstringrequiredHow far the mark price may reverse from its best since activation, in percent: 2 is 2%.
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · object
Trail by a fixed price distance.
pricestringrequiredHow far the mark price may reverse from its best since activation, in price units.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
activationPriceanyOfrequiredThe mark price that starts the trailing; null to trail from placement.
Show attributes
The mark price that starts the trailing; null to trail from placement.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
Variant 2 · null
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 5 · type: perps_cancel
One approved cancellation of one resting Hyperliquid order.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_cancel"
cancelobjectrequiredThe exact order approved for cancelling.
Show attributes
The exact order approved for cancelling.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
oidintegerrequiredThe resting order's id exactly as perps_orders lists it.
Validation rules
- Greater than
0- Maximum
9007199254740991
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 6 · type: perps_automation
A standing approval for one perps automation: open the agent's own position while it holds nothing on the coin, reduce or close it, or add margin to its own account, each time its rule fires, up to its limits.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_automation"
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
positionstringrequiredThe position the action is for. open acts only while the agent holds nothing on this coin; reduce and add_margin act only while it holds this side, and nothing happens otherwise.
Validation rules
- Allowed values
["long","short"]
actiononeOfrequiredWhat a perps automation does each time its rule fires: open the named position while the agent holds nothing on its coin, reduce the named position, or add margin to the agent's own perps account.
Show attributes
What a perps automation does each time its rule fires: open the named position while the agent holds nothing on its coin, reduce the named position, or add margin to the agent's own perps account.
oneOf · 3 variants
Variant 1 · kind: reduce
Close part or all of the position with a reduce-only market order.
kindstringrequiredReduce or close the position.
Validation rules
- Exact value
"reduce"
fractionBpsintegerrequiredHow much of the position to close, in basis points: 10000 closes it all.
Validation rules
- Minimum
1- Maximum
10000
maxSlippageBpsintegerrequiredThe worst fill allowed, in basis points from the mark when it fires.
Validation rules
- Minimum
1- Maximum
500
Variant 2 · kind: add_margin
Fund the agent's own perps account from its agent wallet.
kindstringrequiredAdd margin to the perps account.
Validation rules
- Exact value
"add_margin"
amountRawstringrequiredExact USDC moved from the agent wallet into the perps account, six decimals: 5 USDC is "5000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredMaximum value lost to fees moving it, in basis points.
Validation rules
- Minimum
0- Maximum
300
Variant 3 · kind: open
Open the position with a market order, only while the agent holds nothing on this coin, optionally protected by a native take-profit and stop-loss.
kindstringrequiredOpen the position at market.
Validation rules
- Exact value
"open"
notionalUsdstringrequiredThe position's size in US dollars at the mark when it fires, at most two places: a $200 position is "200". The size in the coin is this over the mark, rounded down to the market's size precision.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,2})?$"
leverageintegerrequiredLeverage the user chose for this market, at most the market's maximum. Never assume it: ask the user.
Validation rules
- Minimum
1- Maximum
100
marginModestringrequiredHow the position is margined, which the user chose with the leverage: cross shares the account's margin, isolated risks only this position's own. An isolated-only market takes isolated. Never assume it: ask the user.
Validation rules
- Allowed values
["cross","isolated"]
maxSlippageBpsintegerrequiredThe worst fill allowed, in basis points from the mark when it fires; the take-profit and stop-loss fill within the same bound of their trigger.
Validation rules
- Minimum
1- Maximum
500
takeProfitPercentanyOfrequiredA native take-profit this far from the mark when it opens, in percent of price in the position's favour ("10" is 10%), or null for none.
Show attributes
A native take-profit this far from the mark when it opens, in percent of price in the position's favour ("10" is 10%), or null for none.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · null
stopLossPercentanyOfrequiredA native stop-loss this far from the mark when it opens, in percent of price against the position ("5" is 5%), or null for none.
Show attributes
A native stop-loss this far from the mark when it opens, in percent of price against the position ("5" is 5%), or null for none.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · null
maxExecutionsintegerrequiredHow many firings may act under this approval.
Validation rules
- Minimum
1- Maximum
100
validUntilstring · date-timerequiredThe deadline after which this approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 7 · type: perps_margin
One approved change to one isolated position's margin, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_margin"
marginobjectrequiredThe exact approved margin change.
Show attributes
The exact approved margin change.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
changestringrequiredadd moves USDC from the account into the position's isolated margin, lowering its liquidation risk; remove takes it back out, raising that risk. A strict isolated market never lets margin be removed while the position is open.
Validation rules
- Allowed values
["add","remove"]
amountstringrequiredExact USDC to move, at most six decimal places, such as 25 or 12.5.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,8})(\\.[0-9]{0,5}[1-9])?$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 8 · type: prediction_fund
One exact USDC or USDT debit delivered as native Base USDC to Polymarket's bridge for the agent's own account; the final pUSD amount is not bounded.
typestringrequiredOne approved Polymarket funding transfer.
Validation rules
- Exact value
"prediction_fund"
transferobjectrequiredThe exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact debit in six-decimal atomic units: 5 USDC or USDT is "5000000", spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it. The host resolves the agent’s own Polymarket Deposit Wallet and its bridge address; never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxFirstLegLossBpsintegerrequiredExplicit maximum loss, in basis points, of the first leg only: the wallet's USDC, USDT or coin delivered as native Base USDC to Polymarket's bridge, fees and any cross-chain hop included. It does not bound the bridge's conversion to pUSD on Polygon, whose fees and output are variable and estimated. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
Show attributes
Approved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 9 · type: solana_buy
An approved Solana buy, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_buy"
buyobjectrequiredThe exact approved token, payment, all-in loss bound and SOL top-up cap, and, for a buy whose funding pays with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved token, payment, all-in loss bound and SOL top-up cap, and, for a buy whose funding pays with a coin, that coin and the most of it it may spend.
tokenobjectrequiredThe exact token to buy.
Show attributes
The exact token to buy.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
payoneOfrequiredWhat the buy spends, as an exact input amount. Buying an exact number of tokens is not supported.
Show attributes
What the buy spends, as an exact input amount. Buying an exact number of tokens is not supported.
oneOf · 2 variants
Variant 1 · kind: usdc
Spend an exact amount of USDC or USDT from the agent wallet.
kindstringrequiredPay from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT), moved to Solana as SOL first.
Validation rules
- Exact value
"usdc"
amountRawstringrequiredExact USDC or USDT to spend, in six-decimal atomic units: $50 is "50000000". At least 5 ("5000000"); a smaller buy is refused.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: sol
Spend an exact amount of SOL the agent's Solana account already holds.
kindstringrequiredPay with SOL already in the agent's Solana account.
Validation rules
- Exact value
"sol"
lamportsstringrequiredExact SOL to spend, in lamports (nine decimals): 0.5 SOL is "500000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
maxSolTopUpUsdcRawstringrequiredThe most extra USDC or USDT the funding may add to keep SOL in the Solana account for network fees, in six-decimal atomic units: "0" for none, at most "1000000" (1 USDC). Must be "0" when paying with SOL.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
payWithobjectoptionalA buy paid in dollars and approved in chat as one call: the coin its funding pays with instead of a USDC or USDT holding, and the most of it it may spend, the SOL top-up included. Never SOL. A buy from a token's page refuses it.
Show attributes
A buy paid in dollars and approved in chat as one call: the coin its funding pays with instead of a USDC or USDT holding, and the most of it it may spend, the SOL top-up included. Never SOL. A buy from a token's page refuses it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 10 · type: solana_sell
An approved Solana sell, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_sell"
sellobjectrequiredThe exact approved token, amount, proceeds and all-in loss bound.
Show attributes
The exact approved token, amount, proceeds and all-in loss bound.
tokenobjectrequiredThe exact token to sell.
Show attributes
The exact token to sell.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
amountoneOfrequiredHow much of the token to sell.
Show attributes
How much of the token to sell.
oneOf · 2 variants
Variant 1 · kind: exact
Sell an exact amount of the token.
kindstringrequiredSell an exact amount of the token.
Validation rules
- Exact value
"exact"
amountRawstringrequiredExact amount of the token to sell, in its smallest unit (scaled by the token's decimals).
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: fraction
Sell a share of the account's balance of the token.
kindstringrequiredSell a share of what the Solana account holds of the token.
Validation rules
- Exact value
"fraction"
bpsintegerrequiredThe share to sell, in basis points of the account's balance of the token: all of it is 10000, half is 5000.
Validation rules
- Minimum
1- Maximum
10000
receivestringrequiredusdc returns the proceeds to the agent wallet as USDC on NEAR, which is what selling means; sol keeps them as SOL in the agent's Solana account.
Validation rules
- Allowed values
["usdc","sol"]
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 11 · type: solana_fund
An approved move of USDC or USDT, or a coin, into the agent's own Solana account.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_fund"
fundobjectrequiredThe exact approved amount and loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact USDC or USDT to move from the agent wallet into the agent's Solana account as SOL, in six-decimal atomic units: 5 USDC is "5000000". Spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees: at most 300. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call: the coin this funding pays with instead of a USDC or USDT holding, and the most of it it may spend. Never SOL.
Show attributes
Approved in chat as one call: the coin this funding pays with instead of a USDC or USDT holding, and the most of it it may spend. Never SOL.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 12 · type: solana_withdraw
An approved move of SOL from the agent's own Solana account back to its agent wallet.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_withdraw"
withdrawobjectrequiredThe exact approved amount, what returns and the loss bound.
Show attributes
The exact approved amount, what returns and the loss bound.
amountoneOfrequiredHow much SOL to withdraw from the agent's Solana account.
Show attributes
How much SOL to withdraw from the agent's Solana account.
oneOf · 2 variants
Variant 1 · kind: exact
Withdraw an exact amount of SOL.
kindstringrequiredWithdraw an exact amount of SOL.
Validation rules
- Exact value
"exact"
lamportsstringrequiredExact SOL to withdraw, in lamports (nine decimals): 0.5 SOL is "500000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: all_spendable
Withdraw all the spendable SOL.
kindstringrequiredWithdraw all the SOL above the reserve the account keeps for rent and network fees.
Validation rules
- Exact value
"all_spendable"
receivestringrequiredusdc returns it to the agent wallet as USDC on NEAR; sol returns it to the agent wallet as SOL.
Validation rules
- Allowed values
["usdc","sol"]
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees: at most 300. Required; no default.
Validation rules
- Minimum
0- Maximum
300
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 13 · type: prediction_order
typestringrequiredValidation rules
- Exact value
"prediction_order"
orderobjectrequiredShow attributes
marketIdstringrequiredValidation rules
- Pattern
"^[1-9][0-9]{0,19}$"
assetIdstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,77})$"
marketQuestionstringrequiredValidation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredValidation rules
- Minimum length
1- Maximum length
256
sidestringrequiredValidation rules
- Allowed values
["BUY","SELL"]
limitPriceUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
quantityoneOfrequiredShow attributes
oneOf · 2 variants
Variant 1 · kind: shares
kindstringrequiredValidation rules
- Exact value
"shares"
sizeSharesDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
Variant 2 · kind: budget
kindstringrequiredValidation rules
- Exact value
"budget"
amountUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
orderTypestringrequiredValidation rules
- Allowed values
["GTC","GTD","FOK","FAK"]
expiresAtintegeroptionalValidation rules
- Minimum
0- Maximum
253402300799
maxFeeUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
maxSpendUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 14 · type: prediction_withdraw
typestringrequiredValidation rules
- Exact value
"prediction_withdraw"
withdrawalobjectrequiredWithdraw pUSD through Polymarket’s conversion service as native USDC on Polygon to a unique verified 1Click address crediting only the agent’s own confidential Intents wallet. Funding remains a separate USDC route.
Show attributes
Withdraw pUSD through Polymarket’s conversion service as native USDC on Polygon to a unique verified 1Click address crediting only the agent’s own confidential Intents wallet. Funding remains a separate USDC route.
amountRawstringrequiredExact pUSD debit in six-decimal atomic units: 5 pUSD is "5000000". Only the agent’s own Deposit Wallet is spent.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 15 · type: composite
One owner signature over several exact one-shot grants and the order they run in.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"composite"
piecesarrayrequiredShow attributes
Validation rules
- Minimum items
1- Maximum items
6
Array items · object
toolstringrequiredThe tool whose one-shot call this piece is.
Validation rules
- Allowed values
["intents_execute","perps_fund","perps_order_place","prediction_fund","prediction_order_place","perps_withdraw","prediction_withdraw"]
contractanyOfrequiredShow attributes
anyOf · 7 variants
Variant 1 · type: near_intents_transfer
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"near_intents_transfer"
actionsarrayrequiredThe actions this contract authorizes, executed in order.
Show attributes
The actions this contract authorizes, executed in order.
Validation rules
- Minimum items
1- Maximum items
16
Array items · oneOf
oneOf · 4 variants
Variant 1 · kind: swap
kindstringrequiredExchange one asset for another; custody never leaves the agent wallet.
Validation rules
- Exact value
"swap"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
exitoneOfoptionalOptional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
Show attributes
Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
oneOf · 3 variants
Variant 1 · kind: take_profit
A take-profit exit: sell once the price is up this much on average cost.
kindstringrequiredSell when the asset is this far ABOVE the automation's average cost.
Validation rules
- Exact value
"take_profit"
gainBpsstringrequiredHow far above the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 2 · kind: stop_loss
A stop-loss exit: sell once the price is down this much on average cost.
kindstringrequiredSell when the asset is this far BELOW the automation's average cost.
Validation rules
- Exact value
"stop_loss"
lossBpsstringrequiredHow far below the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 3 · kind: harvest_every
A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every days days it sells only the gain, if there is any, and the automation keeps running.
kindstringrequiredTake profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled.
Validation rules
- Exact value
"harvest_every"
daysstringrequiredHow many days apart harvests are, 7 to 365, as a decimal string: "7" weekly, "30" monthly.
Validation rules
- Pattern
"^[1-9]\\d{0,2}$"
Variant 2 · kind: withdraw_to_owner
kindstringrequiredReturn an asset to the account that owns the agent wallet.
Validation rules
- Exact value
"withdraw_to_owner"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
Variant 3 · kind: withdraw_transfer
kindstringrequiredPay the exact approved destination through the provider’s chain or Intents transfer route.
Validation rules
- Exact value
"withdraw_transfer"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe exact approved payout rail, network and address.
Show attributes
The exact approved payout rail, network and address.
railstringrequiredA native blockchain transfer or a signed transfer within an Intents ledger.
Validation rules
- Allowed values
["chain","intents"]
networkstringrequiredExact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain.
Validation rules
- Pattern
"^[a-z][a-z0-9-]{0,63}$"
addressstringrequiredExact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,256}$"
memonullrequiredStandalone routing memos are unsupported; routing must be encoded in the approved address.
minimumReceivedRawanyOfrequiredMinimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
Show attributes
Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
maxFeeRawanyOfrequiredOptional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
Show attributes
Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
Variant 4 · kind: send
kindstringrequiredNot executable, and refused in new contracts: pay an address with withdraw_transfer.
Validation rules
- Exact value
"send"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe pinned destination this action pays.
Show attributes
The pinned destination this action pays.
chainstringrequiredWhich chain the destination address is on.
Validation rules
- Minimum length
1- Maximum length
32
addressstringrequiredThe destination address on that chain.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,128}$"
validUntilstring · date-timerequiredWhen this contract's authority expires.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
maxExecutionsintegerrequiredHow many times this contract may be executed before it is exhausted.
Validation rules
- Minimum
1- Maximum
10000
maxTotalInputarrayoptionalOptional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Show attributes
Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
boundsobjectrequiredThe value-loss and signature-lifetime limits every execution must respect.
Show attributes
The value-loss and signature-lifetime limits every execution must respect.
maxValueLossBpsstringrequiredThe most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
maxSignatureLifetimeSecondsintegerrequiredExplicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity.
Validation rules
- Minimum
1- Maximum
259500
executionanyOfoptionalOptional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
Show attributes
Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
anyOf · 2 variants
Variant 1 · object
modestringrequiredOrdered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved.
Validation rules
- Allowed values
["ordered","parallel_independent"]
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · object
modestringrequiredValidation rules
- Exact value
"dependency_graph"
dependenciesarrayrequiredOne row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Show attributes
One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Validation rules
- Minimum items
1- Maximum items
16
Array items · array
Validation rules
- Maximum items
16
Array items · integer
Validation rules
- Minimum
0- Maximum
15
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · type: perps_transfer
One approved perps transfer in exactly the named direction.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_transfer"
directionstringrequiredFund the own perps account from the agent wallet, or withdraw back to the same agent wallet.
Validation rules
- Allowed values
["fund","withdraw"]
transferobjectrequiredThe exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact amount in six-decimal atomic units in either direction: 5 USDC is "5000000". A withdrawal returns USDC. A funding spends it from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it; Hyperliquid receives USDC. Never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalA funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
Show attributes
A funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 3 · type: perps_order
One approved Hyperliquid order, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_order"
orderobjectrequiredThe exact approved order.
Show attributes
The exact approved order.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
sidestringrequiredThe position this order opens, adds to, reduces or protects. A reduce-only entry on a long position sells.
Validation rules
- Allowed values
["long","short"]
sizestringrequiredExact size in the coin, at most the market's szDecimals places.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
leverageanyOfrequiredLeverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
Show attributes
Leverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
100
Variant 2 · null
marginModestringoptionalHow the position is margined, which the user chose with the leverage: cross shares the account's margin with every cross position, isolated puts only this position's own margin at risk (perps_margin_update adds or removes it later). Present exactly when leverage is; an isolated-only market (perps_markets onlyIsolated) takes isolated. Never assume it: ask the user. Absent on orders approved before margin modes existed, which were cross.
Validation rules
- Allowed values
["cross","isolated"]
entryanyOfrequiredThe order itself; null for take-profit and stop-loss on the existing position only.
Show attributes
The order itself; null for take-profit and stop-loss on the existing position only.
anyOf · 2 variants
Variant 1 · object
pricestringrequiredThe limit price; for an immediate (Ioc) order, the worst price it may fill at.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
timeInForcestringrequiredIoc fills now within price and cancels the rest (a market order), Gtc rests until filled or cancelled, Alo rests only as a maker order.
Validation rules
- Allowed values
["Gtc","Ioc","Alo"]
reduceOnlybooleanrequiredTrue to only reduce or close the existing position, never open or add.
Variant 2 · null
takeProfitanyOfrequiredA reduce-only take-profit, or null.
Show attributes
A reduce-only take-profit, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
stopLossanyOfrequiredA reduce-only stop-loss, or null.
Show attributes
A reduce-only stop-loss, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
trailingStopanyOfoptionalA reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
Show attributes
A reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size that follows the mark price as it moves in the position's favour and fires once it reverses by the retracement.
retracementanyOfrequiredHow far the mark price may reverse from its best before the stop fires.
Show attributes
How far the mark price may reverse from its best before the stop fires.
anyOf · 2 variants
Variant 1 · object
Trail by a percentage of the best mark price.
percentstringrequiredHow far the mark price may reverse from its best since activation, in percent: 2 is 2%.
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · object
Trail by a fixed price distance.
pricestringrequiredHow far the mark price may reverse from its best since activation, in price units.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
activationPriceanyOfrequiredThe mark price that starts the trailing; null to trail from placement.
Show attributes
The mark price that starts the trailing; null to trail from placement.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
Variant 2 · null
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 4 · type: prediction_fund
One exact USDC or USDT debit delivered as native Base USDC to Polymarket's bridge for the agent's own account; the final pUSD amount is not bounded.
typestringrequiredOne approved Polymarket funding transfer.
Validation rules
- Exact value
"prediction_fund"
transferobjectrequiredThe exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact debit in six-decimal atomic units: 5 USDC or USDT is "5000000", spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it. The host resolves the agent’s own Polymarket Deposit Wallet and its bridge address; never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxFirstLegLossBpsintegerrequiredExplicit maximum loss, in basis points, of the first leg only: the wallet's USDC, USDT or coin delivered as native Base USDC to Polymarket's bridge, fees and any cross-chain hop included. It does not bound the bridge's conversion to pUSD on Polygon, whose fees and output are variable and estimated. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
Show attributes
Approved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 5 · type: prediction_order
typestringrequiredValidation rules
- Exact value
"prediction_order"
orderobjectrequiredShow attributes
marketIdstringrequiredValidation rules
- Pattern
"^[1-9][0-9]{0,19}$"
assetIdstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,77})$"
marketQuestionstringrequiredValidation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredValidation rules
- Minimum length
1- Maximum length
256
sidestringrequiredValidation rules
- Allowed values
["BUY","SELL"]
limitPriceUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
quantityoneOfrequiredShow attributes
oneOf · 2 variants
Variant 1 · kind: shares
kindstringrequiredValidation rules
- Exact value
"shares"
sizeSharesDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
Variant 2 · kind: budget
kindstringrequiredValidation rules
- Exact value
"budget"
amountUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
orderTypestringrequiredValidation rules
- Allowed values
["GTC","GTD","FOK","FAK"]
expiresAtintegeroptionalValidation rules
- Minimum
0- Maximum
253402300799
maxFeeUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
maxSpendUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 6 · type: perps_freed_withdrawal
One withdrawal home of what a cash-out's exit freed on Hyperliquid, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_freed_withdrawal"
withdrawalobjectrequiredThe signed maximum and all-in loss bound of the withdrawal home.
Show attributes
The signed maximum and all-in loss bound of the withdrawal home.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic USDC: what the exit before it frees, sized by the host before the approval opens. Never more than the exit freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 7 · type: prediction_freed_withdrawal
One withdrawal home of what a cash-out's sale freed on Polymarket, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredValidation rules
- Exact value
"prediction_freed_withdrawal"
withdrawalobjectrequiredWithdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
Show attributes
Withdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic pUSD: what the sale before it frees, sized by the host before the approval opens. Never more than the sale freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
startBystring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
dependenciesarrayrequiredShow attributes
Array items · array
Validation rules
- Maximum items
6
Array items · integer
Validation rules
- Minimum
0- Maximum
9007199254740991
walletDebitanyOfrequiredThe sum of every piece's debit from the agent wallet, per token, in raw units. Empty when the pieces are venue orders paid from money already on their venues, as when finishing a basket, or a cash-out, which closes a position and brings home what that freed.
Show attributes
The sum of every piece's debit from the agent wallet, per token, in raw units. Empty when the pieces are venue orders paid from money already on their venues, as when finishing a basket, or a cash-out, which closes a position and brings home what that freed.
anyOf · 2 variants
Variant 1 · array
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · array
Validation rules
- prefixItems
[]- Maximum items
0
Array items · never
No value is allowed.
validUntilstring · date-timerequiredWhen every piece that has not started loses its authority.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 16 · type: prediction_automation
A standing approval for one Polymarket automation: buy one outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price, each time its rule fires, up to its limits.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"prediction_automation"
marketobjectrequiredThe one Polymarket outcome this automation trades.
Show attributes
The one Polymarket outcome this automation trades.
marketIdstringrequiredThe market's id exactly as prediction_market returns it.
Validation rules
- Pattern
"^[1-9][0-9]{0,19}$"
conditionIdstringrequiredThe market's conditionId exactly as prediction_market returns it.
Validation rules
- Pattern
"^0x[0-9a-fA-F]{64}$"
assetIdstringrequiredThe outcome's CLOB token id, exactly the assetId prediction_market lists for that outcome. Yes and No are different tokens.
Validation rules
- Pattern
"^[1-9][0-9]{0,77}$"
marketQuestionstringrequiredThe market's question exactly as prediction_market returns it.
Validation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredThe outcome's name exactly as prediction_market returns it.
Validation rules
- Minimum length
1- Maximum length
256
actiononeOfrequiredWhat a Polymarket automation does each time its rule fires: buy the outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price.
Show attributes
What a Polymarket automation does each time its rule fires: buy the outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price.
oneOf · 2 variants
Variant 1 · kind: buy
Buy the outcome with a USD budget at no more than a maximum price.
kindstringrequiredBuy shares of the outcome.
Validation rules
- Exact value
"buy"
amountUsdDecimalstringrequiredThe USD each firing spends before fees, to the cent: "50" is $50. Each buy is an immediate order that fills what it can at once and cancels the rest.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,2})?$"
maxPriceUsdDecimalstringrequiredThe most a share may cost, as the market's chance: "0.32" never pays more than 32¢ a share. Use a price on the market's tick.
Validation rules
- Pattern
"^0\\.[0-9]{1,4}$"
maxFeeUsdDecimalstringrequiredThe most each firing may pay Polymarket in fees, in USD: "1" is $1.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,6})?$"
Variant 2 · kind: sell
Sell a share of the agent's holding of the outcome at no less than a minimum price.
kindstringrequiredSell shares of the outcome.
Validation rules
- Exact value
"sell"
fractionBpsintegerrequiredHow much of the agent's holding of the outcome each firing sells, in basis points: 10000 sells it all.
Validation rules
- Minimum
1- Maximum
10000
minPriceUsdDecimalstringrequiredThe least a share may sell for, as the market's chance: "0.7" never sells below 70¢ a share. Use a price on the market's tick.
Validation rules
- Pattern
"^0\\.[0-9]{1,4}$"
maxFeeUsdDecimalstringrequiredThe most each firing may pay Polymarket in fees, in USD: "1" is $1.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,6})?$"
maxExecutionsintegerrequiredHow many firings may trade under this approval; a buy spends at most maxExecutions × amountUsdDecimal in all.
Validation rules
- Minimum
1- Maximum
100
validUntilstring · date-timerequiredThe deadline after which this approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 17 · type: solana_sell_many
An approved multi-coin Solana sale, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_sell_many"
sellManyobjectrequiredThe exact approved coins, amounts and loss bounds, in order, and where the proceeds go.
Show attributes
The exact approved coins, amounts and loss bounds, in order, and where the proceeds go.
sellsarrayrequiredThe coins to sell, in the order they are sold: 2 to 6, each a different mint, none of them SOL itself.
Show attributes
The coins to sell, in the order they are sold: 2 to 6, each a different mint, none of them SOL itself.
Validation rules
- Minimum items
2- Maximum items
6
Array items · object
One coin of a multi-coin sale, sold through the agent's own Solana account.
tokenobjectrequiredThe exact token to sell.
Show attributes
The exact token to sell.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
amountoneOfrequiredHow much of the token to sell.
Show attributes
How much of the token to sell.
oneOf · 2 variants
Variant 1 · kind: exact
Sell an exact amount of the token.
kindstringrequiredSell an exact amount of the token.
Validation rules
- Exact value
"exact"
amountRawstringrequiredExact amount of the token to sell, in its smallest unit (scaled by the token's decimals).
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: fraction
Sell a share of the account's balance of the token.
kindstringrequiredSell a share of what the Solana account holds of the token.
Validation rules
- Exact value
"fraction"
bpsintegerrequiredThe share to sell, in basis points of the account's balance of the token: all of it is 10000, half is 5000.
Validation rules
- Minimum
1- Maximum
10000
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
receivestringrequiredusdc returns the summed proceeds of every sale that went through to the agent wallet as USDC on NEAR, in one transfer once the last sale ran; sol keeps them as SOL in the agent's Solana account.
Validation rules
- Allowed values
["usdc","sol"]
maxExecutionsnumberrequiredA multi-coin sale is approved once and runs once: always 1.
Validation rules
- Exact value
1
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 18 · type: grid
Owner-signed authority for one grid: the resting cell orders its terms derive, until it ends.
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"grid"
gridobjectrequiredA grid's exact terms: pair, levels, quantity and starting sides.
Show attributes
A grid's exact terms: pair, levels, quantity and starting sides.
baseobjectrequiredThe asset the grid buys low and sells high.
Show attributes
The asset the grid buys low and sells high.
pinnedobjectrequiredThe exact base asset: token id and decimals.
Show attributes
The exact base asset: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
quoteobjectrequiredThe asset prices are in and buys are paid with.
Show attributes
The asset prices are in and buys are paid with.
pinnedobjectrequiredThe exact quote asset: token id and decimals.
Show attributes
The exact quote asset: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
levelsarrayrequiredThe 2 to 20 grid prices, strictly ascending: quote units per ONE base unit, plain human decimals.
Show attributes
The 2 to 20 grid prices, strictly ascending: quote units per ONE base unit, plain human decimals.
Validation rules
- Minimum items
2- Maximum items
20
Array items · string
Validation rules
- Maximum length
80- Pattern
"^(0|[1-9]\\d{0,38})(\\.\\d{1,38})?$"
quantityPerCellstringrequiredThe exact base amount every cell buys and sells, in the base asset's smallest unit. Fixed: profits never compound.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
cellsarrayrequiredOne entry per cell, lowest first (levels.length - 1 of them): cells wholly below the start price and the one straddling it buy, cells wholly above it stay idle.
Show attributes
One entry per cell, lowest first (levels.length - 1 of them): cells wholly below the start price and the one straddling it buy, cells wholly above it stay idle.
Validation rules
- Minimum items
1- Maximum items
19
Array items · object
startstringrequiredThe side the cell's first order is on: buy at its low level, or idle (the cell never places).
Validation rules
- Allowed values
["buy","idle"]
validUntilstring · date-timerequiredWhen the grid ends: no order is placed, and none rests, after it. At most 720 hours after the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 19 · type: perps_freed_withdrawal
One withdrawal home of what a cash-out's exit freed on Hyperliquid, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_freed_withdrawal"
withdrawalobjectrequiredThe signed maximum and all-in loss bound of the withdrawal home.
Show attributes
The signed maximum and all-in loss bound of the withdrawal home.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic USDC: what the exit before it frees, sized by the host before the approval opens. Never more than the exit freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 20 · type: prediction_freed_withdrawal
One withdrawal home of what a cash-out's sale freed on Polymarket, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredValidation rules
- Exact value
"prediction_freed_withdrawal"
withdrawalobjectrequiredWithdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
Show attributes
Withdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic pUSD: what the sale before it frees, sized by the host before the approval opens. Never more than the sale freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
policyobjectrequiredThe custody worker's exact grant for these terms; clients sign it without mutation.
Show attributes
The custody worker's exact grant for these terms; clients sign it without mutation.
domainstringrequiredDomain separation for this signed policy message.
Validation rules
- Exact value
"fin.policy.contract.v1"
bindingobjectrequiredThe deployment and caller to which this consent applies.
Show attributes
The deployment and caller to which this consent applies.
networkstringrequiredThe NEAR network this policy deployment serves.
Validation rules
- Allowed values
["testnet","mainnet"]
project_uuidstringrequiredStable policy deployment identifier.
Validation rules
- Minimum length
1
caller_idstringrequiredFin integration identity bound into consent.
Validation rules
- Minimum length
1
owner_idstringrequiredSHA-256 of the canonical owner descriptor.
Validation rules
- Pattern
"^[0-9a-f]{64}$"
wallet_idstringrequiredThe policy worker's wallet identity receiving this grant; the worker spends only from that wallet's own account.
Validation rules
- Minimum length
1
approval_idstring · uuidrequiredThe exact persisted approval to which this owner-signed grant belongs.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
noncestringrequiredUnique consent nonce; replay cannot create additional allowance.
Validation rules
- Pattern
"^[0-9a-f]{64}$"
issued_at_msintegerrequiredConsent issue time in Unix milliseconds.
Validation rules
- Minimum
0- Maximum
9007199254740991
sourceoneOfrequiredWhat this consent authorizes: one present-user request, the firings of one exact automation, or one grid's derived orders.
Show attributes
What this consent authorizes: one present-user request, the firings of one exact automation, or one grid's derived orders.
oneOf · 3 variants
Variant 1 · kind: one_shot
kindstringrequiredOne approved request, executed by the run that asked for it.
Validation rules
- Exact value
"one_shot"
Variant 2 · kind: grid
kindstringrequiredA standing grid grant: the cell orders its terms derive, placed by the grid engine without a run.
Validation rules
- Exact value
"grid"
Variant 3 · kind: automation
kindstringrequiredA standing grant that the named automation's recorded firings may exercise.
Validation rules
- Exact value
"automation"
definitionobjectrequiredThe automation's exact saved definition; any edit invalidates this consent.
Show attributes
The automation's exact saved definition; any edit invalidates this consent.
namestringrequiredThe automation's name, as approved.
Validation rules
- Minimum length
1- Maximum length
120
promptstringrequiredThe automation's saved prompt, as approved.
Validation rules
- Minimum length
1- Maximum length
8192
ruleobjectrequiredOne automation's rule: when it wakes, what condition it evaluates, and how it fires.
Show attributes
One automation's rule: when it wakes, what condition it evaluates, and how it fires.
schemaVersionnumberrequiredThe rule schema's version; always 1.
Validation rules
- Exact value
1
deliveryoneOfrequiredWhat happens when a new occurrence is ready before the previous one has finished.
Show attributes
What happens when a new occurrence is ready before the previous one has finished.
Validation rules
- Default
{"overlap":"queue","maxPendingOccurrences":100}
oneOf · 3 variants
Variant 1 · object
overlapstringrequiredQueue a new occurrence and run it once the active one finishes.
Validation rules
- Exact value
"queue"
maxPendingOccurrencesintegerrequiredHow many occurrences may wait in the queue, not counting the one currently active, including one whose run is itself waiting on an approval.
Validation rules
- Minimum
1- Maximum
100
Variant 2 · object
overlapstringrequiredClose the occurrence already pending as coalesced and record the new match as a fresh occurrence, rather than queuing a second.
Validation rules
- Exact value
"coalesce"
Variant 3 · object
overlapstringrequiredDrop a new match while an occurrence is already active.
Validation rules
- Exact value
"skip"
maxDeliveryLatenessSecondsintegerrequiredHow long a new occurrence may wait to be delivered before its deadline passes and it is refused, in seconds.
Validation rules
- Default
86400- Minimum
1- Maximum
86400
maxEvaluationGapSecondsintegerrequiredThe longest gap allowed between evaluations before firing.mode: rising_edge treats its history as broken and waits for a fresh baseline, in seconds.
Validation rules
- Default
600- Minimum
1- Maximum
2678400
wakesarrayrequiredOccasions to evaluate the rule's condition: alternatives, not an AND of conditions. At most one clock and one event stream.
Show attributes
Occasions to evaluate the rule's condition: alternatives, not an AND of conditions. At most one clock and one event stream.
Validation rules
- Minimum items
1- Maximum items
7
Array items · oneOf
oneOf · 5 variants
Variant 1 · kind: at
kindstringrequiredA one-time wake at an exact moment; exhausted after that check, even if its condition is false.
Validation rules
- Exact value
"at"
runAtstring · date-timerequiredThe exact moment this wake fires, as an ISO 8601 timestamp with an offset.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
misfireoneOfrequiredWhat happens when the engine could not evaluate this wake on time.
Show attributes
What happens when the engine could not evaluate this wake on time.
Validation rules
- Default
{"mode":"latest","maxLatenessSeconds":null}
oneOf · 3 variants
Variant 1 · object
modestringrequiredDrop a wake the engine could not evaluate in time; wait for the next one.
Validation rules
- Exact value
"skip"
graceSecondsintegerrequiredHow late this wake may still run before it counts as missed, in seconds.
Validation rules
- Default
5- Minimum
1- Maximum
60
Variant 2 · object
modestringrequiredRun once for the most recently missed wake, dropping any earlier ones.
Validation rules
- Exact value
"latest"
maxLatenessSecondsanyOfrequiredHow late a missed wake may still run, in seconds; null for no limit.
Show attributes
How late a missed wake may still run, in seconds; null for no limit.
Validation rules
- Default
null
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
2678400
Variant 2 · null
Variant 3 · object
modestringrequiredRun once for every missed wake, oldest first.
Validation rules
- Exact value
"all"
maxLatenessSecondsanyOfrequiredHow late a missed wake may still run, in seconds; null for no limit.
Show attributes
How late a missed wake may still run, in seconds; null for no limit.
Validation rules
- Default
null
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
2678400
Variant 2 · null
evaluationTimestringrequiredWhich moment this wake is evaluated as of: scheduled_time the time it was due, detection_time when the engine actually ran it.
Validation rules
- Default
"detection_time"- Allowed values
["scheduled_time","detection_time"]
Variant 2 · kind: interval
kindstringrequiredA wake that repeats on a fixed elapsed interval.
Validation rules
- Exact value
"interval"
intervalMinutesintegerrequiredHow often this wake repeats, in minutes.
Validation rules
- Minimum
1- Maximum
44640
misfireoneOfrequiredWhat happens when the engine could not evaluate this wake on time.
Show attributes
What happens when the engine could not evaluate this wake on time.
Validation rules
- Default
{"mode":"latest","maxLatenessSeconds":null}
oneOf · 3 variants
Variant 1 · object
modestringrequiredDrop a wake the engine could not evaluate in time; wait for the next one.
Validation rules
- Exact value
"skip"
graceSecondsintegerrequiredHow late this wake may still run before it counts as missed, in seconds.
Validation rules
- Default
5- Minimum
1- Maximum
60
Variant 2 · object
modestringrequiredRun once for the most recently missed wake, dropping any earlier ones.
Validation rules
- Exact value
"latest"
maxLatenessSecondsanyOfrequiredHow late a missed wake may still run, in seconds; null for no limit.
Show attributes
How late a missed wake may still run, in seconds; null for no limit.
Validation rules
- Default
null
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
2678400
Variant 2 · null
Variant 3 · object
modestringrequiredRun once for every missed wake, oldest first.
Validation rules
- Exact value
"all"
maxLatenessSecondsanyOfrequiredHow late a missed wake may still run, in seconds; null for no limit.
Show attributes
How late a missed wake may still run, in seconds; null for no limit.
Validation rules
- Default
null
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
2678400
Variant 2 · null
evaluationTimestringrequiredWhich moment this wake is evaluated as of: scheduled_time the time it was due, detection_time when the engine actually ran it.
Validation rules
- Default
"detection_time"- Allowed values
["scheduled_time","detection_time"]
Variant 3 · kind: calendar
kindstringrequiredA wake on a recurring calendar schedule: local times, weekdays, months and days of the month.
Validation rules
- Exact value
"calendar"
timeZonestringrequiredThe IANA time zone a calendar wake's local times are interpreted in.
Validation rules
- Minimum length
1- Maximum length
80
localTimesarrayrequiredThe times of day this wake fires, each in 24-hour HH:MM form, in timeZone.
Show attributes
The times of day this wake fires, each in 24-hour HH:MM form, in timeZone.
Validation rules
- Minimum items
1- Maximum items
24
Array items · string
Validation rules
- Pattern
"^([01]\\d|2[0-3]):[0-5]\\d$"
weekdaysarrayrequiredWhich ISO weekdays this wake fires on, 1 (Monday) through 7 (Sunday). Defaults to every day.
Show attributes
Which ISO weekdays this wake fires on, 1 (Monday) through 7 (Sunday). Defaults to every day.
Validation rules
- Default
[1,2,3,4,5,6,7]- Minimum items
1- Maximum items
7
Array items · integer
Validation rules
- Minimum
1- Maximum
7
monthsarrayrequiredWhich months this wake fires in, 1 (January) through 12 (December). Defaults to every month.
Show attributes
Which months this wake fires in, 1 (January) through 12 (December). Defaults to every month.
Validation rules
- Default
[1,2,3,4,5,6,7,8,9,10,11,12]- Minimum items
1- Maximum items
12
Array items · integer
Validation rules
- Minimum
1- Maximum
12
monthDaysarrayrequiredWhich days of the month this wake fires on, 1 through 31. Defaults to every day.
Show attributes
Which days of the month this wake fires on, 1 through 31. Defaults to every day.
Validation rules
- Default
[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]- Minimum items
1- Maximum items
31
Array items · integer
Validation rules
- Minimum
1- Maximum
31
misfireoneOfrequiredWhat happens when the engine could not evaluate this wake on time.
Show attributes
What happens when the engine could not evaluate this wake on time.
Validation rules
- Default
{"mode":"latest","maxLatenessSeconds":null}
oneOf · 3 variants
Variant 1 · object
modestringrequiredDrop a wake the engine could not evaluate in time; wait for the next one.
Validation rules
- Exact value
"skip"
graceSecondsintegerrequiredHow late this wake may still run before it counts as missed, in seconds.
Validation rules
- Default
5- Minimum
1- Maximum
60
Variant 2 · object
modestringrequiredRun once for the most recently missed wake, dropping any earlier ones.
Validation rules
- Exact value
"latest"
maxLatenessSecondsanyOfrequiredHow late a missed wake may still run, in seconds; null for no limit.
Show attributes
How late a missed wake may still run, in seconds; null for no limit.
Validation rules
- Default
null
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
2678400
Variant 2 · null
Variant 3 · object
modestringrequiredRun once for every missed wake, oldest first.
Validation rules
- Exact value
"all"
maxLatenessSecondsanyOfrequiredHow late a missed wake may still run, in seconds; null for no limit.
Show attributes
How late a missed wake may still run, in seconds; null for no limit.
Validation rules
- Default
null
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
2678400
Variant 2 · null
evaluationTimestringrequiredWhich moment this wake is evaluated as of: scheduled_time the time it was due, detection_time when the engine actually ran it.
Validation rules
- Default
"detection_time"- Allowed values
["scheduled_time","detection_time"]
Variant 4 · kind: event
kindstringrequiredA wake evaluated each time a matching custom webhook event arrives.
Validation rules
- Exact value
"event"
eventTypestringrequiredThe event type this wake matches; a live webhook delivery of a different type is ignored before it reaches the condition.
Validation rules
- Pattern
"^[A-Za-z][A-Za-z0-9_.:-]{0,79}$"
fieldsarrayrequiredThe data fields an event of this type is declared to carry.
Show attributes
The data fields an event of this type is declared to carry.
Validation rules
- Maximum items
32
Array items · object
One data field an event or a source's observation carries: where it lives, and its type.
patharrayrequiredThe keys to walk, in order, from an observation's top level down to this field.
Show attributes
The keys to walk, in order, from an observation's top level down to this field.
Validation rules
- Minimum items
1- Maximum items
8
Array items · string
Validation rules
- Pattern
"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"
valueTypeoneOfrequiredWhat type this field's value has, and the unit it carries when it has one.
Show attributes
What type this field's value has, and the unit it carries when it has one.
oneOf · 4 variants
Variant 1 · type: boolean
typestringrequiredA true/false value.
Validation rules
- Exact value
"boolean"
Variant 2 · type: string
typestringrequiredA text value.
Validation rules
- Exact value
"string"
Variant 3 · type: integer
typestringrequiredA whole-number value, compared exactly.
Validation rules
- Exact value
"integer"
unitstringrequiredThe unit an integer or decimal value is measured in, as the source or literal declares it.
Validation rules
- Minimum length
1- Maximum length
64
Variant 4 · type: decimal
typestringrequiredAn exact decimal value, as text, compared exactly.
Validation rules
- Exact value
"decimal"
unitstringrequiredThe unit an integer or decimal value is measured in, as the source or literal declares it.
Validation rules
- Minimum length
1- Maximum length
64
optionalbooleanoptionalWhether the provider may genuinely not observe this field, rather than fail to read it. When true, a missing value resolves a condition over it to missing_field and the rule's verdict to unknown, rather than zero, null or false.
Variant 5 · kind: reader_update
kindstringrequiredA wake evaluated each time the named reader delivers a fresh observation.
Validation rules
- Exact value
"reader_update"
bindingstringrequiredThe binding name a rule or a plan gives one configured source.
Validation rules
- Pattern
"^[A-Za-z][A-Za-z0-9_-]{0,31}$"
readersarrayrequiredThe named source bindings this rule reads from, referenced by condition and by each reader_update wake's binding.
Show attributes
The named source bindings this rule reads from, referenced by condition and by each reader_update wake's binding.
Validation rules
- Maximum items
4
Array items · object
namestringrequiredThe binding name a rule or a plan gives one configured source.
Validation rules
- Pattern
"^[A-Za-z][A-Za-z0-9_-]{0,31}$"
readerIdstringrequiredThe installed source operation's id, as listed by List automation data sources.
Validation rules
- Pattern
"^[a-z][a-z0-9_.-]{0,79}$"
configobjectrequiredArbitrary JSON data: an event's data, a reader's configuration, or a source plan's configuration. Bounded to 16 KiB, 8 levels of nesting and 256 entries.
Show attributes
Arbitrary JSON data: an event's data, a reader's configuration, or a source plan's configuration. Bounded to 16 KiB, 8 levels of nesting and 256 entries.
Validation rules
- propertyNames
{"type":"string"}
Additional property values
Any JSON value: a string, number, boolean, null, array or object, nested to any depth.
anyOf · 6 variants
Variant 1 · string
Variant 2 · number
Variant 3 · boolean
Variant 4 · null
Variant 5 · array
Array items · anyOf
Recursive reference: #/components/schemas/AutomationJsonValue. See the complete schema below.
Variant 6 · object
Validation rules
- propertyNames
{"type":"string"}
Additional property values
Recursive reference: #/components/schemas/AutomationJsonValue. See the complete schema below.
deliverystringoptionalUse reviewed push updates; omit for periodic snapshots.
Validation rules
- Exact value
"push"
pollIntervalSecondsintegerrequiredPolling cadence, or subscription lease/reconciliation cadence for push delivery, in seconds.
Validation rules
- Minimum
1- Maximum
2147483
maxAgeSecondsintegerrequiredMaximum retained input age at evaluation, matching requirement.maxAgeSeconds when present. Snapshots use observation time; events use trusted receipt time. Collection separately enforces the provider's acquisition-age guarantee.
Validation rules
- Minimum
1- Maximum
86400
requirementobjectoptionalWhat a reader needs from its source: how fresh an answer must be, and whether a slower one is still acceptable.
Show attributes
What a reader needs from its source: how fresh an answer must be, and whether a slower one is still acceptable.
maxLatencySecondsanyOfrequiredThe target delay between an observation and its delivery, in seconds; null when delivery has no target deadline.
Show attributes
The target delay between an observation and its delivery, in seconds; null when delivery has no target deadline.
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
2147483
Variant 2 · null
maxAgeSecondsintegerrequiredMaximum acceptable input age at evaluation, matching the reader's maxAgeSeconds, measured from the provider's own observation time. The selected provider's acquisition guarantee must fit within this limit and does not reduce this evaluation window.
Validation rules
- Minimum
1- Maximum
86400
allowDegradedLatencybooleanrequiredWhether delivery slower than the target delay is still accepted.
maxAcceptedLatencySecondsintegeroptionalThe slowest delivery still accepted, in seconds, when allowDegradedLatency is set.
Validation rules
- Minimum
1- Maximum
2147483
conditionanyrequiredThe rule's condition tree, up to 8 levels deep and 128 nodes total, built from five node kinds: {op:"bool", value} a fixed true/false leaf; {op:"compare", comparator, left, right} one of eq/ne/lt/lte/gt/gte between two operands — lt/lte/gt/gte require both operands to be integer or decimal, and both sides must share the same type and, for integer/decimal, the same unit; {op:"all", args} / {op:"any", args} AND/OR over one or more child nodes; {op:"not", arg} negates one child node. An operand is either {kind:"field", binding, path} — a bound reader's name and the key path into its data — or {kind:"literal", type, value, unit?} with type one of boolean/string/integer/decimal (integer/decimal values are exact decimal strings and carry unit).
exitobjectoptionalThe exit watch, when this rule's automation has exit actions on its contract. Present exactly when the contract has an exit action.
Show attributes
The exit watch, when this rule's automation has exit actions on its contract. Present exactly when the contract has an exit action.
intervalSecondsintegerrequiredHow often this automation re-checks its exit guards, in seconds; at least 60 and at most 2678400 (31 days), the same span an interval wake may cover. Recommend 300.
Validation rules
- Minimum
60- Maximum
2678400
readersobjectrequiredThe two price bindings each exit guard is measured against; both must be the reviewed USD token-price operation.
Show attributes
The two price bindings each exit guard is measured against; both must be the reviewed USD token-price operation.
assetstringrequiredThe binding in readers that prices the asset this automation bought, in USD.
Validation rules
- Pattern
"^[A-Za-z][A-Za-z0-9_-]{0,31}$"
quotestringrequiredThe binding in readers that prices the token this automation pays with, in USD.
Validation rules
- Pattern
"^[A-Za-z][A-Za-z0-9_-]{0,31}$"
pushobjectoptionalAdditional push-delivered USD prices that may check exits between periodic 1Click checks.
Show attributes
Additional push-delivered USD prices that may check exits between periodic 1Click checks.
readersobjectrequiredThe supplementary price bindings for the bought asset and its paying token.
Show attributes
The supplementary price bindings for the bought asset and its paying token.
assetstringrequiredThe binding name a rule or a plan gives one configured source.
Validation rules
- Pattern
"^[A-Za-z][A-Za-z0-9_-]{0,31}$"
quotestringrequiredThe binding name a rule or a plan gives one configured source.
Validation rules
- Pattern
"^[A-Za-z][A-Za-z0-9_-]{0,31}$"
firingobjectrequiredHow this rule turns a qualifying evaluation into a firing: which ones count, how often, and how many.
Show attributes
How this rule turns a qualifying evaluation into a firing: which ones count, how often, and how many.
modestringrequiredWhen a qualifying evaluation fires: each_match fires on every qualifying evaluation, including the first; rising_edge fires only on a known false-to-true transition.
Validation rules
- Allowed values
["each_match","rising_edge"]
repeatstringrequiredWhether this rule fires at most once, or keeps watching after it fires.
Validation rules
- Allowed values
["once","repeating"]
maxRunsintegeroptionalMaximum deliverable runs recorded for this automation across pauses and resumes. Missed or refused deliveries do not count; recorded runs count even if later canceled, coalesced or failed. Omit for no finite limit beyond repeat=once.
Validation rules
- Minimum
1- Maximum
1000000
initialstringrequiredHow rising_edge treats the first known state: baseline records it without firing, fire_if_true fires immediately if it is already true.
Validation rules
- Allowed values
["baseline","fire_if_true"]
cooldownSecondsintegerrequiredThe minimum time between firings, in seconds; it does not require the condition to stay true that whole time. For rising_edge, a false-to-true edge that lands inside cooldown is discarded, not queued: it is not replayed once cooldown ends, so the rule needs an entirely fresh edge after cooldown lapses before it fires again — simply remaining true past the cooldown boundary does not trigger a firing.
Validation rules
- Minimum
0- Maximum
2678400
newsobjectoptionalPresent only on a news exit: the owner's own words, which Fin's news judge reads new stories against. Its rule is fixed: one news.judged event wake, no readers, the judged condition and one firing, over a reduce-only perps contract.
Show attributes
Present only on a news exit: the owner's own words, which Fin's news judge reads new stories against. Its rule is fixed: one news.judged event wake, no readers, the judged condition and one firing, over a reduce-only perps contract.
conditionstringrequiredThe owner's condition in their own words, exactly as they said it, such as right before Anthropic's IPO. Never paraphrased: the judge reads the news against these words.
Validation rules
- Minimum length
3- Maximum length
500
matchstringrequiredA few words every story the judge reads must contain in its headline or summary, such as Anthropic IPO: a broad filter, not the condition. The judge decides from the condition.
Validation rules
- Minimum length
2- Maximum length
80- Pattern
"^[\\p{L}\\p{N} .'&-]+$"
maxSnapshotSkewSecondsintegerrequiredThe most that bound readers' observation times may disagree before evaluation reports snapshot_skew, in seconds.
Validation rules
- Minimum
0- Maximum
86400
maxSigningDelaySecondsintegerrequiredThe owner-approved time after the worker records a firing during which its run may obtain signatures.
Validation rules
- Minimum
1- Maximum
86400
automationIdstring · uuidoptionalThe saved automation whose edited terms the owner approves; absent for creation.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
definitionVersionintegeroptionalThe saved definition version those edited terms authorize; absent for creation.
Validation rules
- Greater than
0- Maximum
9007199254740991
contractoneOfrequiredThe exact approved authority: swap actions with their bounds, count and expiry, one limit order, one perps transfer/order/cancellation or margin change, one Polymarket funding/order/withdrawal, the exact Solana actions, or one grid.
Show attributes
The exact approved authority: swap actions with their bounds, count and expiry, one limit order, one perps transfer/order/cancellation or margin change, one Polymarket funding/order/withdrawal, the exact Solana actions, or one grid.
oneOf · 20 variants
Variant 1 · type: near_intents_transfer
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"near_intents_transfer"
actionsarrayrequiredThe actions this contract authorizes, executed in order.
Show attributes
The actions this contract authorizes, executed in order.
Validation rules
- Minimum items
1- Maximum items
16
Array items · oneOf
oneOf · 4 variants
Variant 1 · kind: swap
kindstringrequiredExchange one asset for another; custody never leaves the agent wallet.
Validation rules
- Exact value
"swap"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
exitoneOfoptionalOptional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
Show attributes
Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
oneOf · 3 variants
Variant 1 · kind: take_profit
A take-profit exit: sell once the price is up this much on average cost.
kindstringrequiredSell when the asset is this far ABOVE the automation's average cost.
Validation rules
- Exact value
"take_profit"
gainBpsstringrequiredHow far above the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 2 · kind: stop_loss
A stop-loss exit: sell once the price is down this much on average cost.
kindstringrequiredSell when the asset is this far BELOW the automation's average cost.
Validation rules
- Exact value
"stop_loss"
lossBpsstringrequiredHow far below the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 3 · kind: harvest_every
A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every days days it sells only the gain, if there is any, and the automation keeps running.
kindstringrequiredTake profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled.
Validation rules
- Exact value
"harvest_every"
daysstringrequiredHow many days apart harvests are, 7 to 365, as a decimal string: "7" weekly, "30" monthly.
Validation rules
- Pattern
"^[1-9]\\d{0,2}$"
Variant 2 · kind: withdraw_to_owner
kindstringrequiredReturn an asset to the account that owns the agent wallet.
Validation rules
- Exact value
"withdraw_to_owner"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
Variant 3 · kind: withdraw_transfer
kindstringrequiredPay the exact approved destination through the provider’s chain or Intents transfer route.
Validation rules
- Exact value
"withdraw_transfer"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe exact approved payout rail, network and address.
Show attributes
The exact approved payout rail, network and address.
railstringrequiredA native blockchain transfer or a signed transfer within an Intents ledger.
Validation rules
- Allowed values
["chain","intents"]
networkstringrequiredExact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain.
Validation rules
- Pattern
"^[a-z][a-z0-9-]{0,63}$"
addressstringrequiredExact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,256}$"
memonullrequiredStandalone routing memos are unsupported; routing must be encoded in the approved address.
minimumReceivedRawanyOfrequiredMinimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
Show attributes
Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
maxFeeRawanyOfrequiredOptional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
Show attributes
Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
Variant 4 · kind: send
kindstringrequiredNot executable, and refused in new contracts: pay an address with withdraw_transfer.
Validation rules
- Exact value
"send"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe pinned destination this action pays.
Show attributes
The pinned destination this action pays.
chainstringrequiredWhich chain the destination address is on.
Validation rules
- Minimum length
1- Maximum length
32
addressstringrequiredThe destination address on that chain.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,128}$"
validUntilstring · date-timerequiredWhen this contract's authority expires.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
maxExecutionsintegerrequiredHow many times this contract may be executed before it is exhausted.
Validation rules
- Minimum
1- Maximum
10000
maxTotalInputarrayoptionalOptional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Show attributes
Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
boundsobjectrequiredThe value-loss and signature-lifetime limits every execution must respect.
Show attributes
The value-loss and signature-lifetime limits every execution must respect.
maxValueLossBpsstringrequiredThe most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
maxSignatureLifetimeSecondsintegerrequiredExplicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity.
Validation rules
- Minimum
1- Maximum
259500
executionanyOfoptionalOptional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
Show attributes
Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
anyOf · 2 variants
Variant 1 · object
modestringrequiredOrdered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved.
Validation rules
- Allowed values
["ordered","parallel_independent"]
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · object
modestringrequiredValidation rules
- Exact value
"dependency_graph"
dependenciesarrayrequiredOne row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Show attributes
One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Validation rules
- Minimum items
1- Maximum items
16
Array items · array
Validation rules
- Maximum items
16
Array items · integer
Validation rules
- Minimum
0- Maximum
15
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · type: limit_order
Owner-signed authority for one resting limit order: the exact approved placement, created and funded once by the policy worker before the approval expires.
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"limit_order"
orderobjectrequiredThe exact approved placement request.
Show attributes
The exact approved placement request.
inputobjectrequiredThe input (base) asset this order sells.
Show attributes
The input (base) asset this order sells.
pinnedobjectrequiredThe exact asset the order sells: token id and decimals.
Show attributes
The exact asset the order sells: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
outputobjectrequiredThe output (quote) asset this order buys.
Show attributes
The output (quote) asset this order buys.
pinnedobjectrequiredThe exact asset the order buys: token id and decimals.
Show attributes
The exact asset the order buys: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
quantitystringrequiredThe exact input amount to sell, in the input asset's smallest unit. 1 NEAR with verified decimals 24 is "1000000000000000000000000". Scale decimal digits with the verified decimals and reject excess fractional digits; no floating-point arithmetic or bash.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
limitPricestringrequiredThe minimum price the fill must reach, as output-asset units per ONE input unit, written as a plain human decimal: "5" means at least 5 output tokens per 1 input token. Never scale it by decimals.
Validation rules
- Maximum length
80- Pattern
"^(0|[1-9]\\d{0,38})(\\.\\d{1,38})?$"
expiresInHoursintegerrequiredHow long the order may rest before it expires, in whole hours. Use the user's duration within this wallet's maximum, or the wallet's default from the latest request's host context when none is given. The schema permits up to 720 hours (30 days); a wallet may have a lower maximum. Never shorten a requested duration to fit.
Validation rules
- Minimum
1- Maximum
720
validUntilstring · date-timerequiredThe latest instant the order may be created and funded under this consent.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 3 · type: perps_transfer
One approved perps transfer in exactly the named direction.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_transfer"
directionstringrequiredFund the own perps account from the agent wallet, or withdraw back to the same agent wallet.
Validation rules
- Allowed values
["fund","withdraw"]
transferobjectrequiredThe exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact amount in six-decimal atomic units in either direction: 5 USDC is "5000000". A withdrawal returns USDC. A funding spends it from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it; Hyperliquid receives USDC. Never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalA funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
Show attributes
A funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 4 · type: perps_order
One approved Hyperliquid order, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_order"
orderobjectrequiredThe exact approved order.
Show attributes
The exact approved order.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
sidestringrequiredThe position this order opens, adds to, reduces or protects. A reduce-only entry on a long position sells.
Validation rules
- Allowed values
["long","short"]
sizestringrequiredExact size in the coin, at most the market's szDecimals places.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
leverageanyOfrequiredLeverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
Show attributes
Leverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
100
Variant 2 · null
marginModestringoptionalHow the position is margined, which the user chose with the leverage: cross shares the account's margin with every cross position, isolated puts only this position's own margin at risk (perps_margin_update adds or removes it later). Present exactly when leverage is; an isolated-only market (perps_markets onlyIsolated) takes isolated. Never assume it: ask the user. Absent on orders approved before margin modes existed, which were cross.
Validation rules
- Allowed values
["cross","isolated"]
entryanyOfrequiredThe order itself; null for take-profit and stop-loss on the existing position only.
Show attributes
The order itself; null for take-profit and stop-loss on the existing position only.
anyOf · 2 variants
Variant 1 · object
pricestringrequiredThe limit price; for an immediate (Ioc) order, the worst price it may fill at.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
timeInForcestringrequiredIoc fills now within price and cancels the rest (a market order), Gtc rests until filled or cancelled, Alo rests only as a maker order.
Validation rules
- Allowed values
["Gtc","Ioc","Alo"]
reduceOnlybooleanrequiredTrue to only reduce or close the existing position, never open or add.
Variant 2 · null
takeProfitanyOfrequiredA reduce-only take-profit, or null.
Show attributes
A reduce-only take-profit, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
stopLossanyOfrequiredA reduce-only stop-loss, or null.
Show attributes
A reduce-only stop-loss, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
trailingStopanyOfoptionalA reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
Show attributes
A reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size that follows the mark price as it moves in the position's favour and fires once it reverses by the retracement.
retracementanyOfrequiredHow far the mark price may reverse from its best before the stop fires.
Show attributes
How far the mark price may reverse from its best before the stop fires.
anyOf · 2 variants
Variant 1 · object
Trail by a percentage of the best mark price.
percentstringrequiredHow far the mark price may reverse from its best since activation, in percent: 2 is 2%.
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · object
Trail by a fixed price distance.
pricestringrequiredHow far the mark price may reverse from its best since activation, in price units.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
activationPriceanyOfrequiredThe mark price that starts the trailing; null to trail from placement.
Show attributes
The mark price that starts the trailing; null to trail from placement.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
Variant 2 · null
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 5 · type: perps_cancel
One approved cancellation of one resting Hyperliquid order.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_cancel"
cancelobjectrequiredThe exact order approved for cancelling.
Show attributes
The exact order approved for cancelling.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
oidintegerrequiredThe resting order's id exactly as perps_orders lists it.
Validation rules
- Greater than
0- Maximum
9007199254740991
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 6 · type: perps_automation
A standing approval for one perps automation: open the agent's own position while it holds nothing on the coin, reduce or close it, or add margin to its own account, each time its rule fires, up to its limits.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_automation"
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
positionstringrequiredThe position the action is for. open acts only while the agent holds nothing on this coin; reduce and add_margin act only while it holds this side, and nothing happens otherwise.
Validation rules
- Allowed values
["long","short"]
actiononeOfrequiredWhat a perps automation does each time its rule fires: open the named position while the agent holds nothing on its coin, reduce the named position, or add margin to the agent's own perps account.
Show attributes
What a perps automation does each time its rule fires: open the named position while the agent holds nothing on its coin, reduce the named position, or add margin to the agent's own perps account.
oneOf · 3 variants
Variant 1 · kind: reduce
Close part or all of the position with a reduce-only market order.
kindstringrequiredReduce or close the position.
Validation rules
- Exact value
"reduce"
fractionBpsintegerrequiredHow much of the position to close, in basis points: 10000 closes it all.
Validation rules
- Minimum
1- Maximum
10000
maxSlippageBpsintegerrequiredThe worst fill allowed, in basis points from the mark when it fires.
Validation rules
- Minimum
1- Maximum
500
Variant 2 · kind: add_margin
Fund the agent's own perps account from its agent wallet.
kindstringrequiredAdd margin to the perps account.
Validation rules
- Exact value
"add_margin"
amountRawstringrequiredExact USDC moved from the agent wallet into the perps account, six decimals: 5 USDC is "5000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredMaximum value lost to fees moving it, in basis points.
Validation rules
- Minimum
0- Maximum
300
Variant 3 · kind: open
Open the position with a market order, only while the agent holds nothing on this coin, optionally protected by a native take-profit and stop-loss.
kindstringrequiredOpen the position at market.
Validation rules
- Exact value
"open"
notionalUsdstringrequiredThe position's size in US dollars at the mark when it fires, at most two places: a $200 position is "200". The size in the coin is this over the mark, rounded down to the market's size precision.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,2})?$"
leverageintegerrequiredLeverage the user chose for this market, at most the market's maximum. Never assume it: ask the user.
Validation rules
- Minimum
1- Maximum
100
marginModestringrequiredHow the position is margined, which the user chose with the leverage: cross shares the account's margin, isolated risks only this position's own. An isolated-only market takes isolated. Never assume it: ask the user.
Validation rules
- Allowed values
["cross","isolated"]
maxSlippageBpsintegerrequiredThe worst fill allowed, in basis points from the mark when it fires; the take-profit and stop-loss fill within the same bound of their trigger.
Validation rules
- Minimum
1- Maximum
500
takeProfitPercentanyOfrequiredA native take-profit this far from the mark when it opens, in percent of price in the position's favour ("10" is 10%), or null for none.
Show attributes
A native take-profit this far from the mark when it opens, in percent of price in the position's favour ("10" is 10%), or null for none.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · null
stopLossPercentanyOfrequiredA native stop-loss this far from the mark when it opens, in percent of price against the position ("5" is 5%), or null for none.
Show attributes
A native stop-loss this far from the mark when it opens, in percent of price against the position ("5" is 5%), or null for none.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · null
maxExecutionsintegerrequiredHow many firings may act under this approval.
Validation rules
- Minimum
1- Maximum
100
validUntilstring · date-timerequiredThe deadline after which this approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 7 · type: perps_margin
One approved change to one isolated position's margin, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_margin"
marginobjectrequiredThe exact approved margin change.
Show attributes
The exact approved margin change.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
changestringrequiredadd moves USDC from the account into the position's isolated margin, lowering its liquidation risk; remove takes it back out, raising that risk. A strict isolated market never lets margin be removed while the position is open.
Validation rules
- Allowed values
["add","remove"]
amountstringrequiredExact USDC to move, at most six decimal places, such as 25 or 12.5.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,8})(\\.[0-9]{0,5}[1-9])?$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 8 · type: prediction_fund
One exact USDC or USDT debit delivered as native Base USDC to Polymarket's bridge for the agent's own account; the final pUSD amount is not bounded.
typestringrequiredOne approved Polymarket funding transfer.
Validation rules
- Exact value
"prediction_fund"
transferobjectrequiredThe exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact debit in six-decimal atomic units: 5 USDC or USDT is "5000000", spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it. The host resolves the agent’s own Polymarket Deposit Wallet and its bridge address; never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxFirstLegLossBpsintegerrequiredExplicit maximum loss, in basis points, of the first leg only: the wallet's USDC, USDT or coin delivered as native Base USDC to Polymarket's bridge, fees and any cross-chain hop included. It does not bound the bridge's conversion to pUSD on Polygon, whose fees and output are variable and estimated. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
Show attributes
Approved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 9 · type: solana_buy
An approved Solana buy, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_buy"
buyobjectrequiredThe exact approved token, payment, all-in loss bound and SOL top-up cap, and, for a buy whose funding pays with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved token, payment, all-in loss bound and SOL top-up cap, and, for a buy whose funding pays with a coin, that coin and the most of it it may spend.
tokenobjectrequiredThe exact token to buy.
Show attributes
The exact token to buy.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
payoneOfrequiredWhat the buy spends, as an exact input amount. Buying an exact number of tokens is not supported.
Show attributes
What the buy spends, as an exact input amount. Buying an exact number of tokens is not supported.
oneOf · 2 variants
Variant 1 · kind: usdc
Spend an exact amount of USDC or USDT from the agent wallet.
kindstringrequiredPay from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT), moved to Solana as SOL first.
Validation rules
- Exact value
"usdc"
amountRawstringrequiredExact USDC or USDT to spend, in six-decimal atomic units: $50 is "50000000". At least 5 ("5000000"); a smaller buy is refused.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: sol
Spend an exact amount of SOL the agent's Solana account already holds.
kindstringrequiredPay with SOL already in the agent's Solana account.
Validation rules
- Exact value
"sol"
lamportsstringrequiredExact SOL to spend, in lamports (nine decimals): 0.5 SOL is "500000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
maxSolTopUpUsdcRawstringrequiredThe most extra USDC or USDT the funding may add to keep SOL in the Solana account for network fees, in six-decimal atomic units: "0" for none, at most "1000000" (1 USDC). Must be "0" when paying with SOL.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
payWithobjectoptionalA buy paid in dollars and approved in chat as one call: the coin its funding pays with instead of a USDC or USDT holding, and the most of it it may spend, the SOL top-up included. Never SOL. A buy from a token's page refuses it.
Show attributes
A buy paid in dollars and approved in chat as one call: the coin its funding pays with instead of a USDC or USDT holding, and the most of it it may spend, the SOL top-up included. Never SOL. A buy from a token's page refuses it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 10 · type: solana_sell
An approved Solana sell, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_sell"
sellobjectrequiredThe exact approved token, amount, proceeds and all-in loss bound.
Show attributes
The exact approved token, amount, proceeds and all-in loss bound.
tokenobjectrequiredThe exact token to sell.
Show attributes
The exact token to sell.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
amountoneOfrequiredHow much of the token to sell.
Show attributes
How much of the token to sell.
oneOf · 2 variants
Variant 1 · kind: exact
Sell an exact amount of the token.
kindstringrequiredSell an exact amount of the token.
Validation rules
- Exact value
"exact"
amountRawstringrequiredExact amount of the token to sell, in its smallest unit (scaled by the token's decimals).
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: fraction
Sell a share of the account's balance of the token.
kindstringrequiredSell a share of what the Solana account holds of the token.
Validation rules
- Exact value
"fraction"
bpsintegerrequiredThe share to sell, in basis points of the account's balance of the token: all of it is 10000, half is 5000.
Validation rules
- Minimum
1- Maximum
10000
receivestringrequiredusdc returns the proceeds to the agent wallet as USDC on NEAR, which is what selling means; sol keeps them as SOL in the agent's Solana account.
Validation rules
- Allowed values
["usdc","sol"]
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 11 · type: solana_fund
An approved move of USDC or USDT, or a coin, into the agent's own Solana account.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_fund"
fundobjectrequiredThe exact approved amount and loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact USDC or USDT to move from the agent wallet into the agent's Solana account as SOL, in six-decimal atomic units: 5 USDC is "5000000". Spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees: at most 300. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call: the coin this funding pays with instead of a USDC or USDT holding, and the most of it it may spend. Never SOL.
Show attributes
Approved in chat as one call: the coin this funding pays with instead of a USDC or USDT holding, and the most of it it may spend. Never SOL.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 12 · type: solana_withdraw
An approved move of SOL from the agent's own Solana account back to its agent wallet.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_withdraw"
withdrawobjectrequiredThe exact approved amount, what returns and the loss bound.
Show attributes
The exact approved amount, what returns and the loss bound.
amountoneOfrequiredHow much SOL to withdraw from the agent's Solana account.
Show attributes
How much SOL to withdraw from the agent's Solana account.
oneOf · 2 variants
Variant 1 · kind: exact
Withdraw an exact amount of SOL.
kindstringrequiredWithdraw an exact amount of SOL.
Validation rules
- Exact value
"exact"
lamportsstringrequiredExact SOL to withdraw, in lamports (nine decimals): 0.5 SOL is "500000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: all_spendable
Withdraw all the spendable SOL.
kindstringrequiredWithdraw all the SOL above the reserve the account keeps for rent and network fees.
Validation rules
- Exact value
"all_spendable"
receivestringrequiredusdc returns it to the agent wallet as USDC on NEAR; sol returns it to the agent wallet as SOL.
Validation rules
- Allowed values
["usdc","sol"]
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees: at most 300. Required; no default.
Validation rules
- Minimum
0- Maximum
300
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 13 · type: prediction_order
typestringrequiredValidation rules
- Exact value
"prediction_order"
orderobjectrequiredShow attributes
marketIdstringrequiredValidation rules
- Pattern
"^[1-9][0-9]{0,19}$"
assetIdstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,77})$"
marketQuestionstringrequiredValidation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredValidation rules
- Minimum length
1- Maximum length
256
sidestringrequiredValidation rules
- Allowed values
["BUY","SELL"]
limitPriceUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
quantityoneOfrequiredShow attributes
oneOf · 2 variants
Variant 1 · kind: shares
kindstringrequiredValidation rules
- Exact value
"shares"
sizeSharesDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
Variant 2 · kind: budget
kindstringrequiredValidation rules
- Exact value
"budget"
amountUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
orderTypestringrequiredValidation rules
- Allowed values
["GTC","GTD","FOK","FAK"]
expiresAtintegeroptionalValidation rules
- Minimum
0- Maximum
253402300799
maxFeeUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
maxSpendUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 14 · type: prediction_withdraw
typestringrequiredValidation rules
- Exact value
"prediction_withdraw"
withdrawalobjectrequiredWithdraw pUSD through Polymarket’s conversion service as native USDC on Polygon to a unique verified 1Click address crediting only the agent’s own confidential Intents wallet. Funding remains a separate USDC route.
Show attributes
Withdraw pUSD through Polymarket’s conversion service as native USDC on Polygon to a unique verified 1Click address crediting only the agent’s own confidential Intents wallet. Funding remains a separate USDC route.
amountRawstringrequiredExact pUSD debit in six-decimal atomic units: 5 pUSD is "5000000". Only the agent’s own Deposit Wallet is spent.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 15 · type: composite
One owner signature over several exact one-shot grants and the order they run in.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"composite"
piecesarrayrequiredShow attributes
Validation rules
- Minimum items
1- Maximum items
6
Array items · object
toolstringrequiredThe tool whose one-shot call this piece is.
Validation rules
- Allowed values
["intents_execute","perps_fund","perps_order_place","prediction_fund","prediction_order_place","perps_withdraw","prediction_withdraw"]
contractanyOfrequiredShow attributes
anyOf · 7 variants
Variant 1 · type: near_intents_transfer
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"near_intents_transfer"
actionsarrayrequiredThe actions this contract authorizes, executed in order.
Show attributes
The actions this contract authorizes, executed in order.
Validation rules
- Minimum items
1- Maximum items
16
Array items · oneOf
oneOf · 4 variants
Variant 1 · kind: swap
kindstringrequiredExchange one asset for another; custody never leaves the agent wallet.
Validation rules
- Exact value
"swap"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
exitoneOfoptionalOptional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
Show attributes
Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
oneOf · 3 variants
Variant 1 · kind: take_profit
A take-profit exit: sell once the price is up this much on average cost.
kindstringrequiredSell when the asset is this far ABOVE the automation's average cost.
Validation rules
- Exact value
"take_profit"
gainBpsstringrequiredHow far above the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 2 · kind: stop_loss
A stop-loss exit: sell once the price is down this much on average cost.
kindstringrequiredSell when the asset is this far BELOW the automation's average cost.
Validation rules
- Exact value
"stop_loss"
lossBpsstringrequiredHow far below the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 3 · kind: harvest_every
A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every days days it sells only the gain, if there is any, and the automation keeps running.
kindstringrequiredTake profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled.
Validation rules
- Exact value
"harvest_every"
daysstringrequiredHow many days apart harvests are, 7 to 365, as a decimal string: "7" weekly, "30" monthly.
Validation rules
- Pattern
"^[1-9]\\d{0,2}$"
Variant 2 · kind: withdraw_to_owner
kindstringrequiredReturn an asset to the account that owns the agent wallet.
Validation rules
- Exact value
"withdraw_to_owner"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
Variant 3 · kind: withdraw_transfer
kindstringrequiredPay the exact approved destination through the provider’s chain or Intents transfer route.
Validation rules
- Exact value
"withdraw_transfer"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe exact approved payout rail, network and address.
Show attributes
The exact approved payout rail, network and address.
railstringrequiredA native blockchain transfer or a signed transfer within an Intents ledger.
Validation rules
- Allowed values
["chain","intents"]
networkstringrequiredExact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain.
Validation rules
- Pattern
"^[a-z][a-z0-9-]{0,63}$"
addressstringrequiredExact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,256}$"
memonullrequiredStandalone routing memos are unsupported; routing must be encoded in the approved address.
minimumReceivedRawanyOfrequiredMinimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
Show attributes
Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
maxFeeRawanyOfrequiredOptional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
Show attributes
Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
Variant 4 · kind: send
kindstringrequiredNot executable, and refused in new contracts: pay an address with withdraw_transfer.
Validation rules
- Exact value
"send"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe pinned destination this action pays.
Show attributes
The pinned destination this action pays.
chainstringrequiredWhich chain the destination address is on.
Validation rules
- Minimum length
1- Maximum length
32
addressstringrequiredThe destination address on that chain.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,128}$"
validUntilstring · date-timerequiredWhen this contract's authority expires.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
maxExecutionsintegerrequiredHow many times this contract may be executed before it is exhausted.
Validation rules
- Minimum
1- Maximum
10000
maxTotalInputarrayoptionalOptional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Show attributes
Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
boundsobjectrequiredThe value-loss and signature-lifetime limits every execution must respect.
Show attributes
The value-loss and signature-lifetime limits every execution must respect.
maxValueLossBpsstringrequiredThe most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
maxSignatureLifetimeSecondsintegerrequiredExplicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity.
Validation rules
- Minimum
1- Maximum
259500
executionanyOfoptionalOptional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
Show attributes
Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
anyOf · 2 variants
Variant 1 · object
modestringrequiredOrdered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved.
Validation rules
- Allowed values
["ordered","parallel_independent"]
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · object
modestringrequiredValidation rules
- Exact value
"dependency_graph"
dependenciesarrayrequiredOne row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Show attributes
One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Validation rules
- Minimum items
1- Maximum items
16
Array items · array
Validation rules
- Maximum items
16
Array items · integer
Validation rules
- Minimum
0- Maximum
15
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · type: perps_transfer
One approved perps transfer in exactly the named direction.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_transfer"
directionstringrequiredFund the own perps account from the agent wallet, or withdraw back to the same agent wallet.
Validation rules
- Allowed values
["fund","withdraw"]
transferobjectrequiredThe exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact amount in six-decimal atomic units in either direction: 5 USDC is "5000000". A withdrawal returns USDC. A funding spends it from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it; Hyperliquid receives USDC. Never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalA funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
Show attributes
A funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 3 · type: perps_order
One approved Hyperliquid order, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_order"
orderobjectrequiredThe exact approved order.
Show attributes
The exact approved order.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
sidestringrequiredThe position this order opens, adds to, reduces or protects. A reduce-only entry on a long position sells.
Validation rules
- Allowed values
["long","short"]
sizestringrequiredExact size in the coin, at most the market's szDecimals places.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
leverageanyOfrequiredLeverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
Show attributes
Leverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
100
Variant 2 · null
marginModestringoptionalHow the position is margined, which the user chose with the leverage: cross shares the account's margin with every cross position, isolated puts only this position's own margin at risk (perps_margin_update adds or removes it later). Present exactly when leverage is; an isolated-only market (perps_markets onlyIsolated) takes isolated. Never assume it: ask the user. Absent on orders approved before margin modes existed, which were cross.
Validation rules
- Allowed values
["cross","isolated"]
entryanyOfrequiredThe order itself; null for take-profit and stop-loss on the existing position only.
Show attributes
The order itself; null for take-profit and stop-loss on the existing position only.
anyOf · 2 variants
Variant 1 · object
pricestringrequiredThe limit price; for an immediate (Ioc) order, the worst price it may fill at.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
timeInForcestringrequiredIoc fills now within price and cancels the rest (a market order), Gtc rests until filled or cancelled, Alo rests only as a maker order.
Validation rules
- Allowed values
["Gtc","Ioc","Alo"]
reduceOnlybooleanrequiredTrue to only reduce or close the existing position, never open or add.
Variant 2 · null
takeProfitanyOfrequiredA reduce-only take-profit, or null.
Show attributes
A reduce-only take-profit, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
stopLossanyOfrequiredA reduce-only stop-loss, or null.
Show attributes
A reduce-only stop-loss, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
trailingStopanyOfoptionalA reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
Show attributes
A reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size that follows the mark price as it moves in the position's favour and fires once it reverses by the retracement.
retracementanyOfrequiredHow far the mark price may reverse from its best before the stop fires.
Show attributes
How far the mark price may reverse from its best before the stop fires.
anyOf · 2 variants
Variant 1 · object
Trail by a percentage of the best mark price.
percentstringrequiredHow far the mark price may reverse from its best since activation, in percent: 2 is 2%.
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · object
Trail by a fixed price distance.
pricestringrequiredHow far the mark price may reverse from its best since activation, in price units.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
activationPriceanyOfrequiredThe mark price that starts the trailing; null to trail from placement.
Show attributes
The mark price that starts the trailing; null to trail from placement.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
Variant 2 · null
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 4 · type: prediction_fund
One exact USDC or USDT debit delivered as native Base USDC to Polymarket's bridge for the agent's own account; the final pUSD amount is not bounded.
typestringrequiredOne approved Polymarket funding transfer.
Validation rules
- Exact value
"prediction_fund"
transferobjectrequiredThe exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact debit in six-decimal atomic units: 5 USDC or USDT is "5000000", spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it. The host resolves the agent’s own Polymarket Deposit Wallet and its bridge address; never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxFirstLegLossBpsintegerrequiredExplicit maximum loss, in basis points, of the first leg only: the wallet's USDC, USDT or coin delivered as native Base USDC to Polymarket's bridge, fees and any cross-chain hop included. It does not bound the bridge's conversion to pUSD on Polygon, whose fees and output are variable and estimated. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
Show attributes
Approved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 5 · type: prediction_order
typestringrequiredValidation rules
- Exact value
"prediction_order"
orderobjectrequiredShow attributes
marketIdstringrequiredValidation rules
- Pattern
"^[1-9][0-9]{0,19}$"
assetIdstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,77})$"
marketQuestionstringrequiredValidation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredValidation rules
- Minimum length
1- Maximum length
256
sidestringrequiredValidation rules
- Allowed values
["BUY","SELL"]
limitPriceUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
quantityoneOfrequiredShow attributes
oneOf · 2 variants
Variant 1 · kind: shares
kindstringrequiredValidation rules
- Exact value
"shares"
sizeSharesDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
Variant 2 · kind: budget
kindstringrequiredValidation rules
- Exact value
"budget"
amountUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
orderTypestringrequiredValidation rules
- Allowed values
["GTC","GTD","FOK","FAK"]
expiresAtintegeroptionalValidation rules
- Minimum
0- Maximum
253402300799
maxFeeUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
maxSpendUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 6 · type: perps_freed_withdrawal
One withdrawal home of what a cash-out's exit freed on Hyperliquid, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_freed_withdrawal"
withdrawalobjectrequiredThe signed maximum and all-in loss bound of the withdrawal home.
Show attributes
The signed maximum and all-in loss bound of the withdrawal home.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic USDC: what the exit before it frees, sized by the host before the approval opens. Never more than the exit freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 7 · type: prediction_freed_withdrawal
One withdrawal home of what a cash-out's sale freed on Polymarket, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredValidation rules
- Exact value
"prediction_freed_withdrawal"
withdrawalobjectrequiredWithdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
Show attributes
Withdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic pUSD: what the sale before it frees, sized by the host before the approval opens. Never more than the sale freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
startBystring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
dependenciesarrayrequiredShow attributes
Array items · array
Validation rules
- Maximum items
6
Array items · integer
Validation rules
- Minimum
0- Maximum
9007199254740991
walletDebitanyOfrequiredThe sum of every piece's debit from the agent wallet, per token, in raw units. Empty when the pieces are venue orders paid from money already on their venues, as when finishing a basket, or a cash-out, which closes a position and brings home what that freed.
Show attributes
The sum of every piece's debit from the agent wallet, per token, in raw units. Empty when the pieces are venue orders paid from money already on their venues, as when finishing a basket, or a cash-out, which closes a position and brings home what that freed.
anyOf · 2 variants
Variant 1 · array
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · array
Validation rules
- prefixItems
[]- Maximum items
0
Array items · never
No value is allowed.
validUntilstring · date-timerequiredWhen every piece that has not started loses its authority.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 16 · type: prediction_automation
A standing approval for one Polymarket automation: buy one outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price, each time its rule fires, up to its limits.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"prediction_automation"
marketobjectrequiredThe one Polymarket outcome this automation trades.
Show attributes
The one Polymarket outcome this automation trades.
marketIdstringrequiredThe market's id exactly as prediction_market returns it.
Validation rules
- Pattern
"^[1-9][0-9]{0,19}$"
conditionIdstringrequiredThe market's conditionId exactly as prediction_market returns it.
Validation rules
- Pattern
"^0x[0-9a-fA-F]{64}$"
assetIdstringrequiredThe outcome's CLOB token id, exactly the assetId prediction_market lists for that outcome. Yes and No are different tokens.
Validation rules
- Pattern
"^[1-9][0-9]{0,77}$"
marketQuestionstringrequiredThe market's question exactly as prediction_market returns it.
Validation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredThe outcome's name exactly as prediction_market returns it.
Validation rules
- Minimum length
1- Maximum length
256
actiononeOfrequiredWhat a Polymarket automation does each time its rule fires: buy the outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price.
Show attributes
What a Polymarket automation does each time its rule fires: buy the outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price.
oneOf · 2 variants
Variant 1 · kind: buy
Buy the outcome with a USD budget at no more than a maximum price.
kindstringrequiredBuy shares of the outcome.
Validation rules
- Exact value
"buy"
amountUsdDecimalstringrequiredThe USD each firing spends before fees, to the cent: "50" is $50. Each buy is an immediate order that fills what it can at once and cancels the rest.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,2})?$"
maxPriceUsdDecimalstringrequiredThe most a share may cost, as the market's chance: "0.32" never pays more than 32¢ a share. Use a price on the market's tick.
Validation rules
- Pattern
"^0\\.[0-9]{1,4}$"
maxFeeUsdDecimalstringrequiredThe most each firing may pay Polymarket in fees, in USD: "1" is $1.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,6})?$"
Variant 2 · kind: sell
Sell a share of the agent's holding of the outcome at no less than a minimum price.
kindstringrequiredSell shares of the outcome.
Validation rules
- Exact value
"sell"
fractionBpsintegerrequiredHow much of the agent's holding of the outcome each firing sells, in basis points: 10000 sells it all.
Validation rules
- Minimum
1- Maximum
10000
minPriceUsdDecimalstringrequiredThe least a share may sell for, as the market's chance: "0.7" never sells below 70¢ a share. Use a price on the market's tick.
Validation rules
- Pattern
"^0\\.[0-9]{1,4}$"
maxFeeUsdDecimalstringrequiredThe most each firing may pay Polymarket in fees, in USD: "1" is $1.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,6})?$"
maxExecutionsintegerrequiredHow many firings may trade under this approval; a buy spends at most maxExecutions × amountUsdDecimal in all.
Validation rules
- Minimum
1- Maximum
100
validUntilstring · date-timerequiredThe deadline after which this approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 17 · type: solana_sell_many
An approved multi-coin Solana sale, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_sell_many"
sellManyobjectrequiredThe exact approved coins, amounts and loss bounds, in order, and where the proceeds go.
Show attributes
The exact approved coins, amounts and loss bounds, in order, and where the proceeds go.
sellsarrayrequiredThe coins to sell, in the order they are sold: 2 to 6, each a different mint, none of them SOL itself.
Show attributes
The coins to sell, in the order they are sold: 2 to 6, each a different mint, none of them SOL itself.
Validation rules
- Minimum items
2- Maximum items
6
Array items · object
One coin of a multi-coin sale, sold through the agent's own Solana account.
tokenobjectrequiredThe exact token to sell.
Show attributes
The exact token to sell.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
amountoneOfrequiredHow much of the token to sell.
Show attributes
How much of the token to sell.
oneOf · 2 variants
Variant 1 · kind: exact
Sell an exact amount of the token.
kindstringrequiredSell an exact amount of the token.
Validation rules
- Exact value
"exact"
amountRawstringrequiredExact amount of the token to sell, in its smallest unit (scaled by the token's decimals).
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: fraction
Sell a share of the account's balance of the token.
kindstringrequiredSell a share of what the Solana account holds of the token.
Validation rules
- Exact value
"fraction"
bpsintegerrequiredThe share to sell, in basis points of the account's balance of the token: all of it is 10000, half is 5000.
Validation rules
- Minimum
1- Maximum
10000
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
receivestringrequiredusdc returns the summed proceeds of every sale that went through to the agent wallet as USDC on NEAR, in one transfer once the last sale ran; sol keeps them as SOL in the agent's Solana account.
Validation rules
- Allowed values
["usdc","sol"]
maxExecutionsnumberrequiredA multi-coin sale is approved once and runs once: always 1.
Validation rules
- Exact value
1
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 18 · type: grid
Owner-signed authority for one grid: the resting cell orders its terms derive, until it ends.
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"grid"
gridobjectrequiredA grid's exact terms: pair, levels, quantity and starting sides.
Show attributes
A grid's exact terms: pair, levels, quantity and starting sides.
baseobjectrequiredThe asset the grid buys low and sells high.
Show attributes
The asset the grid buys low and sells high.
pinnedobjectrequiredThe exact base asset: token id and decimals.
Show attributes
The exact base asset: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
quoteobjectrequiredThe asset prices are in and buys are paid with.
Show attributes
The asset prices are in and buys are paid with.
pinnedobjectrequiredThe exact quote asset: token id and decimals.
Show attributes
The exact quote asset: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
levelsarrayrequiredThe 2 to 20 grid prices, strictly ascending: quote units per ONE base unit, plain human decimals.
Show attributes
The 2 to 20 grid prices, strictly ascending: quote units per ONE base unit, plain human decimals.
Validation rules
- Minimum items
2- Maximum items
20
Array items · string
Validation rules
- Maximum length
80- Pattern
"^(0|[1-9]\\d{0,38})(\\.\\d{1,38})?$"
quantityPerCellstringrequiredThe exact base amount every cell buys and sells, in the base asset's smallest unit. Fixed: profits never compound.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
cellsarrayrequiredOne entry per cell, lowest first (levels.length - 1 of them): cells wholly below the start price and the one straddling it buy, cells wholly above it stay idle.
Show attributes
One entry per cell, lowest first (levels.length - 1 of them): cells wholly below the start price and the one straddling it buy, cells wholly above it stay idle.
Validation rules
- Minimum items
1- Maximum items
19
Array items · object
startstringrequiredThe side the cell's first order is on: buy at its low level, or idle (the cell never places).
Validation rules
- Allowed values
["buy","idle"]
validUntilstring · date-timerequiredWhen the grid ends: no order is placed, and none rests, after it. At most 720 hours after the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 19 · type: perps_freed_withdrawal
One withdrawal home of what a cash-out's exit freed on Hyperliquid, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_freed_withdrawal"
withdrawalobjectrequiredThe signed maximum and all-in loss bound of the withdrawal home.
Show attributes
The signed maximum and all-in loss bound of the withdrawal home.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic USDC: what the exit before it frees, sized by the host before the approval opens. Never more than the exit freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 20 · type: prediction_freed_withdrawal
One withdrawal home of what a cash-out's sale freed on Polymarket, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredValidation rules
- Exact value
"prediction_freed_withdrawal"
withdrawalobjectrequiredWithdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
Show attributes
Withdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic pUSD: what the sale before it frees, sized by the host before the approval opens. Never more than the sale freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
messagestringrequiredThe text the user signs with their registered wallet or passkey. Sign it exactly as returned: a changed character makes the signature invalid.
controllerIdstring · uuidrequiredThe user's registered wallet or passkey, the only one whose signature is accepted. Send it back unchanged beside the signature.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
expiresAtstring · date-timerequiredWhen the signature stops being accepted, about four and a half minutes after this was issued. Send it back unchanged beside the signature.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
recipientstringoptionalNEAR wallets only: the recipient to pass to signMessage together with the message.
Variant 2 · null
summarystringrequiredA short summary of what approving would do.
statusstringrequiredpending while it waits for a decision, approved or denied once decided, or expired when nobody decided before expiresAt.
Validation rules
- Allowed values
["pending","approved","denied","expired"]
reasonstring or nullrequiredWhy it was decided, if a reason was given.
requestedAtstring · date-timerequiredWhen the agent asked.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
expiresAtstring · date-timerequiredWhen the approval expires if nobody decides it.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
decidedAtanyOfrequiredWhen it was approved or denied; null until then.
Show attributes
When it was approved or denied; null until then.
anyOf · 2 variants
Variant 1 · string · date-time
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 2 · null
consumedAtanyOfrequiredWhen the approved action started, or null until then (always null when denied). The action can still fail afterwards: this is not proof it succeeded.
Show attributes
When the approved action started, or null until then (always null when denied). The action can still fail afterwards: this is not proof it succeeded.
anyOf · 2 variants
Variant 1 · string · date-time
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 2 · null
signedByanyOfrequiredFor an approved money action, which only the user's signature approves: the sign-in wallet that signed it, by its public identifier (an EVM, Solana, Stellar or Tron address, a NEAR account, a TON public key, or a passkey's credential id). A user's sign-in wallet is fixed at their first sign-in and never replaced, so reading it now names the same wallet that signed when the action was approved. null for any other approval, and for a money action approved before the user's sign-in wallet was registered, when approvals took no signature.
Show attributes
For an approved money action, which only the user's signature approves: the sign-in wallet that signed it, by its public identifier (an EVM, Solana, Stellar or Tron address, a NEAR account, a TON public key, or a passkey's credential id). A user's sign-in wallet is fixed at their first sign-in and never replaced, so reading it now names the same wallet that signed when the action was approved. null for any other approval, and for a money action approved before the user's sign-in wallet was registered, when approvals took no signature.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Minimum length
1- Maximum length
8192
Variant 2 · null
conversationIdstring · uuidrequiredThe conversation's id.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
runIdanyOfrequiredThe run waiting on this approval; null only for old approvals.
Show attributes
The run waiting on this approval; null only for old approvals.
anyOf · 2 variants
Variant 1 · string · uuid
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
Variant 2 · null
operationIdnullrequiredAlways null for an approval a run is waiting on.
Variant 2 · object
idstring · uuidrequiredThe approval's id.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
toolstringrequiredThe tool the agent wants to use.
fingerprintstringrequiredThe SHA-256 digest, as 64 lowercase hexadecimal characters, of the tool and its exact input in canonical JSON, with the deployment's no-signing restriction when it set one: the decision applies to exactly this action, and the action that runs must match it.
inputanyOfrequiredThe tool's input, exactly as it would run: show it to the user.
Show attributes
The tool's input, exactly as it would run: show it to the user.
anyOf · 6 variants
Variant 1 · string
Variant 2 · number
Variant 3 · boolean
Variant 4 · null
Variant 5 · array
Array items · anyOf
Recursive reference: #/components/schemas/JsonValue. See the complete schema below.
Variant 6 · object
Validation rules
- propertyNames
{"type":"string"}
Additional property values
Recursive reference: #/components/schemas/JsonValue. See the complete schema below.
contractanyOfrequiredFor a money action, the amounts, assets, destinations and limits approving it allows; null for other actions.
Show attributes
For a money action, the amounts, assets, destinations and limits approving it allows; null for other actions.
anyOf · 2 variants
Variant 1 · oneOf
oneOf · 20 variants
Variant 1 · type: near_intents_transfer
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"near_intents_transfer"
actionsarrayrequiredThe actions this contract authorizes, executed in order.
Show attributes
The actions this contract authorizes, executed in order.
Validation rules
- Minimum items
1- Maximum items
16
Array items · oneOf
oneOf · 4 variants
Variant 1 · kind: swap
kindstringrequiredExchange one asset for another; custody never leaves the agent wallet.
Validation rules
- Exact value
"swap"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
exitoneOfoptionalOptional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
Show attributes
Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
oneOf · 3 variants
Variant 1 · kind: take_profit
A take-profit exit: sell once the price is up this much on average cost.
kindstringrequiredSell when the asset is this far ABOVE the automation's average cost.
Validation rules
- Exact value
"take_profit"
gainBpsstringrequiredHow far above the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 2 · kind: stop_loss
A stop-loss exit: sell once the price is down this much on average cost.
kindstringrequiredSell when the asset is this far BELOW the automation's average cost.
Validation rules
- Exact value
"stop_loss"
lossBpsstringrequiredHow far below the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 3 · kind: harvest_every
A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every days days it sells only the gain, if there is any, and the automation keeps running.
kindstringrequiredTake profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled.
Validation rules
- Exact value
"harvest_every"
daysstringrequiredHow many days apart harvests are, 7 to 365, as a decimal string: "7" weekly, "30" monthly.
Validation rules
- Pattern
"^[1-9]\\d{0,2}$"
Variant 2 · kind: withdraw_to_owner
kindstringrequiredReturn an asset to the account that owns the agent wallet.
Validation rules
- Exact value
"withdraw_to_owner"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
Variant 3 · kind: withdraw_transfer
kindstringrequiredPay the exact approved destination through the provider’s chain or Intents transfer route.
Validation rules
- Exact value
"withdraw_transfer"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe exact approved payout rail, network and address.
Show attributes
The exact approved payout rail, network and address.
railstringrequiredA native blockchain transfer or a signed transfer within an Intents ledger.
Validation rules
- Allowed values
["chain","intents"]
networkstringrequiredExact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain.
Validation rules
- Pattern
"^[a-z][a-z0-9-]{0,63}$"
addressstringrequiredExact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,256}$"
memonullrequiredStandalone routing memos are unsupported; routing must be encoded in the approved address.
minimumReceivedRawanyOfrequiredMinimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
Show attributes
Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
maxFeeRawanyOfrequiredOptional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
Show attributes
Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
Variant 4 · kind: send
kindstringrequiredNot executable, and refused in new contracts: pay an address with withdraw_transfer.
Validation rules
- Exact value
"send"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe pinned destination this action pays.
Show attributes
The pinned destination this action pays.
chainstringrequiredWhich chain the destination address is on.
Validation rules
- Minimum length
1- Maximum length
32
addressstringrequiredThe destination address on that chain.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,128}$"
validUntilstring · date-timerequiredWhen this contract's authority expires.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
maxExecutionsintegerrequiredHow many times this contract may be executed before it is exhausted.
Validation rules
- Minimum
1- Maximum
10000
maxTotalInputarrayoptionalOptional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Show attributes
Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
boundsobjectrequiredThe value-loss and signature-lifetime limits every execution must respect.
Show attributes
The value-loss and signature-lifetime limits every execution must respect.
maxValueLossBpsstringrequiredThe most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
maxSignatureLifetimeSecondsintegerrequiredExplicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity.
Validation rules
- Minimum
1- Maximum
259500
executionanyOfoptionalOptional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
Show attributes
Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
anyOf · 2 variants
Variant 1 · object
modestringrequiredOrdered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved.
Validation rules
- Allowed values
["ordered","parallel_independent"]
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · object
modestringrequiredValidation rules
- Exact value
"dependency_graph"
dependenciesarrayrequiredOne row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Show attributes
One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Validation rules
- Minimum items
1- Maximum items
16
Array items · array
Validation rules
- Maximum items
16
Array items · integer
Validation rules
- Minimum
0- Maximum
15
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · type: limit_order
Owner-signed authority for one resting limit order: the exact approved placement, created and funded once by the policy worker before the approval expires.
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"limit_order"
orderobjectrequiredThe exact approved placement request.
Show attributes
The exact approved placement request.
inputobjectrequiredThe input (base) asset this order sells.
Show attributes
The input (base) asset this order sells.
pinnedobjectrequiredThe exact asset the order sells: token id and decimals.
Show attributes
The exact asset the order sells: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
outputobjectrequiredThe output (quote) asset this order buys.
Show attributes
The output (quote) asset this order buys.
pinnedobjectrequiredThe exact asset the order buys: token id and decimals.
Show attributes
The exact asset the order buys: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
quantitystringrequiredThe exact input amount to sell, in the input asset's smallest unit. 1 NEAR with verified decimals 24 is "1000000000000000000000000". Scale decimal digits with the verified decimals and reject excess fractional digits; no floating-point arithmetic or bash.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
limitPricestringrequiredThe minimum price the fill must reach, as output-asset units per ONE input unit, written as a plain human decimal: "5" means at least 5 output tokens per 1 input token. Never scale it by decimals.
Validation rules
- Maximum length
80- Pattern
"^(0|[1-9]\\d{0,38})(\\.\\d{1,38})?$"
expiresInHoursintegerrequiredHow long the order may rest before it expires, in whole hours. Use the user's duration within this wallet's maximum, or the wallet's default from the latest request's host context when none is given. The schema permits up to 720 hours (30 days); a wallet may have a lower maximum. Never shorten a requested duration to fit.
Validation rules
- Minimum
1- Maximum
720
validUntilstring · date-timerequiredThe latest instant the order may be created and funded under this consent.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 3 · type: perps_transfer
One approved perps transfer in exactly the named direction.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_transfer"
directionstringrequiredFund the own perps account from the agent wallet, or withdraw back to the same agent wallet.
Validation rules
- Allowed values
["fund","withdraw"]
transferobjectrequiredThe exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact amount in six-decimal atomic units in either direction: 5 USDC is "5000000". A withdrawal returns USDC. A funding spends it from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it; Hyperliquid receives USDC. Never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalA funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
Show attributes
A funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 4 · type: perps_order
One approved Hyperliquid order, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_order"
orderobjectrequiredThe exact approved order.
Show attributes
The exact approved order.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
sidestringrequiredThe position this order opens, adds to, reduces or protects. A reduce-only entry on a long position sells.
Validation rules
- Allowed values
["long","short"]
sizestringrequiredExact size in the coin, at most the market's szDecimals places.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
leverageanyOfrequiredLeverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
Show attributes
Leverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
100
Variant 2 · null
marginModestringoptionalHow the position is margined, which the user chose with the leverage: cross shares the account's margin with every cross position, isolated puts only this position's own margin at risk (perps_margin_update adds or removes it later). Present exactly when leverage is; an isolated-only market (perps_markets onlyIsolated) takes isolated. Never assume it: ask the user. Absent on orders approved before margin modes existed, which were cross.
Validation rules
- Allowed values
["cross","isolated"]
entryanyOfrequiredThe order itself; null for take-profit and stop-loss on the existing position only.
Show attributes
The order itself; null for take-profit and stop-loss on the existing position only.
anyOf · 2 variants
Variant 1 · object
pricestringrequiredThe limit price; for an immediate (Ioc) order, the worst price it may fill at.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
timeInForcestringrequiredIoc fills now within price and cancels the rest (a market order), Gtc rests until filled or cancelled, Alo rests only as a maker order.
Validation rules
- Allowed values
["Gtc","Ioc","Alo"]
reduceOnlybooleanrequiredTrue to only reduce or close the existing position, never open or add.
Variant 2 · null
takeProfitanyOfrequiredA reduce-only take-profit, or null.
Show attributes
A reduce-only take-profit, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
stopLossanyOfrequiredA reduce-only stop-loss, or null.
Show attributes
A reduce-only stop-loss, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
trailingStopanyOfoptionalA reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
Show attributes
A reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size that follows the mark price as it moves in the position's favour and fires once it reverses by the retracement.
retracementanyOfrequiredHow far the mark price may reverse from its best before the stop fires.
Show attributes
How far the mark price may reverse from its best before the stop fires.
anyOf · 2 variants
Variant 1 · object
Trail by a percentage of the best mark price.
percentstringrequiredHow far the mark price may reverse from its best since activation, in percent: 2 is 2%.
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · object
Trail by a fixed price distance.
pricestringrequiredHow far the mark price may reverse from its best since activation, in price units.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
activationPriceanyOfrequiredThe mark price that starts the trailing; null to trail from placement.
Show attributes
The mark price that starts the trailing; null to trail from placement.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
Variant 2 · null
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 5 · type: perps_cancel
One approved cancellation of one resting Hyperliquid order.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_cancel"
cancelobjectrequiredThe exact order approved for cancelling.
Show attributes
The exact order approved for cancelling.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
oidintegerrequiredThe resting order's id exactly as perps_orders lists it.
Validation rules
- Greater than
0- Maximum
9007199254740991
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 6 · type: perps_automation
A standing approval for one perps automation: open the agent's own position while it holds nothing on the coin, reduce or close it, or add margin to its own account, each time its rule fires, up to its limits.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_automation"
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
positionstringrequiredThe position the action is for. open acts only while the agent holds nothing on this coin; reduce and add_margin act only while it holds this side, and nothing happens otherwise.
Validation rules
- Allowed values
["long","short"]
actiononeOfrequiredWhat a perps automation does each time its rule fires: open the named position while the agent holds nothing on its coin, reduce the named position, or add margin to the agent's own perps account.
Show attributes
What a perps automation does each time its rule fires: open the named position while the agent holds nothing on its coin, reduce the named position, or add margin to the agent's own perps account.
oneOf · 3 variants
Variant 1 · kind: reduce
Close part or all of the position with a reduce-only market order.
kindstringrequiredReduce or close the position.
Validation rules
- Exact value
"reduce"
fractionBpsintegerrequiredHow much of the position to close, in basis points: 10000 closes it all.
Validation rules
- Minimum
1- Maximum
10000
maxSlippageBpsintegerrequiredThe worst fill allowed, in basis points from the mark when it fires.
Validation rules
- Minimum
1- Maximum
500
Variant 2 · kind: add_margin
Fund the agent's own perps account from its agent wallet.
kindstringrequiredAdd margin to the perps account.
Validation rules
- Exact value
"add_margin"
amountRawstringrequiredExact USDC moved from the agent wallet into the perps account, six decimals: 5 USDC is "5000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredMaximum value lost to fees moving it, in basis points.
Validation rules
- Minimum
0- Maximum
300
Variant 3 · kind: open
Open the position with a market order, only while the agent holds nothing on this coin, optionally protected by a native take-profit and stop-loss.
kindstringrequiredOpen the position at market.
Validation rules
- Exact value
"open"
notionalUsdstringrequiredThe position's size in US dollars at the mark when it fires, at most two places: a $200 position is "200". The size in the coin is this over the mark, rounded down to the market's size precision.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,2})?$"
leverageintegerrequiredLeverage the user chose for this market, at most the market's maximum. Never assume it: ask the user.
Validation rules
- Minimum
1- Maximum
100
marginModestringrequiredHow the position is margined, which the user chose with the leverage: cross shares the account's margin, isolated risks only this position's own. An isolated-only market takes isolated. Never assume it: ask the user.
Validation rules
- Allowed values
["cross","isolated"]
maxSlippageBpsintegerrequiredThe worst fill allowed, in basis points from the mark when it fires; the take-profit and stop-loss fill within the same bound of their trigger.
Validation rules
- Minimum
1- Maximum
500
takeProfitPercentanyOfrequiredA native take-profit this far from the mark when it opens, in percent of price in the position's favour ("10" is 10%), or null for none.
Show attributes
A native take-profit this far from the mark when it opens, in percent of price in the position's favour ("10" is 10%), or null for none.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · null
stopLossPercentanyOfrequiredA native stop-loss this far from the mark when it opens, in percent of price against the position ("5" is 5%), or null for none.
Show attributes
A native stop-loss this far from the mark when it opens, in percent of price against the position ("5" is 5%), or null for none.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · null
maxExecutionsintegerrequiredHow many firings may act under this approval.
Validation rules
- Minimum
1- Maximum
100
validUntilstring · date-timerequiredThe deadline after which this approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 7 · type: perps_margin
One approved change to one isolated position's margin, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_margin"
marginobjectrequiredThe exact approved margin change.
Show attributes
The exact approved margin change.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
changestringrequiredadd moves USDC from the account into the position's isolated margin, lowering its liquidation risk; remove takes it back out, raising that risk. A strict isolated market never lets margin be removed while the position is open.
Validation rules
- Allowed values
["add","remove"]
amountstringrequiredExact USDC to move, at most six decimal places, such as 25 or 12.5.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,8})(\\.[0-9]{0,5}[1-9])?$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 8 · type: prediction_fund
One exact USDC or USDT debit delivered as native Base USDC to Polymarket's bridge for the agent's own account; the final pUSD amount is not bounded.
typestringrequiredOne approved Polymarket funding transfer.
Validation rules
- Exact value
"prediction_fund"
transferobjectrequiredThe exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact debit in six-decimal atomic units: 5 USDC or USDT is "5000000", spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it. The host resolves the agent’s own Polymarket Deposit Wallet and its bridge address; never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxFirstLegLossBpsintegerrequiredExplicit maximum loss, in basis points, of the first leg only: the wallet's USDC, USDT or coin delivered as native Base USDC to Polymarket's bridge, fees and any cross-chain hop included. It does not bound the bridge's conversion to pUSD on Polygon, whose fees and output are variable and estimated. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
Show attributes
Approved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 9 · type: solana_buy
An approved Solana buy, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_buy"
buyobjectrequiredThe exact approved token, payment, all-in loss bound and SOL top-up cap, and, for a buy whose funding pays with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved token, payment, all-in loss bound and SOL top-up cap, and, for a buy whose funding pays with a coin, that coin and the most of it it may spend.
tokenobjectrequiredThe exact token to buy.
Show attributes
The exact token to buy.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
payoneOfrequiredWhat the buy spends, as an exact input amount. Buying an exact number of tokens is not supported.
Show attributes
What the buy spends, as an exact input amount. Buying an exact number of tokens is not supported.
oneOf · 2 variants
Variant 1 · kind: usdc
Spend an exact amount of USDC or USDT from the agent wallet.
kindstringrequiredPay from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT), moved to Solana as SOL first.
Validation rules
- Exact value
"usdc"
amountRawstringrequiredExact USDC or USDT to spend, in six-decimal atomic units: $50 is "50000000". At least 5 ("5000000"); a smaller buy is refused.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: sol
Spend an exact amount of SOL the agent's Solana account already holds.
kindstringrequiredPay with SOL already in the agent's Solana account.
Validation rules
- Exact value
"sol"
lamportsstringrequiredExact SOL to spend, in lamports (nine decimals): 0.5 SOL is "500000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
maxSolTopUpUsdcRawstringrequiredThe most extra USDC or USDT the funding may add to keep SOL in the Solana account for network fees, in six-decimal atomic units: "0" for none, at most "1000000" (1 USDC). Must be "0" when paying with SOL.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
payWithobjectoptionalA buy paid in dollars and approved in chat as one call: the coin its funding pays with instead of a USDC or USDT holding, and the most of it it may spend, the SOL top-up included. Never SOL. A buy from a token's page refuses it.
Show attributes
A buy paid in dollars and approved in chat as one call: the coin its funding pays with instead of a USDC or USDT holding, and the most of it it may spend, the SOL top-up included. Never SOL. A buy from a token's page refuses it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 10 · type: solana_sell
An approved Solana sell, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_sell"
sellobjectrequiredThe exact approved token, amount, proceeds and all-in loss bound.
Show attributes
The exact approved token, amount, proceeds and all-in loss bound.
tokenobjectrequiredThe exact token to sell.
Show attributes
The exact token to sell.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
amountoneOfrequiredHow much of the token to sell.
Show attributes
How much of the token to sell.
oneOf · 2 variants
Variant 1 · kind: exact
Sell an exact amount of the token.
kindstringrequiredSell an exact amount of the token.
Validation rules
- Exact value
"exact"
amountRawstringrequiredExact amount of the token to sell, in its smallest unit (scaled by the token's decimals).
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: fraction
Sell a share of the account's balance of the token.
kindstringrequiredSell a share of what the Solana account holds of the token.
Validation rules
- Exact value
"fraction"
bpsintegerrequiredThe share to sell, in basis points of the account's balance of the token: all of it is 10000, half is 5000.
Validation rules
- Minimum
1- Maximum
10000
receivestringrequiredusdc returns the proceeds to the agent wallet as USDC on NEAR, which is what selling means; sol keeps them as SOL in the agent's Solana account.
Validation rules
- Allowed values
["usdc","sol"]
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 11 · type: solana_fund
An approved move of USDC or USDT, or a coin, into the agent's own Solana account.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_fund"
fundobjectrequiredThe exact approved amount and loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact USDC or USDT to move from the agent wallet into the agent's Solana account as SOL, in six-decimal atomic units: 5 USDC is "5000000". Spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees: at most 300. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call: the coin this funding pays with instead of a USDC or USDT holding, and the most of it it may spend. Never SOL.
Show attributes
Approved in chat as one call: the coin this funding pays with instead of a USDC or USDT holding, and the most of it it may spend. Never SOL.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 12 · type: solana_withdraw
An approved move of SOL from the agent's own Solana account back to its agent wallet.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_withdraw"
withdrawobjectrequiredThe exact approved amount, what returns and the loss bound.
Show attributes
The exact approved amount, what returns and the loss bound.
amountoneOfrequiredHow much SOL to withdraw from the agent's Solana account.
Show attributes
How much SOL to withdraw from the agent's Solana account.
oneOf · 2 variants
Variant 1 · kind: exact
Withdraw an exact amount of SOL.
kindstringrequiredWithdraw an exact amount of SOL.
Validation rules
- Exact value
"exact"
lamportsstringrequiredExact SOL to withdraw, in lamports (nine decimals): 0.5 SOL is "500000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: all_spendable
Withdraw all the spendable SOL.
kindstringrequiredWithdraw all the SOL above the reserve the account keeps for rent and network fees.
Validation rules
- Exact value
"all_spendable"
receivestringrequiredusdc returns it to the agent wallet as USDC on NEAR; sol returns it to the agent wallet as SOL.
Validation rules
- Allowed values
["usdc","sol"]
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees: at most 300. Required; no default.
Validation rules
- Minimum
0- Maximum
300
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 13 · type: prediction_order
typestringrequiredValidation rules
- Exact value
"prediction_order"
orderobjectrequiredShow attributes
marketIdstringrequiredValidation rules
- Pattern
"^[1-9][0-9]{0,19}$"
assetIdstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,77})$"
marketQuestionstringrequiredValidation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredValidation rules
- Minimum length
1- Maximum length
256
sidestringrequiredValidation rules
- Allowed values
["BUY","SELL"]
limitPriceUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
quantityoneOfrequiredShow attributes
oneOf · 2 variants
Variant 1 · kind: shares
kindstringrequiredValidation rules
- Exact value
"shares"
sizeSharesDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
Variant 2 · kind: budget
kindstringrequiredValidation rules
- Exact value
"budget"
amountUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
orderTypestringrequiredValidation rules
- Allowed values
["GTC","GTD","FOK","FAK"]
expiresAtintegeroptionalValidation rules
- Minimum
0- Maximum
253402300799
maxFeeUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
maxSpendUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 14 · type: prediction_withdraw
typestringrequiredValidation rules
- Exact value
"prediction_withdraw"
withdrawalobjectrequiredWithdraw pUSD through Polymarket’s conversion service as native USDC on Polygon to a unique verified 1Click address crediting only the agent’s own confidential Intents wallet. Funding remains a separate USDC route.
Show attributes
Withdraw pUSD through Polymarket’s conversion service as native USDC on Polygon to a unique verified 1Click address crediting only the agent’s own confidential Intents wallet. Funding remains a separate USDC route.
amountRawstringrequiredExact pUSD debit in six-decimal atomic units: 5 pUSD is "5000000". Only the agent’s own Deposit Wallet is spent.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 15 · type: composite
One owner signature over several exact one-shot grants and the order they run in.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"composite"
piecesarrayrequiredShow attributes
Validation rules
- Minimum items
1- Maximum items
6
Array items · object
toolstringrequiredThe tool whose one-shot call this piece is.
Validation rules
- Allowed values
["intents_execute","perps_fund","perps_order_place","prediction_fund","prediction_order_place","perps_withdraw","prediction_withdraw"]
contractanyOfrequiredShow attributes
anyOf · 7 variants
Variant 1 · type: near_intents_transfer
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"near_intents_transfer"
actionsarrayrequiredThe actions this contract authorizes, executed in order.
Show attributes
The actions this contract authorizes, executed in order.
Validation rules
- Minimum items
1- Maximum items
16
Array items · oneOf
oneOf · 4 variants
Variant 1 · kind: swap
kindstringrequiredExchange one asset for another; custody never leaves the agent wallet.
Validation rules
- Exact value
"swap"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
exitoneOfoptionalOptional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
Show attributes
Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
oneOf · 3 variants
Variant 1 · kind: take_profit
A take-profit exit: sell once the price is up this much on average cost.
kindstringrequiredSell when the asset is this far ABOVE the automation's average cost.
Validation rules
- Exact value
"take_profit"
gainBpsstringrequiredHow far above the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 2 · kind: stop_loss
A stop-loss exit: sell once the price is down this much on average cost.
kindstringrequiredSell when the asset is this far BELOW the automation's average cost.
Validation rules
- Exact value
"stop_loss"
lossBpsstringrequiredHow far below the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 3 · kind: harvest_every
A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every days days it sells only the gain, if there is any, and the automation keeps running.
kindstringrequiredTake profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled.
Validation rules
- Exact value
"harvest_every"
daysstringrequiredHow many days apart harvests are, 7 to 365, as a decimal string: "7" weekly, "30" monthly.
Validation rules
- Pattern
"^[1-9]\\d{0,2}$"
Variant 2 · kind: withdraw_to_owner
kindstringrequiredReturn an asset to the account that owns the agent wallet.
Validation rules
- Exact value
"withdraw_to_owner"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
Variant 3 · kind: withdraw_transfer
kindstringrequiredPay the exact approved destination through the provider’s chain or Intents transfer route.
Validation rules
- Exact value
"withdraw_transfer"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe exact approved payout rail, network and address.
Show attributes
The exact approved payout rail, network and address.
railstringrequiredA native blockchain transfer or a signed transfer within an Intents ledger.
Validation rules
- Allowed values
["chain","intents"]
networkstringrequiredExact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain.
Validation rules
- Pattern
"^[a-z][a-z0-9-]{0,63}$"
addressstringrequiredExact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,256}$"
memonullrequiredStandalone routing memos are unsupported; routing must be encoded in the approved address.
minimumReceivedRawanyOfrequiredMinimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
Show attributes
Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
maxFeeRawanyOfrequiredOptional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
Show attributes
Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
Variant 4 · kind: send
kindstringrequiredNot executable, and refused in new contracts: pay an address with withdraw_transfer.
Validation rules
- Exact value
"send"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe pinned destination this action pays.
Show attributes
The pinned destination this action pays.
chainstringrequiredWhich chain the destination address is on.
Validation rules
- Minimum length
1- Maximum length
32
addressstringrequiredThe destination address on that chain.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,128}$"
validUntilstring · date-timerequiredWhen this contract's authority expires.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
maxExecutionsintegerrequiredHow many times this contract may be executed before it is exhausted.
Validation rules
- Minimum
1- Maximum
10000
maxTotalInputarrayoptionalOptional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Show attributes
Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
boundsobjectrequiredThe value-loss and signature-lifetime limits every execution must respect.
Show attributes
The value-loss and signature-lifetime limits every execution must respect.
maxValueLossBpsstringrequiredThe most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
maxSignatureLifetimeSecondsintegerrequiredExplicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity.
Validation rules
- Minimum
1- Maximum
259500
executionanyOfoptionalOptional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
Show attributes
Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
anyOf · 2 variants
Variant 1 · object
modestringrequiredOrdered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved.
Validation rules
- Allowed values
["ordered","parallel_independent"]
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · object
modestringrequiredValidation rules
- Exact value
"dependency_graph"
dependenciesarrayrequiredOne row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Show attributes
One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Validation rules
- Minimum items
1- Maximum items
16
Array items · array
Validation rules
- Maximum items
16
Array items · integer
Validation rules
- Minimum
0- Maximum
15
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · type: perps_transfer
One approved perps transfer in exactly the named direction.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_transfer"
directionstringrequiredFund the own perps account from the agent wallet, or withdraw back to the same agent wallet.
Validation rules
- Allowed values
["fund","withdraw"]
transferobjectrequiredThe exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact amount in six-decimal atomic units in either direction: 5 USDC is "5000000". A withdrawal returns USDC. A funding spends it from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it; Hyperliquid receives USDC. Never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalA funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
Show attributes
A funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 3 · type: perps_order
One approved Hyperliquid order, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_order"
orderobjectrequiredThe exact approved order.
Show attributes
The exact approved order.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
sidestringrequiredThe position this order opens, adds to, reduces or protects. A reduce-only entry on a long position sells.
Validation rules
- Allowed values
["long","short"]
sizestringrequiredExact size in the coin, at most the market's szDecimals places.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
leverageanyOfrequiredLeverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
Show attributes
Leverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
100
Variant 2 · null
marginModestringoptionalHow the position is margined, which the user chose with the leverage: cross shares the account's margin with every cross position, isolated puts only this position's own margin at risk (perps_margin_update adds or removes it later). Present exactly when leverage is; an isolated-only market (perps_markets onlyIsolated) takes isolated. Never assume it: ask the user. Absent on orders approved before margin modes existed, which were cross.
Validation rules
- Allowed values
["cross","isolated"]
entryanyOfrequiredThe order itself; null for take-profit and stop-loss on the existing position only.
Show attributes
The order itself; null for take-profit and stop-loss on the existing position only.
anyOf · 2 variants
Variant 1 · object
pricestringrequiredThe limit price; for an immediate (Ioc) order, the worst price it may fill at.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
timeInForcestringrequiredIoc fills now within price and cancels the rest (a market order), Gtc rests until filled or cancelled, Alo rests only as a maker order.
Validation rules
- Allowed values
["Gtc","Ioc","Alo"]
reduceOnlybooleanrequiredTrue to only reduce or close the existing position, never open or add.
Variant 2 · null
takeProfitanyOfrequiredA reduce-only take-profit, or null.
Show attributes
A reduce-only take-profit, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
stopLossanyOfrequiredA reduce-only stop-loss, or null.
Show attributes
A reduce-only stop-loss, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
trailingStopanyOfoptionalA reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
Show attributes
A reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size that follows the mark price as it moves in the position's favour and fires once it reverses by the retracement.
retracementanyOfrequiredHow far the mark price may reverse from its best before the stop fires.
Show attributes
How far the mark price may reverse from its best before the stop fires.
anyOf · 2 variants
Variant 1 · object
Trail by a percentage of the best mark price.
percentstringrequiredHow far the mark price may reverse from its best since activation, in percent: 2 is 2%.
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · object
Trail by a fixed price distance.
pricestringrequiredHow far the mark price may reverse from its best since activation, in price units.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
activationPriceanyOfrequiredThe mark price that starts the trailing; null to trail from placement.
Show attributes
The mark price that starts the trailing; null to trail from placement.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
Variant 2 · null
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 4 · type: prediction_fund
One exact USDC or USDT debit delivered as native Base USDC to Polymarket's bridge for the agent's own account; the final pUSD amount is not bounded.
typestringrequiredOne approved Polymarket funding transfer.
Validation rules
- Exact value
"prediction_fund"
transferobjectrequiredThe exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact debit in six-decimal atomic units: 5 USDC or USDT is "5000000", spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it. The host resolves the agent’s own Polymarket Deposit Wallet and its bridge address; never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxFirstLegLossBpsintegerrequiredExplicit maximum loss, in basis points, of the first leg only: the wallet's USDC, USDT or coin delivered as native Base USDC to Polymarket's bridge, fees and any cross-chain hop included. It does not bound the bridge's conversion to pUSD on Polygon, whose fees and output are variable and estimated. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
Show attributes
Approved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 5 · type: prediction_order
typestringrequiredValidation rules
- Exact value
"prediction_order"
orderobjectrequiredShow attributes
marketIdstringrequiredValidation rules
- Pattern
"^[1-9][0-9]{0,19}$"
assetIdstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,77})$"
marketQuestionstringrequiredValidation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredValidation rules
- Minimum length
1- Maximum length
256
sidestringrequiredValidation rules
- Allowed values
["BUY","SELL"]
limitPriceUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
quantityoneOfrequiredShow attributes
oneOf · 2 variants
Variant 1 · kind: shares
kindstringrequiredValidation rules
- Exact value
"shares"
sizeSharesDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
Variant 2 · kind: budget
kindstringrequiredValidation rules
- Exact value
"budget"
amountUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
orderTypestringrequiredValidation rules
- Allowed values
["GTC","GTD","FOK","FAK"]
expiresAtintegeroptionalValidation rules
- Minimum
0- Maximum
253402300799
maxFeeUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
maxSpendUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 6 · type: perps_freed_withdrawal
One withdrawal home of what a cash-out's exit freed on Hyperliquid, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_freed_withdrawal"
withdrawalobjectrequiredThe signed maximum and all-in loss bound of the withdrawal home.
Show attributes
The signed maximum and all-in loss bound of the withdrawal home.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic USDC: what the exit before it frees, sized by the host before the approval opens. Never more than the exit freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 7 · type: prediction_freed_withdrawal
One withdrawal home of what a cash-out's sale freed on Polymarket, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredValidation rules
- Exact value
"prediction_freed_withdrawal"
withdrawalobjectrequiredWithdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
Show attributes
Withdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic pUSD: what the sale before it frees, sized by the host before the approval opens. Never more than the sale freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
startBystring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
dependenciesarrayrequiredShow attributes
Array items · array
Validation rules
- Maximum items
6
Array items · integer
Validation rules
- Minimum
0- Maximum
9007199254740991
walletDebitanyOfrequiredThe sum of every piece's debit from the agent wallet, per token, in raw units. Empty when the pieces are venue orders paid from money already on their venues, as when finishing a basket, or a cash-out, which closes a position and brings home what that freed.
Show attributes
The sum of every piece's debit from the agent wallet, per token, in raw units. Empty when the pieces are venue orders paid from money already on their venues, as when finishing a basket, or a cash-out, which closes a position and brings home what that freed.
anyOf · 2 variants
Variant 1 · array
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · array
Validation rules
- prefixItems
[]- Maximum items
0
Array items · never
No value is allowed.
validUntilstring · date-timerequiredWhen every piece that has not started loses its authority.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 16 · type: prediction_automation
A standing approval for one Polymarket automation: buy one outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price, each time its rule fires, up to its limits.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"prediction_automation"
marketobjectrequiredThe one Polymarket outcome this automation trades.
Show attributes
The one Polymarket outcome this automation trades.
marketIdstringrequiredThe market's id exactly as prediction_market returns it.
Validation rules
- Pattern
"^[1-9][0-9]{0,19}$"
conditionIdstringrequiredThe market's conditionId exactly as prediction_market returns it.
Validation rules
- Pattern
"^0x[0-9a-fA-F]{64}$"
assetIdstringrequiredThe outcome's CLOB token id, exactly the assetId prediction_market lists for that outcome. Yes and No are different tokens.
Validation rules
- Pattern
"^[1-9][0-9]{0,77}$"
marketQuestionstringrequiredThe market's question exactly as prediction_market returns it.
Validation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredThe outcome's name exactly as prediction_market returns it.
Validation rules
- Minimum length
1- Maximum length
256
actiononeOfrequiredWhat a Polymarket automation does each time its rule fires: buy the outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price.
Show attributes
What a Polymarket automation does each time its rule fires: buy the outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price.
oneOf · 2 variants
Variant 1 · kind: buy
Buy the outcome with a USD budget at no more than a maximum price.
kindstringrequiredBuy shares of the outcome.
Validation rules
- Exact value
"buy"
amountUsdDecimalstringrequiredThe USD each firing spends before fees, to the cent: "50" is $50. Each buy is an immediate order that fills what it can at once and cancels the rest.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,2})?$"
maxPriceUsdDecimalstringrequiredThe most a share may cost, as the market's chance: "0.32" never pays more than 32¢ a share. Use a price on the market's tick.
Validation rules
- Pattern
"^0\\.[0-9]{1,4}$"
maxFeeUsdDecimalstringrequiredThe most each firing may pay Polymarket in fees, in USD: "1" is $1.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,6})?$"
Variant 2 · kind: sell
Sell a share of the agent's holding of the outcome at no less than a minimum price.
kindstringrequiredSell shares of the outcome.
Validation rules
- Exact value
"sell"
fractionBpsintegerrequiredHow much of the agent's holding of the outcome each firing sells, in basis points: 10000 sells it all.
Validation rules
- Minimum
1- Maximum
10000
minPriceUsdDecimalstringrequiredThe least a share may sell for, as the market's chance: "0.7" never sells below 70¢ a share. Use a price on the market's tick.
Validation rules
- Pattern
"^0\\.[0-9]{1,4}$"
maxFeeUsdDecimalstringrequiredThe most each firing may pay Polymarket in fees, in USD: "1" is $1.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,6})?$"
maxExecutionsintegerrequiredHow many firings may trade under this approval; a buy spends at most maxExecutions × amountUsdDecimal in all.
Validation rules
- Minimum
1- Maximum
100
validUntilstring · date-timerequiredThe deadline after which this approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 17 · type: solana_sell_many
An approved multi-coin Solana sale, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_sell_many"
sellManyobjectrequiredThe exact approved coins, amounts and loss bounds, in order, and where the proceeds go.
Show attributes
The exact approved coins, amounts and loss bounds, in order, and where the proceeds go.
sellsarrayrequiredThe coins to sell, in the order they are sold: 2 to 6, each a different mint, none of them SOL itself.
Show attributes
The coins to sell, in the order they are sold: 2 to 6, each a different mint, none of them SOL itself.
Validation rules
- Minimum items
2- Maximum items
6
Array items · object
One coin of a multi-coin sale, sold through the agent's own Solana account.
tokenobjectrequiredThe exact token to sell.
Show attributes
The exact token to sell.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
amountoneOfrequiredHow much of the token to sell.
Show attributes
How much of the token to sell.
oneOf · 2 variants
Variant 1 · kind: exact
Sell an exact amount of the token.
kindstringrequiredSell an exact amount of the token.
Validation rules
- Exact value
"exact"
amountRawstringrequiredExact amount of the token to sell, in its smallest unit (scaled by the token's decimals).
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: fraction
Sell a share of the account's balance of the token.
kindstringrequiredSell a share of what the Solana account holds of the token.
Validation rules
- Exact value
"fraction"
bpsintegerrequiredThe share to sell, in basis points of the account's balance of the token: all of it is 10000, half is 5000.
Validation rules
- Minimum
1- Maximum
10000
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
receivestringrequiredusdc returns the summed proceeds of every sale that went through to the agent wallet as USDC on NEAR, in one transfer once the last sale ran; sol keeps them as SOL in the agent's Solana account.
Validation rules
- Allowed values
["usdc","sol"]
maxExecutionsnumberrequiredA multi-coin sale is approved once and runs once: always 1.
Validation rules
- Exact value
1
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 18 · type: grid
Owner-signed authority for one grid: the resting cell orders its terms derive, until it ends.
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"grid"
gridobjectrequiredA grid's exact terms: pair, levels, quantity and starting sides.
Show attributes
A grid's exact terms: pair, levels, quantity and starting sides.
baseobjectrequiredThe asset the grid buys low and sells high.
Show attributes
The asset the grid buys low and sells high.
pinnedobjectrequiredThe exact base asset: token id and decimals.
Show attributes
The exact base asset: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
quoteobjectrequiredThe asset prices are in and buys are paid with.
Show attributes
The asset prices are in and buys are paid with.
pinnedobjectrequiredThe exact quote asset: token id and decimals.
Show attributes
The exact quote asset: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
levelsarrayrequiredThe 2 to 20 grid prices, strictly ascending: quote units per ONE base unit, plain human decimals.
Show attributes
The 2 to 20 grid prices, strictly ascending: quote units per ONE base unit, plain human decimals.
Validation rules
- Minimum items
2- Maximum items
20
Array items · string
Validation rules
- Maximum length
80- Pattern
"^(0|[1-9]\\d{0,38})(\\.\\d{1,38})?$"
quantityPerCellstringrequiredThe exact base amount every cell buys and sells, in the base asset's smallest unit. Fixed: profits never compound.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
cellsarrayrequiredOne entry per cell, lowest first (levels.length - 1 of them): cells wholly below the start price and the one straddling it buy, cells wholly above it stay idle.
Show attributes
One entry per cell, lowest first (levels.length - 1 of them): cells wholly below the start price and the one straddling it buy, cells wholly above it stay idle.
Validation rules
- Minimum items
1- Maximum items
19
Array items · object
startstringrequiredThe side the cell's first order is on: buy at its low level, or idle (the cell never places).
Validation rules
- Allowed values
["buy","idle"]
validUntilstring · date-timerequiredWhen the grid ends: no order is placed, and none rests, after it. At most 720 hours after the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 19 · type: perps_freed_withdrawal
One withdrawal home of what a cash-out's exit freed on Hyperliquid, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_freed_withdrawal"
withdrawalobjectrequiredThe signed maximum and all-in loss bound of the withdrawal home.
Show attributes
The signed maximum and all-in loss bound of the withdrawal home.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic USDC: what the exit before it frees, sized by the host before the approval opens. Never more than the exit freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 20 · type: prediction_freed_withdrawal
One withdrawal home of what a cash-out's sale freed on Polymarket, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredValidation rules
- Exact value
"prediction_freed_withdrawal"
withdrawalobjectrequiredWithdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
Show attributes
Withdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic pUSD: what the sale before it frees, sized by the host before the approval opens. Never more than the sale freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 2 · null
authorizationanyOfrequiredFor a money action waiting for a decision: the message the user signs to approve it, and the request it covers. null for other actions, once decided, and for withdrawals the user starts with Withdraw funds, which approves them itself.
Show attributes
For a money action waiting for a decision: the message the user signs to approve it, and the request it covers. null for other actions, once decided, and for withdrawals the user starts with Withdraw funds, which approves them itself.
anyOf · 2 variants
Variant 1 · object
What the user signs to approve a money action. Sign message exactly as returned and send the signature to Approve an action with controllerId and expiresAt unchanged.
purposestringrequiredAlways financial.approval: the signature approves this one money action.
Validation rules
- Exact value
"financial.approval"
walletIdstring · uuidrequiredThe agent wallet the action spends from.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
requestKeystring · uuidrequiredThe approval's id, which the signature names, so it approves this approval and no other.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
requestobjectrequiredThe exact terms the signature covers, including the permission they grant. Shown for review; the signed message already contains them.
Show attributes
The exact terms the signature covers, including the permission they grant. Shown for review; the signed message already contains them.
approvalIdstring · uuidrequiredThe approval being decided.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
fingerprintstringrequiredFingerprint of the immutable approval bytes.
toolstringrequiredThe exact trusted tool receiving the approved terms.
inputanyOfrequiredThe complete persisted tool arguments to approve.
Show attributes
The complete persisted tool arguments to approve.
anyOf · 6 variants
Variant 1 · string
Variant 2 · number
Variant 3 · boolean
Variant 4 · null
Variant 5 · array
Array items · anyOf
Recursive reference: #/components/schemas/JsonValue. See the complete schema below.
Variant 6 · object
Validation rules
- propertyNames
{"type":"string"}
Additional property values
Recursive reference: #/components/schemas/JsonValue. See the complete schema below.
contractoneOfrequiredExact financial actions, quantity, allowance, validity and loss bounds authorized by this approval: swap actions, one limit order, one perps transfer/order/cancellation or margin change, one Polymarket funding/order/withdrawal, the exact Solana actions, or one grid's terms.
Show attributes
Exact financial actions, quantity, allowance, validity and loss bounds authorized by this approval: swap actions, one limit order, one perps transfer/order/cancellation or margin change, one Polymarket funding/order/withdrawal, the exact Solana actions, or one grid's terms.
oneOf · 20 variants
Variant 1 · type: near_intents_transfer
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"near_intents_transfer"
actionsarrayrequiredThe actions this contract authorizes, executed in order.
Show attributes
The actions this contract authorizes, executed in order.
Validation rules
- Minimum items
1- Maximum items
16
Array items · oneOf
oneOf · 4 variants
Variant 1 · kind: swap
kindstringrequiredExchange one asset for another; custody never leaves the agent wallet.
Validation rules
- Exact value
"swap"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
exitoneOfoptionalOptional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
Show attributes
Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
oneOf · 3 variants
Variant 1 · kind: take_profit
A take-profit exit: sell once the price is up this much on average cost.
kindstringrequiredSell when the asset is this far ABOVE the automation's average cost.
Validation rules
- Exact value
"take_profit"
gainBpsstringrequiredHow far above the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 2 · kind: stop_loss
A stop-loss exit: sell once the price is down this much on average cost.
kindstringrequiredSell when the asset is this far BELOW the automation's average cost.
Validation rules
- Exact value
"stop_loss"
lossBpsstringrequiredHow far below the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 3 · kind: harvest_every
A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every days days it sells only the gain, if there is any, and the automation keeps running.
kindstringrequiredTake profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled.
Validation rules
- Exact value
"harvest_every"
daysstringrequiredHow many days apart harvests are, 7 to 365, as a decimal string: "7" weekly, "30" monthly.
Validation rules
- Pattern
"^[1-9]\\d{0,2}$"
Variant 2 · kind: withdraw_to_owner
kindstringrequiredReturn an asset to the account that owns the agent wallet.
Validation rules
- Exact value
"withdraw_to_owner"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
Variant 3 · kind: withdraw_transfer
kindstringrequiredPay the exact approved destination through the provider’s chain or Intents transfer route.
Validation rules
- Exact value
"withdraw_transfer"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe exact approved payout rail, network and address.
Show attributes
The exact approved payout rail, network and address.
railstringrequiredA native blockchain transfer or a signed transfer within an Intents ledger.
Validation rules
- Allowed values
["chain","intents"]
networkstringrequiredExact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain.
Validation rules
- Pattern
"^[a-z][a-z0-9-]{0,63}$"
addressstringrequiredExact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,256}$"
memonullrequiredStandalone routing memos are unsupported; routing must be encoded in the approved address.
minimumReceivedRawanyOfrequiredMinimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
Show attributes
Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
maxFeeRawanyOfrequiredOptional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
Show attributes
Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
Variant 4 · kind: send
kindstringrequiredNot executable, and refused in new contracts: pay an address with withdraw_transfer.
Validation rules
- Exact value
"send"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe pinned destination this action pays.
Show attributes
The pinned destination this action pays.
chainstringrequiredWhich chain the destination address is on.
Validation rules
- Minimum length
1- Maximum length
32
addressstringrequiredThe destination address on that chain.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,128}$"
validUntilstring · date-timerequiredWhen this contract's authority expires.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
maxExecutionsintegerrequiredHow many times this contract may be executed before it is exhausted.
Validation rules
- Minimum
1- Maximum
10000
maxTotalInputarrayoptionalOptional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Show attributes
Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
boundsobjectrequiredThe value-loss and signature-lifetime limits every execution must respect.
Show attributes
The value-loss and signature-lifetime limits every execution must respect.
maxValueLossBpsstringrequiredThe most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
maxSignatureLifetimeSecondsintegerrequiredExplicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity.
Validation rules
- Minimum
1- Maximum
259500
executionanyOfoptionalOptional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
Show attributes
Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
anyOf · 2 variants
Variant 1 · object
modestringrequiredOrdered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved.
Validation rules
- Allowed values
["ordered","parallel_independent"]
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · object
modestringrequiredValidation rules
- Exact value
"dependency_graph"
dependenciesarrayrequiredOne row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Show attributes
One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Validation rules
- Minimum items
1- Maximum items
16
Array items · array
Validation rules
- Maximum items
16
Array items · integer
Validation rules
- Minimum
0- Maximum
15
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · type: limit_order
Owner-signed authority for one resting limit order: the exact approved placement, created and funded once by the policy worker before the approval expires.
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"limit_order"
orderobjectrequiredThe exact approved placement request.
Show attributes
The exact approved placement request.
inputobjectrequiredThe input (base) asset this order sells.
Show attributes
The input (base) asset this order sells.
pinnedobjectrequiredThe exact asset the order sells: token id and decimals.
Show attributes
The exact asset the order sells: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
outputobjectrequiredThe output (quote) asset this order buys.
Show attributes
The output (quote) asset this order buys.
pinnedobjectrequiredThe exact asset the order buys: token id and decimals.
Show attributes
The exact asset the order buys: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
quantitystringrequiredThe exact input amount to sell, in the input asset's smallest unit. 1 NEAR with verified decimals 24 is "1000000000000000000000000". Scale decimal digits with the verified decimals and reject excess fractional digits; no floating-point arithmetic or bash.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
limitPricestringrequiredThe minimum price the fill must reach, as output-asset units per ONE input unit, written as a plain human decimal: "5" means at least 5 output tokens per 1 input token. Never scale it by decimals.
Validation rules
- Maximum length
80- Pattern
"^(0|[1-9]\\d{0,38})(\\.\\d{1,38})?$"
expiresInHoursintegerrequiredHow long the order may rest before it expires, in whole hours. Use the user's duration within this wallet's maximum, or the wallet's default from the latest request's host context when none is given. The schema permits up to 720 hours (30 days); a wallet may have a lower maximum. Never shorten a requested duration to fit.
Validation rules
- Minimum
1- Maximum
720
validUntilstring · date-timerequiredThe latest instant the order may be created and funded under this consent.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 3 · type: perps_transfer
One approved perps transfer in exactly the named direction.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_transfer"
directionstringrequiredFund the own perps account from the agent wallet, or withdraw back to the same agent wallet.
Validation rules
- Allowed values
["fund","withdraw"]
transferobjectrequiredThe exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact amount in six-decimal atomic units in either direction: 5 USDC is "5000000". A withdrawal returns USDC. A funding spends it from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it; Hyperliquid receives USDC. Never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalA funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
Show attributes
A funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 4 · type: perps_order
One approved Hyperliquid order, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_order"
orderobjectrequiredThe exact approved order.
Show attributes
The exact approved order.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
sidestringrequiredThe position this order opens, adds to, reduces or protects. A reduce-only entry on a long position sells.
Validation rules
- Allowed values
["long","short"]
sizestringrequiredExact size in the coin, at most the market's szDecimals places.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
leverageanyOfrequiredLeverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
Show attributes
Leverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
100
Variant 2 · null
marginModestringoptionalHow the position is margined, which the user chose with the leverage: cross shares the account's margin with every cross position, isolated puts only this position's own margin at risk (perps_margin_update adds or removes it later). Present exactly when leverage is; an isolated-only market (perps_markets onlyIsolated) takes isolated. Never assume it: ask the user. Absent on orders approved before margin modes existed, which were cross.
Validation rules
- Allowed values
["cross","isolated"]
entryanyOfrequiredThe order itself; null for take-profit and stop-loss on the existing position only.
Show attributes
The order itself; null for take-profit and stop-loss on the existing position only.
anyOf · 2 variants
Variant 1 · object
pricestringrequiredThe limit price; for an immediate (Ioc) order, the worst price it may fill at.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
timeInForcestringrequiredIoc fills now within price and cancels the rest (a market order), Gtc rests until filled or cancelled, Alo rests only as a maker order.
Validation rules
- Allowed values
["Gtc","Ioc","Alo"]
reduceOnlybooleanrequiredTrue to only reduce or close the existing position, never open or add.
Variant 2 · null
takeProfitanyOfrequiredA reduce-only take-profit, or null.
Show attributes
A reduce-only take-profit, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
stopLossanyOfrequiredA reduce-only stop-loss, or null.
Show attributes
A reduce-only stop-loss, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
trailingStopanyOfoptionalA reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
Show attributes
A reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size that follows the mark price as it moves in the position's favour and fires once it reverses by the retracement.
retracementanyOfrequiredHow far the mark price may reverse from its best before the stop fires.
Show attributes
How far the mark price may reverse from its best before the stop fires.
anyOf · 2 variants
Variant 1 · object
Trail by a percentage of the best mark price.
percentstringrequiredHow far the mark price may reverse from its best since activation, in percent: 2 is 2%.
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · object
Trail by a fixed price distance.
pricestringrequiredHow far the mark price may reverse from its best since activation, in price units.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
activationPriceanyOfrequiredThe mark price that starts the trailing; null to trail from placement.
Show attributes
The mark price that starts the trailing; null to trail from placement.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
Variant 2 · null
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 5 · type: perps_cancel
One approved cancellation of one resting Hyperliquid order.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_cancel"
cancelobjectrequiredThe exact order approved for cancelling.
Show attributes
The exact order approved for cancelling.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
oidintegerrequiredThe resting order's id exactly as perps_orders lists it.
Validation rules
- Greater than
0- Maximum
9007199254740991
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 6 · type: perps_automation
A standing approval for one perps automation: open the agent's own position while it holds nothing on the coin, reduce or close it, or add margin to its own account, each time its rule fires, up to its limits.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_automation"
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
positionstringrequiredThe position the action is for. open acts only while the agent holds nothing on this coin; reduce and add_margin act only while it holds this side, and nothing happens otherwise.
Validation rules
- Allowed values
["long","short"]
actiononeOfrequiredWhat a perps automation does each time its rule fires: open the named position while the agent holds nothing on its coin, reduce the named position, or add margin to the agent's own perps account.
Show attributes
What a perps automation does each time its rule fires: open the named position while the agent holds nothing on its coin, reduce the named position, or add margin to the agent's own perps account.
oneOf · 3 variants
Variant 1 · kind: reduce
Close part or all of the position with a reduce-only market order.
kindstringrequiredReduce or close the position.
Validation rules
- Exact value
"reduce"
fractionBpsintegerrequiredHow much of the position to close, in basis points: 10000 closes it all.
Validation rules
- Minimum
1- Maximum
10000
maxSlippageBpsintegerrequiredThe worst fill allowed, in basis points from the mark when it fires.
Validation rules
- Minimum
1- Maximum
500
Variant 2 · kind: add_margin
Fund the agent's own perps account from its agent wallet.
kindstringrequiredAdd margin to the perps account.
Validation rules
- Exact value
"add_margin"
amountRawstringrequiredExact USDC moved from the agent wallet into the perps account, six decimals: 5 USDC is "5000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredMaximum value lost to fees moving it, in basis points.
Validation rules
- Minimum
0- Maximum
300
Variant 3 · kind: open
Open the position with a market order, only while the agent holds nothing on this coin, optionally protected by a native take-profit and stop-loss.
kindstringrequiredOpen the position at market.
Validation rules
- Exact value
"open"
notionalUsdstringrequiredThe position's size in US dollars at the mark when it fires, at most two places: a $200 position is "200". The size in the coin is this over the mark, rounded down to the market's size precision.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,2})?$"
leverageintegerrequiredLeverage the user chose for this market, at most the market's maximum. Never assume it: ask the user.
Validation rules
- Minimum
1- Maximum
100
marginModestringrequiredHow the position is margined, which the user chose with the leverage: cross shares the account's margin, isolated risks only this position's own. An isolated-only market takes isolated. Never assume it: ask the user.
Validation rules
- Allowed values
["cross","isolated"]
maxSlippageBpsintegerrequiredThe worst fill allowed, in basis points from the mark when it fires; the take-profit and stop-loss fill within the same bound of their trigger.
Validation rules
- Minimum
1- Maximum
500
takeProfitPercentanyOfrequiredA native take-profit this far from the mark when it opens, in percent of price in the position's favour ("10" is 10%), or null for none.
Show attributes
A native take-profit this far from the mark when it opens, in percent of price in the position's favour ("10" is 10%), or null for none.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · null
stopLossPercentanyOfrequiredA native stop-loss this far from the mark when it opens, in percent of price against the position ("5" is 5%), or null for none.
Show attributes
A native stop-loss this far from the mark when it opens, in percent of price against the position ("5" is 5%), or null for none.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · null
maxExecutionsintegerrequiredHow many firings may act under this approval.
Validation rules
- Minimum
1- Maximum
100
validUntilstring · date-timerequiredThe deadline after which this approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 7 · type: perps_margin
One approved change to one isolated position's margin, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_margin"
marginobjectrequiredThe exact approved margin change.
Show attributes
The exact approved margin change.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
changestringrequiredadd moves USDC from the account into the position's isolated margin, lowering its liquidation risk; remove takes it back out, raising that risk. A strict isolated market never lets margin be removed while the position is open.
Validation rules
- Allowed values
["add","remove"]
amountstringrequiredExact USDC to move, at most six decimal places, such as 25 or 12.5.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,8})(\\.[0-9]{0,5}[1-9])?$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 8 · type: prediction_fund
One exact USDC or USDT debit delivered as native Base USDC to Polymarket's bridge for the agent's own account; the final pUSD amount is not bounded.
typestringrequiredOne approved Polymarket funding transfer.
Validation rules
- Exact value
"prediction_fund"
transferobjectrequiredThe exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact debit in six-decimal atomic units: 5 USDC or USDT is "5000000", spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it. The host resolves the agent’s own Polymarket Deposit Wallet and its bridge address; never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxFirstLegLossBpsintegerrequiredExplicit maximum loss, in basis points, of the first leg only: the wallet's USDC, USDT or coin delivered as native Base USDC to Polymarket's bridge, fees and any cross-chain hop included. It does not bound the bridge's conversion to pUSD on Polygon, whose fees and output are variable and estimated. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
Show attributes
Approved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 9 · type: solana_buy
An approved Solana buy, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_buy"
buyobjectrequiredThe exact approved token, payment, all-in loss bound and SOL top-up cap, and, for a buy whose funding pays with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved token, payment, all-in loss bound and SOL top-up cap, and, for a buy whose funding pays with a coin, that coin and the most of it it may spend.
tokenobjectrequiredThe exact token to buy.
Show attributes
The exact token to buy.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
payoneOfrequiredWhat the buy spends, as an exact input amount. Buying an exact number of tokens is not supported.
Show attributes
What the buy spends, as an exact input amount. Buying an exact number of tokens is not supported.
oneOf · 2 variants
Variant 1 · kind: usdc
Spend an exact amount of USDC or USDT from the agent wallet.
kindstringrequiredPay from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT), moved to Solana as SOL first.
Validation rules
- Exact value
"usdc"
amountRawstringrequiredExact USDC or USDT to spend, in six-decimal atomic units: $50 is "50000000". At least 5 ("5000000"); a smaller buy is refused.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: sol
Spend an exact amount of SOL the agent's Solana account already holds.
kindstringrequiredPay with SOL already in the agent's Solana account.
Validation rules
- Exact value
"sol"
lamportsstringrequiredExact SOL to spend, in lamports (nine decimals): 0.5 SOL is "500000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
maxSolTopUpUsdcRawstringrequiredThe most extra USDC or USDT the funding may add to keep SOL in the Solana account for network fees, in six-decimal atomic units: "0" for none, at most "1000000" (1 USDC). Must be "0" when paying with SOL.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
payWithobjectoptionalA buy paid in dollars and approved in chat as one call: the coin its funding pays with instead of a USDC or USDT holding, and the most of it it may spend, the SOL top-up included. Never SOL. A buy from a token's page refuses it.
Show attributes
A buy paid in dollars and approved in chat as one call: the coin its funding pays with instead of a USDC or USDT holding, and the most of it it may spend, the SOL top-up included. Never SOL. A buy from a token's page refuses it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 10 · type: solana_sell
An approved Solana sell, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_sell"
sellobjectrequiredThe exact approved token, amount, proceeds and all-in loss bound.
Show attributes
The exact approved token, amount, proceeds and all-in loss bound.
tokenobjectrequiredThe exact token to sell.
Show attributes
The exact token to sell.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
amountoneOfrequiredHow much of the token to sell.
Show attributes
How much of the token to sell.
oneOf · 2 variants
Variant 1 · kind: exact
Sell an exact amount of the token.
kindstringrequiredSell an exact amount of the token.
Validation rules
- Exact value
"exact"
amountRawstringrequiredExact amount of the token to sell, in its smallest unit (scaled by the token's decimals).
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: fraction
Sell a share of the account's balance of the token.
kindstringrequiredSell a share of what the Solana account holds of the token.
Validation rules
- Exact value
"fraction"
bpsintegerrequiredThe share to sell, in basis points of the account's balance of the token: all of it is 10000, half is 5000.
Validation rules
- Minimum
1- Maximum
10000
receivestringrequiredusdc returns the proceeds to the agent wallet as USDC on NEAR, which is what selling means; sol keeps them as SOL in the agent's Solana account.
Validation rules
- Allowed values
["usdc","sol"]
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 11 · type: solana_fund
An approved move of USDC or USDT, or a coin, into the agent's own Solana account.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_fund"
fundobjectrequiredThe exact approved amount and loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact USDC or USDT to move from the agent wallet into the agent's Solana account as SOL, in six-decimal atomic units: 5 USDC is "5000000". Spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees: at most 300. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call: the coin this funding pays with instead of a USDC or USDT holding, and the most of it it may spend. Never SOL.
Show attributes
Approved in chat as one call: the coin this funding pays with instead of a USDC or USDT holding, and the most of it it may spend. Never SOL.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 12 · type: solana_withdraw
An approved move of SOL from the agent's own Solana account back to its agent wallet.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_withdraw"
withdrawobjectrequiredThe exact approved amount, what returns and the loss bound.
Show attributes
The exact approved amount, what returns and the loss bound.
amountoneOfrequiredHow much SOL to withdraw from the agent's Solana account.
Show attributes
How much SOL to withdraw from the agent's Solana account.
oneOf · 2 variants
Variant 1 · kind: exact
Withdraw an exact amount of SOL.
kindstringrequiredWithdraw an exact amount of SOL.
Validation rules
- Exact value
"exact"
lamportsstringrequiredExact SOL to withdraw, in lamports (nine decimals): 0.5 SOL is "500000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: all_spendable
Withdraw all the spendable SOL.
kindstringrequiredWithdraw all the SOL above the reserve the account keeps for rent and network fees.
Validation rules
- Exact value
"all_spendable"
receivestringrequiredusdc returns it to the agent wallet as USDC on NEAR; sol returns it to the agent wallet as SOL.
Validation rules
- Allowed values
["usdc","sol"]
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees: at most 300. Required; no default.
Validation rules
- Minimum
0- Maximum
300
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 13 · type: prediction_order
typestringrequiredValidation rules
- Exact value
"prediction_order"
orderobjectrequiredShow attributes
marketIdstringrequiredValidation rules
- Pattern
"^[1-9][0-9]{0,19}$"
assetIdstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,77})$"
marketQuestionstringrequiredValidation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredValidation rules
- Minimum length
1- Maximum length
256
sidestringrequiredValidation rules
- Allowed values
["BUY","SELL"]
limitPriceUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
quantityoneOfrequiredShow attributes
oneOf · 2 variants
Variant 1 · kind: shares
kindstringrequiredValidation rules
- Exact value
"shares"
sizeSharesDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
Variant 2 · kind: budget
kindstringrequiredValidation rules
- Exact value
"budget"
amountUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
orderTypestringrequiredValidation rules
- Allowed values
["GTC","GTD","FOK","FAK"]
expiresAtintegeroptionalValidation rules
- Minimum
0- Maximum
253402300799
maxFeeUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
maxSpendUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 14 · type: prediction_withdraw
typestringrequiredValidation rules
- Exact value
"prediction_withdraw"
withdrawalobjectrequiredWithdraw pUSD through Polymarket’s conversion service as native USDC on Polygon to a unique verified 1Click address crediting only the agent’s own confidential Intents wallet. Funding remains a separate USDC route.
Show attributes
Withdraw pUSD through Polymarket’s conversion service as native USDC on Polygon to a unique verified 1Click address crediting only the agent’s own confidential Intents wallet. Funding remains a separate USDC route.
amountRawstringrequiredExact pUSD debit in six-decimal atomic units: 5 pUSD is "5000000". Only the agent’s own Deposit Wallet is spent.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 15 · type: composite
One owner signature over several exact one-shot grants and the order they run in.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"composite"
piecesarrayrequiredShow attributes
Validation rules
- Minimum items
1- Maximum items
6
Array items · object
toolstringrequiredThe tool whose one-shot call this piece is.
Validation rules
- Allowed values
["intents_execute","perps_fund","perps_order_place","prediction_fund","prediction_order_place","perps_withdraw","prediction_withdraw"]
contractanyOfrequiredShow attributes
anyOf · 7 variants
Variant 1 · type: near_intents_transfer
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"near_intents_transfer"
actionsarrayrequiredThe actions this contract authorizes, executed in order.
Show attributes
The actions this contract authorizes, executed in order.
Validation rules
- Minimum items
1- Maximum items
16
Array items · oneOf
oneOf · 4 variants
Variant 1 · kind: swap
kindstringrequiredExchange one asset for another; custody never leaves the agent wallet.
Validation rules
- Exact value
"swap"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
exitoneOfoptionalOptional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
Show attributes
Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
oneOf · 3 variants
Variant 1 · kind: take_profit
A take-profit exit: sell once the price is up this much on average cost.
kindstringrequiredSell when the asset is this far ABOVE the automation's average cost.
Validation rules
- Exact value
"take_profit"
gainBpsstringrequiredHow far above the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 2 · kind: stop_loss
A stop-loss exit: sell once the price is down this much on average cost.
kindstringrequiredSell when the asset is this far BELOW the automation's average cost.
Validation rules
- Exact value
"stop_loss"
lossBpsstringrequiredHow far below the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 3 · kind: harvest_every
A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every days days it sells only the gain, if there is any, and the automation keeps running.
kindstringrequiredTake profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled.
Validation rules
- Exact value
"harvest_every"
daysstringrequiredHow many days apart harvests are, 7 to 365, as a decimal string: "7" weekly, "30" monthly.
Validation rules
- Pattern
"^[1-9]\\d{0,2}$"
Variant 2 · kind: withdraw_to_owner
kindstringrequiredReturn an asset to the account that owns the agent wallet.
Validation rules
- Exact value
"withdraw_to_owner"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
Variant 3 · kind: withdraw_transfer
kindstringrequiredPay the exact approved destination through the provider’s chain or Intents transfer route.
Validation rules
- Exact value
"withdraw_transfer"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe exact approved payout rail, network and address.
Show attributes
The exact approved payout rail, network and address.
railstringrequiredA native blockchain transfer or a signed transfer within an Intents ledger.
Validation rules
- Allowed values
["chain","intents"]
networkstringrequiredExact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain.
Validation rules
- Pattern
"^[a-z][a-z0-9-]{0,63}$"
addressstringrequiredExact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,256}$"
memonullrequiredStandalone routing memos are unsupported; routing must be encoded in the approved address.
minimumReceivedRawanyOfrequiredMinimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
Show attributes
Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
maxFeeRawanyOfrequiredOptional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
Show attributes
Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
Variant 4 · kind: send
kindstringrequiredNot executable, and refused in new contracts: pay an address with withdraw_transfer.
Validation rules
- Exact value
"send"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe pinned destination this action pays.
Show attributes
The pinned destination this action pays.
chainstringrequiredWhich chain the destination address is on.
Validation rules
- Minimum length
1- Maximum length
32
addressstringrequiredThe destination address on that chain.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,128}$"
validUntilstring · date-timerequiredWhen this contract's authority expires.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
maxExecutionsintegerrequiredHow many times this contract may be executed before it is exhausted.
Validation rules
- Minimum
1- Maximum
10000
maxTotalInputarrayoptionalOptional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Show attributes
Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
boundsobjectrequiredThe value-loss and signature-lifetime limits every execution must respect.
Show attributes
The value-loss and signature-lifetime limits every execution must respect.
maxValueLossBpsstringrequiredThe most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
maxSignatureLifetimeSecondsintegerrequiredExplicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity.
Validation rules
- Minimum
1- Maximum
259500
executionanyOfoptionalOptional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
Show attributes
Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
anyOf · 2 variants
Variant 1 · object
modestringrequiredOrdered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved.
Validation rules
- Allowed values
["ordered","parallel_independent"]
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · object
modestringrequiredValidation rules
- Exact value
"dependency_graph"
dependenciesarrayrequiredOne row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Show attributes
One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Validation rules
- Minimum items
1- Maximum items
16
Array items · array
Validation rules
- Maximum items
16
Array items · integer
Validation rules
- Minimum
0- Maximum
15
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · type: perps_transfer
One approved perps transfer in exactly the named direction.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_transfer"
directionstringrequiredFund the own perps account from the agent wallet, or withdraw back to the same agent wallet.
Validation rules
- Allowed values
["fund","withdraw"]
transferobjectrequiredThe exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact amount in six-decimal atomic units in either direction: 5 USDC is "5000000". A withdrawal returns USDC. A funding spends it from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it; Hyperliquid receives USDC. Never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalA funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
Show attributes
A funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 3 · type: perps_order
One approved Hyperliquid order, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_order"
orderobjectrequiredThe exact approved order.
Show attributes
The exact approved order.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
sidestringrequiredThe position this order opens, adds to, reduces or protects. A reduce-only entry on a long position sells.
Validation rules
- Allowed values
["long","short"]
sizestringrequiredExact size in the coin, at most the market's szDecimals places.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
leverageanyOfrequiredLeverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
Show attributes
Leverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
100
Variant 2 · null
marginModestringoptionalHow the position is margined, which the user chose with the leverage: cross shares the account's margin with every cross position, isolated puts only this position's own margin at risk (perps_margin_update adds or removes it later). Present exactly when leverage is; an isolated-only market (perps_markets onlyIsolated) takes isolated. Never assume it: ask the user. Absent on orders approved before margin modes existed, which were cross.
Validation rules
- Allowed values
["cross","isolated"]
entryanyOfrequiredThe order itself; null for take-profit and stop-loss on the existing position only.
Show attributes
The order itself; null for take-profit and stop-loss on the existing position only.
anyOf · 2 variants
Variant 1 · object
pricestringrequiredThe limit price; for an immediate (Ioc) order, the worst price it may fill at.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
timeInForcestringrequiredIoc fills now within price and cancels the rest (a market order), Gtc rests until filled or cancelled, Alo rests only as a maker order.
Validation rules
- Allowed values
["Gtc","Ioc","Alo"]
reduceOnlybooleanrequiredTrue to only reduce or close the existing position, never open or add.
Variant 2 · null
takeProfitanyOfrequiredA reduce-only take-profit, or null.
Show attributes
A reduce-only take-profit, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
stopLossanyOfrequiredA reduce-only stop-loss, or null.
Show attributes
A reduce-only stop-loss, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
trailingStopanyOfoptionalA reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
Show attributes
A reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size that follows the mark price as it moves in the position's favour and fires once it reverses by the retracement.
retracementanyOfrequiredHow far the mark price may reverse from its best before the stop fires.
Show attributes
How far the mark price may reverse from its best before the stop fires.
anyOf · 2 variants
Variant 1 · object
Trail by a percentage of the best mark price.
percentstringrequiredHow far the mark price may reverse from its best since activation, in percent: 2 is 2%.
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · object
Trail by a fixed price distance.
pricestringrequiredHow far the mark price may reverse from its best since activation, in price units.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
activationPriceanyOfrequiredThe mark price that starts the trailing; null to trail from placement.
Show attributes
The mark price that starts the trailing; null to trail from placement.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
Variant 2 · null
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 4 · type: prediction_fund
One exact USDC or USDT debit delivered as native Base USDC to Polymarket's bridge for the agent's own account; the final pUSD amount is not bounded.
typestringrequiredOne approved Polymarket funding transfer.
Validation rules
- Exact value
"prediction_fund"
transferobjectrequiredThe exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact debit in six-decimal atomic units: 5 USDC or USDT is "5000000", spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it. The host resolves the agent’s own Polymarket Deposit Wallet and its bridge address; never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxFirstLegLossBpsintegerrequiredExplicit maximum loss, in basis points, of the first leg only: the wallet's USDC, USDT or coin delivered as native Base USDC to Polymarket's bridge, fees and any cross-chain hop included. It does not bound the bridge's conversion to pUSD on Polygon, whose fees and output are variable and estimated. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
Show attributes
Approved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 5 · type: prediction_order
typestringrequiredValidation rules
- Exact value
"prediction_order"
orderobjectrequiredShow attributes
marketIdstringrequiredValidation rules
- Pattern
"^[1-9][0-9]{0,19}$"
assetIdstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,77})$"
marketQuestionstringrequiredValidation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredValidation rules
- Minimum length
1- Maximum length
256
sidestringrequiredValidation rules
- Allowed values
["BUY","SELL"]
limitPriceUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
quantityoneOfrequiredShow attributes
oneOf · 2 variants
Variant 1 · kind: shares
kindstringrequiredValidation rules
- Exact value
"shares"
sizeSharesDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
Variant 2 · kind: budget
kindstringrequiredValidation rules
- Exact value
"budget"
amountUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
orderTypestringrequiredValidation rules
- Allowed values
["GTC","GTD","FOK","FAK"]
expiresAtintegeroptionalValidation rules
- Minimum
0- Maximum
253402300799
maxFeeUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
maxSpendUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 6 · type: perps_freed_withdrawal
One withdrawal home of what a cash-out's exit freed on Hyperliquid, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_freed_withdrawal"
withdrawalobjectrequiredThe signed maximum and all-in loss bound of the withdrawal home.
Show attributes
The signed maximum and all-in loss bound of the withdrawal home.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic USDC: what the exit before it frees, sized by the host before the approval opens. Never more than the exit freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 7 · type: prediction_freed_withdrawal
One withdrawal home of what a cash-out's sale freed on Polymarket, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredValidation rules
- Exact value
"prediction_freed_withdrawal"
withdrawalobjectrequiredWithdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
Show attributes
Withdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic pUSD: what the sale before it frees, sized by the host before the approval opens. Never more than the sale freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
startBystring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
dependenciesarrayrequiredShow attributes
Array items · array
Validation rules
- Maximum items
6
Array items · integer
Validation rules
- Minimum
0- Maximum
9007199254740991
walletDebitanyOfrequiredThe sum of every piece's debit from the agent wallet, per token, in raw units. Empty when the pieces are venue orders paid from money already on their venues, as when finishing a basket, or a cash-out, which closes a position and brings home what that freed.
Show attributes
The sum of every piece's debit from the agent wallet, per token, in raw units. Empty when the pieces are venue orders paid from money already on their venues, as when finishing a basket, or a cash-out, which closes a position and brings home what that freed.
anyOf · 2 variants
Variant 1 · array
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · array
Validation rules
- prefixItems
[]- Maximum items
0
Array items · never
No value is allowed.
validUntilstring · date-timerequiredWhen every piece that has not started loses its authority.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 16 · type: prediction_automation
A standing approval for one Polymarket automation: buy one outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price, each time its rule fires, up to its limits.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"prediction_automation"
marketobjectrequiredThe one Polymarket outcome this automation trades.
Show attributes
The one Polymarket outcome this automation trades.
marketIdstringrequiredThe market's id exactly as prediction_market returns it.
Validation rules
- Pattern
"^[1-9][0-9]{0,19}$"
conditionIdstringrequiredThe market's conditionId exactly as prediction_market returns it.
Validation rules
- Pattern
"^0x[0-9a-fA-F]{64}$"
assetIdstringrequiredThe outcome's CLOB token id, exactly the assetId prediction_market lists for that outcome. Yes and No are different tokens.
Validation rules
- Pattern
"^[1-9][0-9]{0,77}$"
marketQuestionstringrequiredThe market's question exactly as prediction_market returns it.
Validation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredThe outcome's name exactly as prediction_market returns it.
Validation rules
- Minimum length
1- Maximum length
256
actiononeOfrequiredWhat a Polymarket automation does each time its rule fires: buy the outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price.
Show attributes
What a Polymarket automation does each time its rule fires: buy the outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price.
oneOf · 2 variants
Variant 1 · kind: buy
Buy the outcome with a USD budget at no more than a maximum price.
kindstringrequiredBuy shares of the outcome.
Validation rules
- Exact value
"buy"
amountUsdDecimalstringrequiredThe USD each firing spends before fees, to the cent: "50" is $50. Each buy is an immediate order that fills what it can at once and cancels the rest.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,2})?$"
maxPriceUsdDecimalstringrequiredThe most a share may cost, as the market's chance: "0.32" never pays more than 32¢ a share. Use a price on the market's tick.
Validation rules
- Pattern
"^0\\.[0-9]{1,4}$"
maxFeeUsdDecimalstringrequiredThe most each firing may pay Polymarket in fees, in USD: "1" is $1.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,6})?$"
Variant 2 · kind: sell
Sell a share of the agent's holding of the outcome at no less than a minimum price.
kindstringrequiredSell shares of the outcome.
Validation rules
- Exact value
"sell"
fractionBpsintegerrequiredHow much of the agent's holding of the outcome each firing sells, in basis points: 10000 sells it all.
Validation rules
- Minimum
1- Maximum
10000
minPriceUsdDecimalstringrequiredThe least a share may sell for, as the market's chance: "0.7" never sells below 70¢ a share. Use a price on the market's tick.
Validation rules
- Pattern
"^0\\.[0-9]{1,4}$"
maxFeeUsdDecimalstringrequiredThe most each firing may pay Polymarket in fees, in USD: "1" is $1.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,6})?$"
maxExecutionsintegerrequiredHow many firings may trade under this approval; a buy spends at most maxExecutions × amountUsdDecimal in all.
Validation rules
- Minimum
1- Maximum
100
validUntilstring · date-timerequiredThe deadline after which this approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 17 · type: solana_sell_many
An approved multi-coin Solana sale, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_sell_many"
sellManyobjectrequiredThe exact approved coins, amounts and loss bounds, in order, and where the proceeds go.
Show attributes
The exact approved coins, amounts and loss bounds, in order, and where the proceeds go.
sellsarrayrequiredThe coins to sell, in the order they are sold: 2 to 6, each a different mint, none of them SOL itself.
Show attributes
The coins to sell, in the order they are sold: 2 to 6, each a different mint, none of them SOL itself.
Validation rules
- Minimum items
2- Maximum items
6
Array items · object
One coin of a multi-coin sale, sold through the agent's own Solana account.
tokenobjectrequiredThe exact token to sell.
Show attributes
The exact token to sell.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
amountoneOfrequiredHow much of the token to sell.
Show attributes
How much of the token to sell.
oneOf · 2 variants
Variant 1 · kind: exact
Sell an exact amount of the token.
kindstringrequiredSell an exact amount of the token.
Validation rules
- Exact value
"exact"
amountRawstringrequiredExact amount of the token to sell, in its smallest unit (scaled by the token's decimals).
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: fraction
Sell a share of the account's balance of the token.
kindstringrequiredSell a share of what the Solana account holds of the token.
Validation rules
- Exact value
"fraction"
bpsintegerrequiredThe share to sell, in basis points of the account's balance of the token: all of it is 10000, half is 5000.
Validation rules
- Minimum
1- Maximum
10000
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
receivestringrequiredusdc returns the summed proceeds of every sale that went through to the agent wallet as USDC on NEAR, in one transfer once the last sale ran; sol keeps them as SOL in the agent's Solana account.
Validation rules
- Allowed values
["usdc","sol"]
maxExecutionsnumberrequiredA multi-coin sale is approved once and runs once: always 1.
Validation rules
- Exact value
1
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 18 · type: grid
Owner-signed authority for one grid: the resting cell orders its terms derive, until it ends.
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"grid"
gridobjectrequiredA grid's exact terms: pair, levels, quantity and starting sides.
Show attributes
A grid's exact terms: pair, levels, quantity and starting sides.
baseobjectrequiredThe asset the grid buys low and sells high.
Show attributes
The asset the grid buys low and sells high.
pinnedobjectrequiredThe exact base asset: token id and decimals.
Show attributes
The exact base asset: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
quoteobjectrequiredThe asset prices are in and buys are paid with.
Show attributes
The asset prices are in and buys are paid with.
pinnedobjectrequiredThe exact quote asset: token id and decimals.
Show attributes
The exact quote asset: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
levelsarrayrequiredThe 2 to 20 grid prices, strictly ascending: quote units per ONE base unit, plain human decimals.
Show attributes
The 2 to 20 grid prices, strictly ascending: quote units per ONE base unit, plain human decimals.
Validation rules
- Minimum items
2- Maximum items
20
Array items · string
Validation rules
- Maximum length
80- Pattern
"^(0|[1-9]\\d{0,38})(\\.\\d{1,38})?$"
quantityPerCellstringrequiredThe exact base amount every cell buys and sells, in the base asset's smallest unit. Fixed: profits never compound.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
cellsarrayrequiredOne entry per cell, lowest first (levels.length - 1 of them): cells wholly below the start price and the one straddling it buy, cells wholly above it stay idle.
Show attributes
One entry per cell, lowest first (levels.length - 1 of them): cells wholly below the start price and the one straddling it buy, cells wholly above it stay idle.
Validation rules
- Minimum items
1- Maximum items
19
Array items · object
startstringrequiredThe side the cell's first order is on: buy at its low level, or idle (the cell never places).
Validation rules
- Allowed values
["buy","idle"]
validUntilstring · date-timerequiredWhen the grid ends: no order is placed, and none rests, after it. At most 720 hours after the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 19 · type: perps_freed_withdrawal
One withdrawal home of what a cash-out's exit freed on Hyperliquid, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_freed_withdrawal"
withdrawalobjectrequiredThe signed maximum and all-in loss bound of the withdrawal home.
Show attributes
The signed maximum and all-in loss bound of the withdrawal home.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic USDC: what the exit before it frees, sized by the host before the approval opens. Never more than the exit freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 20 · type: prediction_freed_withdrawal
One withdrawal home of what a cash-out's sale freed on Polymarket, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredValidation rules
- Exact value
"prediction_freed_withdrawal"
withdrawalobjectrequiredWithdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
Show attributes
Withdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic pUSD: what the sale before it frees, sized by the host before the approval opens. Never more than the sale freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
policyobjectrequiredThe custody worker's exact grant for these terms; clients sign it without mutation.
Show attributes
The custody worker's exact grant for these terms; clients sign it without mutation.
domainstringrequiredDomain separation for this signed policy message.
Validation rules
- Exact value
"fin.policy.contract.v1"
bindingobjectrequiredThe deployment and caller to which this consent applies.
Show attributes
The deployment and caller to which this consent applies.
networkstringrequiredThe NEAR network this policy deployment serves.
Validation rules
- Allowed values
["testnet","mainnet"]
project_uuidstringrequiredStable policy deployment identifier.
Validation rules
- Minimum length
1
caller_idstringrequiredFin integration identity bound into consent.
Validation rules
- Minimum length
1
owner_idstringrequiredSHA-256 of the canonical owner descriptor.
Validation rules
- Pattern
"^[0-9a-f]{64}$"
wallet_idstringrequiredThe policy worker's wallet identity receiving this grant; the worker spends only from that wallet's own account.
Validation rules
- Minimum length
1
approval_idstring · uuidrequiredThe exact persisted approval to which this owner-signed grant belongs.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
noncestringrequiredUnique consent nonce; replay cannot create additional allowance.
Validation rules
- Pattern
"^[0-9a-f]{64}$"
issued_at_msintegerrequiredConsent issue time in Unix milliseconds.
Validation rules
- Minimum
0- Maximum
9007199254740991
sourceoneOfrequiredWhat this consent authorizes: one present-user request, the firings of one exact automation, or one grid's derived orders.
Show attributes
What this consent authorizes: one present-user request, the firings of one exact automation, or one grid's derived orders.
oneOf · 3 variants
Variant 1 · kind: one_shot
kindstringrequiredOne approved request, executed by the run that asked for it.
Validation rules
- Exact value
"one_shot"
Variant 2 · kind: grid
kindstringrequiredA standing grid grant: the cell orders its terms derive, placed by the grid engine without a run.
Validation rules
- Exact value
"grid"
Variant 3 · kind: automation
kindstringrequiredA standing grant that the named automation's recorded firings may exercise.
Validation rules
- Exact value
"automation"
definitionobjectrequiredThe automation's exact saved definition; any edit invalidates this consent.
Show attributes
The automation's exact saved definition; any edit invalidates this consent.
namestringrequiredThe automation's name, as approved.
Validation rules
- Minimum length
1- Maximum length
120
promptstringrequiredThe automation's saved prompt, as approved.
Validation rules
- Minimum length
1- Maximum length
8192
ruleobjectrequiredOne automation's rule: when it wakes, what condition it evaluates, and how it fires.
Show attributes
One automation's rule: when it wakes, what condition it evaluates, and how it fires.
schemaVersionnumberrequiredThe rule schema's version; always 1.
Validation rules
- Exact value
1
deliveryoneOfrequiredWhat happens when a new occurrence is ready before the previous one has finished.
Show attributes
What happens when a new occurrence is ready before the previous one has finished.
Validation rules
- Default
{"overlap":"queue","maxPendingOccurrences":100}
oneOf · 3 variants
Variant 1 · object
overlapstringrequiredQueue a new occurrence and run it once the active one finishes.
Validation rules
- Exact value
"queue"
maxPendingOccurrencesintegerrequiredHow many occurrences may wait in the queue, not counting the one currently active, including one whose run is itself waiting on an approval.
Validation rules
- Minimum
1- Maximum
100
Variant 2 · object
overlapstringrequiredClose the occurrence already pending as coalesced and record the new match as a fresh occurrence, rather than queuing a second.
Validation rules
- Exact value
"coalesce"
Variant 3 · object
overlapstringrequiredDrop a new match while an occurrence is already active.
Validation rules
- Exact value
"skip"
maxDeliveryLatenessSecondsintegerrequiredHow long a new occurrence may wait to be delivered before its deadline passes and it is refused, in seconds.
Validation rules
- Default
86400- Minimum
1- Maximum
86400
maxEvaluationGapSecondsintegerrequiredThe longest gap allowed between evaluations before firing.mode: rising_edge treats its history as broken and waits for a fresh baseline, in seconds.
Validation rules
- Default
600- Minimum
1- Maximum
2678400
wakesarrayrequiredOccasions to evaluate the rule's condition: alternatives, not an AND of conditions. At most one clock and one event stream.
Show attributes
Occasions to evaluate the rule's condition: alternatives, not an AND of conditions. At most one clock and one event stream.
Validation rules
- Minimum items
1- Maximum items
7
Array items · oneOf
oneOf · 5 variants
Variant 1 · kind: at
kindstringrequiredA one-time wake at an exact moment; exhausted after that check, even if its condition is false.
Validation rules
- Exact value
"at"
runAtstring · date-timerequiredThe exact moment this wake fires, as an ISO 8601 timestamp with an offset.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
misfireoneOfrequiredWhat happens when the engine could not evaluate this wake on time.
Show attributes
What happens when the engine could not evaluate this wake on time.
Validation rules
- Default
{"mode":"latest","maxLatenessSeconds":null}
oneOf · 3 variants
Variant 1 · object
modestringrequiredDrop a wake the engine could not evaluate in time; wait for the next one.
Validation rules
- Exact value
"skip"
graceSecondsintegerrequiredHow late this wake may still run before it counts as missed, in seconds.
Validation rules
- Default
5- Minimum
1- Maximum
60
Variant 2 · object
modestringrequiredRun once for the most recently missed wake, dropping any earlier ones.
Validation rules
- Exact value
"latest"
maxLatenessSecondsanyOfrequiredHow late a missed wake may still run, in seconds; null for no limit.
Show attributes
How late a missed wake may still run, in seconds; null for no limit.
Validation rules
- Default
null
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
2678400
Variant 2 · null
Variant 3 · object
modestringrequiredRun once for every missed wake, oldest first.
Validation rules
- Exact value
"all"
maxLatenessSecondsanyOfrequiredHow late a missed wake may still run, in seconds; null for no limit.
Show attributes
How late a missed wake may still run, in seconds; null for no limit.
Validation rules
- Default
null
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
2678400
Variant 2 · null
evaluationTimestringrequiredWhich moment this wake is evaluated as of: scheduled_time the time it was due, detection_time when the engine actually ran it.
Validation rules
- Default
"detection_time"- Allowed values
["scheduled_time","detection_time"]
Variant 2 · kind: interval
kindstringrequiredA wake that repeats on a fixed elapsed interval.
Validation rules
- Exact value
"interval"
intervalMinutesintegerrequiredHow often this wake repeats, in minutes.
Validation rules
- Minimum
1- Maximum
44640
misfireoneOfrequiredWhat happens when the engine could not evaluate this wake on time.
Show attributes
What happens when the engine could not evaluate this wake on time.
Validation rules
- Default
{"mode":"latest","maxLatenessSeconds":null}
oneOf · 3 variants
Variant 1 · object
modestringrequiredDrop a wake the engine could not evaluate in time; wait for the next one.
Validation rules
- Exact value
"skip"
graceSecondsintegerrequiredHow late this wake may still run before it counts as missed, in seconds.
Validation rules
- Default
5- Minimum
1- Maximum
60
Variant 2 · object
modestringrequiredRun once for the most recently missed wake, dropping any earlier ones.
Validation rules
- Exact value
"latest"
maxLatenessSecondsanyOfrequiredHow late a missed wake may still run, in seconds; null for no limit.
Show attributes
How late a missed wake may still run, in seconds; null for no limit.
Validation rules
- Default
null
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
2678400
Variant 2 · null
Variant 3 · object
modestringrequiredRun once for every missed wake, oldest first.
Validation rules
- Exact value
"all"
maxLatenessSecondsanyOfrequiredHow late a missed wake may still run, in seconds; null for no limit.
Show attributes
How late a missed wake may still run, in seconds; null for no limit.
Validation rules
- Default
null
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
2678400
Variant 2 · null
evaluationTimestringrequiredWhich moment this wake is evaluated as of: scheduled_time the time it was due, detection_time when the engine actually ran it.
Validation rules
- Default
"detection_time"- Allowed values
["scheduled_time","detection_time"]
Variant 3 · kind: calendar
kindstringrequiredA wake on a recurring calendar schedule: local times, weekdays, months and days of the month.
Validation rules
- Exact value
"calendar"
timeZonestringrequiredThe IANA time zone a calendar wake's local times are interpreted in.
Validation rules
- Minimum length
1- Maximum length
80
localTimesarrayrequiredThe times of day this wake fires, each in 24-hour HH:MM form, in timeZone.
Show attributes
The times of day this wake fires, each in 24-hour HH:MM form, in timeZone.
Validation rules
- Minimum items
1- Maximum items
24
Array items · string
Validation rules
- Pattern
"^([01]\\d|2[0-3]):[0-5]\\d$"
weekdaysarrayrequiredWhich ISO weekdays this wake fires on, 1 (Monday) through 7 (Sunday). Defaults to every day.
Show attributes
Which ISO weekdays this wake fires on, 1 (Monday) through 7 (Sunday). Defaults to every day.
Validation rules
- Default
[1,2,3,4,5,6,7]- Minimum items
1- Maximum items
7
Array items · integer
Validation rules
- Minimum
1- Maximum
7
monthsarrayrequiredWhich months this wake fires in, 1 (January) through 12 (December). Defaults to every month.
Show attributes
Which months this wake fires in, 1 (January) through 12 (December). Defaults to every month.
Validation rules
- Default
[1,2,3,4,5,6,7,8,9,10,11,12]- Minimum items
1- Maximum items
12
Array items · integer
Validation rules
- Minimum
1- Maximum
12
monthDaysarrayrequiredWhich days of the month this wake fires on, 1 through 31. Defaults to every day.
Show attributes
Which days of the month this wake fires on, 1 through 31. Defaults to every day.
Validation rules
- Default
[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]- Minimum items
1- Maximum items
31
Array items · integer
Validation rules
- Minimum
1- Maximum
31
misfireoneOfrequiredWhat happens when the engine could not evaluate this wake on time.
Show attributes
What happens when the engine could not evaluate this wake on time.
Validation rules
- Default
{"mode":"latest","maxLatenessSeconds":null}
oneOf · 3 variants
Variant 1 · object
modestringrequiredDrop a wake the engine could not evaluate in time; wait for the next one.
Validation rules
- Exact value
"skip"
graceSecondsintegerrequiredHow late this wake may still run before it counts as missed, in seconds.
Validation rules
- Default
5- Minimum
1- Maximum
60
Variant 2 · object
modestringrequiredRun once for the most recently missed wake, dropping any earlier ones.
Validation rules
- Exact value
"latest"
maxLatenessSecondsanyOfrequiredHow late a missed wake may still run, in seconds; null for no limit.
Show attributes
How late a missed wake may still run, in seconds; null for no limit.
Validation rules
- Default
null
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
2678400
Variant 2 · null
Variant 3 · object
modestringrequiredRun once for every missed wake, oldest first.
Validation rules
- Exact value
"all"
maxLatenessSecondsanyOfrequiredHow late a missed wake may still run, in seconds; null for no limit.
Show attributes
How late a missed wake may still run, in seconds; null for no limit.
Validation rules
- Default
null
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
2678400
Variant 2 · null
evaluationTimestringrequiredWhich moment this wake is evaluated as of: scheduled_time the time it was due, detection_time when the engine actually ran it.
Validation rules
- Default
"detection_time"- Allowed values
["scheduled_time","detection_time"]
Variant 4 · kind: event
kindstringrequiredA wake evaluated each time a matching custom webhook event arrives.
Validation rules
- Exact value
"event"
eventTypestringrequiredThe event type this wake matches; a live webhook delivery of a different type is ignored before it reaches the condition.
Validation rules
- Pattern
"^[A-Za-z][A-Za-z0-9_.:-]{0,79}$"
fieldsarrayrequiredThe data fields an event of this type is declared to carry.
Show attributes
The data fields an event of this type is declared to carry.
Validation rules
- Maximum items
32
Array items · object
One data field an event or a source's observation carries: where it lives, and its type.
patharrayrequiredThe keys to walk, in order, from an observation's top level down to this field.
Show attributes
The keys to walk, in order, from an observation's top level down to this field.
Validation rules
- Minimum items
1- Maximum items
8
Array items · string
Validation rules
- Pattern
"^[A-Za-z_][A-Za-z0-9_-]{0,63}$"
valueTypeoneOfrequiredWhat type this field's value has, and the unit it carries when it has one.
Show attributes
What type this field's value has, and the unit it carries when it has one.
oneOf · 4 variants
Variant 1 · type: boolean
typestringrequiredA true/false value.
Validation rules
- Exact value
"boolean"
Variant 2 · type: string
typestringrequiredA text value.
Validation rules
- Exact value
"string"
Variant 3 · type: integer
typestringrequiredA whole-number value, compared exactly.
Validation rules
- Exact value
"integer"
unitstringrequiredThe unit an integer or decimal value is measured in, as the source or literal declares it.
Validation rules
- Minimum length
1- Maximum length
64
Variant 4 · type: decimal
typestringrequiredAn exact decimal value, as text, compared exactly.
Validation rules
- Exact value
"decimal"
unitstringrequiredThe unit an integer or decimal value is measured in, as the source or literal declares it.
Validation rules
- Minimum length
1- Maximum length
64
optionalbooleanoptionalWhether the provider may genuinely not observe this field, rather than fail to read it. When true, a missing value resolves a condition over it to missing_field and the rule's verdict to unknown, rather than zero, null or false.
Variant 5 · kind: reader_update
kindstringrequiredA wake evaluated each time the named reader delivers a fresh observation.
Validation rules
- Exact value
"reader_update"
bindingstringrequiredThe binding name a rule or a plan gives one configured source.
Validation rules
- Pattern
"^[A-Za-z][A-Za-z0-9_-]{0,31}$"
readersarrayrequiredThe named source bindings this rule reads from, referenced by condition and by each reader_update wake's binding.
Show attributes
The named source bindings this rule reads from, referenced by condition and by each reader_update wake's binding.
Validation rules
- Maximum items
4
Array items · object
namestringrequiredThe binding name a rule or a plan gives one configured source.
Validation rules
- Pattern
"^[A-Za-z][A-Za-z0-9_-]{0,31}$"
readerIdstringrequiredThe installed source operation's id, as listed by List automation data sources.
Validation rules
- Pattern
"^[a-z][a-z0-9_.-]{0,79}$"
configobjectrequiredArbitrary JSON data: an event's data, a reader's configuration, or a source plan's configuration. Bounded to 16 KiB, 8 levels of nesting and 256 entries.
Show attributes
Arbitrary JSON data: an event's data, a reader's configuration, or a source plan's configuration. Bounded to 16 KiB, 8 levels of nesting and 256 entries.
Validation rules
- propertyNames
{"type":"string"}
Additional property values
Any JSON value: a string, number, boolean, null, array or object, nested to any depth.
anyOf · 6 variants
Variant 1 · string
Variant 2 · number
Variant 3 · boolean
Variant 4 · null
Variant 5 · array
Array items · anyOf
Recursive reference: #/components/schemas/AutomationJsonValue. See the complete schema below.
Variant 6 · object
Validation rules
- propertyNames
{"type":"string"}
Additional property values
Recursive reference: #/components/schemas/AutomationJsonValue. See the complete schema below.
deliverystringoptionalUse reviewed push updates; omit for periodic snapshots.
Validation rules
- Exact value
"push"
pollIntervalSecondsintegerrequiredPolling cadence, or subscription lease/reconciliation cadence for push delivery, in seconds.
Validation rules
- Minimum
1- Maximum
2147483
maxAgeSecondsintegerrequiredMaximum retained input age at evaluation, matching requirement.maxAgeSeconds when present. Snapshots use observation time; events use trusted receipt time. Collection separately enforces the provider's acquisition-age guarantee.
Validation rules
- Minimum
1- Maximum
86400
requirementobjectoptionalWhat a reader needs from its source: how fresh an answer must be, and whether a slower one is still acceptable.
Show attributes
What a reader needs from its source: how fresh an answer must be, and whether a slower one is still acceptable.
maxLatencySecondsanyOfrequiredThe target delay between an observation and its delivery, in seconds; null when delivery has no target deadline.
Show attributes
The target delay between an observation and its delivery, in seconds; null when delivery has no target deadline.
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
2147483
Variant 2 · null
maxAgeSecondsintegerrequiredMaximum acceptable input age at evaluation, matching the reader's maxAgeSeconds, measured from the provider's own observation time. The selected provider's acquisition guarantee must fit within this limit and does not reduce this evaluation window.
Validation rules
- Minimum
1- Maximum
86400
allowDegradedLatencybooleanrequiredWhether delivery slower than the target delay is still accepted.
maxAcceptedLatencySecondsintegeroptionalThe slowest delivery still accepted, in seconds, when allowDegradedLatency is set.
Validation rules
- Minimum
1- Maximum
2147483
conditionanyrequiredThe rule's condition tree, up to 8 levels deep and 128 nodes total, built from five node kinds: {op:"bool", value} a fixed true/false leaf; {op:"compare", comparator, left, right} one of eq/ne/lt/lte/gt/gte between two operands — lt/lte/gt/gte require both operands to be integer or decimal, and both sides must share the same type and, for integer/decimal, the same unit; {op:"all", args} / {op:"any", args} AND/OR over one or more child nodes; {op:"not", arg} negates one child node. An operand is either {kind:"field", binding, path} — a bound reader's name and the key path into its data — or {kind:"literal", type, value, unit?} with type one of boolean/string/integer/decimal (integer/decimal values are exact decimal strings and carry unit).
exitobjectoptionalThe exit watch, when this rule's automation has exit actions on its contract. Present exactly when the contract has an exit action.
Show attributes
The exit watch, when this rule's automation has exit actions on its contract. Present exactly when the contract has an exit action.
intervalSecondsintegerrequiredHow often this automation re-checks its exit guards, in seconds; at least 60 and at most 2678400 (31 days), the same span an interval wake may cover. Recommend 300.
Validation rules
- Minimum
60- Maximum
2678400
readersobjectrequiredThe two price bindings each exit guard is measured against; both must be the reviewed USD token-price operation.
Show attributes
The two price bindings each exit guard is measured against; both must be the reviewed USD token-price operation.
assetstringrequiredThe binding in readers that prices the asset this automation bought, in USD.
Validation rules
- Pattern
"^[A-Za-z][A-Za-z0-9_-]{0,31}$"
quotestringrequiredThe binding in readers that prices the token this automation pays with, in USD.
Validation rules
- Pattern
"^[A-Za-z][A-Za-z0-9_-]{0,31}$"
pushobjectoptionalAdditional push-delivered USD prices that may check exits between periodic 1Click checks.
Show attributes
Additional push-delivered USD prices that may check exits between periodic 1Click checks.
readersobjectrequiredThe supplementary price bindings for the bought asset and its paying token.
Show attributes
The supplementary price bindings for the bought asset and its paying token.
assetstringrequiredThe binding name a rule or a plan gives one configured source.
Validation rules
- Pattern
"^[A-Za-z][A-Za-z0-9_-]{0,31}$"
quotestringrequiredThe binding name a rule or a plan gives one configured source.
Validation rules
- Pattern
"^[A-Za-z][A-Za-z0-9_-]{0,31}$"
firingobjectrequiredHow this rule turns a qualifying evaluation into a firing: which ones count, how often, and how many.
Show attributes
How this rule turns a qualifying evaluation into a firing: which ones count, how often, and how many.
modestringrequiredWhen a qualifying evaluation fires: each_match fires on every qualifying evaluation, including the first; rising_edge fires only on a known false-to-true transition.
Validation rules
- Allowed values
["each_match","rising_edge"]
repeatstringrequiredWhether this rule fires at most once, or keeps watching after it fires.
Validation rules
- Allowed values
["once","repeating"]
maxRunsintegeroptionalMaximum deliverable runs recorded for this automation across pauses and resumes. Missed or refused deliveries do not count; recorded runs count even if later canceled, coalesced or failed. Omit for no finite limit beyond repeat=once.
Validation rules
- Minimum
1- Maximum
1000000
initialstringrequiredHow rising_edge treats the first known state: baseline records it without firing, fire_if_true fires immediately if it is already true.
Validation rules
- Allowed values
["baseline","fire_if_true"]
cooldownSecondsintegerrequiredThe minimum time between firings, in seconds; it does not require the condition to stay true that whole time. For rising_edge, a false-to-true edge that lands inside cooldown is discarded, not queued: it is not replayed once cooldown ends, so the rule needs an entirely fresh edge after cooldown lapses before it fires again — simply remaining true past the cooldown boundary does not trigger a firing.
Validation rules
- Minimum
0- Maximum
2678400
newsobjectoptionalPresent only on a news exit: the owner's own words, which Fin's news judge reads new stories against. Its rule is fixed: one news.judged event wake, no readers, the judged condition and one firing, over a reduce-only perps contract.
Show attributes
Present only on a news exit: the owner's own words, which Fin's news judge reads new stories against. Its rule is fixed: one news.judged event wake, no readers, the judged condition and one firing, over a reduce-only perps contract.
conditionstringrequiredThe owner's condition in their own words, exactly as they said it, such as right before Anthropic's IPO. Never paraphrased: the judge reads the news against these words.
Validation rules
- Minimum length
3- Maximum length
500
matchstringrequiredA few words every story the judge reads must contain in its headline or summary, such as Anthropic IPO: a broad filter, not the condition. The judge decides from the condition.
Validation rules
- Minimum length
2- Maximum length
80- Pattern
"^[\\p{L}\\p{N} .'&-]+$"
maxSnapshotSkewSecondsintegerrequiredThe most that bound readers' observation times may disagree before evaluation reports snapshot_skew, in seconds.
Validation rules
- Minimum
0- Maximum
86400
maxSigningDelaySecondsintegerrequiredThe owner-approved time after the worker records a firing during which its run may obtain signatures.
Validation rules
- Minimum
1- Maximum
86400
automationIdstring · uuidoptionalThe saved automation whose edited terms the owner approves; absent for creation.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
definitionVersionintegeroptionalThe saved definition version those edited terms authorize; absent for creation.
Validation rules
- Greater than
0- Maximum
9007199254740991
contractoneOfrequiredThe exact approved authority: swap actions with their bounds, count and expiry, one limit order, one perps transfer/order/cancellation or margin change, one Polymarket funding/order/withdrawal, the exact Solana actions, or one grid.
Show attributes
The exact approved authority: swap actions with their bounds, count and expiry, one limit order, one perps transfer/order/cancellation or margin change, one Polymarket funding/order/withdrawal, the exact Solana actions, or one grid.
oneOf · 20 variants
Variant 1 · type: near_intents_transfer
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"near_intents_transfer"
actionsarrayrequiredThe actions this contract authorizes, executed in order.
Show attributes
The actions this contract authorizes, executed in order.
Validation rules
- Minimum items
1- Maximum items
16
Array items · oneOf
oneOf · 4 variants
Variant 1 · kind: swap
kindstringrequiredExchange one asset for another; custody never leaves the agent wallet.
Validation rules
- Exact value
"swap"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
exitoneOfoptionalOptional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
Show attributes
Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
oneOf · 3 variants
Variant 1 · kind: take_profit
A take-profit exit: sell once the price is up this much on average cost.
kindstringrequiredSell when the asset is this far ABOVE the automation's average cost.
Validation rules
- Exact value
"take_profit"
gainBpsstringrequiredHow far above the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 2 · kind: stop_loss
A stop-loss exit: sell once the price is down this much on average cost.
kindstringrequiredSell when the asset is this far BELOW the automation's average cost.
Validation rules
- Exact value
"stop_loss"
lossBpsstringrequiredHow far below the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 3 · kind: harvest_every
A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every days days it sells only the gain, if there is any, and the automation keeps running.
kindstringrequiredTake profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled.
Validation rules
- Exact value
"harvest_every"
daysstringrequiredHow many days apart harvests are, 7 to 365, as a decimal string: "7" weekly, "30" monthly.
Validation rules
- Pattern
"^[1-9]\\d{0,2}$"
Variant 2 · kind: withdraw_to_owner
kindstringrequiredReturn an asset to the account that owns the agent wallet.
Validation rules
- Exact value
"withdraw_to_owner"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
Variant 3 · kind: withdraw_transfer
kindstringrequiredPay the exact approved destination through the provider’s chain or Intents transfer route.
Validation rules
- Exact value
"withdraw_transfer"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe exact approved payout rail, network and address.
Show attributes
The exact approved payout rail, network and address.
railstringrequiredA native blockchain transfer or a signed transfer within an Intents ledger.
Validation rules
- Allowed values
["chain","intents"]
networkstringrequiredExact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain.
Validation rules
- Pattern
"^[a-z][a-z0-9-]{0,63}$"
addressstringrequiredExact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,256}$"
memonullrequiredStandalone routing memos are unsupported; routing must be encoded in the approved address.
minimumReceivedRawanyOfrequiredMinimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
Show attributes
Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
maxFeeRawanyOfrequiredOptional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
Show attributes
Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
Variant 4 · kind: send
kindstringrequiredNot executable, and refused in new contracts: pay an address with withdraw_transfer.
Validation rules
- Exact value
"send"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe pinned destination this action pays.
Show attributes
The pinned destination this action pays.
chainstringrequiredWhich chain the destination address is on.
Validation rules
- Minimum length
1- Maximum length
32
addressstringrequiredThe destination address on that chain.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,128}$"
validUntilstring · date-timerequiredWhen this contract's authority expires.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
maxExecutionsintegerrequiredHow many times this contract may be executed before it is exhausted.
Validation rules
- Minimum
1- Maximum
10000
maxTotalInputarrayoptionalOptional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Show attributes
Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
boundsobjectrequiredThe value-loss and signature-lifetime limits every execution must respect.
Show attributes
The value-loss and signature-lifetime limits every execution must respect.
maxValueLossBpsstringrequiredThe most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
maxSignatureLifetimeSecondsintegerrequiredExplicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity.
Validation rules
- Minimum
1- Maximum
259500
executionanyOfoptionalOptional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
Show attributes
Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
anyOf · 2 variants
Variant 1 · object
modestringrequiredOrdered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved.
Validation rules
- Allowed values
["ordered","parallel_independent"]
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · object
modestringrequiredValidation rules
- Exact value
"dependency_graph"
dependenciesarrayrequiredOne row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Show attributes
One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Validation rules
- Minimum items
1- Maximum items
16
Array items · array
Validation rules
- Maximum items
16
Array items · integer
Validation rules
- Minimum
0- Maximum
15
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · type: limit_order
Owner-signed authority for one resting limit order: the exact approved placement, created and funded once by the policy worker before the approval expires.
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"limit_order"
orderobjectrequiredThe exact approved placement request.
Show attributes
The exact approved placement request.
inputobjectrequiredThe input (base) asset this order sells.
Show attributes
The input (base) asset this order sells.
pinnedobjectrequiredThe exact asset the order sells: token id and decimals.
Show attributes
The exact asset the order sells: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
outputobjectrequiredThe output (quote) asset this order buys.
Show attributes
The output (quote) asset this order buys.
pinnedobjectrequiredThe exact asset the order buys: token id and decimals.
Show attributes
The exact asset the order buys: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
quantitystringrequiredThe exact input amount to sell, in the input asset's smallest unit. 1 NEAR with verified decimals 24 is "1000000000000000000000000". Scale decimal digits with the verified decimals and reject excess fractional digits; no floating-point arithmetic or bash.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
limitPricestringrequiredThe minimum price the fill must reach, as output-asset units per ONE input unit, written as a plain human decimal: "5" means at least 5 output tokens per 1 input token. Never scale it by decimals.
Validation rules
- Maximum length
80- Pattern
"^(0|[1-9]\\d{0,38})(\\.\\d{1,38})?$"
expiresInHoursintegerrequiredHow long the order may rest before it expires, in whole hours. Use the user's duration within this wallet's maximum, or the wallet's default from the latest request's host context when none is given. The schema permits up to 720 hours (30 days); a wallet may have a lower maximum. Never shorten a requested duration to fit.
Validation rules
- Minimum
1- Maximum
720
validUntilstring · date-timerequiredThe latest instant the order may be created and funded under this consent.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 3 · type: perps_transfer
One approved perps transfer in exactly the named direction.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_transfer"
directionstringrequiredFund the own perps account from the agent wallet, or withdraw back to the same agent wallet.
Validation rules
- Allowed values
["fund","withdraw"]
transferobjectrequiredThe exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact amount in six-decimal atomic units in either direction: 5 USDC is "5000000". A withdrawal returns USDC. A funding spends it from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it; Hyperliquid receives USDC. Never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalA funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
Show attributes
A funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 4 · type: perps_order
One approved Hyperliquid order, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_order"
orderobjectrequiredThe exact approved order.
Show attributes
The exact approved order.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
sidestringrequiredThe position this order opens, adds to, reduces or protects. A reduce-only entry on a long position sells.
Validation rules
- Allowed values
["long","short"]
sizestringrequiredExact size in the coin, at most the market's szDecimals places.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
leverageanyOfrequiredLeverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
Show attributes
Leverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
100
Variant 2 · null
marginModestringoptionalHow the position is margined, which the user chose with the leverage: cross shares the account's margin with every cross position, isolated puts only this position's own margin at risk (perps_margin_update adds or removes it later). Present exactly when leverage is; an isolated-only market (perps_markets onlyIsolated) takes isolated. Never assume it: ask the user. Absent on orders approved before margin modes existed, which were cross.
Validation rules
- Allowed values
["cross","isolated"]
entryanyOfrequiredThe order itself; null for take-profit and stop-loss on the existing position only.
Show attributes
The order itself; null for take-profit and stop-loss on the existing position only.
anyOf · 2 variants
Variant 1 · object
pricestringrequiredThe limit price; for an immediate (Ioc) order, the worst price it may fill at.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
timeInForcestringrequiredIoc fills now within price and cancels the rest (a market order), Gtc rests until filled or cancelled, Alo rests only as a maker order.
Validation rules
- Allowed values
["Gtc","Ioc","Alo"]
reduceOnlybooleanrequiredTrue to only reduce or close the existing position, never open or add.
Variant 2 · null
takeProfitanyOfrequiredA reduce-only take-profit, or null.
Show attributes
A reduce-only take-profit, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
stopLossanyOfrequiredA reduce-only stop-loss, or null.
Show attributes
A reduce-only stop-loss, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
trailingStopanyOfoptionalA reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
Show attributes
A reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size that follows the mark price as it moves in the position's favour and fires once it reverses by the retracement.
retracementanyOfrequiredHow far the mark price may reverse from its best before the stop fires.
Show attributes
How far the mark price may reverse from its best before the stop fires.
anyOf · 2 variants
Variant 1 · object
Trail by a percentage of the best mark price.
percentstringrequiredHow far the mark price may reverse from its best since activation, in percent: 2 is 2%.
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · object
Trail by a fixed price distance.
pricestringrequiredHow far the mark price may reverse from its best since activation, in price units.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
activationPriceanyOfrequiredThe mark price that starts the trailing; null to trail from placement.
Show attributes
The mark price that starts the trailing; null to trail from placement.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
Variant 2 · null
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 5 · type: perps_cancel
One approved cancellation of one resting Hyperliquid order.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_cancel"
cancelobjectrequiredThe exact order approved for cancelling.
Show attributes
The exact order approved for cancelling.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
oidintegerrequiredThe resting order's id exactly as perps_orders lists it.
Validation rules
- Greater than
0- Maximum
9007199254740991
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 6 · type: perps_automation
A standing approval for one perps automation: open the agent's own position while it holds nothing on the coin, reduce or close it, or add margin to its own account, each time its rule fires, up to its limits.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_automation"
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
positionstringrequiredThe position the action is for. open acts only while the agent holds nothing on this coin; reduce and add_margin act only while it holds this side, and nothing happens otherwise.
Validation rules
- Allowed values
["long","short"]
actiononeOfrequiredWhat a perps automation does each time its rule fires: open the named position while the agent holds nothing on its coin, reduce the named position, or add margin to the agent's own perps account.
Show attributes
What a perps automation does each time its rule fires: open the named position while the agent holds nothing on its coin, reduce the named position, or add margin to the agent's own perps account.
oneOf · 3 variants
Variant 1 · kind: reduce
Close part or all of the position with a reduce-only market order.
kindstringrequiredReduce or close the position.
Validation rules
- Exact value
"reduce"
fractionBpsintegerrequiredHow much of the position to close, in basis points: 10000 closes it all.
Validation rules
- Minimum
1- Maximum
10000
maxSlippageBpsintegerrequiredThe worst fill allowed, in basis points from the mark when it fires.
Validation rules
- Minimum
1- Maximum
500
Variant 2 · kind: add_margin
Fund the agent's own perps account from its agent wallet.
kindstringrequiredAdd margin to the perps account.
Validation rules
- Exact value
"add_margin"
amountRawstringrequiredExact USDC moved from the agent wallet into the perps account, six decimals: 5 USDC is "5000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredMaximum value lost to fees moving it, in basis points.
Validation rules
- Minimum
0- Maximum
300
Variant 3 · kind: open
Open the position with a market order, only while the agent holds nothing on this coin, optionally protected by a native take-profit and stop-loss.
kindstringrequiredOpen the position at market.
Validation rules
- Exact value
"open"
notionalUsdstringrequiredThe position's size in US dollars at the mark when it fires, at most two places: a $200 position is "200". The size in the coin is this over the mark, rounded down to the market's size precision.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,2})?$"
leverageintegerrequiredLeverage the user chose for this market, at most the market's maximum. Never assume it: ask the user.
Validation rules
- Minimum
1- Maximum
100
marginModestringrequiredHow the position is margined, which the user chose with the leverage: cross shares the account's margin, isolated risks only this position's own. An isolated-only market takes isolated. Never assume it: ask the user.
Validation rules
- Allowed values
["cross","isolated"]
maxSlippageBpsintegerrequiredThe worst fill allowed, in basis points from the mark when it fires; the take-profit and stop-loss fill within the same bound of their trigger.
Validation rules
- Minimum
1- Maximum
500
takeProfitPercentanyOfrequiredA native take-profit this far from the mark when it opens, in percent of price in the position's favour ("10" is 10%), or null for none.
Show attributes
A native take-profit this far from the mark when it opens, in percent of price in the position's favour ("10" is 10%), or null for none.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · null
stopLossPercentanyOfrequiredA native stop-loss this far from the mark when it opens, in percent of price against the position ("5" is 5%), or null for none.
Show attributes
A native stop-loss this far from the mark when it opens, in percent of price against the position ("5" is 5%), or null for none.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · null
maxExecutionsintegerrequiredHow many firings may act under this approval.
Validation rules
- Minimum
1- Maximum
100
validUntilstring · date-timerequiredThe deadline after which this approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 7 · type: perps_margin
One approved change to one isolated position's margin, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_margin"
marginobjectrequiredThe exact approved margin change.
Show attributes
The exact approved margin change.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
changestringrequiredadd moves USDC from the account into the position's isolated margin, lowering its liquidation risk; remove takes it back out, raising that risk. A strict isolated market never lets margin be removed while the position is open.
Validation rules
- Allowed values
["add","remove"]
amountstringrequiredExact USDC to move, at most six decimal places, such as 25 or 12.5.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,8})(\\.[0-9]{0,5}[1-9])?$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 8 · type: prediction_fund
One exact USDC or USDT debit delivered as native Base USDC to Polymarket's bridge for the agent's own account; the final pUSD amount is not bounded.
typestringrequiredOne approved Polymarket funding transfer.
Validation rules
- Exact value
"prediction_fund"
transferobjectrequiredThe exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact debit in six-decimal atomic units: 5 USDC or USDT is "5000000", spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it. The host resolves the agent’s own Polymarket Deposit Wallet and its bridge address; never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxFirstLegLossBpsintegerrequiredExplicit maximum loss, in basis points, of the first leg only: the wallet's USDC, USDT or coin delivered as native Base USDC to Polymarket's bridge, fees and any cross-chain hop included. It does not bound the bridge's conversion to pUSD on Polygon, whose fees and output are variable and estimated. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
Show attributes
Approved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 9 · type: solana_buy
An approved Solana buy, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_buy"
buyobjectrequiredThe exact approved token, payment, all-in loss bound and SOL top-up cap, and, for a buy whose funding pays with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved token, payment, all-in loss bound and SOL top-up cap, and, for a buy whose funding pays with a coin, that coin and the most of it it may spend.
tokenobjectrequiredThe exact token to buy.
Show attributes
The exact token to buy.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
payoneOfrequiredWhat the buy spends, as an exact input amount. Buying an exact number of tokens is not supported.
Show attributes
What the buy spends, as an exact input amount. Buying an exact number of tokens is not supported.
oneOf · 2 variants
Variant 1 · kind: usdc
Spend an exact amount of USDC or USDT from the agent wallet.
kindstringrequiredPay from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT), moved to Solana as SOL first.
Validation rules
- Exact value
"usdc"
amountRawstringrequiredExact USDC or USDT to spend, in six-decimal atomic units: $50 is "50000000". At least 5 ("5000000"); a smaller buy is refused.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: sol
Spend an exact amount of SOL the agent's Solana account already holds.
kindstringrequiredPay with SOL already in the agent's Solana account.
Validation rules
- Exact value
"sol"
lamportsstringrequiredExact SOL to spend, in lamports (nine decimals): 0.5 SOL is "500000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
maxSolTopUpUsdcRawstringrequiredThe most extra USDC or USDT the funding may add to keep SOL in the Solana account for network fees, in six-decimal atomic units: "0" for none, at most "1000000" (1 USDC). Must be "0" when paying with SOL.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
payWithobjectoptionalA buy paid in dollars and approved in chat as one call: the coin its funding pays with instead of a USDC or USDT holding, and the most of it it may spend, the SOL top-up included. Never SOL. A buy from a token's page refuses it.
Show attributes
A buy paid in dollars and approved in chat as one call: the coin its funding pays with instead of a USDC or USDT holding, and the most of it it may spend, the SOL top-up included. Never SOL. A buy from a token's page refuses it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 10 · type: solana_sell
An approved Solana sell, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_sell"
sellobjectrequiredThe exact approved token, amount, proceeds and all-in loss bound.
Show attributes
The exact approved token, amount, proceeds and all-in loss bound.
tokenobjectrequiredThe exact token to sell.
Show attributes
The exact token to sell.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
amountoneOfrequiredHow much of the token to sell.
Show attributes
How much of the token to sell.
oneOf · 2 variants
Variant 1 · kind: exact
Sell an exact amount of the token.
kindstringrequiredSell an exact amount of the token.
Validation rules
- Exact value
"exact"
amountRawstringrequiredExact amount of the token to sell, in its smallest unit (scaled by the token's decimals).
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: fraction
Sell a share of the account's balance of the token.
kindstringrequiredSell a share of what the Solana account holds of the token.
Validation rules
- Exact value
"fraction"
bpsintegerrequiredThe share to sell, in basis points of the account's balance of the token: all of it is 10000, half is 5000.
Validation rules
- Minimum
1- Maximum
10000
receivestringrequiredusdc returns the proceeds to the agent wallet as USDC on NEAR, which is what selling means; sol keeps them as SOL in the agent's Solana account.
Validation rules
- Allowed values
["usdc","sol"]
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 11 · type: solana_fund
An approved move of USDC or USDT, or a coin, into the agent's own Solana account.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_fund"
fundobjectrequiredThe exact approved amount and loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact USDC or USDT to move from the agent wallet into the agent's Solana account as SOL, in six-decimal atomic units: 5 USDC is "5000000". Spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees: at most 300. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call: the coin this funding pays with instead of a USDC or USDT holding, and the most of it it may spend. Never SOL.
Show attributes
Approved in chat as one call: the coin this funding pays with instead of a USDC or USDT holding, and the most of it it may spend. Never SOL.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 12 · type: solana_withdraw
An approved move of SOL from the agent's own Solana account back to its agent wallet.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_withdraw"
withdrawobjectrequiredThe exact approved amount, what returns and the loss bound.
Show attributes
The exact approved amount, what returns and the loss bound.
amountoneOfrequiredHow much SOL to withdraw from the agent's Solana account.
Show attributes
How much SOL to withdraw from the agent's Solana account.
oneOf · 2 variants
Variant 1 · kind: exact
Withdraw an exact amount of SOL.
kindstringrequiredWithdraw an exact amount of SOL.
Validation rules
- Exact value
"exact"
lamportsstringrequiredExact SOL to withdraw, in lamports (nine decimals): 0.5 SOL is "500000000".
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: all_spendable
Withdraw all the spendable SOL.
kindstringrequiredWithdraw all the SOL above the reserve the account keeps for rent and network fees.
Validation rules
- Exact value
"all_spendable"
receivestringrequiredusdc returns it to the agent wallet as USDC on NEAR; sol returns it to the agent wallet as SOL.
Validation rules
- Allowed values
["usdc","sol"]
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees: at most 300. Required; no default.
Validation rules
- Minimum
0- Maximum
300
maxExecutionsintegerrequiredHow many times this grant may execute: 1 for a one-shot approval.
Validation rules
- Minimum
1- Maximum
1000
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 13 · type: prediction_order
typestringrequiredValidation rules
- Exact value
"prediction_order"
orderobjectrequiredShow attributes
marketIdstringrequiredValidation rules
- Pattern
"^[1-9][0-9]{0,19}$"
assetIdstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,77})$"
marketQuestionstringrequiredValidation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredValidation rules
- Minimum length
1- Maximum length
256
sidestringrequiredValidation rules
- Allowed values
["BUY","SELL"]
limitPriceUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
quantityoneOfrequiredShow attributes
oneOf · 2 variants
Variant 1 · kind: shares
kindstringrequiredValidation rules
- Exact value
"shares"
sizeSharesDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
Variant 2 · kind: budget
kindstringrequiredValidation rules
- Exact value
"budget"
amountUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
orderTypestringrequiredValidation rules
- Allowed values
["GTC","GTD","FOK","FAK"]
expiresAtintegeroptionalValidation rules
- Minimum
0- Maximum
253402300799
maxFeeUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
maxSpendUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 14 · type: prediction_withdraw
typestringrequiredValidation rules
- Exact value
"prediction_withdraw"
withdrawalobjectrequiredWithdraw pUSD through Polymarket’s conversion service as native USDC on Polygon to a unique verified 1Click address crediting only the agent’s own confidential Intents wallet. Funding remains a separate USDC route.
Show attributes
Withdraw pUSD through Polymarket’s conversion service as native USDC on Polygon to a unique verified 1Click address crediting only the agent’s own confidential Intents wallet. Funding remains a separate USDC route.
amountRawstringrequiredExact pUSD debit in six-decimal atomic units: 5 pUSD is "5000000". Only the agent’s own Deposit Wallet is spent.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 15 · type: composite
One owner signature over several exact one-shot grants and the order they run in.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"composite"
piecesarrayrequiredShow attributes
Validation rules
- Minimum items
1- Maximum items
6
Array items · object
toolstringrequiredThe tool whose one-shot call this piece is.
Validation rules
- Allowed values
["intents_execute","perps_fund","perps_order_place","prediction_fund","prediction_order_place","perps_withdraw","prediction_withdraw"]
contractanyOfrequiredShow attributes
anyOf · 7 variants
Variant 1 · type: near_intents_transfer
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"near_intents_transfer"
actionsarrayrequiredThe actions this contract authorizes, executed in order.
Show attributes
The actions this contract authorizes, executed in order.
Validation rules
- Minimum items
1- Maximum items
16
Array items · oneOf
oneOf · 4 variants
Variant 1 · kind: swap
kindstringrequiredExchange one asset for another; custody never leaves the agent wallet.
Validation rules
- Exact value
"swap"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
exitoneOfoptionalOptional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
Show attributes
Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.
oneOf · 3 variants
Variant 1 · kind: take_profit
A take-profit exit: sell once the price is up this much on average cost.
kindstringrequiredSell when the asset is this far ABOVE the automation's average cost.
Validation rules
- Exact value
"take_profit"
gainBpsstringrequiredHow far above the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 2 · kind: stop_loss
A stop-loss exit: sell once the price is down this much on average cost.
kindstringrequiredSell when the asset is this far BELOW the automation's average cost.
Validation rules
- Exact value
"stop_loss"
lossBpsstringrequiredHow far below the average cost the price must be, in basis points.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 3 · kind: harvest_every
A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every days days it sells only the gain, if there is any, and the automation keeps running.
kindstringrequiredTake profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled.
Validation rules
- Exact value
"harvest_every"
daysstringrequiredHow many days apart harvests are, 7 to 365, as a decimal string: "7" weekly, "30" monthly.
Validation rules
- Pattern
"^[1-9]\\d{0,2}$"
Variant 2 · kind: withdraw_to_owner
kindstringrequiredReturn an asset to the account that owns the agent wallet.
Validation rules
- Exact value
"withdraw_to_owner"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
Variant 3 · kind: withdraw_transfer
kindstringrequiredPay the exact approved destination through the provider’s chain or Intents transfer route.
Validation rules
- Exact value
"withdraw_transfer"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe exact approved payout rail, network and address.
Show attributes
The exact approved payout rail, network and address.
railstringrequiredA native blockchain transfer or a signed transfer within an Intents ledger.
Validation rules
- Allowed values
["chain","intents"]
networkstringrequiredExact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain.
Validation rules
- Pattern
"^[a-z][a-z0-9-]{0,63}$"
addressstringrequiredExact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,256}$"
memonullrequiredStandalone routing memos are unsupported; routing must be encoded in the approved address.
minimumReceivedRawanyOfrequiredMinimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
Show attributes
Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
maxFeeRawanyOfrequiredOptional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
Show attributes
Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · null
Variant 4 · kind: send
kindstringrequiredNot executable, and refused in new contracts: pay an address with withdraw_transfer.
Validation rules
- Exact value
"send"
inputanyOfrequiredThe asset this action spends: pinned to one token, or any token the agent wallet holds.
Show attributes
The asset this action spends: pinned to one token, or any token the agent wallet holds.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
quantityoneOfrequiredHow much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
Show attributes
How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it.
oneOf · 7 variants
Variant 1 · kind: exact_input_tokens
An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw "5000000". No floating-point arithmetic or bash.
kindstringrequiredSpend an exact amount of the input token.
Validation rules
- Exact value
"exact_input_tokens"
amountRawstringrequiredThe exact input amount, in the input token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: exact_input_value_usd
A USD value of the input token: "$5 worth of USDC" is value "5", never exactly 5 USDC. The host converts it at live prices.
kindstringrequiredSpend a USD-denominated value of the input token.
Validation rules
- Exact value
"exact_input_value_usd"
valuestringrequiredThe USD value to spend, as a decimal string.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$"
Variant 3 · kind: exact_output_tokens
An exact quantity of the output token, scaled by its verified decimals; the host calculates the input.
kindstringrequiredReceive an exact amount of the output token.
Validation rules
- Exact value
"exact_output_tokens"
amountRawstringrequiredThe exact output amount, in the output token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 4 · kind: all_of_input
kindstringrequiredSpend everything the agent wallet holds of the input asset.
Validation rules
- Exact value
"all_of_input"
Variant 5 · kind: fraction_of_input
kindstringrequiredSpend a fraction of the input asset.
Validation rules
- Exact value
"fraction_of_input"
bpsstringrequiredThe fraction to spend, in basis points of the input asset.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 6 · kind: fraction_of_position
A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an exit guard.
kindstringrequiredSell a fraction of this automation's own position in the input asset.
Validation rules
- Exact value
"fraction_of_position"
bpsstringrequiredThe fraction to sell, in basis points of this automation's own position; 10000 is all of it.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
Variant 7 · kind: gain_of_position
Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every exit guard and a pinned output other than that token.
kindstringrequiredSell only the gain on this automation's own position in the input asset.
Validation rules
- Exact value
"gain_of_position"
outputanyOfrequiredThe asset this action produces: pinned to one token, or left open.
Show attributes
The asset this action produces: pinned to one token, or left open.
anyOf · 2 variants
Variant 1 · object
pinnedobjectrequiredThe exact token this asset is pinned to.
Show attributes
The exact token this asset is pinned to.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
Variant 2 · object
anybooleanrequiredAny token the agent wallet holds; the executor picks one at execution.
Validation rules
- Exact value
true
recipientobjectrequiredThe pinned destination this action pays.
Show attributes
The pinned destination this action pays.
chainstringrequiredWhich chain the destination address is on.
Validation rules
- Minimum length
1- Maximum length
32
addressstringrequiredThe destination address on that chain.
Validation rules
- Pattern
"^[\\x21-\\x7e]{1,128}$"
validUntilstring · date-timerequiredWhen this contract's authority expires.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
maxExecutionsintegerrequiredHow many times this contract may be executed before it is exhausted.
Validation rules
- Minimum
1- Maximum
10000
maxTotalInputarrayoptionalOptional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Show attributes
Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
boundsobjectrequiredThe value-loss and signature-lifetime limits every execution must respect.
Show attributes
The value-loss and signature-lifetime limits every execution must respect.
maxValueLossBpsstringrequiredThe most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,4})$"
maxSignatureLifetimeSecondsintegerrequiredExplicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity.
Validation rules
- Minimum
1- Maximum
259500
executionanyOfoptionalOptional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
Show attributes
Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.
anyOf · 2 variants
Variant 1 · object
modestringrequiredOrdered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved.
Validation rules
- Allowed values
["ordered","parallel_independent"]
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · object
modestringrequiredValidation rules
- Exact value
"dependency_graph"
dependenciesarrayrequiredOne row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Show attributes
One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings.
Validation rules
- Minimum items
1- Maximum items
16
Array items · array
Validation rules
- Maximum items
16
Array items · integer
Validation rules
- Minimum
0- Maximum
15
maxPreparationAttemptsintegerrequiredThe maximum unsigned preparation attempts for each approved action, including its first attempt.
Validation rules
- Minimum
1- Maximum
3
dispatchWindowSecondsintegerrequiredThe maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues.
Validation rules
- Minimum
60- Maximum
86400
Variant 2 · type: perps_transfer
One approved perps transfer in exactly the named direction.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_transfer"
directionstringrequiredFund the own perps account from the agent wallet, or withdraw back to the same agent wallet.
Validation rules
- Allowed values
["fund","withdraw"]
transferobjectrequiredThe exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact amount in six-decimal atomic units in either direction: 5 USDC is "5000000". A withdrawal returns USDC. A funding spends it from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it; Hyperliquid receives USDC. Never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalA funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
Show attributes
A funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 3 · type: perps_order
One approved Hyperliquid order, signed once exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_order"
orderobjectrequiredThe exact approved order.
Show attributes
The exact approved order.
coinstringrequiredThe market's coin name exactly as perps_markets lists it, such as BTC or xyz:TSLA.
Validation rules
- Pattern
"^(?:xyz:)?[A-Za-z0-9]{1,20}$"
assetintegerrequiredThe market's asset id exactly as perps_markets lists it for that coin.
Validation rules
- Minimum
0- Maximum
1099999
sidestringrequiredThe position this order opens, adds to, reduces or protects. A reduce-only entry on a long position sells.
Validation rules
- Allowed values
["long","short"]
sizestringrequiredExact size in the coin, at most the market's szDecimals places.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
leverageanyOfrequiredLeverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
Show attributes
Leverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user.
anyOf · 2 variants
Variant 1 · integer
Validation rules
- Minimum
1- Maximum
100
Variant 2 · null
marginModestringoptionalHow the position is margined, which the user chose with the leverage: cross shares the account's margin with every cross position, isolated puts only this position's own margin at risk (perps_margin_update adds or removes it later). Present exactly when leverage is; an isolated-only market (perps_markets onlyIsolated) takes isolated. Never assume it: ask the user. Absent on orders approved before margin modes existed, which were cross.
Validation rules
- Allowed values
["cross","isolated"]
entryanyOfrequiredThe order itself; null for take-profit and stop-loss on the existing position only.
Show attributes
The order itself; null for take-profit and stop-loss on the existing position only.
anyOf · 2 variants
Variant 1 · object
pricestringrequiredThe limit price; for an immediate (Ioc) order, the worst price it may fill at.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
timeInForcestringrequiredIoc fills now within price and cancels the rest (a market order), Gtc rests until filled or cancelled, Alo rests only as a maker order.
Validation rules
- Allowed values
["Gtc","Ioc","Alo"]
reduceOnlybooleanrequiredTrue to only reduce or close the existing position, never open or add.
Variant 2 · null
takeProfitanyOfrequiredA reduce-only take-profit, or null.
Show attributes
A reduce-only take-profit, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
stopLossanyOfrequiredA reduce-only stop-loss, or null.
Show attributes
A reduce-only stop-loss, or null.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice.
triggerPricestringrequiredThe mark price that fires this exit.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
limitPricestringrequiredThe worst price the exit may fill at once fired; it executes as a market order within it.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
trailingStopanyOfoptionalA reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
Show attributes
A reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.
anyOf · 2 variants
Variant 1 · object
A reduce-only market exit on the same size that follows the mark price as it moves in the position's favour and fires once it reverses by the retracement.
retracementanyOfrequiredHow far the mark price may reverse from its best before the stop fires.
Show attributes
How far the mark price may reverse from its best before the stop fires.
anyOf · 2 variants
Variant 1 · object
Trail by a percentage of the best mark price.
percentstringrequiredHow far the mark price may reverse from its best since activation, in percent: 2 is 2%.
Validation rules
- Pattern
"^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
Variant 2 · object
Trail by a fixed price distance.
pricestringrequiredHow far the mark price may reverse from its best since activation, in price units.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
activationPriceanyOfrequiredThe mark price that starts the trailing; null to trail from placement.
Show attributes
The mark price that starts the trailing; null to trail from placement.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
Variant 2 · null
Variant 2 · null
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 4 · type: prediction_fund
One exact USDC or USDT debit delivered as native Base USDC to Polymarket's bridge for the agent's own account; the final pUSD amount is not bounded.
typestringrequiredOne approved Polymarket funding transfer.
Validation rules
- Exact value
"prediction_fund"
transferobjectrequiredThe exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
Show attributes
The exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.
amountRawstringrequiredExact debit in six-decimal atomic units: 5 USDC or USDT is "5000000", spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it. The host resolves the agent’s own Polymarket Deposit Wallet and its bridge address; never supply an address.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxFirstLegLossBpsintegerrequiredExplicit maximum loss, in basis points, of the first leg only: the wallet's USDC, USDT or coin delivered as native Base USDC to Polymarket's bridge, fees and any cross-chain hop included. It does not bound the bridge's conversion to pUSD on Polygon, whose fees and output are variable and estimated. Required; no default.
Validation rules
- Minimum
0- Maximum
300
payWithobjectoptionalApproved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
Show attributes
Approved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
maxInputRawstringrequiredThe most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 5 · type: prediction_order
typestringrequiredValidation rules
- Exact value
"prediction_order"
orderobjectrequiredShow attributes
marketIdstringrequiredValidation rules
- Pattern
"^[1-9][0-9]{0,19}$"
assetIdstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,77})$"
marketQuestionstringrequiredValidation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredValidation rules
- Minimum length
1- Maximum length
256
sidestringrequiredValidation rules
- Allowed values
["BUY","SELL"]
limitPriceUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
quantityoneOfrequiredShow attributes
oneOf · 2 variants
Variant 1 · kind: shares
kindstringrequiredValidation rules
- Exact value
"shares"
sizeSharesDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
Variant 2 · kind: budget
kindstringrequiredValidation rules
- Exact value
"budget"
amountUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
orderTypestringrequiredValidation rules
- Allowed values
["GTC","GTD","FOK","FAK"]
expiresAtintegeroptionalValidation rules
- Minimum
0- Maximum
253402300799
maxFeeUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
maxSpendUsdDecimalstringrequiredValidation rules
- Pattern
"^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 6 · type: perps_freed_withdrawal
One withdrawal home of what a cash-out's exit freed on Hyperliquid, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_freed_withdrawal"
withdrawalobjectrequiredThe signed maximum and all-in loss bound of the withdrawal home.
Show attributes
The signed maximum and all-in loss bound of the withdrawal home.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic USDC: what the exit before it frees, sized by the host before the approval opens. Never more than the exit freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 7 · type: prediction_freed_withdrawal
One withdrawal home of what a cash-out's sale freed on Polymarket, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredValidation rules
- Exact value
"prediction_freed_withdrawal"
withdrawalobjectrequiredWithdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
Show attributes
Withdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic pUSD: what the sale before it frees, sized by the host before the approval opens. Never more than the sale freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
startBystring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
dependenciesarrayrequiredShow attributes
Array items · array
Validation rules
- Maximum items
6
Array items · integer
Validation rules
- Minimum
0- Maximum
9007199254740991
walletDebitanyOfrequiredThe sum of every piece's debit from the agent wallet, per token, in raw units. Empty when the pieces are venue orders paid from money already on their venues, as when finishing a basket, or a cash-out, which closes a position and brings home what that freed.
Show attributes
The sum of every piece's debit from the agent wallet, per token, in raw units. Empty when the pieces are venue orders paid from money already on their venues, as when finishing a basket, or a cash-out, which closes a position and brings home what that freed.
anyOf · 2 variants
Variant 1 · array
Validation rules
- Minimum items
1- Maximum items
16
Array items · object
One capped input token and its total spend ceiling.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
amountRawstringrequiredThe most this contract may spend of this token in total, across every execution, in the token's smallest unit.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · array
Validation rules
- prefixItems
[]- Maximum items
0
Array items · never
No value is allowed.
validUntilstring · date-timerequiredWhen every piece that has not started loses its authority.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 16 · type: prediction_automation
A standing approval for one Polymarket automation: buy one outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price, each time its rule fires, up to its limits.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"prediction_automation"
marketobjectrequiredThe one Polymarket outcome this automation trades.
Show attributes
The one Polymarket outcome this automation trades.
marketIdstringrequiredThe market's id exactly as prediction_market returns it.
Validation rules
- Pattern
"^[1-9][0-9]{0,19}$"
conditionIdstringrequiredThe market's conditionId exactly as prediction_market returns it.
Validation rules
- Pattern
"^0x[0-9a-fA-F]{64}$"
assetIdstringrequiredThe outcome's CLOB token id, exactly the assetId prediction_market lists for that outcome. Yes and No are different tokens.
Validation rules
- Pattern
"^[1-9][0-9]{0,77}$"
marketQuestionstringrequiredThe market's question exactly as prediction_market returns it.
Validation rules
- Minimum length
1- Maximum length
1000
outcomestringrequiredThe outcome's name exactly as prediction_market returns it.
Validation rules
- Minimum length
1- Maximum length
256
actiononeOfrequiredWhat a Polymarket automation does each time its rule fires: buy the outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price.
Show attributes
What a Polymarket automation does each time its rule fires: buy the outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price.
oneOf · 2 variants
Variant 1 · kind: buy
Buy the outcome with a USD budget at no more than a maximum price.
kindstringrequiredBuy shares of the outcome.
Validation rules
- Exact value
"buy"
amountUsdDecimalstringrequiredThe USD each firing spends before fees, to the cent: "50" is $50. Each buy is an immediate order that fills what it can at once and cancels the rest.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,2})?$"
maxPriceUsdDecimalstringrequiredThe most a share may cost, as the market's chance: "0.32" never pays more than 32¢ a share. Use a price on the market's tick.
Validation rules
- Pattern
"^0\\.[0-9]{1,4}$"
maxFeeUsdDecimalstringrequiredThe most each firing may pay Polymarket in fees, in USD: "1" is $1.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,6})?$"
Variant 2 · kind: sell
Sell a share of the agent's holding of the outcome at no less than a minimum price.
kindstringrequiredSell shares of the outcome.
Validation rules
- Exact value
"sell"
fractionBpsintegerrequiredHow much of the agent's holding of the outcome each firing sells, in basis points: 10000 sells it all.
Validation rules
- Minimum
1- Maximum
10000
minPriceUsdDecimalstringrequiredThe least a share may sell for, as the market's chance: "0.7" never sells below 70¢ a share. Use a price on the market's tick.
Validation rules
- Pattern
"^0\\.[0-9]{1,4}$"
maxFeeUsdDecimalstringrequiredThe most each firing may pay Polymarket in fees, in USD: "1" is $1.
Validation rules
- Pattern
"^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,6})?$"
maxExecutionsintegerrequiredHow many firings may trade under this approval; a buy spends at most maxExecutions × amountUsdDecimal in all.
Validation rules
- Minimum
1- Maximum
100
validUntilstring · date-timerequiredThe deadline after which this approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 17 · type: solana_sell_many
An approved multi-coin Solana sale, executed only exactly as approved.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"solana_sell_many"
sellManyobjectrequiredThe exact approved coins, amounts and loss bounds, in order, and where the proceeds go.
Show attributes
The exact approved coins, amounts and loss bounds, in order, and where the proceeds go.
sellsarrayrequiredThe coins to sell, in the order they are sold: 2 to 6, each a different mint, none of them SOL itself.
Show attributes
The coins to sell, in the order they are sold: 2 to 6, each a different mint, none of them SOL itself.
Validation rules
- Minimum items
2- Maximum items
6
Array items · object
One coin of a multi-coin sale, sold through the agent's own Solana account.
tokenobjectrequiredThe exact token to sell.
Show attributes
The exact token to sell.
mintstringrequiredThe token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker.
Validation rules
- Minimum length
32- Maximum length
44- Pattern
"^[1-9A-HJ-NP-Za-km-z]+$"
decimalsintegerrequiredThe mint's decimals, exactly as returned with the mint.
Validation rules
- Minimum
0- Maximum
18
tokenProgramstringrequiredThe program that owns the mint, exactly as returned with the mint: spl_token or token_2022.
Validation rules
- Allowed values
["spl_token","token_2022"]
amountoneOfrequiredHow much of the token to sell.
Show attributes
How much of the token to sell.
oneOf · 2 variants
Variant 1 · kind: exact
Sell an exact amount of the token.
kindstringrequiredSell an exact amount of the token.
Validation rules
- Exact value
"exact"
amountRawstringrequiredExact amount of the token to sell, in its smallest unit (scaled by the token's decimals).
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
Variant 2 · kind: fraction
Sell a share of the account's balance of the token.
kindstringrequiredSell a share of what the Solana account holds of the token.
Validation rules
- Exact value
"fraction"
bpsintegerrequiredThe share to sell, in basis points of the account's balance of the token: all of it is 10000, half is 5000.
Validation rules
- Minimum
1- Maximum
10000
maxValueLossBpsintegerrequiredExplicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default.
Validation rules
- Minimum
1- Maximum
1500
receivestringrequiredusdc returns the summed proceeds of every sale that went through to the agent wallet as USDC on NEAR, in one transfer once the last sale ran; sol keeps them as SOL in the agent's Solana account.
Validation rules
- Allowed values
["usdc","sol"]
maxExecutionsnumberrequiredA multi-coin sale is approved once and runs once: always 1.
Validation rules
- Exact value
1
validUntilstring · date-timerequiredWhen this grant's authority expires; for a one-shot approval, the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 18 · type: grid
Owner-signed authority for one grid: the resting cell orders its terms derive, until it ends.
typestringrequiredWhich contract template this is.
Validation rules
- Exact value
"grid"
gridobjectrequiredA grid's exact terms: pair, levels, quantity and starting sides.
Show attributes
A grid's exact terms: pair, levels, quantity and starting sides.
baseobjectrequiredThe asset the grid buys low and sells high.
Show attributes
The asset the grid buys low and sells high.
pinnedobjectrequiredThe exact base asset: token id and decimals.
Show attributes
The exact base asset: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
quoteobjectrequiredThe asset prices are in and buys are paid with.
Show attributes
The asset prices are in and buys are paid with.
pinnedobjectrequiredThe exact quote asset: token id and decimals.
Show attributes
The exact quote asset: token id and decimals.
tokenIdstringrequiredThe exact ledger asset identifier, including its token standard namespace.
Validation rules
- Maximum length
256- Pattern
"^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$"
decimalsintegerrequiredHow many decimal places the token's smallest unit represents.
Validation rules
- Minimum
0- Maximum
38
levelsarrayrequiredThe 2 to 20 grid prices, strictly ascending: quote units per ONE base unit, plain human decimals.
Show attributes
The 2 to 20 grid prices, strictly ascending: quote units per ONE base unit, plain human decimals.
Validation rules
- Minimum items
2- Maximum items
20
Array items · string
Validation rules
- Maximum length
80- Pattern
"^(0|[1-9]\\d{0,38})(\\.\\d{1,38})?$"
quantityPerCellstringrequiredThe exact base amount every cell buys and sells, in the base asset's smallest unit. Fixed: profits never compound.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
cellsarrayrequiredOne entry per cell, lowest first (levels.length - 1 of them): cells wholly below the start price and the one straddling it buy, cells wholly above it stay idle.
Show attributes
One entry per cell, lowest first (levels.length - 1 of them): cells wholly below the start price and the one straddling it buy, cells wholly above it stay idle.
Validation rules
- Minimum items
1- Maximum items
19
Array items · object
startstringrequiredThe side the cell's first order is on: buy at its low level, or idle (the cell never places).
Validation rules
- Allowed values
["buy","idle"]
validUntilstring · date-timerequiredWhen the grid ends: no order is placed, and none rests, after it. At most 720 hours after the approval's own expiry.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 19 · type: perps_freed_withdrawal
One withdrawal home of what a cash-out's exit freed on Hyperliquid, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredWhich authorization contract this is.
Validation rules
- Exact value
"perps_freed_withdrawal"
withdrawalobjectrequiredThe signed maximum and all-in loss bound of the withdrawal home.
Show attributes
The signed maximum and all-in loss bound of the withdrawal home.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic USDC: what the exit before it frees, sized by the host before the approval opens. Never more than the exit freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxValueLossBpsintegerrequiredExplicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredThe deadline after which this one-shot approval authorizes nothing.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 20 · type: prediction_freed_withdrawal
One withdrawal home of what a cash-out's sale freed on Polymarket, at most the signed maximum. Only ever a piece of a cash-out.
typestringrequiredValidation rules
- Exact value
"prediction_freed_withdrawal"
withdrawalobjectrequiredWithdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
Show attributes
Withdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw.
upToRawstringrequiredThe most this withdrawal may move, in six-decimal atomic pUSD: what the sale before it frees, sized by the host before the approval opens. Never more than the sale freed.
Validation rules
- Pattern
"^(0|[1-9]\\d{0,38})$"
maxLossBpsintegerrequiredExplicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit.
Validation rules
- Minimum
0- Maximum
300
validUntilstring · date-timerequiredValidation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
messagestringrequiredThe text the user signs with their registered wallet or passkey. Sign it exactly as returned: a changed character makes the signature invalid.
controllerIdstring · uuidrequiredThe user's registered wallet or passkey, the only one whose signature is accepted. Send it back unchanged beside the signature.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
expiresAtstring · date-timerequiredWhen the signature stops being accepted, about four and a half minutes after this was issued. Send it back unchanged beside the signature.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
recipientstringoptionalNEAR wallets only: the recipient to pass to signMessage together with the message.
Variant 2 · null
summarystringrequiredA short summary of what approving would do.
statusstringrequiredpending while it waits for a decision, approved or denied once decided, or expired when nobody decided before expiresAt.
Validation rules
- Allowed values
["pending","approved","denied","expired"]
reasonstring or nullrequiredWhy it was decided, if a reason was given.
requestedAtstring · date-timerequiredWhen the agent asked.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
expiresAtstring · date-timerequiredWhen the approval expires if nobody decides it.
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
decidedAtanyOfrequiredWhen it was approved or denied; null until then.
Show attributes
When it was approved or denied; null until then.
anyOf · 2 variants
Variant 1 · string · date-time
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 2 · null
consumedAtanyOfrequiredWhen the approved action started, or null until then (always null when denied). The action can still fail afterwards: this is not proof it succeeded.
Show attributes
When the approved action started, or null until then (always null when denied). The action can still fail afterwards: this is not proof it succeeded.
anyOf · 2 variants
Variant 1 · string · date-time
Validation rules
- Format
"date-time"- Pattern
"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
Variant 2 · null
signedByanyOfrequiredFor an approved money action, which only the user's signature approves: the sign-in wallet that signed it, by its public identifier (an EVM, Solana, Stellar or Tron address, a NEAR account, a TON public key, or a passkey's credential id). A user's sign-in wallet is fixed at their first sign-in and never replaced, so reading it now names the same wallet that signed when the action was approved. null for any other approval, and for a money action approved before the user's sign-in wallet was registered, when approvals took no signature.
Show attributes
For an approved money action, which only the user's signature approves: the sign-in wallet that signed it, by its public identifier (an EVM, Solana, Stellar or Tron address, a NEAR account, a TON public key, or a passkey's credential id). A user's sign-in wallet is fixed at their first sign-in and never replaced, so reading it now names the same wallet that signed when the action was approved. null for any other approval, and for a money action approved before the user's sign-in wallet was registered, when approvals took no signature.
anyOf · 2 variants
Variant 1 · string
Validation rules
- Minimum length
1- Maximum length
8192
Variant 2 · null
conversationIdnullrequiredAlways null: a withdrawal's review belongs to the withdrawal.
runIdnullrequiredAlways null: a withdrawal has no run.
operationIdstring · uuidrequiredThe withdrawal this review belongs to (its id in Get a withdrawal). Withdraw funds decides it.
Validation rules
- Format
"uuid"- Pattern
"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
400 The request could not be read as this operation expects.
The request could not be read as this operation expects.
invalid_input— the body or query failed validation;issuesnames each fieldinvalid_cursor— thecursoris not one this list minted
application/problem+json · object
RFC 9457 problem details: what every error response carries. Never a provider's message, a query or a stack.
typestringrequiredThe kind of problem as a URN, urn:fin:error:<kind>; stable, compare against it
titlestringrequiredThe kind's human title, for logs; never parse it
statusintegerrequiredThe HTTP status, repeated in the body
Validation rules
- Minimum
400- Maximum
599
reasonstringoptionalThe machine-readable why. One of:
run_active(409) — a run already holds this conversationbudget_exhausted(429) — the user's AI usage budget, or your partner account's AI spend limit, is used up until the next day or month, or an operator froze itapproval_not_pending(409) — the approval was already decided or has expired, or its id does not exist or belongs to a different conversationexecution_capacity(429) — no capacity is free to run this right now; honourRetry-Afterexecution_unavailable(503) — the service that runs the agent could not take the work;retryablesays whether to try againstop_pending(409) — a stop is already in progress and its cleanup is not yet confirmedautomation_changed(409) — the automation changed while this request was handled; read it again and retryautomation_held(409) — an operator holds the automation; it fires again when releasedautomation_invalid(409) — the automation's definition cannot run as writtenautomation_paused(409) — the automation is paused; resume it firstautomation_has_no_webhook(409) — the automation does not run on incoming events, so it has no webhookautomation_limit(409) — the user already has as many automations as the deployment allowsprofile_unknown_tool(400) —profile.toolsnames a tool this deployment does not havedeployment_paused(503) — an operator paused this kind of work for the deployment; try again laterrun_not_active(409) — the run named in the path is not the conversation's live runwithdrawal_changed(409) — the request key already binds different withdrawal terms, or the current balance cannot cover the requested amountswap_changed(409) — the swap cannot be made as asked: an asset is no longer available or the current balance cannot cover the amount; get a new quoteorder_changed(409) — the order can no longer be placed as prepared: the agent wallet no longer holds the amount, an asset is no longer offered, or its minimum no longer matches the assets' precision; prepare it againprediction_order_changed(409) — the Polymarket order can no longer be placed as signed: the market closed or stopped taking orders, its price is off the market's tick or its size off Polymarket's minimum, its fee or cost would exceed the signed caps, the Polymarket account cannot cover it, or the signature lapsed before it was placed. Nothing was placed; prepare it againsolana_trade_changed(409) — the Solana trade can no longer run as signed: the token's decimals or program changed, the agent's Solana account or holdings no longer fit it, another Solana trade is running, or the signature lapsed before it started. Nothing moved; prepare it againtrade_not_recoverable(409) — the original trade or a recovery attempt remains active or uncertain, its unfinished actions lack conclusive recovery proof, or its remaining proposal can no longer be usedorder_not_cancelable(409) — the limit order can no longer be cancelled: it filled or expired, or the swap provider never took it. Read the order for where it standsgrid_not_active(409) — the grid is not running, so it cannot be paused: it is already paused, stopping or ended. Read the grid for where it standsgrid_not_paused(409) — the grid is not paused, so there is nothing to resume. Read the grid for where it standssuggestion_changed(409) — the suggestion no longer holds: the account or the market moved since fin made it, the user set it aside, or it cannot be made where the user is now. Say it changed, and read the page's suggestions againrequest_key_conflict(409) — the request identity already binds different terms; retrieve the original resource or use a new identity for a new requestquestion_not_pending(409) — the questionnaire has already been answered, closed, or is not awaiting this submissionflag_changed(409) — the flag's targeting changed since you read it; read it again and retrygroup_changed(409) — the group changed or was deleted since you read it; read it again and retrygroup_in_use(409) — a flag's rules still name this group; take it out of those rules firstgroup_name_taken(409) — another group already has this nameagent_wallet_required(409) — create the agent wallet before opening a perps, prediction-market or Solana accountwallet_account_unsupported(409) — the user's wallet is an Agent API wallet, whose Intents account is a 0x address this route cannot name; read it with Get wallet account, Get wallet account balances and Open a wallet account session insteadconversation_deleted(410) — the conversation was deleted; its history stays readableautomation_deleted(410) — the automation was deletedgrid_ended(410) — the grid stopped, expired or failed; it stays readable but takes no command. A new grid needs the user's approval in chatcredential_expired(401) — the user token has expired; obtain a fresh oneaccount_disabled(403) — an operator disabled the accountperps_disabled(403) — perps is not enabled for this userprediction_disabled(403) — prediction-market trading is not enabled for this usersolana_disabled(403) — Solana trading is not enabled for this userno_account(404) — the user has not opened the account this call reads; open it firstnot_available_in_region(403) — perps funding is unavailable in the user's region for this request; withdrawals remain availablesteering_disabled(403) — steering a working run is not turned on for this user; send the message with Start a run once the run endsbaskets_disabled(403) — idea baskets are not turned on for this user; hide the Ideas pages and their basketsbasket_buying(409) — the basket is still buying, so it cannot be deleted yet; try again once its result is inbasket_awaiting_approval(409) — an approval to buy this basket is still open; decline it in the chat, then delete the basketbasket_step_not_failed(409) — the step bought, or the basket is not partly bought, so no order can be linked to it; read the basket againbasket_step_linked(409) — another order is already linked to this step; a link is permanent, so read the basket againbasket_order_not_linkable(400) — the order cannot stand in for this step: it is not one of the step'sfailures[].linkableorders, or another basket step already holds itvoice_disabled(403) — voice input is not turned on for this user; let them type insteadvoice_unavailable(503) — this deployment has no speech model, so it cannot transcribe recordings; let the user type insteadprovider_unavailable(503) — an external provider the call depends on did not answerquote_refused(400) — 1Click would not quote this request, usually an amount below what it routes or a pair it does not offer; nothing was reserved. Change the amount or the assets and quote again; for a deposit address, no address was issued, so offer another networkinvalid_input(400) — the body or query failed validation;issuesnames each fieldinternal(500) — a fault on our side; quoterequestIdwhen reporting itpartner_key_required(401) — noX-Api-Keyheader was sentpartner_key_invalid(401) — theX-Api-Keyis unknown or revokedsubject_mismatch(403) — the{userId}in the path is not the token's userorigin_rejected(403) — a browserOriginother than the configured web originpermission_required(403) — the verified credential is not permitted to make this callsignature_required(403) — creating the agent wallet needs the user's signature: send the user's signature ofcreation.messagefrom Get the agent wallet asauthorizationasset_not_withdrawable(403) — tokenized stocks cannot be withdrawn; sell them firstasset_not_swappable(403) — the swap names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offasset_not_tradable(403) — the order names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offsolana_token_not_tradable(403) — Fin won't trade this token: its mint lets someone freeze, move or charge for holdings or pause transfers, it can't be sold back, Fin couldn't read its mint, it has no reliable price, or it is wrapped SOL. A sale is refused only for what would stop it landinglimit_orders_disabled(403) — limit orders are not enabled for this usergrid_trading_disabled(403) — grid trading is not enabled for this user, so a paused grid cannot be resumed; pausing and cancelling a grid are never gateddeposit_limit_exceeded(429) — the deposit would take the agent wallet past the user's deposit limit, or, for a deposit address, the wallet has no room left under it; nothing was recorded. ReaddepositLimit.availableCentsfrom Get balances for how much fits now, and deposit no more than thatpolicy_change_throttled(429) — the user's Agent API wallet changed what it allows a few minutes ago, and the NEAR Intents Agent API lets it change again only after a cooldown; nothing was asked or signed, so call again onceRetry-Afterhas passedagent_slippage_exceeded(403) — the user's wallet is an Agent API wallet whose agent signs only trades that lose at most the share of their value its owner allowed (max_slippage_bps): fees, price and slippage together, by 1Click's own USD values at the quote's minimum output. This trade's quote loses more, states no USD value, or, before there is a quote, its loss bound is already quoted with more slippage than that (half the bound, plus 1Click's fee at the most it has been seen to take, 20 basis points, before an approval). Very small trades lose more to fixed fees; nothing was signed, so ask again with a larger amount or a smaller loss boundagent_api_orders_unavailable(403) — the user's Agent API wallet needs wallet setup to enable limit orders, or the order exceeds this wallet's 168-hour maximum; finish wallet setup or choose at most 168 hours before trying again; nothing was approved or signeddestination_not_allowed(403) — the user's wallet is an Agent API wallet, whose agent pays a deposit only to itself, to a NEAR Intents account its owner listed (on the confidential ledger) or to an address on a chain its owner listed; allow this one with Add a withdrawal destination (one owner signature), then ask again. A public NEAR Intents account, or an address with no valid spelling on its chain, cannot be paid at all; nothing was signedrate_limited(429) — the per-key or per-user limit is spent; honourRetry-Afterpartner_request_capacity(429) — this partner's request quota across all keys and replicas is spent; honour Retry-Afterpartner_run_capacity(429) — this partner's active run quota is full; honour Retry-After and reuse the same request identitystream_capacity(429) — the partner, user or replica has no free stream capacity; honourRetry-Afterinvalid_cursor(400) — thecursoris not one this list mintedinvalid_question_answer(400) — the questionnaire answer does not match its questions or allowed choicesquestion_closed(410) — the questionnaire expired or was cancelledunknown_target(400) — a rule names a partner, group or user that does not exist, or a user outside the partners the same rule namesscope_invalid(400) — a subject in the scope is not a subject id, or appears twicesubject_unsupported(404) — a subject in the scope is not one market briefs cover; list them with List market subjectsbrief_not_found(404) — no market brief job with this id was created with your partner keybriefs_busy(429) — your market briefs are at their limit of briefs generating at once; retry afterRetry-Aftermarket_briefs_disabled(403) — market briefs are not turned on for your partner keystory_not_found(404) — no market story with this id is current: it never was one, or Fin no longer shows it because its sources were withdrawn or its figures can no longer be read
Validation rules
- Allowed values
["run_active","budget_exhausted","approval_not_pending","execution_capacity","execution_unavailable","stop_pending","automation_changed","automation_held","automation_invalid","automation_paused","automation_has_no_webhook","automation_limit","profile_unknown_tool","deployment_paused","run_not_active","withdrawal_changed","swap_changed","order_changed","prediction_order_changed","solana_trade_changed","trade_not_recoverable","order_not_cancelable","grid_not_active","grid_not_paused","suggestion_changed","request_key_conflict","question_not_pending","flag_changed","group_changed","group_in_use","group_name_taken","agent_wallet_required","wallet_account_unsupported","conversation_deleted","automation_deleted","grid_ended","credential_expired","account_disabled","perps_disabled","prediction_disabled","solana_disabled","no_account","not_available_in_region","steering_disabled","baskets_disabled","basket_buying","basket_awaiting_approval","basket_step_not_failed","basket_step_linked","basket_order_not_linkable","voice_disabled","voice_unavailable","provider_unavailable","quote_refused","invalid_input","internal","partner_key_required","partner_key_invalid","subject_mismatch","origin_rejected","permission_required","signature_required","asset_not_withdrawable","asset_not_swappable","asset_not_tradable","solana_token_not_tradable","limit_orders_disabled","grid_trading_disabled","deposit_limit_exceeded","policy_change_throttled","agent_slippage_exceeded","agent_api_orders_unavailable","destination_not_allowed","rate_limited","partner_request_capacity","partner_run_capacity","stream_capacity","invalid_cursor","invalid_question_answer","question_closed","unknown_target","scope_invalid","subject_unsupported","brief_not_found","briefs_busy","market_briefs_disabled","story_not_found"]
requestIdstringrequiredThe id Fin used for this request; quote it when reporting a problem
retryablebooleanrequiredWhether repeating the same request later can succeed without changing it
detailstringoptionalOnly on invalid_input: which part of the request failed validation
issuesarrayoptionalOnly on invalid_input: one entry per failing field
Show attributes
Only on invalid_input: one entry per failing field
Array items · object
pathstringrequiredThe JSON pointer of the failing field; empty for the root object
messagestringrequiredWhy the field failed
401 A credential is missing, invalid or expired.
A credential is missing, invalid or expired.
partner_key_required— noX-Api-Keyheader was sentpartner_key_invalid— theX-Api-Keyis unknown or revokedcredential_expired— the user token has expired; obtain a fresh one
application/problem+json · object
RFC 9457 problem details: what every error response carries. Never a provider's message, a query or a stack.
typestringrequiredThe kind of problem as a URN, urn:fin:error:<kind>; stable, compare against it
titlestringrequiredThe kind's human title, for logs; never parse it
statusintegerrequiredThe HTTP status, repeated in the body
Validation rules
- Minimum
400- Maximum
599
reasonstringoptionalThe machine-readable why. One of:
run_active(409) — a run already holds this conversationbudget_exhausted(429) — the user's AI usage budget, or your partner account's AI spend limit, is used up until the next day or month, or an operator froze itapproval_not_pending(409) — the approval was already decided or has expired, or its id does not exist or belongs to a different conversationexecution_capacity(429) — no capacity is free to run this right now; honourRetry-Afterexecution_unavailable(503) — the service that runs the agent could not take the work;retryablesays whether to try againstop_pending(409) — a stop is already in progress and its cleanup is not yet confirmedautomation_changed(409) — the automation changed while this request was handled; read it again and retryautomation_held(409) — an operator holds the automation; it fires again when releasedautomation_invalid(409) — the automation's definition cannot run as writtenautomation_paused(409) — the automation is paused; resume it firstautomation_has_no_webhook(409) — the automation does not run on incoming events, so it has no webhookautomation_limit(409) — the user already has as many automations as the deployment allowsprofile_unknown_tool(400) —profile.toolsnames a tool this deployment does not havedeployment_paused(503) — an operator paused this kind of work for the deployment; try again laterrun_not_active(409) — the run named in the path is not the conversation's live runwithdrawal_changed(409) — the request key already binds different withdrawal terms, or the current balance cannot cover the requested amountswap_changed(409) — the swap cannot be made as asked: an asset is no longer available or the current balance cannot cover the amount; get a new quoteorder_changed(409) — the order can no longer be placed as prepared: the agent wallet no longer holds the amount, an asset is no longer offered, or its minimum no longer matches the assets' precision; prepare it againprediction_order_changed(409) — the Polymarket order can no longer be placed as signed: the market closed or stopped taking orders, its price is off the market's tick or its size off Polymarket's minimum, its fee or cost would exceed the signed caps, the Polymarket account cannot cover it, or the signature lapsed before it was placed. Nothing was placed; prepare it againsolana_trade_changed(409) — the Solana trade can no longer run as signed: the token's decimals or program changed, the agent's Solana account or holdings no longer fit it, another Solana trade is running, or the signature lapsed before it started. Nothing moved; prepare it againtrade_not_recoverable(409) — the original trade or a recovery attempt remains active or uncertain, its unfinished actions lack conclusive recovery proof, or its remaining proposal can no longer be usedorder_not_cancelable(409) — the limit order can no longer be cancelled: it filled or expired, or the swap provider never took it. Read the order for where it standsgrid_not_active(409) — the grid is not running, so it cannot be paused: it is already paused, stopping or ended. Read the grid for where it standsgrid_not_paused(409) — the grid is not paused, so there is nothing to resume. Read the grid for where it standssuggestion_changed(409) — the suggestion no longer holds: the account or the market moved since fin made it, the user set it aside, or it cannot be made where the user is now. Say it changed, and read the page's suggestions againrequest_key_conflict(409) — the request identity already binds different terms; retrieve the original resource or use a new identity for a new requestquestion_not_pending(409) — the questionnaire has already been answered, closed, or is not awaiting this submissionflag_changed(409) — the flag's targeting changed since you read it; read it again and retrygroup_changed(409) — the group changed or was deleted since you read it; read it again and retrygroup_in_use(409) — a flag's rules still name this group; take it out of those rules firstgroup_name_taken(409) — another group already has this nameagent_wallet_required(409) — create the agent wallet before opening a perps, prediction-market or Solana accountwallet_account_unsupported(409) — the user's wallet is an Agent API wallet, whose Intents account is a 0x address this route cannot name; read it with Get wallet account, Get wallet account balances and Open a wallet account session insteadconversation_deleted(410) — the conversation was deleted; its history stays readableautomation_deleted(410) — the automation was deletedgrid_ended(410) — the grid stopped, expired or failed; it stays readable but takes no command. A new grid needs the user's approval in chatcredential_expired(401) — the user token has expired; obtain a fresh oneaccount_disabled(403) — an operator disabled the accountperps_disabled(403) — perps is not enabled for this userprediction_disabled(403) — prediction-market trading is not enabled for this usersolana_disabled(403) — Solana trading is not enabled for this userno_account(404) — the user has not opened the account this call reads; open it firstnot_available_in_region(403) — perps funding is unavailable in the user's region for this request; withdrawals remain availablesteering_disabled(403) — steering a working run is not turned on for this user; send the message with Start a run once the run endsbaskets_disabled(403) — idea baskets are not turned on for this user; hide the Ideas pages and their basketsbasket_buying(409) — the basket is still buying, so it cannot be deleted yet; try again once its result is inbasket_awaiting_approval(409) — an approval to buy this basket is still open; decline it in the chat, then delete the basketbasket_step_not_failed(409) — the step bought, or the basket is not partly bought, so no order can be linked to it; read the basket againbasket_step_linked(409) — another order is already linked to this step; a link is permanent, so read the basket againbasket_order_not_linkable(400) — the order cannot stand in for this step: it is not one of the step'sfailures[].linkableorders, or another basket step already holds itvoice_disabled(403) — voice input is not turned on for this user; let them type insteadvoice_unavailable(503) — this deployment has no speech model, so it cannot transcribe recordings; let the user type insteadprovider_unavailable(503) — an external provider the call depends on did not answerquote_refused(400) — 1Click would not quote this request, usually an amount below what it routes or a pair it does not offer; nothing was reserved. Change the amount or the assets and quote again; for a deposit address, no address was issued, so offer another networkinvalid_input(400) — the body or query failed validation;issuesnames each fieldinternal(500) — a fault on our side; quoterequestIdwhen reporting itpartner_key_required(401) — noX-Api-Keyheader was sentpartner_key_invalid(401) — theX-Api-Keyis unknown or revokedsubject_mismatch(403) — the{userId}in the path is not the token's userorigin_rejected(403) — a browserOriginother than the configured web originpermission_required(403) — the verified credential is not permitted to make this callsignature_required(403) — creating the agent wallet needs the user's signature: send the user's signature ofcreation.messagefrom Get the agent wallet asauthorizationasset_not_withdrawable(403) — tokenized stocks cannot be withdrawn; sell them firstasset_not_swappable(403) — the swap names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offasset_not_tradable(403) — the order names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offsolana_token_not_tradable(403) — Fin won't trade this token: its mint lets someone freeze, move or charge for holdings or pause transfers, it can't be sold back, Fin couldn't read its mint, it has no reliable price, or it is wrapped SOL. A sale is refused only for what would stop it landinglimit_orders_disabled(403) — limit orders are not enabled for this usergrid_trading_disabled(403) — grid trading is not enabled for this user, so a paused grid cannot be resumed; pausing and cancelling a grid are never gateddeposit_limit_exceeded(429) — the deposit would take the agent wallet past the user's deposit limit, or, for a deposit address, the wallet has no room left under it; nothing was recorded. ReaddepositLimit.availableCentsfrom Get balances for how much fits now, and deposit no more than thatpolicy_change_throttled(429) — the user's Agent API wallet changed what it allows a few minutes ago, and the NEAR Intents Agent API lets it change again only after a cooldown; nothing was asked or signed, so call again onceRetry-Afterhas passedagent_slippage_exceeded(403) — the user's wallet is an Agent API wallet whose agent signs only trades that lose at most the share of their value its owner allowed (max_slippage_bps): fees, price and slippage together, by 1Click's own USD values at the quote's minimum output. This trade's quote loses more, states no USD value, or, before there is a quote, its loss bound is already quoted with more slippage than that (half the bound, plus 1Click's fee at the most it has been seen to take, 20 basis points, before an approval). Very small trades lose more to fixed fees; nothing was signed, so ask again with a larger amount or a smaller loss boundagent_api_orders_unavailable(403) — the user's Agent API wallet needs wallet setup to enable limit orders, or the order exceeds this wallet's 168-hour maximum; finish wallet setup or choose at most 168 hours before trying again; nothing was approved or signeddestination_not_allowed(403) — the user's wallet is an Agent API wallet, whose agent pays a deposit only to itself, to a NEAR Intents account its owner listed (on the confidential ledger) or to an address on a chain its owner listed; allow this one with Add a withdrawal destination (one owner signature), then ask again. A public NEAR Intents account, or an address with no valid spelling on its chain, cannot be paid at all; nothing was signedrate_limited(429) — the per-key or per-user limit is spent; honourRetry-Afterpartner_request_capacity(429) — this partner's request quota across all keys and replicas is spent; honour Retry-Afterpartner_run_capacity(429) — this partner's active run quota is full; honour Retry-After and reuse the same request identitystream_capacity(429) — the partner, user or replica has no free stream capacity; honourRetry-Afterinvalid_cursor(400) — thecursoris not one this list mintedinvalid_question_answer(400) — the questionnaire answer does not match its questions or allowed choicesquestion_closed(410) — the questionnaire expired or was cancelledunknown_target(400) — a rule names a partner, group or user that does not exist, or a user outside the partners the same rule namesscope_invalid(400) — a subject in the scope is not a subject id, or appears twicesubject_unsupported(404) — a subject in the scope is not one market briefs cover; list them with List market subjectsbrief_not_found(404) — no market brief job with this id was created with your partner keybriefs_busy(429) — your market briefs are at their limit of briefs generating at once; retry afterRetry-Aftermarket_briefs_disabled(403) — market briefs are not turned on for your partner keystory_not_found(404) — no market story with this id is current: it never was one, or Fin no longer shows it because its sources were withdrawn or its figures can no longer be read
Validation rules
- Allowed values
["run_active","budget_exhausted","approval_not_pending","execution_capacity","execution_unavailable","stop_pending","automation_changed","automation_held","automation_invalid","automation_paused","automation_has_no_webhook","automation_limit","profile_unknown_tool","deployment_paused","run_not_active","withdrawal_changed","swap_changed","order_changed","prediction_order_changed","solana_trade_changed","trade_not_recoverable","order_not_cancelable","grid_not_active","grid_not_paused","suggestion_changed","request_key_conflict","question_not_pending","flag_changed","group_changed","group_in_use","group_name_taken","agent_wallet_required","wallet_account_unsupported","conversation_deleted","automation_deleted","grid_ended","credential_expired","account_disabled","perps_disabled","prediction_disabled","solana_disabled","no_account","not_available_in_region","steering_disabled","baskets_disabled","basket_buying","basket_awaiting_approval","basket_step_not_failed","basket_step_linked","basket_order_not_linkable","voice_disabled","voice_unavailable","provider_unavailable","quote_refused","invalid_input","internal","partner_key_required","partner_key_invalid","subject_mismatch","origin_rejected","permission_required","signature_required","asset_not_withdrawable","asset_not_swappable","asset_not_tradable","solana_token_not_tradable","limit_orders_disabled","grid_trading_disabled","deposit_limit_exceeded","policy_change_throttled","agent_slippage_exceeded","agent_api_orders_unavailable","destination_not_allowed","rate_limited","partner_request_capacity","partner_run_capacity","stream_capacity","invalid_cursor","invalid_question_answer","question_closed","unknown_target","scope_invalid","subject_unsupported","brief_not_found","briefs_busy","market_briefs_disabled","story_not_found"]
requestIdstringrequiredThe id Fin used for this request; quote it when reporting a problem
retryablebooleanrequiredWhether repeating the same request later can succeed without changing it
detailstringoptionalOnly on invalid_input: which part of the request failed validation
issuesarrayoptionalOnly on invalid_input: one entry per failing field
Show attributes
Only on invalid_input: one entry per failing field
Array items · object
pathstringrequiredThe JSON pointer of the failing field; empty for the root object
messagestringrequiredWhy the field failed
403 The credentials are valid but may not do this.
The credentials are valid but may not do this.
subject_mismatch— the{userId}in the path is not the token's useraccount_disabled— an operator disabled the accountorigin_rejected— a browserOriginother than the configured web originpermission_required— the verified credential is not permitted to make this call
application/problem+json · object
RFC 9457 problem details: what every error response carries. Never a provider's message, a query or a stack.
typestringrequiredThe kind of problem as a URN, urn:fin:error:<kind>; stable, compare against it
titlestringrequiredThe kind's human title, for logs; never parse it
statusintegerrequiredThe HTTP status, repeated in the body
Validation rules
- Minimum
400- Maximum
599
reasonstringoptionalThe machine-readable why. One of:
run_active(409) — a run already holds this conversationbudget_exhausted(429) — the user's AI usage budget, or your partner account's AI spend limit, is used up until the next day or month, or an operator froze itapproval_not_pending(409) — the approval was already decided or has expired, or its id does not exist or belongs to a different conversationexecution_capacity(429) — no capacity is free to run this right now; honourRetry-Afterexecution_unavailable(503) — the service that runs the agent could not take the work;retryablesays whether to try againstop_pending(409) — a stop is already in progress and its cleanup is not yet confirmedautomation_changed(409) — the automation changed while this request was handled; read it again and retryautomation_held(409) — an operator holds the automation; it fires again when releasedautomation_invalid(409) — the automation's definition cannot run as writtenautomation_paused(409) — the automation is paused; resume it firstautomation_has_no_webhook(409) — the automation does not run on incoming events, so it has no webhookautomation_limit(409) — the user already has as many automations as the deployment allowsprofile_unknown_tool(400) —profile.toolsnames a tool this deployment does not havedeployment_paused(503) — an operator paused this kind of work for the deployment; try again laterrun_not_active(409) — the run named in the path is not the conversation's live runwithdrawal_changed(409) — the request key already binds different withdrawal terms, or the current balance cannot cover the requested amountswap_changed(409) — the swap cannot be made as asked: an asset is no longer available or the current balance cannot cover the amount; get a new quoteorder_changed(409) — the order can no longer be placed as prepared: the agent wallet no longer holds the amount, an asset is no longer offered, or its minimum no longer matches the assets' precision; prepare it againprediction_order_changed(409) — the Polymarket order can no longer be placed as signed: the market closed or stopped taking orders, its price is off the market's tick or its size off Polymarket's minimum, its fee or cost would exceed the signed caps, the Polymarket account cannot cover it, or the signature lapsed before it was placed. Nothing was placed; prepare it againsolana_trade_changed(409) — the Solana trade can no longer run as signed: the token's decimals or program changed, the agent's Solana account or holdings no longer fit it, another Solana trade is running, or the signature lapsed before it started. Nothing moved; prepare it againtrade_not_recoverable(409) — the original trade or a recovery attempt remains active or uncertain, its unfinished actions lack conclusive recovery proof, or its remaining proposal can no longer be usedorder_not_cancelable(409) — the limit order can no longer be cancelled: it filled or expired, or the swap provider never took it. Read the order for where it standsgrid_not_active(409) — the grid is not running, so it cannot be paused: it is already paused, stopping or ended. Read the grid for where it standsgrid_not_paused(409) — the grid is not paused, so there is nothing to resume. Read the grid for where it standssuggestion_changed(409) — the suggestion no longer holds: the account or the market moved since fin made it, the user set it aside, or it cannot be made where the user is now. Say it changed, and read the page's suggestions againrequest_key_conflict(409) — the request identity already binds different terms; retrieve the original resource or use a new identity for a new requestquestion_not_pending(409) — the questionnaire has already been answered, closed, or is not awaiting this submissionflag_changed(409) — the flag's targeting changed since you read it; read it again and retrygroup_changed(409) — the group changed or was deleted since you read it; read it again and retrygroup_in_use(409) — a flag's rules still name this group; take it out of those rules firstgroup_name_taken(409) — another group already has this nameagent_wallet_required(409) — create the agent wallet before opening a perps, prediction-market or Solana accountwallet_account_unsupported(409) — the user's wallet is an Agent API wallet, whose Intents account is a 0x address this route cannot name; read it with Get wallet account, Get wallet account balances and Open a wallet account session insteadconversation_deleted(410) — the conversation was deleted; its history stays readableautomation_deleted(410) — the automation was deletedgrid_ended(410) — the grid stopped, expired or failed; it stays readable but takes no command. A new grid needs the user's approval in chatcredential_expired(401) — the user token has expired; obtain a fresh oneaccount_disabled(403) — an operator disabled the accountperps_disabled(403) — perps is not enabled for this userprediction_disabled(403) — prediction-market trading is not enabled for this usersolana_disabled(403) — Solana trading is not enabled for this userno_account(404) — the user has not opened the account this call reads; open it firstnot_available_in_region(403) — perps funding is unavailable in the user's region for this request; withdrawals remain availablesteering_disabled(403) — steering a working run is not turned on for this user; send the message with Start a run once the run endsbaskets_disabled(403) — idea baskets are not turned on for this user; hide the Ideas pages and their basketsbasket_buying(409) — the basket is still buying, so it cannot be deleted yet; try again once its result is inbasket_awaiting_approval(409) — an approval to buy this basket is still open; decline it in the chat, then delete the basketbasket_step_not_failed(409) — the step bought, or the basket is not partly bought, so no order can be linked to it; read the basket againbasket_step_linked(409) — another order is already linked to this step; a link is permanent, so read the basket againbasket_order_not_linkable(400) — the order cannot stand in for this step: it is not one of the step'sfailures[].linkableorders, or another basket step already holds itvoice_disabled(403) — voice input is not turned on for this user; let them type insteadvoice_unavailable(503) — this deployment has no speech model, so it cannot transcribe recordings; let the user type insteadprovider_unavailable(503) — an external provider the call depends on did not answerquote_refused(400) — 1Click would not quote this request, usually an amount below what it routes or a pair it does not offer; nothing was reserved. Change the amount or the assets and quote again; for a deposit address, no address was issued, so offer another networkinvalid_input(400) — the body or query failed validation;issuesnames each fieldinternal(500) — a fault on our side; quoterequestIdwhen reporting itpartner_key_required(401) — noX-Api-Keyheader was sentpartner_key_invalid(401) — theX-Api-Keyis unknown or revokedsubject_mismatch(403) — the{userId}in the path is not the token's userorigin_rejected(403) — a browserOriginother than the configured web originpermission_required(403) — the verified credential is not permitted to make this callsignature_required(403) — creating the agent wallet needs the user's signature: send the user's signature ofcreation.messagefrom Get the agent wallet asauthorizationasset_not_withdrawable(403) — tokenized stocks cannot be withdrawn; sell them firstasset_not_swappable(403) — the swap names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offasset_not_tradable(403) — the order names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offsolana_token_not_tradable(403) — Fin won't trade this token: its mint lets someone freeze, move or charge for holdings or pause transfers, it can't be sold back, Fin couldn't read its mint, it has no reliable price, or it is wrapped SOL. A sale is refused only for what would stop it landinglimit_orders_disabled(403) — limit orders are not enabled for this usergrid_trading_disabled(403) — grid trading is not enabled for this user, so a paused grid cannot be resumed; pausing and cancelling a grid are never gateddeposit_limit_exceeded(429) — the deposit would take the agent wallet past the user's deposit limit, or, for a deposit address, the wallet has no room left under it; nothing was recorded. ReaddepositLimit.availableCentsfrom Get balances for how much fits now, and deposit no more than thatpolicy_change_throttled(429) — the user's Agent API wallet changed what it allows a few minutes ago, and the NEAR Intents Agent API lets it change again only after a cooldown; nothing was asked or signed, so call again onceRetry-Afterhas passedagent_slippage_exceeded(403) — the user's wallet is an Agent API wallet whose agent signs only trades that lose at most the share of their value its owner allowed (max_slippage_bps): fees, price and slippage together, by 1Click's own USD values at the quote's minimum output. This trade's quote loses more, states no USD value, or, before there is a quote, its loss bound is already quoted with more slippage than that (half the bound, plus 1Click's fee at the most it has been seen to take, 20 basis points, before an approval). Very small trades lose more to fixed fees; nothing was signed, so ask again with a larger amount or a smaller loss boundagent_api_orders_unavailable(403) — the user's Agent API wallet needs wallet setup to enable limit orders, or the order exceeds this wallet's 168-hour maximum; finish wallet setup or choose at most 168 hours before trying again; nothing was approved or signeddestination_not_allowed(403) — the user's wallet is an Agent API wallet, whose agent pays a deposit only to itself, to a NEAR Intents account its owner listed (on the confidential ledger) or to an address on a chain its owner listed; allow this one with Add a withdrawal destination (one owner signature), then ask again. A public NEAR Intents account, or an address with no valid spelling on its chain, cannot be paid at all; nothing was signedrate_limited(429) — the per-key or per-user limit is spent; honourRetry-Afterpartner_request_capacity(429) — this partner's request quota across all keys and replicas is spent; honour Retry-Afterpartner_run_capacity(429) — this partner's active run quota is full; honour Retry-After and reuse the same request identitystream_capacity(429) — the partner, user or replica has no free stream capacity; honourRetry-Afterinvalid_cursor(400) — thecursoris not one this list mintedinvalid_question_answer(400) — the questionnaire answer does not match its questions or allowed choicesquestion_closed(410) — the questionnaire expired or was cancelledunknown_target(400) — a rule names a partner, group or user that does not exist, or a user outside the partners the same rule namesscope_invalid(400) — a subject in the scope is not a subject id, or appears twicesubject_unsupported(404) — a subject in the scope is not one market briefs cover; list them with List market subjectsbrief_not_found(404) — no market brief job with this id was created with your partner keybriefs_busy(429) — your market briefs are at their limit of briefs generating at once; retry afterRetry-Aftermarket_briefs_disabled(403) — market briefs are not turned on for your partner keystory_not_found(404) — no market story with this id is current: it never was one, or Fin no longer shows it because its sources were withdrawn or its figures can no longer be read
Validation rules
- Allowed values
["run_active","budget_exhausted","approval_not_pending","execution_capacity","execution_unavailable","stop_pending","automation_changed","automation_held","automation_invalid","automation_paused","automation_has_no_webhook","automation_limit","profile_unknown_tool","deployment_paused","run_not_active","withdrawal_changed","swap_changed","order_changed","prediction_order_changed","solana_trade_changed","trade_not_recoverable","order_not_cancelable","grid_not_active","grid_not_paused","suggestion_changed","request_key_conflict","question_not_pending","flag_changed","group_changed","group_in_use","group_name_taken","agent_wallet_required","wallet_account_unsupported","conversation_deleted","automation_deleted","grid_ended","credential_expired","account_disabled","perps_disabled","prediction_disabled","solana_disabled","no_account","not_available_in_region","steering_disabled","baskets_disabled","basket_buying","basket_awaiting_approval","basket_step_not_failed","basket_step_linked","basket_order_not_linkable","voice_disabled","voice_unavailable","provider_unavailable","quote_refused","invalid_input","internal","partner_key_required","partner_key_invalid","subject_mismatch","origin_rejected","permission_required","signature_required","asset_not_withdrawable","asset_not_swappable","asset_not_tradable","solana_token_not_tradable","limit_orders_disabled","grid_trading_disabled","deposit_limit_exceeded","policy_change_throttled","agent_slippage_exceeded","agent_api_orders_unavailable","destination_not_allowed","rate_limited","partner_request_capacity","partner_run_capacity","stream_capacity","invalid_cursor","invalid_question_answer","question_closed","unknown_target","scope_invalid","subject_unsupported","brief_not_found","briefs_busy","market_briefs_disabled","story_not_found"]
requestIdstringrequiredThe id Fin used for this request; quote it when reporting a problem
retryablebooleanrequiredWhether repeating the same request later can succeed without changing it
detailstringoptionalOnly on invalid_input: which part of the request failed validation
issuesarrayoptionalOnly on invalid_input: one entry per failing field
Show attributes
Only on invalid_input: one entry per failing field
Array items · object
pathstringrequiredThe JSON pointer of the failing field; empty for the root object
messagestringrequiredWhy the field failed
404 The resource is missing, belongs to someone else, or its id is malformed: all three answer alike.
The resource is missing, belongs to someone else, or its id is malformed: all three answer alike.
application/problem+json · object
RFC 9457 problem details: what every error response carries. Never a provider's message, a query or a stack.
typestringrequiredThe kind of problem as a URN, urn:fin:error:<kind>; stable, compare against it
titlestringrequiredThe kind's human title, for logs; never parse it
statusintegerrequiredThe HTTP status, repeated in the body
Validation rules
- Minimum
400- Maximum
599
reasonstringoptionalThe machine-readable why. One of:
run_active(409) — a run already holds this conversationbudget_exhausted(429) — the user's AI usage budget, or your partner account's AI spend limit, is used up until the next day or month, or an operator froze itapproval_not_pending(409) — the approval was already decided or has expired, or its id does not exist or belongs to a different conversationexecution_capacity(429) — no capacity is free to run this right now; honourRetry-Afterexecution_unavailable(503) — the service that runs the agent could not take the work;retryablesays whether to try againstop_pending(409) — a stop is already in progress and its cleanup is not yet confirmedautomation_changed(409) — the automation changed while this request was handled; read it again and retryautomation_held(409) — an operator holds the automation; it fires again when releasedautomation_invalid(409) — the automation's definition cannot run as writtenautomation_paused(409) — the automation is paused; resume it firstautomation_has_no_webhook(409) — the automation does not run on incoming events, so it has no webhookautomation_limit(409) — the user already has as many automations as the deployment allowsprofile_unknown_tool(400) —profile.toolsnames a tool this deployment does not havedeployment_paused(503) — an operator paused this kind of work for the deployment; try again laterrun_not_active(409) — the run named in the path is not the conversation's live runwithdrawal_changed(409) — the request key already binds different withdrawal terms, or the current balance cannot cover the requested amountswap_changed(409) — the swap cannot be made as asked: an asset is no longer available or the current balance cannot cover the amount; get a new quoteorder_changed(409) — the order can no longer be placed as prepared: the agent wallet no longer holds the amount, an asset is no longer offered, or its minimum no longer matches the assets' precision; prepare it againprediction_order_changed(409) — the Polymarket order can no longer be placed as signed: the market closed or stopped taking orders, its price is off the market's tick or its size off Polymarket's minimum, its fee or cost would exceed the signed caps, the Polymarket account cannot cover it, or the signature lapsed before it was placed. Nothing was placed; prepare it againsolana_trade_changed(409) — the Solana trade can no longer run as signed: the token's decimals or program changed, the agent's Solana account or holdings no longer fit it, another Solana trade is running, or the signature lapsed before it started. Nothing moved; prepare it againtrade_not_recoverable(409) — the original trade or a recovery attempt remains active or uncertain, its unfinished actions lack conclusive recovery proof, or its remaining proposal can no longer be usedorder_not_cancelable(409) — the limit order can no longer be cancelled: it filled or expired, or the swap provider never took it. Read the order for where it standsgrid_not_active(409) — the grid is not running, so it cannot be paused: it is already paused, stopping or ended. Read the grid for where it standsgrid_not_paused(409) — the grid is not paused, so there is nothing to resume. Read the grid for where it standssuggestion_changed(409) — the suggestion no longer holds: the account or the market moved since fin made it, the user set it aside, or it cannot be made where the user is now. Say it changed, and read the page's suggestions againrequest_key_conflict(409) — the request identity already binds different terms; retrieve the original resource or use a new identity for a new requestquestion_not_pending(409) — the questionnaire has already been answered, closed, or is not awaiting this submissionflag_changed(409) — the flag's targeting changed since you read it; read it again and retrygroup_changed(409) — the group changed or was deleted since you read it; read it again and retrygroup_in_use(409) — a flag's rules still name this group; take it out of those rules firstgroup_name_taken(409) — another group already has this nameagent_wallet_required(409) — create the agent wallet before opening a perps, prediction-market or Solana accountwallet_account_unsupported(409) — the user's wallet is an Agent API wallet, whose Intents account is a 0x address this route cannot name; read it with Get wallet account, Get wallet account balances and Open a wallet account session insteadconversation_deleted(410) — the conversation was deleted; its history stays readableautomation_deleted(410) — the automation was deletedgrid_ended(410) — the grid stopped, expired or failed; it stays readable but takes no command. A new grid needs the user's approval in chatcredential_expired(401) — the user token has expired; obtain a fresh oneaccount_disabled(403) — an operator disabled the accountperps_disabled(403) — perps is not enabled for this userprediction_disabled(403) — prediction-market trading is not enabled for this usersolana_disabled(403) — Solana trading is not enabled for this userno_account(404) — the user has not opened the account this call reads; open it firstnot_available_in_region(403) — perps funding is unavailable in the user's region for this request; withdrawals remain availablesteering_disabled(403) — steering a working run is not turned on for this user; send the message with Start a run once the run endsbaskets_disabled(403) — idea baskets are not turned on for this user; hide the Ideas pages and their basketsbasket_buying(409) — the basket is still buying, so it cannot be deleted yet; try again once its result is inbasket_awaiting_approval(409) — an approval to buy this basket is still open; decline it in the chat, then delete the basketbasket_step_not_failed(409) — the step bought, or the basket is not partly bought, so no order can be linked to it; read the basket againbasket_step_linked(409) — another order is already linked to this step; a link is permanent, so read the basket againbasket_order_not_linkable(400) — the order cannot stand in for this step: it is not one of the step'sfailures[].linkableorders, or another basket step already holds itvoice_disabled(403) — voice input is not turned on for this user; let them type insteadvoice_unavailable(503) — this deployment has no speech model, so it cannot transcribe recordings; let the user type insteadprovider_unavailable(503) — an external provider the call depends on did not answerquote_refused(400) — 1Click would not quote this request, usually an amount below what it routes or a pair it does not offer; nothing was reserved. Change the amount or the assets and quote again; for a deposit address, no address was issued, so offer another networkinvalid_input(400) — the body or query failed validation;issuesnames each fieldinternal(500) — a fault on our side; quoterequestIdwhen reporting itpartner_key_required(401) — noX-Api-Keyheader was sentpartner_key_invalid(401) — theX-Api-Keyis unknown or revokedsubject_mismatch(403) — the{userId}in the path is not the token's userorigin_rejected(403) — a browserOriginother than the configured web originpermission_required(403) — the verified credential is not permitted to make this callsignature_required(403) — creating the agent wallet needs the user's signature: send the user's signature ofcreation.messagefrom Get the agent wallet asauthorizationasset_not_withdrawable(403) — tokenized stocks cannot be withdrawn; sell them firstasset_not_swappable(403) — the swap names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offasset_not_tradable(403) — the order names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offsolana_token_not_tradable(403) — Fin won't trade this token: its mint lets someone freeze, move or charge for holdings or pause transfers, it can't be sold back, Fin couldn't read its mint, it has no reliable price, or it is wrapped SOL. A sale is refused only for what would stop it landinglimit_orders_disabled(403) — limit orders are not enabled for this usergrid_trading_disabled(403) — grid trading is not enabled for this user, so a paused grid cannot be resumed; pausing and cancelling a grid are never gateddeposit_limit_exceeded(429) — the deposit would take the agent wallet past the user's deposit limit, or, for a deposit address, the wallet has no room left under it; nothing was recorded. ReaddepositLimit.availableCentsfrom Get balances for how much fits now, and deposit no more than thatpolicy_change_throttled(429) — the user's Agent API wallet changed what it allows a few minutes ago, and the NEAR Intents Agent API lets it change again only after a cooldown; nothing was asked or signed, so call again onceRetry-Afterhas passedagent_slippage_exceeded(403) — the user's wallet is an Agent API wallet whose agent signs only trades that lose at most the share of their value its owner allowed (max_slippage_bps): fees, price and slippage together, by 1Click's own USD values at the quote's minimum output. This trade's quote loses more, states no USD value, or, before there is a quote, its loss bound is already quoted with more slippage than that (half the bound, plus 1Click's fee at the most it has been seen to take, 20 basis points, before an approval). Very small trades lose more to fixed fees; nothing was signed, so ask again with a larger amount or a smaller loss boundagent_api_orders_unavailable(403) — the user's Agent API wallet needs wallet setup to enable limit orders, or the order exceeds this wallet's 168-hour maximum; finish wallet setup or choose at most 168 hours before trying again; nothing was approved or signeddestination_not_allowed(403) — the user's wallet is an Agent API wallet, whose agent pays a deposit only to itself, to a NEAR Intents account its owner listed (on the confidential ledger) or to an address on a chain its owner listed; allow this one with Add a withdrawal destination (one owner signature), then ask again. A public NEAR Intents account, or an address with no valid spelling on its chain, cannot be paid at all; nothing was signedrate_limited(429) — the per-key or per-user limit is spent; honourRetry-Afterpartner_request_capacity(429) — this partner's request quota across all keys and replicas is spent; honour Retry-Afterpartner_run_capacity(429) — this partner's active run quota is full; honour Retry-After and reuse the same request identitystream_capacity(429) — the partner, user or replica has no free stream capacity; honourRetry-Afterinvalid_cursor(400) — thecursoris not one this list mintedinvalid_question_answer(400) — the questionnaire answer does not match its questions or allowed choicesquestion_closed(410) — the questionnaire expired or was cancelledunknown_target(400) — a rule names a partner, group or user that does not exist, or a user outside the partners the same rule namesscope_invalid(400) — a subject in the scope is not a subject id, or appears twicesubject_unsupported(404) — a subject in the scope is not one market briefs cover; list them with List market subjectsbrief_not_found(404) — no market brief job with this id was created with your partner keybriefs_busy(429) — your market briefs are at their limit of briefs generating at once; retry afterRetry-Aftermarket_briefs_disabled(403) — market briefs are not turned on for your partner keystory_not_found(404) — no market story with this id is current: it never was one, or Fin no longer shows it because its sources were withdrawn or its figures can no longer be read
Validation rules
- Allowed values
["run_active","budget_exhausted","approval_not_pending","execution_capacity","execution_unavailable","stop_pending","automation_changed","automation_held","automation_invalid","automation_paused","automation_has_no_webhook","automation_limit","profile_unknown_tool","deployment_paused","run_not_active","withdrawal_changed","swap_changed","order_changed","prediction_order_changed","solana_trade_changed","trade_not_recoverable","order_not_cancelable","grid_not_active","grid_not_paused","suggestion_changed","request_key_conflict","question_not_pending","flag_changed","group_changed","group_in_use","group_name_taken","agent_wallet_required","wallet_account_unsupported","conversation_deleted","automation_deleted","grid_ended","credential_expired","account_disabled","perps_disabled","prediction_disabled","solana_disabled","no_account","not_available_in_region","steering_disabled","baskets_disabled","basket_buying","basket_awaiting_approval","basket_step_not_failed","basket_step_linked","basket_order_not_linkable","voice_disabled","voice_unavailable","provider_unavailable","quote_refused","invalid_input","internal","partner_key_required","partner_key_invalid","subject_mismatch","origin_rejected","permission_required","signature_required","asset_not_withdrawable","asset_not_swappable","asset_not_tradable","solana_token_not_tradable","limit_orders_disabled","grid_trading_disabled","deposit_limit_exceeded","policy_change_throttled","agent_slippage_exceeded","agent_api_orders_unavailable","destination_not_allowed","rate_limited","partner_request_capacity","partner_run_capacity","stream_capacity","invalid_cursor","invalid_question_answer","question_closed","unknown_target","scope_invalid","subject_unsupported","brief_not_found","briefs_busy","market_briefs_disabled","story_not_found"]
requestIdstringrequiredThe id Fin used for this request; quote it when reporting a problem
retryablebooleanrequiredWhether repeating the same request later can succeed without changing it
detailstringoptionalOnly on invalid_input: which part of the request failed validation
issuesarrayoptionalOnly on invalid_input: one entry per failing field
Show attributes
Only on invalid_input: one entry per failing field
Array items · object
pathstringrequiredThe JSON pointer of the failing field; empty for the root object
messagestringrequiredWhy the field failed
409 The operation lost to the current state.
The operation lost to the current state.
approval_not_pending— the approval was already decided or has expired, or its id does not exist or belongs to a different conversationrun_active— a run already holds this conversationstop_pending— a stop is already in progress and its cleanup is not yet confirmed
application/problem+json · object
RFC 9457 problem details: what every error response carries. Never a provider's message, a query or a stack.
typestringrequiredThe kind of problem as a URN, urn:fin:error:<kind>; stable, compare against it
titlestringrequiredThe kind's human title, for logs; never parse it
statusintegerrequiredThe HTTP status, repeated in the body
Validation rules
- Minimum
400- Maximum
599
reasonstringoptionalThe machine-readable why. One of:
run_active(409) — a run already holds this conversationbudget_exhausted(429) — the user's AI usage budget, or your partner account's AI spend limit, is used up until the next day or month, or an operator froze itapproval_not_pending(409) — the approval was already decided or has expired, or its id does not exist or belongs to a different conversationexecution_capacity(429) — no capacity is free to run this right now; honourRetry-Afterexecution_unavailable(503) — the service that runs the agent could not take the work;retryablesays whether to try againstop_pending(409) — a stop is already in progress and its cleanup is not yet confirmedautomation_changed(409) — the automation changed while this request was handled; read it again and retryautomation_held(409) — an operator holds the automation; it fires again when releasedautomation_invalid(409) — the automation's definition cannot run as writtenautomation_paused(409) — the automation is paused; resume it firstautomation_has_no_webhook(409) — the automation does not run on incoming events, so it has no webhookautomation_limit(409) — the user already has as many automations as the deployment allowsprofile_unknown_tool(400) —profile.toolsnames a tool this deployment does not havedeployment_paused(503) — an operator paused this kind of work for the deployment; try again laterrun_not_active(409) — the run named in the path is not the conversation's live runwithdrawal_changed(409) — the request key already binds different withdrawal terms, or the current balance cannot cover the requested amountswap_changed(409) — the swap cannot be made as asked: an asset is no longer available or the current balance cannot cover the amount; get a new quoteorder_changed(409) — the order can no longer be placed as prepared: the agent wallet no longer holds the amount, an asset is no longer offered, or its minimum no longer matches the assets' precision; prepare it againprediction_order_changed(409) — the Polymarket order can no longer be placed as signed: the market closed or stopped taking orders, its price is off the market's tick or its size off Polymarket's minimum, its fee or cost would exceed the signed caps, the Polymarket account cannot cover it, or the signature lapsed before it was placed. Nothing was placed; prepare it againsolana_trade_changed(409) — the Solana trade can no longer run as signed: the token's decimals or program changed, the agent's Solana account or holdings no longer fit it, another Solana trade is running, or the signature lapsed before it started. Nothing moved; prepare it againtrade_not_recoverable(409) — the original trade or a recovery attempt remains active or uncertain, its unfinished actions lack conclusive recovery proof, or its remaining proposal can no longer be usedorder_not_cancelable(409) — the limit order can no longer be cancelled: it filled or expired, or the swap provider never took it. Read the order for where it standsgrid_not_active(409) — the grid is not running, so it cannot be paused: it is already paused, stopping or ended. Read the grid for where it standsgrid_not_paused(409) — the grid is not paused, so there is nothing to resume. Read the grid for where it standssuggestion_changed(409) — the suggestion no longer holds: the account or the market moved since fin made it, the user set it aside, or it cannot be made where the user is now. Say it changed, and read the page's suggestions againrequest_key_conflict(409) — the request identity already binds different terms; retrieve the original resource or use a new identity for a new requestquestion_not_pending(409) — the questionnaire has already been answered, closed, or is not awaiting this submissionflag_changed(409) — the flag's targeting changed since you read it; read it again and retrygroup_changed(409) — the group changed or was deleted since you read it; read it again and retrygroup_in_use(409) — a flag's rules still name this group; take it out of those rules firstgroup_name_taken(409) — another group already has this nameagent_wallet_required(409) — create the agent wallet before opening a perps, prediction-market or Solana accountwallet_account_unsupported(409) — the user's wallet is an Agent API wallet, whose Intents account is a 0x address this route cannot name; read it with Get wallet account, Get wallet account balances and Open a wallet account session insteadconversation_deleted(410) — the conversation was deleted; its history stays readableautomation_deleted(410) — the automation was deletedgrid_ended(410) — the grid stopped, expired or failed; it stays readable but takes no command. A new grid needs the user's approval in chatcredential_expired(401) — the user token has expired; obtain a fresh oneaccount_disabled(403) — an operator disabled the accountperps_disabled(403) — perps is not enabled for this userprediction_disabled(403) — prediction-market trading is not enabled for this usersolana_disabled(403) — Solana trading is not enabled for this userno_account(404) — the user has not opened the account this call reads; open it firstnot_available_in_region(403) — perps funding is unavailable in the user's region for this request; withdrawals remain availablesteering_disabled(403) — steering a working run is not turned on for this user; send the message with Start a run once the run endsbaskets_disabled(403) — idea baskets are not turned on for this user; hide the Ideas pages and their basketsbasket_buying(409) — the basket is still buying, so it cannot be deleted yet; try again once its result is inbasket_awaiting_approval(409) — an approval to buy this basket is still open; decline it in the chat, then delete the basketbasket_step_not_failed(409) — the step bought, or the basket is not partly bought, so no order can be linked to it; read the basket againbasket_step_linked(409) — another order is already linked to this step; a link is permanent, so read the basket againbasket_order_not_linkable(400) — the order cannot stand in for this step: it is not one of the step'sfailures[].linkableorders, or another basket step already holds itvoice_disabled(403) — voice input is not turned on for this user; let them type insteadvoice_unavailable(503) — this deployment has no speech model, so it cannot transcribe recordings; let the user type insteadprovider_unavailable(503) — an external provider the call depends on did not answerquote_refused(400) — 1Click would not quote this request, usually an amount below what it routes or a pair it does not offer; nothing was reserved. Change the amount or the assets and quote again; for a deposit address, no address was issued, so offer another networkinvalid_input(400) — the body or query failed validation;issuesnames each fieldinternal(500) — a fault on our side; quoterequestIdwhen reporting itpartner_key_required(401) — noX-Api-Keyheader was sentpartner_key_invalid(401) — theX-Api-Keyis unknown or revokedsubject_mismatch(403) — the{userId}in the path is not the token's userorigin_rejected(403) — a browserOriginother than the configured web originpermission_required(403) — the verified credential is not permitted to make this callsignature_required(403) — creating the agent wallet needs the user's signature: send the user's signature ofcreation.messagefrom Get the agent wallet asauthorizationasset_not_withdrawable(403) — tokenized stocks cannot be withdrawn; sell them firstasset_not_swappable(403) — the swap names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offasset_not_tradable(403) — the order names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offsolana_token_not_tradable(403) — Fin won't trade this token: its mint lets someone freeze, move or charge for holdings or pause transfers, it can't be sold back, Fin couldn't read its mint, it has no reliable price, or it is wrapped SOL. A sale is refused only for what would stop it landinglimit_orders_disabled(403) — limit orders are not enabled for this usergrid_trading_disabled(403) — grid trading is not enabled for this user, so a paused grid cannot be resumed; pausing and cancelling a grid are never gateddeposit_limit_exceeded(429) — the deposit would take the agent wallet past the user's deposit limit, or, for a deposit address, the wallet has no room left under it; nothing was recorded. ReaddepositLimit.availableCentsfrom Get balances for how much fits now, and deposit no more than thatpolicy_change_throttled(429) — the user's Agent API wallet changed what it allows a few minutes ago, and the NEAR Intents Agent API lets it change again only after a cooldown; nothing was asked or signed, so call again onceRetry-Afterhas passedagent_slippage_exceeded(403) — the user's wallet is an Agent API wallet whose agent signs only trades that lose at most the share of their value its owner allowed (max_slippage_bps): fees, price and slippage together, by 1Click's own USD values at the quote's minimum output. This trade's quote loses more, states no USD value, or, before there is a quote, its loss bound is already quoted with more slippage than that (half the bound, plus 1Click's fee at the most it has been seen to take, 20 basis points, before an approval). Very small trades lose more to fixed fees; nothing was signed, so ask again with a larger amount or a smaller loss boundagent_api_orders_unavailable(403) — the user's Agent API wallet needs wallet setup to enable limit orders, or the order exceeds this wallet's 168-hour maximum; finish wallet setup or choose at most 168 hours before trying again; nothing was approved or signeddestination_not_allowed(403) — the user's wallet is an Agent API wallet, whose agent pays a deposit only to itself, to a NEAR Intents account its owner listed (on the confidential ledger) or to an address on a chain its owner listed; allow this one with Add a withdrawal destination (one owner signature), then ask again. A public NEAR Intents account, or an address with no valid spelling on its chain, cannot be paid at all; nothing was signedrate_limited(429) — the per-key or per-user limit is spent; honourRetry-Afterpartner_request_capacity(429) — this partner's request quota across all keys and replicas is spent; honour Retry-Afterpartner_run_capacity(429) — this partner's active run quota is full; honour Retry-After and reuse the same request identitystream_capacity(429) — the partner, user or replica has no free stream capacity; honourRetry-Afterinvalid_cursor(400) — thecursoris not one this list mintedinvalid_question_answer(400) — the questionnaire answer does not match its questions or allowed choicesquestion_closed(410) — the questionnaire expired or was cancelledunknown_target(400) — a rule names a partner, group or user that does not exist, or a user outside the partners the same rule namesscope_invalid(400) — a subject in the scope is not a subject id, or appears twicesubject_unsupported(404) — a subject in the scope is not one market briefs cover; list them with List market subjectsbrief_not_found(404) — no market brief job with this id was created with your partner keybriefs_busy(429) — your market briefs are at their limit of briefs generating at once; retry afterRetry-Aftermarket_briefs_disabled(403) — market briefs are not turned on for your partner keystory_not_found(404) — no market story with this id is current: it never was one, or Fin no longer shows it because its sources were withdrawn or its figures can no longer be read
Validation rules
- Allowed values
["run_active","budget_exhausted","approval_not_pending","execution_capacity","execution_unavailable","stop_pending","automation_changed","automation_held","automation_invalid","automation_paused","automation_has_no_webhook","automation_limit","profile_unknown_tool","deployment_paused","run_not_active","withdrawal_changed","swap_changed","order_changed","prediction_order_changed","solana_trade_changed","trade_not_recoverable","order_not_cancelable","grid_not_active","grid_not_paused","suggestion_changed","request_key_conflict","question_not_pending","flag_changed","group_changed","group_in_use","group_name_taken","agent_wallet_required","wallet_account_unsupported","conversation_deleted","automation_deleted","grid_ended","credential_expired","account_disabled","perps_disabled","prediction_disabled","solana_disabled","no_account","not_available_in_region","steering_disabled","baskets_disabled","basket_buying","basket_awaiting_approval","basket_step_not_failed","basket_step_linked","basket_order_not_linkable","voice_disabled","voice_unavailable","provider_unavailable","quote_refused","invalid_input","internal","partner_key_required","partner_key_invalid","subject_mismatch","origin_rejected","permission_required","signature_required","asset_not_withdrawable","asset_not_swappable","asset_not_tradable","solana_token_not_tradable","limit_orders_disabled","grid_trading_disabled","deposit_limit_exceeded","policy_change_throttled","agent_slippage_exceeded","agent_api_orders_unavailable","destination_not_allowed","rate_limited","partner_request_capacity","partner_run_capacity","stream_capacity","invalid_cursor","invalid_question_answer","question_closed","unknown_target","scope_invalid","subject_unsupported","brief_not_found","briefs_busy","market_briefs_disabled","story_not_found"]
requestIdstringrequiredThe id Fin used for this request; quote it when reporting a problem
retryablebooleanrequiredWhether repeating the same request later can succeed without changing it
detailstringoptionalOnly on invalid_input: which part of the request failed validation
issuesarrayoptionalOnly on invalid_input: one entry per failing field
Show attributes
Only on invalid_input: one entry per failing field
Array items · object
pathstringrequiredThe JSON pointer of the failing field; empty for the root object
messagestringrequiredWhy the field failed
413 The body exceeds the size this deployment accepts.
The body exceeds the size this deployment accepts.
application/problem+json · object
RFC 9457 problem details: what every error response carries. Never a provider's message, a query or a stack.
typestringrequiredThe kind of problem as a URN, urn:fin:error:<kind>; stable, compare against it
titlestringrequiredThe kind's human title, for logs; never parse it
statusintegerrequiredThe HTTP status, repeated in the body
Validation rules
- Minimum
400- Maximum
599
reasonstringoptionalThe machine-readable why. One of:
run_active(409) — a run already holds this conversationbudget_exhausted(429) — the user's AI usage budget, or your partner account's AI spend limit, is used up until the next day or month, or an operator froze itapproval_not_pending(409) — the approval was already decided or has expired, or its id does not exist or belongs to a different conversationexecution_capacity(429) — no capacity is free to run this right now; honourRetry-Afterexecution_unavailable(503) — the service that runs the agent could not take the work;retryablesays whether to try againstop_pending(409) — a stop is already in progress and its cleanup is not yet confirmedautomation_changed(409) — the automation changed while this request was handled; read it again and retryautomation_held(409) — an operator holds the automation; it fires again when releasedautomation_invalid(409) — the automation's definition cannot run as writtenautomation_paused(409) — the automation is paused; resume it firstautomation_has_no_webhook(409) — the automation does not run on incoming events, so it has no webhookautomation_limit(409) — the user already has as many automations as the deployment allowsprofile_unknown_tool(400) —profile.toolsnames a tool this deployment does not havedeployment_paused(503) — an operator paused this kind of work for the deployment; try again laterrun_not_active(409) — the run named in the path is not the conversation's live runwithdrawal_changed(409) — the request key already binds different withdrawal terms, or the current balance cannot cover the requested amountswap_changed(409) — the swap cannot be made as asked: an asset is no longer available or the current balance cannot cover the amount; get a new quoteorder_changed(409) — the order can no longer be placed as prepared: the agent wallet no longer holds the amount, an asset is no longer offered, or its minimum no longer matches the assets' precision; prepare it againprediction_order_changed(409) — the Polymarket order can no longer be placed as signed: the market closed or stopped taking orders, its price is off the market's tick or its size off Polymarket's minimum, its fee or cost would exceed the signed caps, the Polymarket account cannot cover it, or the signature lapsed before it was placed. Nothing was placed; prepare it againsolana_trade_changed(409) — the Solana trade can no longer run as signed: the token's decimals or program changed, the agent's Solana account or holdings no longer fit it, another Solana trade is running, or the signature lapsed before it started. Nothing moved; prepare it againtrade_not_recoverable(409) — the original trade or a recovery attempt remains active or uncertain, its unfinished actions lack conclusive recovery proof, or its remaining proposal can no longer be usedorder_not_cancelable(409) — the limit order can no longer be cancelled: it filled or expired, or the swap provider never took it. Read the order for where it standsgrid_not_active(409) — the grid is not running, so it cannot be paused: it is already paused, stopping or ended. Read the grid for where it standsgrid_not_paused(409) — the grid is not paused, so there is nothing to resume. Read the grid for where it standssuggestion_changed(409) — the suggestion no longer holds: the account or the market moved since fin made it, the user set it aside, or it cannot be made where the user is now. Say it changed, and read the page's suggestions againrequest_key_conflict(409) — the request identity already binds different terms; retrieve the original resource or use a new identity for a new requestquestion_not_pending(409) — the questionnaire has already been answered, closed, or is not awaiting this submissionflag_changed(409) — the flag's targeting changed since you read it; read it again and retrygroup_changed(409) — the group changed or was deleted since you read it; read it again and retrygroup_in_use(409) — a flag's rules still name this group; take it out of those rules firstgroup_name_taken(409) — another group already has this nameagent_wallet_required(409) — create the agent wallet before opening a perps, prediction-market or Solana accountwallet_account_unsupported(409) — the user's wallet is an Agent API wallet, whose Intents account is a 0x address this route cannot name; read it with Get wallet account, Get wallet account balances and Open a wallet account session insteadconversation_deleted(410) — the conversation was deleted; its history stays readableautomation_deleted(410) — the automation was deletedgrid_ended(410) — the grid stopped, expired or failed; it stays readable but takes no command. A new grid needs the user's approval in chatcredential_expired(401) — the user token has expired; obtain a fresh oneaccount_disabled(403) — an operator disabled the accountperps_disabled(403) — perps is not enabled for this userprediction_disabled(403) — prediction-market trading is not enabled for this usersolana_disabled(403) — Solana trading is not enabled for this userno_account(404) — the user has not opened the account this call reads; open it firstnot_available_in_region(403) — perps funding is unavailable in the user's region for this request; withdrawals remain availablesteering_disabled(403) — steering a working run is not turned on for this user; send the message with Start a run once the run endsbaskets_disabled(403) — idea baskets are not turned on for this user; hide the Ideas pages and their basketsbasket_buying(409) — the basket is still buying, so it cannot be deleted yet; try again once its result is inbasket_awaiting_approval(409) — an approval to buy this basket is still open; decline it in the chat, then delete the basketbasket_step_not_failed(409) — the step bought, or the basket is not partly bought, so no order can be linked to it; read the basket againbasket_step_linked(409) — another order is already linked to this step; a link is permanent, so read the basket againbasket_order_not_linkable(400) — the order cannot stand in for this step: it is not one of the step'sfailures[].linkableorders, or another basket step already holds itvoice_disabled(403) — voice input is not turned on for this user; let them type insteadvoice_unavailable(503) — this deployment has no speech model, so it cannot transcribe recordings; let the user type insteadprovider_unavailable(503) — an external provider the call depends on did not answerquote_refused(400) — 1Click would not quote this request, usually an amount below what it routes or a pair it does not offer; nothing was reserved. Change the amount or the assets and quote again; for a deposit address, no address was issued, so offer another networkinvalid_input(400) — the body or query failed validation;issuesnames each fieldinternal(500) — a fault on our side; quoterequestIdwhen reporting itpartner_key_required(401) — noX-Api-Keyheader was sentpartner_key_invalid(401) — theX-Api-Keyis unknown or revokedsubject_mismatch(403) — the{userId}in the path is not the token's userorigin_rejected(403) — a browserOriginother than the configured web originpermission_required(403) — the verified credential is not permitted to make this callsignature_required(403) — creating the agent wallet needs the user's signature: send the user's signature ofcreation.messagefrom Get the agent wallet asauthorizationasset_not_withdrawable(403) — tokenized stocks cannot be withdrawn; sell them firstasset_not_swappable(403) — the swap names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offasset_not_tradable(403) — the order names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offsolana_token_not_tradable(403) — Fin won't trade this token: its mint lets someone freeze, move or charge for holdings or pause transfers, it can't be sold back, Fin couldn't read its mint, it has no reliable price, or it is wrapped SOL. A sale is refused only for what would stop it landinglimit_orders_disabled(403) — limit orders are not enabled for this usergrid_trading_disabled(403) — grid trading is not enabled for this user, so a paused grid cannot be resumed; pausing and cancelling a grid are never gateddeposit_limit_exceeded(429) — the deposit would take the agent wallet past the user's deposit limit, or, for a deposit address, the wallet has no room left under it; nothing was recorded. ReaddepositLimit.availableCentsfrom Get balances for how much fits now, and deposit no more than thatpolicy_change_throttled(429) — the user's Agent API wallet changed what it allows a few minutes ago, and the NEAR Intents Agent API lets it change again only after a cooldown; nothing was asked or signed, so call again onceRetry-Afterhas passedagent_slippage_exceeded(403) — the user's wallet is an Agent API wallet whose agent signs only trades that lose at most the share of their value its owner allowed (max_slippage_bps): fees, price and slippage together, by 1Click's own USD values at the quote's minimum output. This trade's quote loses more, states no USD value, or, before there is a quote, its loss bound is already quoted with more slippage than that (half the bound, plus 1Click's fee at the most it has been seen to take, 20 basis points, before an approval). Very small trades lose more to fixed fees; nothing was signed, so ask again with a larger amount or a smaller loss boundagent_api_orders_unavailable(403) — the user's Agent API wallet needs wallet setup to enable limit orders, or the order exceeds this wallet's 168-hour maximum; finish wallet setup or choose at most 168 hours before trying again; nothing was approved or signeddestination_not_allowed(403) — the user's wallet is an Agent API wallet, whose agent pays a deposit only to itself, to a NEAR Intents account its owner listed (on the confidential ledger) or to an address on a chain its owner listed; allow this one with Add a withdrawal destination (one owner signature), then ask again. A public NEAR Intents account, or an address with no valid spelling on its chain, cannot be paid at all; nothing was signedrate_limited(429) — the per-key or per-user limit is spent; honourRetry-Afterpartner_request_capacity(429) — this partner's request quota across all keys and replicas is spent; honour Retry-Afterpartner_run_capacity(429) — this partner's active run quota is full; honour Retry-After and reuse the same request identitystream_capacity(429) — the partner, user or replica has no free stream capacity; honourRetry-Afterinvalid_cursor(400) — thecursoris not one this list mintedinvalid_question_answer(400) — the questionnaire answer does not match its questions or allowed choicesquestion_closed(410) — the questionnaire expired or was cancelledunknown_target(400) — a rule names a partner, group or user that does not exist, or a user outside the partners the same rule namesscope_invalid(400) — a subject in the scope is not a subject id, or appears twicesubject_unsupported(404) — a subject in the scope is not one market briefs cover; list them with List market subjectsbrief_not_found(404) — no market brief job with this id was created with your partner keybriefs_busy(429) — your market briefs are at their limit of briefs generating at once; retry afterRetry-Aftermarket_briefs_disabled(403) — market briefs are not turned on for your partner keystory_not_found(404) — no market story with this id is current: it never was one, or Fin no longer shows it because its sources were withdrawn or its figures can no longer be read
Validation rules
- Allowed values
["run_active","budget_exhausted","approval_not_pending","execution_capacity","execution_unavailable","stop_pending","automation_changed","automation_held","automation_invalid","automation_paused","automation_has_no_webhook","automation_limit","profile_unknown_tool","deployment_paused","run_not_active","withdrawal_changed","swap_changed","order_changed","prediction_order_changed","solana_trade_changed","trade_not_recoverable","order_not_cancelable","grid_not_active","grid_not_paused","suggestion_changed","request_key_conflict","question_not_pending","flag_changed","group_changed","group_in_use","group_name_taken","agent_wallet_required","wallet_account_unsupported","conversation_deleted","automation_deleted","grid_ended","credential_expired","account_disabled","perps_disabled","prediction_disabled","solana_disabled","no_account","not_available_in_region","steering_disabled","baskets_disabled","basket_buying","basket_awaiting_approval","basket_step_not_failed","basket_step_linked","basket_order_not_linkable","voice_disabled","voice_unavailable","provider_unavailable","quote_refused","invalid_input","internal","partner_key_required","partner_key_invalid","subject_mismatch","origin_rejected","permission_required","signature_required","asset_not_withdrawable","asset_not_swappable","asset_not_tradable","solana_token_not_tradable","limit_orders_disabled","grid_trading_disabled","deposit_limit_exceeded","policy_change_throttled","agent_slippage_exceeded","agent_api_orders_unavailable","destination_not_allowed","rate_limited","partner_request_capacity","partner_run_capacity","stream_capacity","invalid_cursor","invalid_question_answer","question_closed","unknown_target","scope_invalid","subject_unsupported","brief_not_found","briefs_busy","market_briefs_disabled","story_not_found"]
requestIdstringrequiredThe id Fin used for this request; quote it when reporting a problem
retryablebooleanrequiredWhether repeating the same request later can succeed without changing it
detailstringoptionalOnly on invalid_input: which part of the request failed validation
issuesarrayoptionalOnly on invalid_input: one entry per failing field
Show attributes
Only on invalid_input: one entry per failing field
Array items · object
pathstringrequiredThe JSON pointer of the failing field; empty for the root object
messagestringrequiredWhy the field failed
429 A limit refused the request; wait for `Retry-After` when it is sent.
A limit refused the request; wait for Retry-After when it is sent.
rate_limited— the per-key or per-user limit is spent; honourRetry-Afterpartner_request_capacity— this partner's request quota across all keys and replicas is spent; honour Retry-Afterexecution_capacity— no capacity is free to run this right now; honourRetry-Afterpartner_run_capacity— this partner's active run quota is full; honour Retry-After and reuse the same request identity
application/problem+json · object
RFC 9457 problem details: what every error response carries. Never a provider's message, a query or a stack.
typestringrequiredThe kind of problem as a URN, urn:fin:error:<kind>; stable, compare against it
titlestringrequiredThe kind's human title, for logs; never parse it
statusintegerrequiredThe HTTP status, repeated in the body
Validation rules
- Minimum
400- Maximum
599
reasonstringoptionalThe machine-readable why. One of:
run_active(409) — a run already holds this conversationbudget_exhausted(429) — the user's AI usage budget, or your partner account's AI spend limit, is used up until the next day or month, or an operator froze itapproval_not_pending(409) — the approval was already decided or has expired, or its id does not exist or belongs to a different conversationexecution_capacity(429) — no capacity is free to run this right now; honourRetry-Afterexecution_unavailable(503) — the service that runs the agent could not take the work;retryablesays whether to try againstop_pending(409) — a stop is already in progress and its cleanup is not yet confirmedautomation_changed(409) — the automation changed while this request was handled; read it again and retryautomation_held(409) — an operator holds the automation; it fires again when releasedautomation_invalid(409) — the automation's definition cannot run as writtenautomation_paused(409) — the automation is paused; resume it firstautomation_has_no_webhook(409) — the automation does not run on incoming events, so it has no webhookautomation_limit(409) — the user already has as many automations as the deployment allowsprofile_unknown_tool(400) —profile.toolsnames a tool this deployment does not havedeployment_paused(503) — an operator paused this kind of work for the deployment; try again laterrun_not_active(409) — the run named in the path is not the conversation's live runwithdrawal_changed(409) — the request key already binds different withdrawal terms, or the current balance cannot cover the requested amountswap_changed(409) — the swap cannot be made as asked: an asset is no longer available or the current balance cannot cover the amount; get a new quoteorder_changed(409) — the order can no longer be placed as prepared: the agent wallet no longer holds the amount, an asset is no longer offered, or its minimum no longer matches the assets' precision; prepare it againprediction_order_changed(409) — the Polymarket order can no longer be placed as signed: the market closed or stopped taking orders, its price is off the market's tick or its size off Polymarket's minimum, its fee or cost would exceed the signed caps, the Polymarket account cannot cover it, or the signature lapsed before it was placed. Nothing was placed; prepare it againsolana_trade_changed(409) — the Solana trade can no longer run as signed: the token's decimals or program changed, the agent's Solana account or holdings no longer fit it, another Solana trade is running, or the signature lapsed before it started. Nothing moved; prepare it againtrade_not_recoverable(409) — the original trade or a recovery attempt remains active or uncertain, its unfinished actions lack conclusive recovery proof, or its remaining proposal can no longer be usedorder_not_cancelable(409) — the limit order can no longer be cancelled: it filled or expired, or the swap provider never took it. Read the order for where it standsgrid_not_active(409) — the grid is not running, so it cannot be paused: it is already paused, stopping or ended. Read the grid for where it standsgrid_not_paused(409) — the grid is not paused, so there is nothing to resume. Read the grid for where it standssuggestion_changed(409) — the suggestion no longer holds: the account or the market moved since fin made it, the user set it aside, or it cannot be made where the user is now. Say it changed, and read the page's suggestions againrequest_key_conflict(409) — the request identity already binds different terms; retrieve the original resource or use a new identity for a new requestquestion_not_pending(409) — the questionnaire has already been answered, closed, or is not awaiting this submissionflag_changed(409) — the flag's targeting changed since you read it; read it again and retrygroup_changed(409) — the group changed or was deleted since you read it; read it again and retrygroup_in_use(409) — a flag's rules still name this group; take it out of those rules firstgroup_name_taken(409) — another group already has this nameagent_wallet_required(409) — create the agent wallet before opening a perps, prediction-market or Solana accountwallet_account_unsupported(409) — the user's wallet is an Agent API wallet, whose Intents account is a 0x address this route cannot name; read it with Get wallet account, Get wallet account balances and Open a wallet account session insteadconversation_deleted(410) — the conversation was deleted; its history stays readableautomation_deleted(410) — the automation was deletedgrid_ended(410) — the grid stopped, expired or failed; it stays readable but takes no command. A new grid needs the user's approval in chatcredential_expired(401) — the user token has expired; obtain a fresh oneaccount_disabled(403) — an operator disabled the accountperps_disabled(403) — perps is not enabled for this userprediction_disabled(403) — prediction-market trading is not enabled for this usersolana_disabled(403) — Solana trading is not enabled for this userno_account(404) — the user has not opened the account this call reads; open it firstnot_available_in_region(403) — perps funding is unavailable in the user's region for this request; withdrawals remain availablesteering_disabled(403) — steering a working run is not turned on for this user; send the message with Start a run once the run endsbaskets_disabled(403) — idea baskets are not turned on for this user; hide the Ideas pages and their basketsbasket_buying(409) — the basket is still buying, so it cannot be deleted yet; try again once its result is inbasket_awaiting_approval(409) — an approval to buy this basket is still open; decline it in the chat, then delete the basketbasket_step_not_failed(409) — the step bought, or the basket is not partly bought, so no order can be linked to it; read the basket againbasket_step_linked(409) — another order is already linked to this step; a link is permanent, so read the basket againbasket_order_not_linkable(400) — the order cannot stand in for this step: it is not one of the step'sfailures[].linkableorders, or another basket step already holds itvoice_disabled(403) — voice input is not turned on for this user; let them type insteadvoice_unavailable(503) — this deployment has no speech model, so it cannot transcribe recordings; let the user type insteadprovider_unavailable(503) — an external provider the call depends on did not answerquote_refused(400) — 1Click would not quote this request, usually an amount below what it routes or a pair it does not offer; nothing was reserved. Change the amount or the assets and quote again; for a deposit address, no address was issued, so offer another networkinvalid_input(400) — the body or query failed validation;issuesnames each fieldinternal(500) — a fault on our side; quoterequestIdwhen reporting itpartner_key_required(401) — noX-Api-Keyheader was sentpartner_key_invalid(401) — theX-Api-Keyis unknown or revokedsubject_mismatch(403) — the{userId}in the path is not the token's userorigin_rejected(403) — a browserOriginother than the configured web originpermission_required(403) — the verified credential is not permitted to make this callsignature_required(403) — creating the agent wallet needs the user's signature: send the user's signature ofcreation.messagefrom Get the agent wallet asauthorizationasset_not_withdrawable(403) — tokenized stocks cannot be withdrawn; sell them firstasset_not_swappable(403) — the swap names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offasset_not_tradable(403) — the order names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offsolana_token_not_tradable(403) — Fin won't trade this token: its mint lets someone freeze, move or charge for holdings or pause transfers, it can't be sold back, Fin couldn't read its mint, it has no reliable price, or it is wrapped SOL. A sale is refused only for what would stop it landinglimit_orders_disabled(403) — limit orders are not enabled for this usergrid_trading_disabled(403) — grid trading is not enabled for this user, so a paused grid cannot be resumed; pausing and cancelling a grid are never gateddeposit_limit_exceeded(429) — the deposit would take the agent wallet past the user's deposit limit, or, for a deposit address, the wallet has no room left under it; nothing was recorded. ReaddepositLimit.availableCentsfrom Get balances for how much fits now, and deposit no more than thatpolicy_change_throttled(429) — the user's Agent API wallet changed what it allows a few minutes ago, and the NEAR Intents Agent API lets it change again only after a cooldown; nothing was asked or signed, so call again onceRetry-Afterhas passedagent_slippage_exceeded(403) — the user's wallet is an Agent API wallet whose agent signs only trades that lose at most the share of their value its owner allowed (max_slippage_bps): fees, price and slippage together, by 1Click's own USD values at the quote's minimum output. This trade's quote loses more, states no USD value, or, before there is a quote, its loss bound is already quoted with more slippage than that (half the bound, plus 1Click's fee at the most it has been seen to take, 20 basis points, before an approval). Very small trades lose more to fixed fees; nothing was signed, so ask again with a larger amount or a smaller loss boundagent_api_orders_unavailable(403) — the user's Agent API wallet needs wallet setup to enable limit orders, or the order exceeds this wallet's 168-hour maximum; finish wallet setup or choose at most 168 hours before trying again; nothing was approved or signeddestination_not_allowed(403) — the user's wallet is an Agent API wallet, whose agent pays a deposit only to itself, to a NEAR Intents account its owner listed (on the confidential ledger) or to an address on a chain its owner listed; allow this one with Add a withdrawal destination (one owner signature), then ask again. A public NEAR Intents account, or an address with no valid spelling on its chain, cannot be paid at all; nothing was signedrate_limited(429) — the per-key or per-user limit is spent; honourRetry-Afterpartner_request_capacity(429) — this partner's request quota across all keys and replicas is spent; honour Retry-Afterpartner_run_capacity(429) — this partner's active run quota is full; honour Retry-After and reuse the same request identitystream_capacity(429) — the partner, user or replica has no free stream capacity; honourRetry-Afterinvalid_cursor(400) — thecursoris not one this list mintedinvalid_question_answer(400) — the questionnaire answer does not match its questions or allowed choicesquestion_closed(410) — the questionnaire expired or was cancelledunknown_target(400) — a rule names a partner, group or user that does not exist, or a user outside the partners the same rule namesscope_invalid(400) — a subject in the scope is not a subject id, or appears twicesubject_unsupported(404) — a subject in the scope is not one market briefs cover; list them with List market subjectsbrief_not_found(404) — no market brief job with this id was created with your partner keybriefs_busy(429) — your market briefs are at their limit of briefs generating at once; retry afterRetry-Aftermarket_briefs_disabled(403) — market briefs are not turned on for your partner keystory_not_found(404) — no market story with this id is current: it never was one, or Fin no longer shows it because its sources were withdrawn or its figures can no longer be read
Validation rules
- Allowed values
["run_active","budget_exhausted","approval_not_pending","execution_capacity","execution_unavailable","stop_pending","automation_changed","automation_held","automation_invalid","automation_paused","automation_has_no_webhook","automation_limit","profile_unknown_tool","deployment_paused","run_not_active","withdrawal_changed","swap_changed","order_changed","prediction_order_changed","solana_trade_changed","trade_not_recoverable","order_not_cancelable","grid_not_active","grid_not_paused","suggestion_changed","request_key_conflict","question_not_pending","flag_changed","group_changed","group_in_use","group_name_taken","agent_wallet_required","wallet_account_unsupported","conversation_deleted","automation_deleted","grid_ended","credential_expired","account_disabled","perps_disabled","prediction_disabled","solana_disabled","no_account","not_available_in_region","steering_disabled","baskets_disabled","basket_buying","basket_awaiting_approval","basket_step_not_failed","basket_step_linked","basket_order_not_linkable","voice_disabled","voice_unavailable","provider_unavailable","quote_refused","invalid_input","internal","partner_key_required","partner_key_invalid","subject_mismatch","origin_rejected","permission_required","signature_required","asset_not_withdrawable","asset_not_swappable","asset_not_tradable","solana_token_not_tradable","limit_orders_disabled","grid_trading_disabled","deposit_limit_exceeded","policy_change_throttled","agent_slippage_exceeded","agent_api_orders_unavailable","destination_not_allowed","rate_limited","partner_request_capacity","partner_run_capacity","stream_capacity","invalid_cursor","invalid_question_answer","question_closed","unknown_target","scope_invalid","subject_unsupported","brief_not_found","briefs_busy","market_briefs_disabled","story_not_found"]
requestIdstringrequiredThe id Fin used for this request; quote it when reporting a problem
retryablebooleanrequiredWhether repeating the same request later can succeed without changing it
detailstringoptionalOnly on invalid_input: which part of the request failed validation
issuesarrayoptionalOnly on invalid_input: one entry per failing field
Show attributes
Only on invalid_input: one entry per failing field
Array items · object
pathstringrequiredThe JSON pointer of the failing field; empty for the root object
messagestringrequiredWhy the field failed
500 A fault on our side; quote `requestId` when reporting it.
A fault on our side; quote requestId when reporting it.
internal— a fault on our side; quoterequestIdwhen reporting it
application/problem+json · object
RFC 9457 problem details: what every error response carries. Never a provider's message, a query or a stack.
typestringrequiredThe kind of problem as a URN, urn:fin:error:<kind>; stable, compare against it
titlestringrequiredThe kind's human title, for logs; never parse it
statusintegerrequiredThe HTTP status, repeated in the body
Validation rules
- Minimum
400- Maximum
599
reasonstringoptionalThe machine-readable why. One of:
run_active(409) — a run already holds this conversationbudget_exhausted(429) — the user's AI usage budget, or your partner account's AI spend limit, is used up until the next day or month, or an operator froze itapproval_not_pending(409) — the approval was already decided or has expired, or its id does not exist or belongs to a different conversationexecution_capacity(429) — no capacity is free to run this right now; honourRetry-Afterexecution_unavailable(503) — the service that runs the agent could not take the work;retryablesays whether to try againstop_pending(409) — a stop is already in progress and its cleanup is not yet confirmedautomation_changed(409) — the automation changed while this request was handled; read it again and retryautomation_held(409) — an operator holds the automation; it fires again when releasedautomation_invalid(409) — the automation's definition cannot run as writtenautomation_paused(409) — the automation is paused; resume it firstautomation_has_no_webhook(409) — the automation does not run on incoming events, so it has no webhookautomation_limit(409) — the user already has as many automations as the deployment allowsprofile_unknown_tool(400) —profile.toolsnames a tool this deployment does not havedeployment_paused(503) — an operator paused this kind of work for the deployment; try again laterrun_not_active(409) — the run named in the path is not the conversation's live runwithdrawal_changed(409) — the request key already binds different withdrawal terms, or the current balance cannot cover the requested amountswap_changed(409) — the swap cannot be made as asked: an asset is no longer available or the current balance cannot cover the amount; get a new quoteorder_changed(409) — the order can no longer be placed as prepared: the agent wallet no longer holds the amount, an asset is no longer offered, or its minimum no longer matches the assets' precision; prepare it againprediction_order_changed(409) — the Polymarket order can no longer be placed as signed: the market closed or stopped taking orders, its price is off the market's tick or its size off Polymarket's minimum, its fee or cost would exceed the signed caps, the Polymarket account cannot cover it, or the signature lapsed before it was placed. Nothing was placed; prepare it againsolana_trade_changed(409) — the Solana trade can no longer run as signed: the token's decimals or program changed, the agent's Solana account or holdings no longer fit it, another Solana trade is running, or the signature lapsed before it started. Nothing moved; prepare it againtrade_not_recoverable(409) — the original trade or a recovery attempt remains active or uncertain, its unfinished actions lack conclusive recovery proof, or its remaining proposal can no longer be usedorder_not_cancelable(409) — the limit order can no longer be cancelled: it filled or expired, or the swap provider never took it. Read the order for where it standsgrid_not_active(409) — the grid is not running, so it cannot be paused: it is already paused, stopping or ended. Read the grid for where it standsgrid_not_paused(409) — the grid is not paused, so there is nothing to resume. Read the grid for where it standssuggestion_changed(409) — the suggestion no longer holds: the account or the market moved since fin made it, the user set it aside, or it cannot be made where the user is now. Say it changed, and read the page's suggestions againrequest_key_conflict(409) — the request identity already binds different terms; retrieve the original resource or use a new identity for a new requestquestion_not_pending(409) — the questionnaire has already been answered, closed, or is not awaiting this submissionflag_changed(409) — the flag's targeting changed since you read it; read it again and retrygroup_changed(409) — the group changed or was deleted since you read it; read it again and retrygroup_in_use(409) — a flag's rules still name this group; take it out of those rules firstgroup_name_taken(409) — another group already has this nameagent_wallet_required(409) — create the agent wallet before opening a perps, prediction-market or Solana accountwallet_account_unsupported(409) — the user's wallet is an Agent API wallet, whose Intents account is a 0x address this route cannot name; read it with Get wallet account, Get wallet account balances and Open a wallet account session insteadconversation_deleted(410) — the conversation was deleted; its history stays readableautomation_deleted(410) — the automation was deletedgrid_ended(410) — the grid stopped, expired or failed; it stays readable but takes no command. A new grid needs the user's approval in chatcredential_expired(401) — the user token has expired; obtain a fresh oneaccount_disabled(403) — an operator disabled the accountperps_disabled(403) — perps is not enabled for this userprediction_disabled(403) — prediction-market trading is not enabled for this usersolana_disabled(403) — Solana trading is not enabled for this userno_account(404) — the user has not opened the account this call reads; open it firstnot_available_in_region(403) — perps funding is unavailable in the user's region for this request; withdrawals remain availablesteering_disabled(403) — steering a working run is not turned on for this user; send the message with Start a run once the run endsbaskets_disabled(403) — idea baskets are not turned on for this user; hide the Ideas pages and their basketsbasket_buying(409) — the basket is still buying, so it cannot be deleted yet; try again once its result is inbasket_awaiting_approval(409) — an approval to buy this basket is still open; decline it in the chat, then delete the basketbasket_step_not_failed(409) — the step bought, or the basket is not partly bought, so no order can be linked to it; read the basket againbasket_step_linked(409) — another order is already linked to this step; a link is permanent, so read the basket againbasket_order_not_linkable(400) — the order cannot stand in for this step: it is not one of the step'sfailures[].linkableorders, or another basket step already holds itvoice_disabled(403) — voice input is not turned on for this user; let them type insteadvoice_unavailable(503) — this deployment has no speech model, so it cannot transcribe recordings; let the user type insteadprovider_unavailable(503) — an external provider the call depends on did not answerquote_refused(400) — 1Click would not quote this request, usually an amount below what it routes or a pair it does not offer; nothing was reserved. Change the amount or the assets and quote again; for a deposit address, no address was issued, so offer another networkinvalid_input(400) — the body or query failed validation;issuesnames each fieldinternal(500) — a fault on our side; quoterequestIdwhen reporting itpartner_key_required(401) — noX-Api-Keyheader was sentpartner_key_invalid(401) — theX-Api-Keyis unknown or revokedsubject_mismatch(403) — the{userId}in the path is not the token's userorigin_rejected(403) — a browserOriginother than the configured web originpermission_required(403) — the verified credential is not permitted to make this callsignature_required(403) — creating the agent wallet needs the user's signature: send the user's signature ofcreation.messagefrom Get the agent wallet asauthorizationasset_not_withdrawable(403) — tokenized stocks cannot be withdrawn; sell them firstasset_not_swappable(403) — the swap names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offasset_not_tradable(403) — the order names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offsolana_token_not_tradable(403) — Fin won't trade this token: its mint lets someone freeze, move or charge for holdings or pause transfers, it can't be sold back, Fin couldn't read its mint, it has no reliable price, or it is wrapped SOL. A sale is refused only for what would stop it landinglimit_orders_disabled(403) — limit orders are not enabled for this usergrid_trading_disabled(403) — grid trading is not enabled for this user, so a paused grid cannot be resumed; pausing and cancelling a grid are never gateddeposit_limit_exceeded(429) — the deposit would take the agent wallet past the user's deposit limit, or, for a deposit address, the wallet has no room left under it; nothing was recorded. ReaddepositLimit.availableCentsfrom Get balances for how much fits now, and deposit no more than thatpolicy_change_throttled(429) — the user's Agent API wallet changed what it allows a few minutes ago, and the NEAR Intents Agent API lets it change again only after a cooldown; nothing was asked or signed, so call again onceRetry-Afterhas passedagent_slippage_exceeded(403) — the user's wallet is an Agent API wallet whose agent signs only trades that lose at most the share of their value its owner allowed (max_slippage_bps): fees, price and slippage together, by 1Click's own USD values at the quote's minimum output. This trade's quote loses more, states no USD value, or, before there is a quote, its loss bound is already quoted with more slippage than that (half the bound, plus 1Click's fee at the most it has been seen to take, 20 basis points, before an approval). Very small trades lose more to fixed fees; nothing was signed, so ask again with a larger amount or a smaller loss boundagent_api_orders_unavailable(403) — the user's Agent API wallet needs wallet setup to enable limit orders, or the order exceeds this wallet's 168-hour maximum; finish wallet setup or choose at most 168 hours before trying again; nothing was approved or signeddestination_not_allowed(403) — the user's wallet is an Agent API wallet, whose agent pays a deposit only to itself, to a NEAR Intents account its owner listed (on the confidential ledger) or to an address on a chain its owner listed; allow this one with Add a withdrawal destination (one owner signature), then ask again. A public NEAR Intents account, or an address with no valid spelling on its chain, cannot be paid at all; nothing was signedrate_limited(429) — the per-key or per-user limit is spent; honourRetry-Afterpartner_request_capacity(429) — this partner's request quota across all keys and replicas is spent; honour Retry-Afterpartner_run_capacity(429) — this partner's active run quota is full; honour Retry-After and reuse the same request identitystream_capacity(429) — the partner, user or replica has no free stream capacity; honourRetry-Afterinvalid_cursor(400) — thecursoris not one this list mintedinvalid_question_answer(400) — the questionnaire answer does not match its questions or allowed choicesquestion_closed(410) — the questionnaire expired or was cancelledunknown_target(400) — a rule names a partner, group or user that does not exist, or a user outside the partners the same rule namesscope_invalid(400) — a subject in the scope is not a subject id, or appears twicesubject_unsupported(404) — a subject in the scope is not one market briefs cover; list them with List market subjectsbrief_not_found(404) — no market brief job with this id was created with your partner keybriefs_busy(429) — your market briefs are at their limit of briefs generating at once; retry afterRetry-Aftermarket_briefs_disabled(403) — market briefs are not turned on for your partner keystory_not_found(404) — no market story with this id is current: it never was one, or Fin no longer shows it because its sources were withdrawn or its figures can no longer be read
Validation rules
- Allowed values
["run_active","budget_exhausted","approval_not_pending","execution_capacity","execution_unavailable","stop_pending","automation_changed","automation_held","automation_invalid","automation_paused","automation_has_no_webhook","automation_limit","profile_unknown_tool","deployment_paused","run_not_active","withdrawal_changed","swap_changed","order_changed","prediction_order_changed","solana_trade_changed","trade_not_recoverable","order_not_cancelable","grid_not_active","grid_not_paused","suggestion_changed","request_key_conflict","question_not_pending","flag_changed","group_changed","group_in_use","group_name_taken","agent_wallet_required","wallet_account_unsupported","conversation_deleted","automation_deleted","grid_ended","credential_expired","account_disabled","perps_disabled","prediction_disabled","solana_disabled","no_account","not_available_in_region","steering_disabled","baskets_disabled","basket_buying","basket_awaiting_approval","basket_step_not_failed","basket_step_linked","basket_order_not_linkable","voice_disabled","voice_unavailable","provider_unavailable","quote_refused","invalid_input","internal","partner_key_required","partner_key_invalid","subject_mismatch","origin_rejected","permission_required","signature_required","asset_not_withdrawable","asset_not_swappable","asset_not_tradable","solana_token_not_tradable","limit_orders_disabled","grid_trading_disabled","deposit_limit_exceeded","policy_change_throttled","agent_slippage_exceeded","agent_api_orders_unavailable","destination_not_allowed","rate_limited","partner_request_capacity","partner_run_capacity","stream_capacity","invalid_cursor","invalid_question_answer","question_closed","unknown_target","scope_invalid","subject_unsupported","brief_not_found","briefs_busy","market_briefs_disabled","story_not_found"]
requestIdstringrequiredThe id Fin used for this request; quote it when reporting a problem
retryablebooleanrequiredWhether repeating the same request later can succeed without changing it
detailstringoptionalOnly on invalid_input: which part of the request failed validation
issuesarrayoptionalOnly on invalid_input: one entry per failing field
Show attributes
Only on invalid_input: one entry per failing field
Array items · object
pathstringrequiredThe JSON pointer of the failing field; empty for the root object
messagestringrequiredWhy the field failed
503 The service cannot take this right now (draining, a dependency did not answer, or an operator paused the work); `retryable` says whether to try again.
The service cannot take this right now (draining, a dependency did not answer, or an operator paused the work); retryable says whether to try again.
internal— a fault on our side; quoterequestIdwhen reporting itexecution_unavailable— the service that runs the agent could not take the work;retryablesays whether to try againprovider_unavailable— an external provider the call depends on did not answer
application/problem+json · object
RFC 9457 problem details: what every error response carries. Never a provider's message, a query or a stack.
typestringrequiredThe kind of problem as a URN, urn:fin:error:<kind>; stable, compare against it
titlestringrequiredThe kind's human title, for logs; never parse it
statusintegerrequiredThe HTTP status, repeated in the body
Validation rules
- Minimum
400- Maximum
599
reasonstringoptionalThe machine-readable why. One of:
run_active(409) — a run already holds this conversationbudget_exhausted(429) — the user's AI usage budget, or your partner account's AI spend limit, is used up until the next day or month, or an operator froze itapproval_not_pending(409) — the approval was already decided or has expired, or its id does not exist or belongs to a different conversationexecution_capacity(429) — no capacity is free to run this right now; honourRetry-Afterexecution_unavailable(503) — the service that runs the agent could not take the work;retryablesays whether to try againstop_pending(409) — a stop is already in progress and its cleanup is not yet confirmedautomation_changed(409) — the automation changed while this request was handled; read it again and retryautomation_held(409) — an operator holds the automation; it fires again when releasedautomation_invalid(409) — the automation's definition cannot run as writtenautomation_paused(409) — the automation is paused; resume it firstautomation_has_no_webhook(409) — the automation does not run on incoming events, so it has no webhookautomation_limit(409) — the user already has as many automations as the deployment allowsprofile_unknown_tool(400) —profile.toolsnames a tool this deployment does not havedeployment_paused(503) — an operator paused this kind of work for the deployment; try again laterrun_not_active(409) — the run named in the path is not the conversation's live runwithdrawal_changed(409) — the request key already binds different withdrawal terms, or the current balance cannot cover the requested amountswap_changed(409) — the swap cannot be made as asked: an asset is no longer available or the current balance cannot cover the amount; get a new quoteorder_changed(409) — the order can no longer be placed as prepared: the agent wallet no longer holds the amount, an asset is no longer offered, or its minimum no longer matches the assets' precision; prepare it againprediction_order_changed(409) — the Polymarket order can no longer be placed as signed: the market closed or stopped taking orders, its price is off the market's tick or its size off Polymarket's minimum, its fee or cost would exceed the signed caps, the Polymarket account cannot cover it, or the signature lapsed before it was placed. Nothing was placed; prepare it againsolana_trade_changed(409) — the Solana trade can no longer run as signed: the token's decimals or program changed, the agent's Solana account or holdings no longer fit it, another Solana trade is running, or the signature lapsed before it started. Nothing moved; prepare it againtrade_not_recoverable(409) — the original trade or a recovery attempt remains active or uncertain, its unfinished actions lack conclusive recovery proof, or its remaining proposal can no longer be usedorder_not_cancelable(409) — the limit order can no longer be cancelled: it filled or expired, or the swap provider never took it. Read the order for where it standsgrid_not_active(409) — the grid is not running, so it cannot be paused: it is already paused, stopping or ended. Read the grid for where it standsgrid_not_paused(409) — the grid is not paused, so there is nothing to resume. Read the grid for where it standssuggestion_changed(409) — the suggestion no longer holds: the account or the market moved since fin made it, the user set it aside, or it cannot be made where the user is now. Say it changed, and read the page's suggestions againrequest_key_conflict(409) — the request identity already binds different terms; retrieve the original resource or use a new identity for a new requestquestion_not_pending(409) — the questionnaire has already been answered, closed, or is not awaiting this submissionflag_changed(409) — the flag's targeting changed since you read it; read it again and retrygroup_changed(409) — the group changed or was deleted since you read it; read it again and retrygroup_in_use(409) — a flag's rules still name this group; take it out of those rules firstgroup_name_taken(409) — another group already has this nameagent_wallet_required(409) — create the agent wallet before opening a perps, prediction-market or Solana accountwallet_account_unsupported(409) — the user's wallet is an Agent API wallet, whose Intents account is a 0x address this route cannot name; read it with Get wallet account, Get wallet account balances and Open a wallet account session insteadconversation_deleted(410) — the conversation was deleted; its history stays readableautomation_deleted(410) — the automation was deletedgrid_ended(410) — the grid stopped, expired or failed; it stays readable but takes no command. A new grid needs the user's approval in chatcredential_expired(401) — the user token has expired; obtain a fresh oneaccount_disabled(403) — an operator disabled the accountperps_disabled(403) — perps is not enabled for this userprediction_disabled(403) — prediction-market trading is not enabled for this usersolana_disabled(403) — Solana trading is not enabled for this userno_account(404) — the user has not opened the account this call reads; open it firstnot_available_in_region(403) — perps funding is unavailable in the user's region for this request; withdrawals remain availablesteering_disabled(403) — steering a working run is not turned on for this user; send the message with Start a run once the run endsbaskets_disabled(403) — idea baskets are not turned on for this user; hide the Ideas pages and their basketsbasket_buying(409) — the basket is still buying, so it cannot be deleted yet; try again once its result is inbasket_awaiting_approval(409) — an approval to buy this basket is still open; decline it in the chat, then delete the basketbasket_step_not_failed(409) — the step bought, or the basket is not partly bought, so no order can be linked to it; read the basket againbasket_step_linked(409) — another order is already linked to this step; a link is permanent, so read the basket againbasket_order_not_linkable(400) — the order cannot stand in for this step: it is not one of the step'sfailures[].linkableorders, or another basket step already holds itvoice_disabled(403) — voice input is not turned on for this user; let them type insteadvoice_unavailable(503) — this deployment has no speech model, so it cannot transcribe recordings; let the user type insteadprovider_unavailable(503) — an external provider the call depends on did not answerquote_refused(400) — 1Click would not quote this request, usually an amount below what it routes or a pair it does not offer; nothing was reserved. Change the amount or the assets and quote again; for a deposit address, no address was issued, so offer another networkinvalid_input(400) — the body or query failed validation;issuesnames each fieldinternal(500) — a fault on our side; quoterequestIdwhen reporting itpartner_key_required(401) — noX-Api-Keyheader was sentpartner_key_invalid(401) — theX-Api-Keyis unknown or revokedsubject_mismatch(403) — the{userId}in the path is not the token's userorigin_rejected(403) — a browserOriginother than the configured web originpermission_required(403) — the verified credential is not permitted to make this callsignature_required(403) — creating the agent wallet needs the user's signature: send the user's signature ofcreation.messagefrom Get the agent wallet asauthorizationasset_not_withdrawable(403) — tokenized stocks cannot be withdrawn; sell them firstasset_not_swappable(403) — the swap names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offasset_not_tradable(403) — the order names an asset this user cannot buy or trade with this request: a tokenized stock with nocontext.country, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user'searnflag is offsolana_token_not_tradable(403) — Fin won't trade this token: its mint lets someone freeze, move or charge for holdings or pause transfers, it can't be sold back, Fin couldn't read its mint, it has no reliable price, or it is wrapped SOL. A sale is refused only for what would stop it landinglimit_orders_disabled(403) — limit orders are not enabled for this usergrid_trading_disabled(403) — grid trading is not enabled for this user, so a paused grid cannot be resumed; pausing and cancelling a grid are never gateddeposit_limit_exceeded(429) — the deposit would take the agent wallet past the user's deposit limit, or, for a deposit address, the wallet has no room left under it; nothing was recorded. ReaddepositLimit.availableCentsfrom Get balances for how much fits now, and deposit no more than thatpolicy_change_throttled(429) — the user's Agent API wallet changed what it allows a few minutes ago, and the NEAR Intents Agent API lets it change again only after a cooldown; nothing was asked or signed, so call again onceRetry-Afterhas passedagent_slippage_exceeded(403) — the user's wallet is an Agent API wallet whose agent signs only trades that lose at most the share of their value its owner allowed (max_slippage_bps): fees, price and slippage together, by 1Click's own USD values at the quote's minimum output. This trade's quote loses more, states no USD value, or, before there is a quote, its loss bound is already quoted with more slippage than that (half the bound, plus 1Click's fee at the most it has been seen to take, 20 basis points, before an approval). Very small trades lose more to fixed fees; nothing was signed, so ask again with a larger amount or a smaller loss boundagent_api_orders_unavailable(403) — the user's Agent API wallet needs wallet setup to enable limit orders, or the order exceeds this wallet's 168-hour maximum; finish wallet setup or choose at most 168 hours before trying again; nothing was approved or signeddestination_not_allowed(403) — the user's wallet is an Agent API wallet, whose agent pays a deposit only to itself, to a NEAR Intents account its owner listed (on the confidential ledger) or to an address on a chain its owner listed; allow this one with Add a withdrawal destination (one owner signature), then ask again. A public NEAR Intents account, or an address with no valid spelling on its chain, cannot be paid at all; nothing was signedrate_limited(429) — the per-key or per-user limit is spent; honourRetry-Afterpartner_request_capacity(429) — this partner's request quota across all keys and replicas is spent; honour Retry-Afterpartner_run_capacity(429) — this partner's active run quota is full; honour Retry-After and reuse the same request identitystream_capacity(429) — the partner, user or replica has no free stream capacity; honourRetry-Afterinvalid_cursor(400) — thecursoris not one this list mintedinvalid_question_answer(400) — the questionnaire answer does not match its questions or allowed choicesquestion_closed(410) — the questionnaire expired or was cancelledunknown_target(400) — a rule names a partner, group or user that does not exist, or a user outside the partners the same rule namesscope_invalid(400) — a subject in the scope is not a subject id, or appears twicesubject_unsupported(404) — a subject in the scope is not one market briefs cover; list them with List market subjectsbrief_not_found(404) — no market brief job with this id was created with your partner keybriefs_busy(429) — your market briefs are at their limit of briefs generating at once; retry afterRetry-Aftermarket_briefs_disabled(403) — market briefs are not turned on for your partner keystory_not_found(404) — no market story with this id is current: it never was one, or Fin no longer shows it because its sources were withdrawn or its figures can no longer be read
Validation rules
- Allowed values
["run_active","budget_exhausted","approval_not_pending","execution_capacity","execution_unavailable","stop_pending","automation_changed","automation_held","automation_invalid","automation_paused","automation_has_no_webhook","automation_limit","profile_unknown_tool","deployment_paused","run_not_active","withdrawal_changed","swap_changed","order_changed","prediction_order_changed","solana_trade_changed","trade_not_recoverable","order_not_cancelable","grid_not_active","grid_not_paused","suggestion_changed","request_key_conflict","question_not_pending","flag_changed","group_changed","group_in_use","group_name_taken","agent_wallet_required","wallet_account_unsupported","conversation_deleted","automation_deleted","grid_ended","credential_expired","account_disabled","perps_disabled","prediction_disabled","solana_disabled","no_account","not_available_in_region","steering_disabled","baskets_disabled","basket_buying","basket_awaiting_approval","basket_step_not_failed","basket_step_linked","basket_order_not_linkable","voice_disabled","voice_unavailable","provider_unavailable","quote_refused","invalid_input","internal","partner_key_required","partner_key_invalid","subject_mismatch","origin_rejected","permission_required","signature_required","asset_not_withdrawable","asset_not_swappable","asset_not_tradable","solana_token_not_tradable","limit_orders_disabled","grid_trading_disabled","deposit_limit_exceeded","policy_change_throttled","agent_slippage_exceeded","agent_api_orders_unavailable","destination_not_allowed","rate_limited","partner_request_capacity","partner_run_capacity","stream_capacity","invalid_cursor","invalid_question_answer","question_closed","unknown_target","scope_invalid","subject_unsupported","brief_not_found","briefs_busy","market_briefs_disabled","story_not_found"]
requestIdstringrequiredThe id Fin used for this request; quote it when reporting a problem
retryablebooleanrequiredWhether repeating the same request later can succeed without changing it
detailstringoptionalOnly on invalid_input: which part of the request failed validation
issuesarrayoptionalOnly on invalid_input: one entry per failing field
Show attributes
Only on invalid_input: one entry per failing field
Array items · object
pathstringrequiredThe JSON pointer of the failing field; empty for the root object
messagestringrequiredWhy the field failed
Complete OpenAPI definition
The exact operation and all referenced components, including recursive schemas.
{
"operation": {
"operationId": "approvals.approve",
"summary": "Approve an action",
"tags": [
"approvals"
],
"description": "Records the user's approval and resumes the paused run, which then carries out the action. Returns the approval. For a money action, send `authorization` with the user's signature of `authorization.message` from Get an approval. Approving does not mean the action succeeded: follow the run, or the trade (Get a trade), for the result.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"authorization": {
"description": "For a money action: the user's signature of `authorization.message` from Get an approval, with its `controllerId` and `expiresAt` unchanged. Not needed for other actions.",
"type": "object",
"properties": {
"controllerId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "The `controllerId` returned with the message, unchanged: the wallet that signed."
},
"expiresAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "The `expiresAt` returned with the message, unchanged, character for character."
},
"signature": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "An EIP-191 personal-message signature by the current controller.",
"enum": [
"evm"
]
},
"signature": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{130}$",
"description": "The 65-byte hexadecimal signature over the exact supplied message."
}
},
"required": [
"kind",
"signature"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "A user-verified WebAuthn assertion over the message digest.",
"enum": [
"webauthn"
]
},
"credentialId": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"pattern": "^[A-Za-z0-9_-]+$",
"description": "The signing credential identifier encoded as base64url."
},
"clientDataJSON": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"pattern": "^[A-Za-z0-9_-]+$",
"description": "The authenticator's client-data JSON bytes encoded as base64url."
},
"authenticatorData": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"pattern": "^[A-Za-z0-9_-]+$",
"description": "The authenticator data bytes encoded as base64url."
},
"signature": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"pattern": "^[A-Za-z0-9_-]+$",
"description": "The authenticator's signature encoded as base64url."
},
"userHandle": {
"description": "The optional authenticator user handle encoded as base64url.",
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 8192,
"pattern": "^[A-Za-z0-9_-]+$"
},
{
"type": "null"
}
]
}
},
"required": [
"kind",
"credentialId",
"clientDataJSON",
"authenticatorData",
"signature"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "A NEP-413 `signMessage` result over `{message, nonce, recipient}`, where `recipient` is the host of Fin's audience.",
"enum": [
"near"
]
},
"publicKey": {
"type": "string",
"pattern": "^ed25519:[1-9A-HJ-NP-Za-km-z]{32,44}$",
"description": "The signing key as the wallet reports it (`ed25519:` then base58)."
},
"signature": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]{86}==$",
"description": "The 64-byte Ed25519 signature in padded standard base64."
},
"nonce": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]{42}[AEIMQUYcgkosw048]=$",
"description": "The 32-byte nonce the caller gave the wallet, in padded standard base64."
}
},
"required": [
"kind",
"publicKey",
"signature",
"nonce"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "A Solana `signMessage` Ed25519 signature over the exact UTF-8 message bytes.",
"enum": [
"solana"
]
},
"signature": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]{86}==$",
"description": "The 64-byte Ed25519 signature in padded standard base64."
}
},
"required": [
"kind",
"signature"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "A SEP-53 signature: Ed25519 over sha256(\"Stellar Signed Message:\\n\" + message).",
"enum": [
"stellar"
]
},
"signature": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]{86}==$",
"description": "The 64-byte Ed25519 signature in padded standard base64."
}
},
"required": [
"kind",
"signature"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "A TON Connect `signData` result for a `text` payload that is exactly the message.",
"enum": [
"ton"
]
},
"signature": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]{86}==$",
"description": "The 64-byte Ed25519 signature in padded standard base64."
},
"address": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "The signing wallet's address exactly as the wallet returned it."
},
"domain": {
"type": "string",
"minLength": 1,
"maxLength": 253,
"description": "The dApp domain the wallet attested; it must be a partner-registered origin's host."
},
"timestamp": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "The wallet's signing time in UNIX seconds; it must be within five minutes."
}
},
"required": [
"kind",
"signature",
"address",
"domain",
"timestamp"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "A TIP-191 `signMessageV2` signature over the exact message.",
"enum": [
"tron"
]
},
"signature": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{130}$",
"description": "The 65-byte recoverable secp256k1 signature in hexadecimal."
}
},
"required": [
"kind",
"signature"
],
"additionalProperties": false
}
],
"description": "The user's signature of the `message`, exactly as the API returned it."
}
},
"required": [
"controllerId",
"expiresAt",
"signature"
],
"additionalProperties": false
},
"reason": {
"description": "Why the call was approved, for the record.",
"type": "string",
"maxLength": 1024
},
"attestation": {
"description": "A partner-side confirmation reference, recorded on the journal event; never verified by fin.",
"type": "object",
"properties": {
"reference": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"description": "The partner's own reference for this confirmation."
}
},
"required": [
"reference"
],
"additionalProperties": false
}
},
"additionalProperties": false
}
}
}
},
"parameters": [
{
"schema": {
"type": "string",
"pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
},
"in": "path",
"name": "userId",
"required": true,
"description": "Your id for the user: the `userId` you sent to Create a user. It must be the session's user."
},
{
"schema": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"in": "path",
"name": "approvalId",
"required": true,
"description": "The approval's id."
}
],
"security": [
{
"apiKey": [],
"userToken": []
}
],
"responses": {
"200": {
"description": "The approval, now approved.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Approval"
}
}
}
},
"400": {
"$ref": "#/components/responses/InvalidInput"
},
"401": {
"$ref": "#/components/responses/Unauthorized"
},
"403": {
"$ref": "#/components/responses/Forbidden"
},
"404": {
"$ref": "#/components/responses/NotFound"
},
"409": {
"description": "The operation lost to the current state.\n\n- `approval_not_pending` — the approval was already decided or has expired, or its id does not exist or belongs to a different conversation\n- `run_active` — a run already holds this conversation\n- `stop_pending` — a stop is already in progress and its cleanup is not yet confirmed",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"413": {
"$ref": "#/components/responses/PayloadTooLarge"
},
"429": {
"description": "A limit refused the request; wait for `Retry-After` when it is sent.\n\n- `rate_limited` — the per-key or per-user limit is spent; honour `Retry-After`\n- `partner_request_capacity` — this partner's request quota across all keys and replicas is spent; honour Retry-After\n- `execution_capacity` — no capacity is free to run this right now; honour `Retry-After`\n- `partner_run_capacity` — this partner's active run quota is full; honour Retry-After and reuse the same request identity",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"500": {
"$ref": "#/components/responses/Internal"
},
"503": {
"description": "The service cannot take this right now (draining, a dependency did not answer, or an operator paused the work); `retryable` says whether to try again.\n\n- `internal` — a fault on our side; quote `requestId` when reporting it\n- `execution_unavailable` — the service that runs the agent could not take the work; `retryable` says whether to try again\n- `provider_unavailable` — an external provider the call depends on did not answer",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
}
},
"components": {
"schemas": {
"Approval": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "The approval's id."
},
"tool": {
"type": "string",
"description": "The tool the agent wants to use."
},
"fingerprint": {
"type": "string",
"description": "The SHA-256 digest, as 64 lowercase hexadecimal characters, of the tool and its exact input in canonical JSON, with the deployment's no-signing restriction when it set one: the decision applies to exactly this action, and the action that runs must match it."
},
"input": {
"description": "The tool's input, exactly as it would run: show it to the user.",
"$ref": "#/components/schemas/JsonValue"
},
"contract": {
"anyOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "near_intents_transfer",
"description": "Which contract template this is."
},
"actions": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "swap",
"description": "Exchange one asset for another; custody never leaves the agent wallet."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
},
"exit": {
"description": "Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.",
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "take_profit",
"description": "Sell when the asset is this far ABOVE the automation's average cost."
},
"gainBps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "How far above the average cost the price must be, in basis points."
}
},
"required": [
"kind",
"gainBps"
],
"description": "A take-profit exit: sell once the price is up this much on average cost."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "stop_loss",
"description": "Sell when the asset is this far BELOW the automation's average cost."
},
"lossBps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "How far below the average cost the price must be, in basis points."
}
},
"required": [
"kind",
"lossBps"
],
"description": "A stop-loss exit: sell once the price is down this much on average cost."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "harvest_every",
"description": "Take profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled."
},
"days": {
"type": "string",
"pattern": "^[1-9]\\d{0,2}$",
"description": "How many days apart harvests are, 7 to 365, as a decimal string: \"7\" weekly, \"30\" monthly."
}
},
"required": [
"kind",
"days"
],
"description": "A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every `days` days it sells only the gain, if there is any, and the automation keeps running."
}
]
}
},
"required": [
"kind",
"input",
"quantity",
"output"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "withdraw_to_owner",
"description": "Return an asset to the account that owns the agent wallet."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
}
},
"required": [
"kind",
"input",
"quantity",
"output"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "withdraw_transfer",
"description": "Pay the exact approved destination through the provider’s chain or Intents transfer route."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
},
"recipient": {
"type": "object",
"properties": {
"rail": {
"type": "string",
"enum": [
"chain",
"intents"
],
"description": "A native blockchain transfer or a signed transfer within an Intents ledger."
},
"network": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]{0,63}$",
"description": "Exact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain."
},
"address": {
"type": "string",
"pattern": "^[\\x21-\\x7e]{1,256}$",
"description": "Exact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval."
},
"memo": {
"type": "null",
"description": "Standalone routing memos are unsupported; routing must be encoded in the approved address."
}
},
"required": [
"rail",
"network",
"address",
"memo"
],
"description": "The exact approved payout rail, network and address."
},
"minimumReceivedRaw": {
"anyOf": [
{
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$"
},
{
"type": "null"
}
],
"description": "Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor."
},
"maxFeeRaw": {
"anyOf": [
{
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$"
},
{
"type": "null"
}
],
"description": "Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced."
}
},
"required": [
"kind",
"input",
"quantity",
"output",
"recipient",
"minimumReceivedRaw",
"maxFeeRaw"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "send",
"description": "Not executable, and refused in new contracts: pay an address with withdraw_transfer."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
},
"recipient": {
"type": "object",
"properties": {
"chain": {
"type": "string",
"minLength": 1,
"maxLength": 32,
"description": "Which chain the destination address is on."
},
"address": {
"type": "string",
"pattern": "^[\\x21-\\x7e]{1,128}$",
"description": "The destination address on that chain."
}
},
"required": [
"chain",
"address"
],
"description": "The pinned destination this action pays."
}
},
"required": [
"kind",
"input",
"quantity",
"output",
"recipient"
]
}
]
},
"description": "The actions this contract authorizes, executed in order."
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When this contract's authority expires."
},
"maxExecutions": {
"type": "integer",
"minimum": 1,
"maximum": 10000,
"description": "How many times this contract may be executed before it is exhausted."
},
"maxTotalInput": {
"description": "Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.",
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The most this contract may spend of this token in total, across every execution, in the token's smallest unit."
}
},
"required": [
"tokenId",
"decimals",
"amountRaw"
],
"description": "One capped input token and its total spend ceiling."
}
},
"bounds": {
"type": "object",
"properties": {
"maxValueLossBps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss."
},
"maxSignatureLifetimeSeconds": {
"type": "integer",
"minimum": 1,
"maximum": 259500,
"description": "Explicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity."
}
},
"required": [
"maxValueLossBps",
"maxSignatureLifetimeSeconds"
],
"description": "The value-loss and signature-lifetime limits every execution must respect."
},
"execution": {
"description": "Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.",
"anyOf": [
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"ordered",
"parallel_independent"
],
"description": "Ordered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved."
},
"maxPreparationAttempts": {
"type": "integer",
"minimum": 1,
"maximum": 3,
"description": "The maximum unsigned preparation attempts for each approved action, including its first attempt."
},
"dispatchWindowSeconds": {
"type": "integer",
"minimum": 60,
"maximum": 86400,
"description": "The maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues."
}
},
"required": [
"mode",
"maxPreparationAttempts",
"dispatchWindowSeconds"
]
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "dependency_graph"
},
"dependencies": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"maxItems": 16,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 15
}
},
"description": "One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings."
},
"maxPreparationAttempts": {
"type": "integer",
"minimum": 1,
"maximum": 3,
"description": "The maximum unsigned preparation attempts for each approved action, including its first attempt."
},
"dispatchWindowSeconds": {
"type": "integer",
"minimum": 60,
"maximum": 86400,
"description": "The maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues."
}
},
"required": [
"mode",
"dependencies",
"maxPreparationAttempts",
"dispatchWindowSeconds"
]
}
]
}
},
"required": [
"type",
"actions",
"validUntil",
"maxExecutions",
"bounds"
]
},
{
"$ref": "#/components/schemas/LimitOrderContract"
},
{
"$ref": "#/components/schemas/PerpsTransferContract"
},
{
"$ref": "#/components/schemas/PerpsOrderContract"
},
{
"$ref": "#/components/schemas/PerpsCancelContract"
},
{
"$ref": "#/components/schemas/PerpsAutomationContract"
},
{
"$ref": "#/components/schemas/PerpsMarginContract"
},
{
"$ref": "#/components/schemas/PredictionFundContract"
},
{
"$ref": "#/components/schemas/SolanaBuyContract"
},
{
"$ref": "#/components/schemas/SolanaSellContract"
},
{
"$ref": "#/components/schemas/SolanaFundContract"
},
{
"$ref": "#/components/schemas/SolanaWithdrawContract"
},
{
"$ref": "#/components/schemas/PredictionOrderContract"
},
{
"$ref": "#/components/schemas/PredictionWithdrawContract"
},
{
"$ref": "#/components/schemas/CompositeContract"
},
{
"$ref": "#/components/schemas/PredictionAutomationContract"
},
{
"$ref": "#/components/schemas/SolanaSellManyContract"
},
{
"$ref": "#/components/schemas/GridContract"
},
{
"$ref": "#/components/schemas/PerpsFreedWithdrawalContract"
},
{
"$ref": "#/components/schemas/PredictionFreedWithdrawalContract"
}
]
},
{
"type": "null"
}
],
"description": "For a money action, the amounts, assets, destinations and limits approving it allows; `null` for other actions."
},
"authorization": {
"anyOf": [
{
"$ref": "#/components/schemas/ApprovalAuthorization"
},
{
"type": "null"
}
],
"description": "For a money action waiting for a decision: the message the user signs to approve it, and the request it covers. `null` for other actions, once decided, and for withdrawals the user starts with Withdraw funds, which approves them itself."
},
"summary": {
"type": "string",
"description": "A short summary of what approving would do."
},
"status": {
"type": "string",
"enum": [
"pending",
"approved",
"denied",
"expired"
],
"description": "`pending` while it waits for a decision, `approved` or `denied` once decided, or `expired` when nobody decided before `expiresAt`."
},
"reason": {
"description": "Why it was decided, if a reason was given.",
"type": [
"string",
"null"
]
},
"requestedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When the agent asked."
},
"expiresAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When the approval expires if nobody decides it."
},
"decidedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
],
"description": "When it was approved or denied; null until then."
},
"consumedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
],
"description": "When the approved action started, or `null` until then (always `null` when denied). The action can still fail afterwards: this is not proof it succeeded."
},
"signedBy": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 8192
},
{
"type": "null"
}
],
"description": "For an approved money action, which only the user's signature approves: the sign-in wallet that signed it, by its public identifier (an EVM, Solana, Stellar or Tron address, a NEAR account, a TON public key, or a passkey's credential id). A user's sign-in wallet is fixed at their first sign-in and never replaced, so reading it now names the same wallet that signed when the action was approved. `null` for any other approval, and for a money action approved before the user's sign-in wallet was registered, when approvals took no signature."
},
"conversationId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "The conversation's id."
},
"runId": {
"anyOf": [
{
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
{
"type": "null"
}
],
"description": "The run waiting on this approval; `null` only for old approvals."
},
"operationId": {
"type": "null",
"description": "Always `null` for an approval a run is waiting on."
}
},
"required": [
"id",
"tool",
"fingerprint",
"input",
"contract",
"authorization",
"summary",
"status",
"reason",
"requestedAt",
"expiresAt",
"decidedAt",
"consumedAt",
"signedBy",
"conversationId",
"runId",
"operationId"
]
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "The approval's id."
},
"tool": {
"type": "string",
"description": "The tool the agent wants to use."
},
"fingerprint": {
"type": "string",
"description": "The SHA-256 digest, as 64 lowercase hexadecimal characters, of the tool and its exact input in canonical JSON, with the deployment's no-signing restriction when it set one: the decision applies to exactly this action, and the action that runs must match it."
},
"input": {
"description": "The tool's input, exactly as it would run: show it to the user.",
"$ref": "#/components/schemas/JsonValue"
},
"contract": {
"anyOf": [
{
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "near_intents_transfer",
"description": "Which contract template this is."
},
"actions": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "swap",
"description": "Exchange one asset for another; custody never leaves the agent wallet."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
},
"exit": {
"description": "Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.",
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "take_profit",
"description": "Sell when the asset is this far ABOVE the automation's average cost."
},
"gainBps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "How far above the average cost the price must be, in basis points."
}
},
"required": [
"kind",
"gainBps"
],
"description": "A take-profit exit: sell once the price is up this much on average cost."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "stop_loss",
"description": "Sell when the asset is this far BELOW the automation's average cost."
},
"lossBps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "How far below the average cost the price must be, in basis points."
}
},
"required": [
"kind",
"lossBps"
],
"description": "A stop-loss exit: sell once the price is down this much on average cost."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "harvest_every",
"description": "Take profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled."
},
"days": {
"type": "string",
"pattern": "^[1-9]\\d{0,2}$",
"description": "How many days apart harvests are, 7 to 365, as a decimal string: \"7\" weekly, \"30\" monthly."
}
},
"required": [
"kind",
"days"
],
"description": "A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every `days` days it sells only the gain, if there is any, and the automation keeps running."
}
]
}
},
"required": [
"kind",
"input",
"quantity",
"output"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "withdraw_to_owner",
"description": "Return an asset to the account that owns the agent wallet."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
}
},
"required": [
"kind",
"input",
"quantity",
"output"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "withdraw_transfer",
"description": "Pay the exact approved destination through the provider’s chain or Intents transfer route."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
},
"recipient": {
"type": "object",
"properties": {
"rail": {
"type": "string",
"enum": [
"chain",
"intents"
],
"description": "A native blockchain transfer or a signed transfer within an Intents ledger."
},
"network": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]{0,63}$",
"description": "Exact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain."
},
"address": {
"type": "string",
"pattern": "^[\\x21-\\x7e]{1,256}$",
"description": "Exact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval."
},
"memo": {
"type": "null",
"description": "Standalone routing memos are unsupported; routing must be encoded in the approved address."
}
},
"required": [
"rail",
"network",
"address",
"memo"
],
"description": "The exact approved payout rail, network and address."
},
"minimumReceivedRaw": {
"anyOf": [
{
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$"
},
{
"type": "null"
}
],
"description": "Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor."
},
"maxFeeRaw": {
"anyOf": [
{
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$"
},
{
"type": "null"
}
],
"description": "Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced."
}
},
"required": [
"kind",
"input",
"quantity",
"output",
"recipient",
"minimumReceivedRaw",
"maxFeeRaw"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "send",
"description": "Not executable, and refused in new contracts: pay an address with withdraw_transfer."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
},
"recipient": {
"type": "object",
"properties": {
"chain": {
"type": "string",
"minLength": 1,
"maxLength": 32,
"description": "Which chain the destination address is on."
},
"address": {
"type": "string",
"pattern": "^[\\x21-\\x7e]{1,128}$",
"description": "The destination address on that chain."
}
},
"required": [
"chain",
"address"
],
"description": "The pinned destination this action pays."
}
},
"required": [
"kind",
"input",
"quantity",
"output",
"recipient"
]
}
]
},
"description": "The actions this contract authorizes, executed in order."
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When this contract's authority expires."
},
"maxExecutions": {
"type": "integer",
"minimum": 1,
"maximum": 10000,
"description": "How many times this contract may be executed before it is exhausted."
},
"maxTotalInput": {
"description": "Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.",
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The most this contract may spend of this token in total, across every execution, in the token's smallest unit."
}
},
"required": [
"tokenId",
"decimals",
"amountRaw"
],
"description": "One capped input token and its total spend ceiling."
}
},
"bounds": {
"type": "object",
"properties": {
"maxValueLossBps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss."
},
"maxSignatureLifetimeSeconds": {
"type": "integer",
"minimum": 1,
"maximum": 259500,
"description": "Explicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity."
}
},
"required": [
"maxValueLossBps",
"maxSignatureLifetimeSeconds"
],
"description": "The value-loss and signature-lifetime limits every execution must respect."
},
"execution": {
"description": "Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.",
"anyOf": [
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"ordered",
"parallel_independent"
],
"description": "Ordered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved."
},
"maxPreparationAttempts": {
"type": "integer",
"minimum": 1,
"maximum": 3,
"description": "The maximum unsigned preparation attempts for each approved action, including its first attempt."
},
"dispatchWindowSeconds": {
"type": "integer",
"minimum": 60,
"maximum": 86400,
"description": "The maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues."
}
},
"required": [
"mode",
"maxPreparationAttempts",
"dispatchWindowSeconds"
]
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "dependency_graph"
},
"dependencies": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"maxItems": 16,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 15
}
},
"description": "One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings."
},
"maxPreparationAttempts": {
"type": "integer",
"minimum": 1,
"maximum": 3,
"description": "The maximum unsigned preparation attempts for each approved action, including its first attempt."
},
"dispatchWindowSeconds": {
"type": "integer",
"minimum": 60,
"maximum": 86400,
"description": "The maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues."
}
},
"required": [
"mode",
"dependencies",
"maxPreparationAttempts",
"dispatchWindowSeconds"
]
}
]
}
},
"required": [
"type",
"actions",
"validUntil",
"maxExecutions",
"bounds"
]
},
{
"$ref": "#/components/schemas/LimitOrderContract"
},
{
"$ref": "#/components/schemas/PerpsTransferContract"
},
{
"$ref": "#/components/schemas/PerpsOrderContract"
},
{
"$ref": "#/components/schemas/PerpsCancelContract"
},
{
"$ref": "#/components/schemas/PerpsAutomationContract"
},
{
"$ref": "#/components/schemas/PerpsMarginContract"
},
{
"$ref": "#/components/schemas/PredictionFundContract"
},
{
"$ref": "#/components/schemas/SolanaBuyContract"
},
{
"$ref": "#/components/schemas/SolanaSellContract"
},
{
"$ref": "#/components/schemas/SolanaFundContract"
},
{
"$ref": "#/components/schemas/SolanaWithdrawContract"
},
{
"$ref": "#/components/schemas/PredictionOrderContract"
},
{
"$ref": "#/components/schemas/PredictionWithdrawContract"
},
{
"$ref": "#/components/schemas/CompositeContract"
},
{
"$ref": "#/components/schemas/PredictionAutomationContract"
},
{
"$ref": "#/components/schemas/SolanaSellManyContract"
},
{
"$ref": "#/components/schemas/GridContract"
},
{
"$ref": "#/components/schemas/PerpsFreedWithdrawalContract"
},
{
"$ref": "#/components/schemas/PredictionFreedWithdrawalContract"
}
]
},
{
"type": "null"
}
],
"description": "For a money action, the amounts, assets, destinations and limits approving it allows; `null` for other actions."
},
"authorization": {
"anyOf": [
{
"$ref": "#/components/schemas/ApprovalAuthorization"
},
{
"type": "null"
}
],
"description": "For a money action waiting for a decision: the message the user signs to approve it, and the request it covers. `null` for other actions, once decided, and for withdrawals the user starts with Withdraw funds, which approves them itself."
},
"summary": {
"type": "string",
"description": "A short summary of what approving would do."
},
"status": {
"type": "string",
"enum": [
"pending",
"approved",
"denied",
"expired"
],
"description": "`pending` while it waits for a decision, `approved` or `denied` once decided, or `expired` when nobody decided before `expiresAt`."
},
"reason": {
"description": "Why it was decided, if a reason was given.",
"type": [
"string",
"null"
]
},
"requestedAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When the agent asked."
},
"expiresAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When the approval expires if nobody decides it."
},
"decidedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
],
"description": "When it was approved or denied; null until then."
},
"consumedAt": {
"anyOf": [
{
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
},
{
"type": "null"
}
],
"description": "When the approved action started, or `null` until then (always `null` when denied). The action can still fail afterwards: this is not proof it succeeded."
},
"signedBy": {
"anyOf": [
{
"type": "string",
"minLength": 1,
"maxLength": 8192
},
{
"type": "null"
}
],
"description": "For an approved money action, which only the user's signature approves: the sign-in wallet that signed it, by its public identifier (an EVM, Solana, Stellar or Tron address, a NEAR account, a TON public key, or a passkey's credential id). A user's sign-in wallet is fixed at their first sign-in and never replaced, so reading it now names the same wallet that signed when the action was approved. `null` for any other approval, and for a money action approved before the user's sign-in wallet was registered, when approvals took no signature."
},
"conversationId": {
"type": "null",
"description": "Always `null`: a withdrawal's review belongs to the withdrawal."
},
"runId": {
"type": "null",
"description": "Always `null`: a withdrawal has no run."
},
"operationId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "The withdrawal this review belongs to (its `id` in Get a withdrawal). Withdraw funds decides it."
}
},
"required": [
"id",
"tool",
"fingerprint",
"input",
"contract",
"authorization",
"summary",
"status",
"reason",
"requestedAt",
"expiresAt",
"decidedAt",
"consumedAt",
"signedBy",
"conversationId",
"runId",
"operationId"
]
}
],
"description": "An action the agent wants to take that needs the user's OK: what it would do, and whether the user decided."
},
"JsonValue": {
"description": "Any JSON value: a string, number, boolean, null, array or object.",
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/components/schemas/JsonValue"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/components/schemas/JsonValue"
}
}
]
},
"LimitOrderContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "limit_order",
"description": "Which contract template this is."
},
"order": {
"type": "object",
"properties": {
"input": {
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact asset the order sells: token id and decimals."
}
},
"required": [
"pinned"
],
"description": "The input (base) asset this order sells."
},
"output": {
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact asset the order buys: token id and decimals."
}
},
"required": [
"pinned"
],
"description": "The output (quote) asset this order buys."
},
"quantity": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount to sell, in the input asset's smallest unit. 1 NEAR with verified decimals 24 is \"1000000000000000000000000\". Scale decimal digits with the verified decimals and reject excess fractional digits; no floating-point arithmetic or bash."
},
"limitPrice": {
"type": "string",
"maxLength": 80,
"pattern": "^(0|[1-9]\\d{0,38})(\\.\\d{1,38})?$",
"description": "The minimum price the fill must reach, as output-asset units per ONE input unit, written as a plain human decimal: \"5\" means at least 5 output tokens per 1 input token. Never scale it by decimals."
},
"expiresInHours": {
"type": "integer",
"minimum": 1,
"maximum": 720,
"description": "How long the order may rest before it expires, in whole hours. Use the user's duration within this wallet's maximum, or the wallet's default from the latest request's host context when none is given. The schema permits up to 720 hours (30 days); a wallet may have a lower maximum. Never shorten a requested duration to fit."
}
},
"required": [
"input",
"output",
"quantity",
"limitPrice",
"expiresInHours"
],
"description": "The exact approved placement request."
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "The latest instant the order may be created and funded under this consent."
}
},
"required": [
"type",
"order",
"validUntil"
],
"description": "Owner-signed authority for one resting limit order: the exact approved placement, created and funded once by the policy worker before the approval expires."
},
"PerpsTransferContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "perps_transfer",
"description": "Which authorization contract this is."
},
"direction": {
"type": "string",
"enum": [
"fund",
"withdraw"
],
"description": "Fund the own perps account from the agent wallet, or withdraw back to the same agent wallet."
},
"transfer": {
"description": "The exact approved amount and all-in loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.",
"$ref": "#/components/schemas/PerpsTransferInput"
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "The deadline after which this one-shot approval authorizes nothing."
}
},
"required": [
"type",
"direction",
"transfer",
"validUntil"
],
"description": "One approved perps transfer in exactly the named direction."
},
"PerpsTransferInput": {
"type": "object",
"properties": {
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "Exact amount in six-decimal atomic units in either direction: 5 USDC is \"5000000\". A withdrawal returns USDC. A funding spends it from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it; Hyperliquid receives USDC. Never supply an address."
},
"maxValueLossBps": {
"type": "integer",
"minimum": 0,
"maximum": 300,
"description": "Explicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default."
},
"payWith": {
"description": "A funding only, approved in chat as one call: the coin it pays with instead of a USDC or USDT holding, and the most of it it may spend. A withdrawal never carries it.",
"$ref": "#/components/schemas/VenueFundingPayment"
}
},
"required": [
"amountRaw",
"maxValueLossBps"
],
"description": "An exact transfer between the agent's own wallet and its perps account, which holds USDC."
},
"VenueFundingPayment": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
},
"maxInputRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The most of the coin this funding may spend, in its smallest unit: the approved dollars at the price read when the approval opened, plus 5%."
}
},
"required": [
"tokenId",
"decimals",
"maxInputRaw"
],
"description": "The coin this funding pays with and the most of it it may spend, as the owner approved them. Absent: the funding spends one USDC or USDT holding."
},
"PerpsOrderContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "perps_order",
"description": "Which authorization contract this is."
},
"order": {
"description": "The exact approved order.",
"$ref": "#/components/schemas/PerpsOrderInput"
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "The deadline after which this one-shot approval authorizes nothing."
}
},
"required": [
"type",
"order",
"validUntil"
],
"description": "One approved Hyperliquid order, signed once exactly as approved."
},
"PerpsOrderInput": {
"type": "object",
"properties": {
"coin": {
"type": "string",
"pattern": "^(?:xyz:)?[A-Za-z0-9]{1,20}$",
"description": "The market's coin name exactly as perps_markets lists it, such as `BTC` or `xyz:TSLA`."
},
"asset": {
"type": "integer",
"minimum": 0,
"maximum": 1099999,
"description": "The market's asset id exactly as perps_markets lists it for that coin."
},
"side": {
"type": "string",
"enum": [
"long",
"short"
],
"description": "The position this order opens, adds to, reduces or protects. A reduce-only entry on a long position sells."
},
"size": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$",
"description": "Exact size in the coin, at most the market's `szDecimals` places."
},
"leverage": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 100
},
{
"type": "null"
}
],
"description": "Leverage the user chose for this market, at most the market's maximum. Required for an entry that is not reduce-only; null otherwise. Never assume it: ask the user."
},
"marginMode": {
"description": "How the position is margined, which the user chose with the leverage: `cross` shares the account's margin with every cross position, `isolated` puts only this position's own margin at risk (perps_margin_update adds or removes it later). Present exactly when leverage is; an isolated-only market (perps_markets `onlyIsolated`) takes `isolated`. Never assume it: ask the user. Absent on orders approved before margin modes existed, which were cross.",
"type": "string",
"enum": [
"cross",
"isolated"
]
},
"entry": {
"anyOf": [
{
"type": "object",
"properties": {
"price": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$",
"description": "The limit price; for an immediate (`Ioc`) order, the worst price it may fill at."
},
"timeInForce": {
"type": "string",
"enum": [
"Gtc",
"Ioc",
"Alo"
],
"description": "`Ioc` fills now within `price` and cancels the rest (a market order), `Gtc` rests until filled or cancelled, `Alo` rests only as a maker order."
},
"reduceOnly": {
"type": "boolean",
"description": "True to only reduce or close the existing position, never open or add."
}
},
"required": [
"price",
"timeInForce",
"reduceOnly"
]
},
{
"type": "null"
}
],
"description": "The order itself; null for take-profit and stop-loss on the existing position only."
},
"takeProfit": {
"anyOf": [
{
"$ref": "#/components/schemas/PerpsTrigger"
},
{
"type": "null"
}
],
"description": "A reduce-only take-profit, or null."
},
"stopLoss": {
"anyOf": [
{
"$ref": "#/components/schemas/PerpsTrigger"
},
{
"type": "null"
}
],
"description": "A reduce-only stop-loss, or null."
},
"trailingStop": {
"description": "A reduce-only trailing stop, placed after the order (or alone on the existing position); absent or null for none. It carries no builder fee.",
"anyOf": [
{
"$ref": "#/components/schemas/PerpsTrailingStop"
},
{
"type": "null"
}
]
}
},
"required": [
"coin",
"asset",
"side",
"size",
"leverage",
"entry",
"takeProfit",
"stopLoss"
],
"description": "One exact Hyperliquid order on the agent's own account, with optional exits."
},
"PerpsTrigger": {
"type": "object",
"properties": {
"triggerPrice": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$",
"description": "The mark price that fires this exit."
},
"limitPrice": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$",
"description": "The worst price the exit may fill at once fired; it executes as a market order within it."
}
},
"required": [
"triggerPrice",
"limitPrice"
],
"description": "A reduce-only market exit on the same size: fires at triggerPrice and fills no worse than limitPrice."
},
"PerpsTrailingStop": {
"type": "object",
"properties": {
"retracement": {
"anyOf": [
{
"type": "object",
"properties": {
"percent": {
"type": "string",
"pattern": "^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$",
"description": "How far the mark price may reverse from its best since activation, in percent: `2` is 2%."
}
},
"required": [
"percent"
],
"description": "Trail by a percentage of the best mark price."
},
{
"type": "object",
"properties": {
"price": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$",
"description": "How far the mark price may reverse from its best since activation, in price units."
}
},
"required": [
"price"
],
"description": "Trail by a fixed price distance."
}
],
"description": "How far the mark price may reverse from its best before the stop fires."
},
"activationPrice": {
"anyOf": [
{
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,19})(\\.[0-9]{0,11}[1-9])?$"
},
{
"type": "null"
}
],
"description": "The mark price that starts the trailing; null to trail from placement."
}
},
"required": [
"retracement",
"activationPrice"
],
"description": "A reduce-only market exit on the same size that follows the mark price as it moves in the position's favour and fires once it reverses by the retracement."
},
"PerpsCancelContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "perps_cancel",
"description": "Which authorization contract this is."
},
"cancel": {
"description": "The exact order approved for cancelling.",
"$ref": "#/components/schemas/PerpsCancelInput"
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "The deadline after which this one-shot approval authorizes nothing."
}
},
"required": [
"type",
"cancel",
"validUntil"
],
"description": "One approved cancellation of one resting Hyperliquid order."
},
"PerpsCancelInput": {
"type": "object",
"properties": {
"coin": {
"type": "string",
"pattern": "^(?:xyz:)?[A-Za-z0-9]{1,20}$",
"description": "The market's coin name exactly as perps_markets lists it, such as `BTC` or `xyz:TSLA`."
},
"asset": {
"type": "integer",
"minimum": 0,
"maximum": 1099999,
"description": "The market's asset id exactly as perps_markets lists it for that coin."
},
"oid": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "The resting order's id exactly as perps_orders lists it."
}
},
"required": [
"coin",
"asset",
"oid"
],
"description": "Cancel one resting order on the agent's own account."
},
"PerpsAutomationContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "perps_automation",
"description": "Which authorization contract this is."
},
"coin": {
"type": "string",
"pattern": "^(?:xyz:)?[A-Za-z0-9]{1,20}$",
"description": "The market's coin name exactly as perps_markets lists it, such as `BTC` or `xyz:TSLA`."
},
"asset": {
"type": "integer",
"minimum": 0,
"maximum": 1099999,
"description": "The market's asset id exactly as perps_markets lists it for that coin."
},
"position": {
"type": "string",
"enum": [
"long",
"short"
],
"description": "The position the action is for. `open` acts only while the agent holds nothing on this coin; `reduce` and `add_margin` act only while it holds this side, and nothing happens otherwise."
},
"action": {
"$ref": "#/components/schemas/PerpsAutomationAction"
},
"maxExecutions": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "How many firings may act under this approval."
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "The deadline after which this approval authorizes nothing."
}
},
"required": [
"type",
"coin",
"asset",
"position",
"action",
"maxExecutions",
"validUntil"
],
"description": "A standing approval for one perps automation: open the agent's own position while it holds nothing on the coin, reduce or close it, or add margin to its own account, each time its rule fires, up to its limits."
},
"PerpsAutomationAction": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "reduce",
"description": "Reduce or close the position."
},
"fractionBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000,
"description": "How much of the position to close, in basis points: 10000 closes it all."
},
"maxSlippageBps": {
"type": "integer",
"minimum": 1,
"maximum": 500,
"description": "The worst fill allowed, in basis points from the mark when it fires."
}
},
"required": [
"kind",
"fractionBps",
"maxSlippageBps"
],
"description": "Close part or all of the position with a reduce-only market order."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "add_margin",
"description": "Add margin to the perps account."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "Exact USDC moved from the agent wallet into the perps account, six decimals: 5 USDC is \"5000000\"."
},
"maxValueLossBps": {
"type": "integer",
"minimum": 0,
"maximum": 300,
"description": "Maximum value lost to fees moving it, in basis points."
}
},
"required": [
"kind",
"amountRaw",
"maxValueLossBps"
],
"description": "Fund the agent's own perps account from its agent wallet."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "open",
"description": "Open the position at market."
},
"notionalUsd": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,2})?$",
"description": "The position's size in US dollars at the mark when it fires, at most two places: a $200 position is \"200\". The size in the coin is this over the mark, rounded down to the market's size precision."
},
"leverage": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "Leverage the user chose for this market, at most the market's maximum. Never assume it: ask the user."
},
"marginMode": {
"type": "string",
"enum": [
"cross",
"isolated"
],
"description": "How the position is margined, which the user chose with the leverage: `cross` shares the account's margin, `isolated` risks only this position's own. An isolated-only market takes `isolated`. Never assume it: ask the user."
},
"maxSlippageBps": {
"type": "integer",
"minimum": 1,
"maximum": 500,
"description": "The worst fill allowed, in basis points from the mark when it fires; the take-profit and stop-loss fill within the same bound of their trigger."
},
"takeProfitPercent": {
"anyOf": [
{
"type": "string",
"pattern": "^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
},
{
"type": "null"
}
],
"description": "A native take-profit this far from the mark when it opens, in percent of price in the position's favour (\"10\" is 10%), or null for none."
},
"stopLossPercent": {
"anyOf": [
{
"type": "string",
"pattern": "^(0|[1-9][0-9]?)(\\.[0-9]{0,3}[1-9])?$"
},
{
"type": "null"
}
],
"description": "A native stop-loss this far from the mark when it opens, in percent of price against the position (\"5\" is 5%), or null for none."
}
},
"required": [
"kind",
"notionalUsd",
"leverage",
"marginMode",
"maxSlippageBps",
"takeProfitPercent",
"stopLossPercent"
],
"description": "Open the position with a market order, only while the agent holds nothing on this coin, optionally protected by a native take-profit and stop-loss."
}
],
"description": "What a perps automation does each time its rule fires: open the named position while the agent holds nothing on its coin, reduce the named position, or add margin to the agent's own perps account."
},
"PerpsMarginContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "perps_margin",
"description": "Which authorization contract this is."
},
"margin": {
"description": "The exact approved margin change.",
"$ref": "#/components/schemas/PerpsMarginInput"
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "The deadline after which this one-shot approval authorizes nothing."
}
},
"required": [
"type",
"margin",
"validUntil"
],
"description": "One approved change to one isolated position's margin, signed once exactly as approved."
},
"PerpsMarginInput": {
"type": "object",
"properties": {
"coin": {
"type": "string",
"pattern": "^(?:xyz:)?[A-Za-z0-9]{1,20}$",
"description": "The market's coin name exactly as perps_markets lists it, such as `BTC` or `xyz:TSLA`."
},
"asset": {
"type": "integer",
"minimum": 0,
"maximum": 1099999,
"description": "The market's asset id exactly as perps_markets lists it for that coin."
},
"change": {
"type": "string",
"enum": [
"add",
"remove"
],
"description": "`add` moves USDC from the account into the position's isolated margin, lowering its liquidation risk; `remove` takes it back out, raising that risk. A strict isolated market never lets margin be removed while the position is open."
},
"amount": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,8})(\\.[0-9]{0,5}[1-9])?$",
"description": "Exact USDC to move, at most six decimal places, such as `25` or `12.5`."
}
},
"required": [
"coin",
"asset",
"change",
"amount"
],
"description": "Add or remove margin on one isolated position on the agent's own account."
},
"PredictionFundContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "prediction_fund",
"description": "One approved Polymarket funding transfer."
},
"transfer": {
"description": "The exact approved USDC or USDT debit and the first leg's loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.",
"$ref": "#/components/schemas/PredictionFundInput"
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "The deadline after which this one-shot approval authorizes nothing."
}
},
"required": [
"type",
"transfer",
"validUntil"
],
"description": "One exact USDC or USDT debit delivered as native Base USDC to Polymarket's bridge for the agent's own account; the final pUSD amount is not bounded."
},
"PredictionFundInput": {
"type": "object",
"properties": {
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "Exact debit in six-decimal atomic units: 5 USDC or USDT is \"5000000\", spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it. The host resolves the agent’s own Polymarket Deposit Wallet and its bridge address; never supply an address."
},
"maxFirstLegLossBps": {
"type": "integer",
"minimum": 0,
"maximum": 300,
"description": "Explicit maximum loss, in basis points, of the first leg only: the wallet's USDC, USDT or coin delivered as native Base USDC to Polymarket's bridge, fees and any cross-chain hop included. It does not bound the bridge's conversion to pUSD on Polygon, whose fees and output are variable and estimated. Required; no default."
},
"payWith": {
"description": "Approved in chat as one call or as a funded order's funding: the coin the first leg pays with instead of a USDC or USDT holding, and the most of it it may spend.",
"$ref": "#/components/schemas/VenueFundingPayment"
}
},
"required": [
"amountRaw",
"maxFirstLegLossBps"
],
"description": "Fund the agent's own Polymarket Deposit Wallet: one exact USDC or USDT debit, or that many dollars of a coin, delivered as native Base USDC to Polymarket's bridge, which credits an estimated, not guaranteed, pUSD amount on Polygon later."
},
"SolanaBuyContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "solana_buy",
"description": "Which authorization contract this is."
},
"buy": {
"description": "The exact approved token, payment, all-in loss bound and SOL top-up cap, and, for a buy whose funding pays with a coin, that coin and the most of it it may spend.",
"$ref": "#/components/schemas/SolanaBuyInput"
},
"maxExecutions": {
"type": "integer",
"minimum": 1,
"maximum": 1000,
"description": "How many times this grant may execute: 1 for a one-shot approval."
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When this grant's authority expires; for a one-shot approval, the approval's own expiry."
}
},
"required": [
"type",
"buy",
"maxExecutions",
"validUntil"
],
"description": "An approved Solana buy, executed only exactly as approved."
},
"SolanaBuyInput": {
"type": "object",
"properties": {
"token": {
"description": "The exact token to buy.",
"$ref": "#/components/schemas/SolanaToken"
},
"pay": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "usdc",
"description": "Pay from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT), moved to Solana as SOL first."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "Exact USDC or USDT to spend, in six-decimal atomic units: $50 is \"50000000\". At least 5 (\"5000000\"); a smaller buy is refused."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "Spend an exact amount of USDC or USDT from the agent wallet."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "sol",
"description": "Pay with SOL already in the agent's Solana account."
},
"lamports": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "Exact SOL to spend, in lamports (nine decimals): 0.5 SOL is \"500000000\"."
}
},
"required": [
"kind",
"lamports"
],
"description": "Spend an exact amount of SOL the agent's Solana account already holds."
}
],
"description": "What the buy spends, as an exact input amount. Buying an exact number of tokens is not supported."
},
"maxValueLossBps": {
"type": "integer",
"minimum": 1,
"maximum": 1500,
"description": "Explicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default."
},
"maxSolTopUpUsdcRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The most extra USDC or USDT the funding may add to keep SOL in the Solana account for network fees, in six-decimal atomic units: \"0\" for none, at most \"1000000\" (1 USDC). Must be \"0\" when paying with SOL."
},
"payWith": {
"description": "A buy paid in dollars and approved in chat as one call: the coin its funding pays with instead of a USDC or USDT holding, and the most of it it may spend, the SOL top-up included. Never SOL. A buy from a token's page refuses it.",
"$ref": "#/components/schemas/VenueFundingPayment"
}
},
"required": [
"token",
"pay",
"maxValueLossBps",
"maxSolTopUpUsdcRaw"
],
"description": "One exact-input buy of a Solana token through the agent's own Solana account."
},
"SolanaToken": {
"type": "object",
"properties": {
"mint": {
"type": "string",
"minLength": 32,
"maxLength": 44,
"pattern": "^[1-9A-HJ-NP-Za-km-z]+$",
"description": "The token's mint address, exactly as solana_token_search or solana_token returned it. Never a ticker."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 18,
"description": "The mint's decimals, exactly as returned with the mint."
},
"tokenProgram": {
"type": "string",
"enum": [
"spl_token",
"token_2022"
],
"description": "The program that owns the mint, exactly as returned with the mint: `spl_token` or `token_2022`."
}
},
"required": [
"mint",
"decimals",
"tokenProgram"
],
"description": "One Solana token, pinned by its mint, its decimals and its token program."
},
"SolanaSellContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "solana_sell",
"description": "Which authorization contract this is."
},
"sell": {
"description": "The exact approved token, amount, proceeds and all-in loss bound.",
"$ref": "#/components/schemas/SolanaSellInput"
},
"maxExecutions": {
"type": "integer",
"minimum": 1,
"maximum": 1000,
"description": "How many times this grant may execute: 1 for a one-shot approval."
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When this grant's authority expires; for a one-shot approval, the approval's own expiry."
}
},
"required": [
"type",
"sell",
"maxExecutions",
"validUntil"
],
"description": "An approved Solana sell, executed only exactly as approved."
},
"SolanaSellInput": {
"type": "object",
"properties": {
"token": {
"description": "The exact token to sell.",
"$ref": "#/components/schemas/SolanaToken"
},
"amount": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact",
"description": "Sell an exact amount of the token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "Exact amount of the token to sell, in its smallest unit (scaled by the token's decimals)."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "Sell an exact amount of the token."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction",
"description": "Sell a share of what the Solana account holds of the token."
},
"bps": {
"type": "integer",
"minimum": 1,
"maximum": 10000,
"description": "The share to sell, in basis points of the account's balance of the token: all of it is 10000, half is 5000."
}
},
"required": [
"kind",
"bps"
],
"description": "Sell a share of the account's balance of the token."
}
],
"description": "How much of the token to sell."
},
"receive": {
"type": "string",
"enum": [
"usdc",
"sol"
],
"description": "`usdc` returns the proceeds to the agent wallet as USDC on NEAR, which is what selling means; `sol` keeps them as SOL in the agent's Solana account."
},
"maxValueLossBps": {
"type": "integer",
"minimum": 1,
"maximum": 1500,
"description": "Explicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default."
}
},
"required": [
"token",
"amount",
"receive",
"maxValueLossBps"
],
"description": "One sell of a Solana token held in the agent's own Solana account."
},
"SolanaFundContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "solana_fund",
"description": "Which authorization contract this is."
},
"fund": {
"description": "The exact approved amount and loss bound, and, for a funding paid with a coin, that coin and the most of it it may spend.",
"$ref": "#/components/schemas/SolanaFundInput"
},
"maxExecutions": {
"type": "integer",
"minimum": 1,
"maximum": 1000,
"description": "How many times this grant may execute: 1 for a one-shot approval."
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When this grant's authority expires; for a one-shot approval, the approval's own expiry."
}
},
"required": [
"type",
"fund",
"maxExecutions",
"validUntil"
],
"description": "An approved move of USDC or USDT, or a coin, into the agent's own Solana account."
},
"SolanaFundInput": {
"type": "object",
"properties": {
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "Exact USDC or USDT to move from the agent wallet into the agent's Solana account as SOL, in six-decimal atomic units: 5 USDC is \"5000000\". Spent from one USDC or USDT holding of the agent wallet (USDC on NEAR, Base, Arbitrum, Ethereum or Solana, or USDT on NEAR; any USDC that covers it before USDT) that alone covers it, never split across holdings, or, when it pays with a coin, that coin's value of it."
},
"maxValueLossBps": {
"type": "integer",
"minimum": 0,
"maximum": 300,
"description": "Explicit maximum value loss in basis points, including provider fees: at most 300. Required; no default."
},
"payWith": {
"description": "Approved in chat as one call: the coin this funding pays with instead of a USDC or USDT holding, and the most of it it may spend. Never SOL.",
"$ref": "#/components/schemas/VenueFundingPayment"
}
},
"required": [
"amountRaw",
"maxValueLossBps"
],
"description": "Move an exact amount of USDC or USDT, or that many dollars of a coin, from the agent wallet into its own Solana account as SOL."
},
"SolanaWithdrawContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "solana_withdraw",
"description": "Which authorization contract this is."
},
"withdraw": {
"description": "The exact approved amount, what returns and the loss bound.",
"$ref": "#/components/schemas/SolanaWithdrawInput"
},
"maxExecutions": {
"type": "integer",
"minimum": 1,
"maximum": 1000,
"description": "How many times this grant may execute: 1 for a one-shot approval."
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When this grant's authority expires; for a one-shot approval, the approval's own expiry."
}
},
"required": [
"type",
"withdraw",
"maxExecutions",
"validUntil"
],
"description": "An approved move of SOL from the agent's own Solana account back to its agent wallet."
},
"SolanaWithdrawInput": {
"type": "object",
"properties": {
"amount": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact",
"description": "Withdraw an exact amount of SOL."
},
"lamports": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "Exact SOL to withdraw, in lamports (nine decimals): 0.5 SOL is \"500000000\"."
}
},
"required": [
"kind",
"lamports"
],
"description": "Withdraw an exact amount of SOL."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_spendable",
"description": "Withdraw all the SOL above the reserve the account keeps for rent and network fees."
}
},
"required": [
"kind"
],
"description": "Withdraw all the spendable SOL."
}
],
"description": "How much SOL to withdraw from the agent's Solana account."
},
"receive": {
"type": "string",
"enum": [
"usdc",
"sol"
],
"description": "`usdc` returns it to the agent wallet as USDC on NEAR; `sol` returns it to the agent wallet as SOL."
},
"maxValueLossBps": {
"type": "integer",
"minimum": 0,
"maximum": 300,
"description": "Explicit maximum value loss in basis points, including provider fees: at most 300. Required; no default."
}
},
"required": [
"amount",
"receive",
"maxValueLossBps"
],
"description": "Move SOL from the agent's own Solana account back to its agent wallet."
},
"PredictionOrderContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "prediction_order"
},
"order": {
"$ref": "#/components/schemas/PredictionOrderInput"
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"type",
"order",
"validUntil"
]
},
"PredictionOrderInput": {
"type": "object",
"properties": {
"marketId": {
"type": "string",
"pattern": "^[1-9][0-9]{0,19}$"
},
"assetId": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,77})$"
},
"marketQuestion": {
"type": "string",
"minLength": 1,
"maxLength": 1000
},
"outcome": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"side": {
"type": "string",
"enum": [
"BUY",
"SELL"
]
},
"limitPriceUsdDecimal": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "shares"
},
"sizeSharesDecimal": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
}
},
"required": [
"kind",
"sizeSharesDecimal"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "budget"
},
"amountUsdDecimal": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
}
},
"required": [
"kind",
"amountUsdDecimal"
]
}
]
},
"orderType": {
"type": "string",
"enum": [
"GTC",
"GTD",
"FOK",
"FAK"
]
},
"expiresAt": {
"type": "integer",
"minimum": 0,
"maximum": 253402300799
},
"maxFeeUsdDecimal": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
},
"maxSpendUsdDecimal": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,17})(\\.[0-9]{1,6})?$"
}
},
"required": [
"marketId",
"assetId",
"marketQuestion",
"outcome",
"side",
"limitPriceUsdDecimal",
"quantity",
"orderType",
"maxFeeUsdDecimal",
"maxSpendUsdDecimal"
]
},
"PredictionWithdrawContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "prediction_withdraw"
},
"withdrawal": {
"$ref": "#/components/schemas/PredictionWithdrawInput"
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"type",
"withdrawal",
"validUntil"
]
},
"PredictionWithdrawInput": {
"type": "object",
"properties": {
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "Exact pUSD debit in six-decimal atomic units: 5 pUSD is \"5000000\". Only the agent’s own Deposit Wallet is spent."
},
"maxLossBps": {
"type": "integer",
"minimum": 0,
"maximum": 300,
"description": "Explicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit."
}
},
"required": [
"amountRaw",
"maxLossBps"
],
"description": "Withdraw pUSD through Polymarket’s conversion service as native USDC on Polygon to a unique verified 1Click address crediting only the agent’s own confidential Intents wallet. Funding remains a separate USDC route."
},
"CompositeContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "composite",
"description": "Which authorization contract this is."
},
"pieces": {
"minItems": 1,
"maxItems": 6,
"type": "array",
"items": {
"type": "object",
"properties": {
"tool": {
"type": "string",
"enum": [
"intents_execute",
"perps_fund",
"perps_order_place",
"prediction_fund",
"prediction_order_place",
"perps_withdraw",
"prediction_withdraw"
],
"description": "The tool whose one-shot call this piece is."
},
"contract": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "near_intents_transfer",
"description": "Which contract template this is."
},
"actions": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "swap",
"description": "Exchange one asset for another; custody never leaves the agent wallet."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
},
"exit": {
"description": "Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.",
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "take_profit",
"description": "Sell when the asset is this far ABOVE the automation's average cost."
},
"gainBps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "How far above the average cost the price must be, in basis points."
}
},
"required": [
"kind",
"gainBps"
],
"description": "A take-profit exit: sell once the price is up this much on average cost."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "stop_loss",
"description": "Sell when the asset is this far BELOW the automation's average cost."
},
"lossBps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "How far below the average cost the price must be, in basis points."
}
},
"required": [
"kind",
"lossBps"
],
"description": "A stop-loss exit: sell once the price is down this much on average cost."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "harvest_every",
"description": "Take profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled."
},
"days": {
"type": "string",
"pattern": "^[1-9]\\d{0,2}$",
"description": "How many days apart harvests are, 7 to 365, as a decimal string: \"7\" weekly, \"30\" monthly."
}
},
"required": [
"kind",
"days"
],
"description": "A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every `days` days it sells only the gain, if there is any, and the automation keeps running."
}
]
}
},
"required": [
"kind",
"input",
"quantity",
"output"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "withdraw_to_owner",
"description": "Return an asset to the account that owns the agent wallet."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
}
},
"required": [
"kind",
"input",
"quantity",
"output"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "withdraw_transfer",
"description": "Pay the exact approved destination through the provider’s chain or Intents transfer route."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
},
"recipient": {
"type": "object",
"properties": {
"rail": {
"type": "string",
"enum": [
"chain",
"intents"
],
"description": "A native blockchain transfer or a signed transfer within an Intents ledger."
},
"network": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]{0,63}$",
"description": "Exact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain."
},
"address": {
"type": "string",
"pattern": "^[\\x21-\\x7e]{1,256}$",
"description": "Exact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval."
},
"memo": {
"type": "null",
"description": "Standalone routing memos are unsupported; routing must be encoded in the approved address."
}
},
"required": [
"rail",
"network",
"address",
"memo"
],
"description": "The exact approved payout rail, network and address."
},
"minimumReceivedRaw": {
"anyOf": [
{
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$"
},
{
"type": "null"
}
],
"description": "Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor."
},
"maxFeeRaw": {
"anyOf": [
{
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$"
},
{
"type": "null"
}
],
"description": "Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced."
}
},
"required": [
"kind",
"input",
"quantity",
"output",
"recipient",
"minimumReceivedRaw",
"maxFeeRaw"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "send",
"description": "Not executable, and refused in new contracts: pay an address with withdraw_transfer."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
},
"recipient": {
"type": "object",
"properties": {
"chain": {
"type": "string",
"minLength": 1,
"maxLength": 32,
"description": "Which chain the destination address is on."
},
"address": {
"type": "string",
"pattern": "^[\\x21-\\x7e]{1,128}$",
"description": "The destination address on that chain."
}
},
"required": [
"chain",
"address"
],
"description": "The pinned destination this action pays."
}
},
"required": [
"kind",
"input",
"quantity",
"output",
"recipient"
]
}
]
},
"description": "The actions this contract authorizes, executed in order."
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When this contract's authority expires."
},
"maxExecutions": {
"type": "integer",
"minimum": 1,
"maximum": 10000,
"description": "How many times this contract may be executed before it is exhausted."
},
"maxTotalInput": {
"description": "Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.",
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The most this contract may spend of this token in total, across every execution, in the token's smallest unit."
}
},
"required": [
"tokenId",
"decimals",
"amountRaw"
],
"description": "One capped input token and its total spend ceiling."
}
},
"bounds": {
"type": "object",
"properties": {
"maxValueLossBps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss."
},
"maxSignatureLifetimeSeconds": {
"type": "integer",
"minimum": 1,
"maximum": 259500,
"description": "Explicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity."
}
},
"required": [
"maxValueLossBps",
"maxSignatureLifetimeSeconds"
],
"description": "The value-loss and signature-lifetime limits every execution must respect."
},
"execution": {
"description": "Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.",
"anyOf": [
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"ordered",
"parallel_independent"
],
"description": "Ordered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved."
},
"maxPreparationAttempts": {
"type": "integer",
"minimum": 1,
"maximum": 3,
"description": "The maximum unsigned preparation attempts for each approved action, including its first attempt."
},
"dispatchWindowSeconds": {
"type": "integer",
"minimum": 60,
"maximum": 86400,
"description": "The maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues."
}
},
"required": [
"mode",
"maxPreparationAttempts",
"dispatchWindowSeconds"
]
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "dependency_graph"
},
"dependencies": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"maxItems": 16,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 15
}
},
"description": "One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings."
},
"maxPreparationAttempts": {
"type": "integer",
"minimum": 1,
"maximum": 3,
"description": "The maximum unsigned preparation attempts for each approved action, including its first attempt."
},
"dispatchWindowSeconds": {
"type": "integer",
"minimum": 60,
"maximum": 86400,
"description": "The maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues."
}
},
"required": [
"mode",
"dependencies",
"maxPreparationAttempts",
"dispatchWindowSeconds"
]
}
]
}
},
"required": [
"type",
"actions",
"validUntil",
"maxExecutions",
"bounds"
]
},
{
"$ref": "#/components/schemas/PerpsTransferContract"
},
{
"$ref": "#/components/schemas/PerpsOrderContract"
},
{
"$ref": "#/components/schemas/PredictionFundContract"
},
{
"$ref": "#/components/schemas/PredictionOrderContract"
},
{
"$ref": "#/components/schemas/PerpsFreedWithdrawalContract"
},
{
"$ref": "#/components/schemas/PredictionFreedWithdrawalContract"
}
]
},
"startBy": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"tool",
"contract",
"startBy"
]
}
},
"dependencies": {
"type": "array",
"items": {
"maxItems": 6,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
}
},
"walletDebit": {
"anyOf": [
{
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The most this contract may spend of this token in total, across every execution, in the token's smallest unit."
}
},
"required": [
"tokenId",
"decimals",
"amountRaw"
],
"description": "One capped input token and its total spend ceiling."
}
},
{
"type": "array",
"prefixItems": [],
"items": false,
"maxItems": 0
}
],
"description": "The sum of every piece's debit from the agent wallet, per token, in raw units. Empty when the pieces are venue orders paid from money already on their venues, as when finishing a basket, or a cash-out, which closes a position and brings home what that freed."
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When every piece that has not started loses its authority."
}
},
"required": [
"type",
"pieces",
"dependencies",
"walletDebit",
"validUntil"
],
"description": "One owner signature over several exact one-shot grants and the order they run in."
},
"PerpsFreedWithdrawalContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "perps_freed_withdrawal",
"description": "Which authorization contract this is."
},
"withdrawal": {
"description": "The signed maximum and all-in loss bound of the withdrawal home.",
"$ref": "#/components/schemas/PerpsFreedWithdrawalInput"
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "The deadline after which this one-shot approval authorizes nothing."
}
},
"required": [
"type",
"withdrawal",
"validUntil"
],
"description": "One withdrawal home of what a cash-out's exit freed on Hyperliquid, at most the signed maximum. Only ever a piece of a cash-out."
},
"PerpsFreedWithdrawalInput": {
"type": "object",
"properties": {
"upToRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The most this withdrawal may move, in six-decimal atomic USDC: what the exit before it frees, sized by the host before the approval opens. Never more than the exit freed."
},
"maxValueLossBps": {
"type": "integer",
"minimum": 0,
"maximum": 300,
"description": "Explicit maximum value loss in basis points, including provider fees and any swap or cross-chain hop of the USDC, USDT or coin a funding spends. Required; no default."
}
},
"required": [
"upToRaw",
"maxValueLossBps"
],
"description": "Withdraw to the agent's own confidential Intents wallet what the exit before it freed on its own Hyperliquid account, never more than upToRaw."
},
"PredictionFreedWithdrawalContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "prediction_freed_withdrawal"
},
"withdrawal": {
"$ref": "#/components/schemas/PredictionFreedWithdrawalInput"
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
}
},
"required": [
"type",
"withdrawal",
"validUntil"
],
"description": "One withdrawal home of what a cash-out's sale freed on Polymarket, at most the signed maximum. Only ever a piece of a cash-out."
},
"PredictionFreedWithdrawalInput": {
"type": "object",
"properties": {
"upToRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The most this withdrawal may move, in six-decimal atomic pUSD: what the sale before it frees, sized by the host before the approval opens. Never more than the sale freed."
},
"maxLossBps": {
"type": "integer",
"minimum": 0,
"maximum": 300,
"description": "Explicit maximum estimated route loss in basis points, fees included; required, never defaulted. The bridge quote is an estimate, not a guaranteed final credit."
}
},
"required": [
"upToRaw",
"maxLossBps"
],
"description": "Withdraw to the agent's own confidential Intents wallet what the sale before it freed in its own Polymarket Deposit Wallet, never more than upToRaw."
},
"PredictionAutomationContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "prediction_automation",
"description": "Which authorization contract this is."
},
"market": {
"type": "object",
"properties": {
"marketId": {
"type": "string",
"pattern": "^[1-9][0-9]{0,19}$",
"description": "The market's id exactly as prediction_market returns it."
},
"conditionId": {
"type": "string",
"pattern": "^0x[0-9a-fA-F]{64}$",
"description": "The market's conditionId exactly as prediction_market returns it."
},
"assetId": {
"type": "string",
"pattern": "^[1-9][0-9]{0,77}$",
"description": "The outcome's CLOB token id, exactly the assetId prediction_market lists for that outcome. Yes and No are different tokens."
},
"marketQuestion": {
"type": "string",
"minLength": 1,
"maxLength": 1000,
"description": "The market's question exactly as prediction_market returns it."
},
"outcome": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"description": "The outcome's name exactly as prediction_market returns it."
}
},
"required": [
"marketId",
"conditionId",
"assetId",
"marketQuestion",
"outcome"
],
"description": "The one Polymarket outcome this automation trades."
},
"action": {
"$ref": "#/components/schemas/PredictionAutomationAction"
},
"maxExecutions": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "How many firings may trade under this approval; a buy spends at most maxExecutions × amountUsdDecimal in all."
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "The deadline after which this approval authorizes nothing."
}
},
"required": [
"type",
"market",
"action",
"maxExecutions",
"validUntil"
],
"description": "A standing approval for one Polymarket automation: buy one outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price, each time its rule fires, up to its limits."
},
"PredictionAutomationAction": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "buy",
"description": "Buy shares of the outcome."
},
"amountUsdDecimal": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,2})?$",
"description": "The USD each firing spends before fees, to the cent: \"50\" is $50. Each buy is an immediate order that fills what it can at once and cancels the rest."
},
"maxPriceUsdDecimal": {
"type": "string",
"pattern": "^0\\.[0-9]{1,4}$",
"description": "The most a share may cost, as the market's chance: \"0.32\" never pays more than 32¢ a share. Use a price on the market's tick."
},
"maxFeeUsdDecimal": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,6})?$",
"description": "The most each firing may pay Polymarket in fees, in USD: \"1\" is $1."
}
},
"required": [
"kind",
"amountUsdDecimal",
"maxPriceUsdDecimal",
"maxFeeUsdDecimal"
],
"description": "Buy the outcome with a USD budget at no more than a maximum price."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "sell",
"description": "Sell shares of the outcome."
},
"fractionBps": {
"type": "integer",
"minimum": 1,
"maximum": 10000,
"description": "How much of the agent's holding of the outcome each firing sells, in basis points: 10000 sells it all."
},
"minPriceUsdDecimal": {
"type": "string",
"pattern": "^0\\.[0-9]{1,4}$",
"description": "The least a share may sell for, as the market's chance: \"0.7\" never sells below 70¢ a share. Use a price on the market's tick."
},
"maxFeeUsdDecimal": {
"type": "string",
"pattern": "^(0|[1-9][0-9]{0,6})(\\.[0-9]{1,6})?$",
"description": "The most each firing may pay Polymarket in fees, in USD: \"1\" is $1."
}
},
"required": [
"kind",
"fractionBps",
"minPriceUsdDecimal",
"maxFeeUsdDecimal"
],
"description": "Sell a share of the agent's holding of the outcome at no less than a minimum price."
}
],
"description": "What a Polymarket automation does each time its rule fires: buy the outcome with a USD budget at no more than a maximum price, or sell a share of the agent's holding of it at no less than a minimum price."
},
"SolanaSellManyContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "solana_sell_many",
"description": "Which authorization contract this is."
},
"sellMany": {
"description": "The exact approved coins, amounts and loss bounds, in order, and where the proceeds go.",
"$ref": "#/components/schemas/SolanaSellManyInput"
},
"maxExecutions": {
"type": "number",
"const": 1,
"description": "A multi-coin sale is approved once and runs once: always 1."
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When this grant's authority expires; for a one-shot approval, the approval's own expiry."
}
},
"required": [
"type",
"sellMany",
"maxExecutions",
"validUntil"
],
"description": "An approved multi-coin Solana sale, executed only exactly as approved."
},
"SolanaSellManyInput": {
"type": "object",
"properties": {
"sells": {
"minItems": 2,
"maxItems": 6,
"type": "array",
"items": {
"$ref": "#/components/schemas/SolanaSale"
},
"description": "The coins to sell, in the order they are sold: 2 to 6, each a different mint, none of them SOL itself."
},
"receive": {
"type": "string",
"enum": [
"usdc",
"sol"
],
"description": "`usdc` returns the summed proceeds of every sale that went through to the agent wallet as USDC on NEAR, in one transfer once the last sale ran; `sol` keeps them as SOL in the agent's Solana account."
}
},
"required": [
"sells",
"receive"
],
"description": "Several sells of Solana tokens held in the agent's own Solana account, approved together and run as one: each sale on its own, one after another, then one transfer of what they returned."
},
"SolanaSale": {
"type": "object",
"properties": {
"token": {
"description": "The exact token to sell.",
"$ref": "#/components/schemas/SolanaToken"
},
"amount": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact",
"description": "Sell an exact amount of the token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "Exact amount of the token to sell, in its smallest unit (scaled by the token's decimals)."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "Sell an exact amount of the token."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction",
"description": "Sell a share of what the Solana account holds of the token."
},
"bps": {
"type": "integer",
"minimum": 1,
"maximum": 10000,
"description": "The share to sell, in basis points of the account's balance of the token: all of it is 10000, half is 5000."
}
},
"required": [
"kind",
"bps"
],
"description": "Sell a share of the account's balance of the token."
}
],
"description": "How much of the token to sell."
},
"maxValueLossBps": {
"type": "integer",
"minimum": 1,
"maximum": 1500,
"description": "Explicit all-in maximum value loss in basis points, from the value paid to the value received, fees and price impact included: at least 1, at most 1500. Required; no default."
}
},
"required": [
"token",
"amount",
"maxValueLossBps"
],
"description": "One coin of a multi-coin sale, sold through the agent's own Solana account."
},
"GridContract": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "grid",
"description": "Which contract template this is."
},
"grid": {
"type": "object",
"properties": {
"base": {
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact base asset: token id and decimals."
}
},
"required": [
"pinned"
],
"description": "The asset the grid buys low and sells high."
},
"quote": {
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact quote asset: token id and decimals."
}
},
"required": [
"pinned"
],
"description": "The asset prices are in and buys are paid with."
},
"levels": {
"minItems": 2,
"maxItems": 20,
"type": "array",
"items": {
"type": "string",
"maxLength": 80,
"pattern": "^(0|[1-9]\\d{0,38})(\\.\\d{1,38})?$"
},
"description": "The 2 to 20 grid prices, strictly ascending: quote units per ONE base unit, plain human decimals."
},
"quantityPerCell": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact base amount every cell buys and sells, in the base asset's smallest unit. Fixed: profits never compound."
},
"cells": {
"minItems": 1,
"maxItems": 19,
"type": "array",
"items": {
"type": "object",
"properties": {
"start": {
"type": "string",
"enum": [
"buy",
"idle"
],
"description": "The side the cell's first order is on: buy at its low level, or idle (the cell never places)."
}
},
"required": [
"start"
]
},
"description": "One entry per cell, lowest first (levels.length - 1 of them): cells wholly below the start price and the one straddling it buy, cells wholly above it stay idle."
}
},
"required": [
"base",
"quote",
"levels",
"quantityPerCell",
"cells"
],
"description": "A grid's exact terms: pair, levels, quantity and starting sides."
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When the grid ends: no order is placed, and none rests, after it. At most 720 hours after the approval's own expiry."
}
},
"required": [
"type",
"grid",
"validUntil"
],
"description": "Owner-signed authority for one grid: the resting cell orders its terms derive, until it ends."
},
"ApprovalAuthorization": {
"type": "object",
"properties": {
"purpose": {
"type": "string",
"const": "financial.approval",
"description": "Always `financial.approval`: the signature approves this one money action."
},
"walletId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "The agent wallet the action spends from."
},
"requestKey": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "The approval's id, which the signature names, so it approves this approval and no other."
},
"request": {
"type": "object",
"properties": {
"approvalId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "The approval being decided."
},
"fingerprint": {
"type": "string",
"description": "Fingerprint of the immutable approval bytes."
},
"tool": {
"type": "string",
"description": "The exact trusted tool receiving the approved terms."
},
"input": {
"description": "The complete persisted tool arguments to approve.",
"$ref": "#/components/schemas/JsonValue"
},
"contract": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "near_intents_transfer",
"description": "Which contract template this is."
},
"actions": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "swap",
"description": "Exchange one asset for another; custody never leaves the agent wallet."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
},
"exit": {
"description": "Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.",
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "take_profit",
"description": "Sell when the asset is this far ABOVE the automation's average cost."
},
"gainBps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "How far above the average cost the price must be, in basis points."
}
},
"required": [
"kind",
"gainBps"
],
"description": "A take-profit exit: sell once the price is up this much on average cost."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "stop_loss",
"description": "Sell when the asset is this far BELOW the automation's average cost."
},
"lossBps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "How far below the average cost the price must be, in basis points."
}
},
"required": [
"kind",
"lossBps"
],
"description": "A stop-loss exit: sell once the price is down this much on average cost."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "harvest_every",
"description": "Take profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled."
},
"days": {
"type": "string",
"pattern": "^[1-9]\\d{0,2}$",
"description": "How many days apart harvests are, 7 to 365, as a decimal string: \"7\" weekly, \"30\" monthly."
}
},
"required": [
"kind",
"days"
],
"description": "A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every `days` days it sells only the gain, if there is any, and the automation keeps running."
}
]
}
},
"required": [
"kind",
"input",
"quantity",
"output"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "withdraw_to_owner",
"description": "Return an asset to the account that owns the agent wallet."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
}
},
"required": [
"kind",
"input",
"quantity",
"output"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "withdraw_transfer",
"description": "Pay the exact approved destination through the provider’s chain or Intents transfer route."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
},
"recipient": {
"type": "object",
"properties": {
"rail": {
"type": "string",
"enum": [
"chain",
"intents"
],
"description": "A native blockchain transfer or a signed transfer within an Intents ledger."
},
"network": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]{0,63}$",
"description": "Exact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain."
},
"address": {
"type": "string",
"pattern": "^[\\x21-\\x7e]{1,256}$",
"description": "Exact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval."
},
"memo": {
"type": "null",
"description": "Standalone routing memos are unsupported; routing must be encoded in the approved address."
}
},
"required": [
"rail",
"network",
"address",
"memo"
],
"description": "The exact approved payout rail, network and address."
},
"minimumReceivedRaw": {
"anyOf": [
{
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$"
},
{
"type": "null"
}
],
"description": "Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor."
},
"maxFeeRaw": {
"anyOf": [
{
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$"
},
{
"type": "null"
}
],
"description": "Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced."
}
},
"required": [
"kind",
"input",
"quantity",
"output",
"recipient",
"minimumReceivedRaw",
"maxFeeRaw"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "send",
"description": "Not executable, and refused in new contracts: pay an address with withdraw_transfer."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
},
"recipient": {
"type": "object",
"properties": {
"chain": {
"type": "string",
"minLength": 1,
"maxLength": 32,
"description": "Which chain the destination address is on."
},
"address": {
"type": "string",
"pattern": "^[\\x21-\\x7e]{1,128}$",
"description": "The destination address on that chain."
}
},
"required": [
"chain",
"address"
],
"description": "The pinned destination this action pays."
}
},
"required": [
"kind",
"input",
"quantity",
"output",
"recipient"
]
}
]
},
"description": "The actions this contract authorizes, executed in order."
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When this contract's authority expires."
},
"maxExecutions": {
"type": "integer",
"minimum": 1,
"maximum": 10000,
"description": "How many times this contract may be executed before it is exhausted."
},
"maxTotalInput": {
"description": "Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.",
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The most this contract may spend of this token in total, across every execution, in the token's smallest unit."
}
},
"required": [
"tokenId",
"decimals",
"amountRaw"
],
"description": "One capped input token and its total spend ceiling."
}
},
"bounds": {
"type": "object",
"properties": {
"maxValueLossBps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss."
},
"maxSignatureLifetimeSeconds": {
"type": "integer",
"minimum": 1,
"maximum": 259500,
"description": "Explicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity."
}
},
"required": [
"maxValueLossBps",
"maxSignatureLifetimeSeconds"
],
"description": "The value-loss and signature-lifetime limits every execution must respect."
},
"execution": {
"description": "Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.",
"anyOf": [
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"ordered",
"parallel_independent"
],
"description": "Ordered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved."
},
"maxPreparationAttempts": {
"type": "integer",
"minimum": 1,
"maximum": 3,
"description": "The maximum unsigned preparation attempts for each approved action, including its first attempt."
},
"dispatchWindowSeconds": {
"type": "integer",
"minimum": 60,
"maximum": 86400,
"description": "The maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues."
}
},
"required": [
"mode",
"maxPreparationAttempts",
"dispatchWindowSeconds"
]
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "dependency_graph"
},
"dependencies": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"maxItems": 16,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 15
}
},
"description": "One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings."
},
"maxPreparationAttempts": {
"type": "integer",
"minimum": 1,
"maximum": 3,
"description": "The maximum unsigned preparation attempts for each approved action, including its first attempt."
},
"dispatchWindowSeconds": {
"type": "integer",
"minimum": 60,
"maximum": 86400,
"description": "The maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues."
}
},
"required": [
"mode",
"dependencies",
"maxPreparationAttempts",
"dispatchWindowSeconds"
]
}
]
}
},
"required": [
"type",
"actions",
"validUntil",
"maxExecutions",
"bounds"
]
},
{
"$ref": "#/components/schemas/LimitOrderContract"
},
{
"$ref": "#/components/schemas/PerpsTransferContract"
},
{
"$ref": "#/components/schemas/PerpsOrderContract"
},
{
"$ref": "#/components/schemas/PerpsCancelContract"
},
{
"$ref": "#/components/schemas/PerpsAutomationContract"
},
{
"$ref": "#/components/schemas/PerpsMarginContract"
},
{
"$ref": "#/components/schemas/PredictionFundContract"
},
{
"$ref": "#/components/schemas/SolanaBuyContract"
},
{
"$ref": "#/components/schemas/SolanaSellContract"
},
{
"$ref": "#/components/schemas/SolanaFundContract"
},
{
"$ref": "#/components/schemas/SolanaWithdrawContract"
},
{
"$ref": "#/components/schemas/PredictionOrderContract"
},
{
"$ref": "#/components/schemas/PredictionWithdrawContract"
},
{
"$ref": "#/components/schemas/CompositeContract"
},
{
"$ref": "#/components/schemas/PredictionAutomationContract"
},
{
"$ref": "#/components/schemas/SolanaSellManyContract"
},
{
"$ref": "#/components/schemas/GridContract"
},
{
"$ref": "#/components/schemas/PerpsFreedWithdrawalContract"
},
{
"$ref": "#/components/schemas/PredictionFreedWithdrawalContract"
}
],
"description": "Exact financial actions, quantity, allowance, validity and loss bounds authorized by this approval: swap actions, one limit order, one perps transfer/order/cancellation or margin change, one Polymarket funding/order/withdrawal, the exact Solana actions, or one grid's terms."
},
"policy": {
"description": "The custody worker's exact grant for these terms; clients sign it without mutation.",
"$ref": "#/components/schemas/PolicyApprovalMessage"
}
},
"required": [
"approvalId",
"fingerprint",
"tool",
"input",
"contract",
"policy"
],
"description": "The exact terms the signature covers, including the permission they grant. Shown for review; the signed `message` already contains them."
},
"message": {
"type": "string",
"description": "The text the user signs with their registered wallet or passkey. Sign it exactly as returned: a changed character makes the signature invalid."
},
"controllerId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "The user's registered wallet or passkey, the only one whose signature is accepted. Send it back unchanged beside the signature."
},
"expiresAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When the signature stops being accepted, about four and a half minutes after this was issued. Send it back unchanged beside the signature."
},
"recipient": {
"description": "NEAR wallets only: the `recipient` to pass to `signMessage` together with the message.",
"type": "string"
}
},
"required": [
"purpose",
"walletId",
"requestKey",
"request",
"message",
"controllerId",
"expiresAt"
],
"description": "What the user signs to approve a money action. Sign `message` exactly as returned and send the signature to Approve an action with `controllerId` and `expiresAt` unchanged."
},
"PolicyApprovalMessage": {
"type": "object",
"properties": {
"domain": {
"type": "string",
"const": "fin.policy.contract.v1",
"description": "Domain separation for this signed policy message."
},
"binding": {
"type": "object",
"properties": {
"network": {
"type": "string",
"enum": [
"testnet",
"mainnet"
],
"description": "The NEAR network this policy deployment serves."
},
"project_uuid": {
"type": "string",
"minLength": 1,
"description": "Stable policy deployment identifier."
},
"caller_id": {
"type": "string",
"minLength": 1,
"description": "Fin integration identity bound into consent."
}
},
"required": [
"network",
"project_uuid",
"caller_id"
],
"description": "The deployment and caller to which this consent applies."
},
"owner_id": {
"type": "string",
"pattern": "^[0-9a-f]{64}$",
"description": "SHA-256 of the canonical owner descriptor."
},
"wallet_id": {
"type": "string",
"minLength": 1,
"description": "The policy worker's wallet identity receiving this grant; the worker spends only from that wallet's own account."
},
"approval_id": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
"description": "The exact persisted approval to which this owner-signed grant belongs."
},
"nonce": {
"type": "string",
"pattern": "^[0-9a-f]{64}$",
"description": "Unique consent nonce; replay cannot create additional allowance."
},
"issued_at_ms": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991,
"description": "Consent issue time in Unix milliseconds."
},
"source": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "one_shot",
"description": "One approved request, executed by the run that asked for it."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "grid",
"description": "A standing grid grant: the cell orders its terms derive, placed by the grid engine without a run."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "automation",
"description": "A standing grant that the named automation's recorded firings may exercise."
},
"definition": {
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120,
"description": "The automation's name, as approved."
},
"prompt": {
"type": "string",
"minLength": 1,
"maxLength": 8192,
"description": "The automation's saved prompt, as approved."
},
"rule": {
"$ref": "#/components/schemas/AutomationRule"
}
},
"required": [
"name",
"prompt",
"rule"
],
"description": "The automation's exact saved definition; any edit invalidates this consent."
},
"maxSigningDelaySeconds": {
"type": "integer",
"minimum": 1,
"maximum": 86400,
"description": "The owner-approved time after the worker records a firing during which its run may obtain signatures."
},
"automationId": {
"description": "The saved automation whose edited terms the owner approves; absent for creation.",
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"definitionVersion": {
"description": "The saved definition version those edited terms authorize; absent for creation.",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"kind",
"definition",
"maxSigningDelaySeconds"
]
}
],
"description": "What this consent authorizes: one present-user request, the firings of one exact automation, or one grid's derived orders."
},
"contract": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "near_intents_transfer",
"description": "Which contract template this is."
},
"actions": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "swap",
"description": "Exchange one asset for another; custody never leaves the agent wallet."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
},
"exit": {
"description": "Optional exit guard: this action sells only when the asset's price in its output token crosses the automation's own average cost by the approved amount.",
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "take_profit",
"description": "Sell when the asset is this far ABOVE the automation's average cost."
},
"gainBps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "How far above the average cost the price must be, in basis points."
}
},
"required": [
"kind",
"gainBps"
],
"description": "A take-profit exit: sell once the price is up this much on average cost."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "stop_loss",
"description": "Sell when the asset is this far BELOW the automation's average cost."
},
"lossBps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "How far below the average cost the price must be, in basis points."
}
},
"required": [
"kind",
"lossBps"
],
"description": "A stop-loss exit: sell once the price is down this much on average cost."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "harvest_every",
"description": "Take profits on a schedule: sell only the gain every this many days, counted from the last harvest that settled, or from the first deposit that settled."
},
"days": {
"type": "string",
"pattern": "^[1-9]\\d{0,2}$",
"description": "How many days apart harvests are, 7 to 365, as a decimal string: \"7\" weekly, \"30\" monthly."
}
},
"required": [
"kind",
"days"
],
"description": "A scheduled harvest: only on a gain_of_position exit selling a curated yield vault's share token (earn_vaults). Every `days` days it sells only the gain, if there is any, and the automation keeps running."
}
]
}
},
"required": [
"kind",
"input",
"quantity",
"output"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "withdraw_to_owner",
"description": "Return an asset to the account that owns the agent wallet."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
}
},
"required": [
"kind",
"input",
"quantity",
"output"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "withdraw_transfer",
"description": "Pay the exact approved destination through the provider’s chain or Intents transfer route."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
},
"recipient": {
"type": "object",
"properties": {
"rail": {
"type": "string",
"enum": [
"chain",
"intents"
],
"description": "A native blockchain transfer or a signed transfer within an Intents ledger."
},
"network": {
"type": "string",
"pattern": "^[a-z][a-z0-9-]{0,63}$",
"description": "Exact network identifier from wallet capabilities; near-intents and near-intents-confidential are ledgers, not the NEAR blockchain."
},
"address": {
"type": "string",
"pattern": "^[\\x21-\\x7e]{1,256}$",
"description": "Exact network address, preserving case and any routing metadata encoded in its native address format. Names must be resolved before approval."
},
"memo": {
"type": "null",
"description": "Standalone routing memos are unsupported; routing must be encoded in the approved address."
}
},
"required": [
"rail",
"network",
"address",
"memo"
],
"description": "The exact approved payout rail, network and address."
},
"minimumReceivedRaw": {
"anyOf": [
{
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$"
},
{
"type": "null"
}
],
"description": "Minimum acceptable payout in output-asset atomic units, or null when the approved all-in loss bound alone sets the floor."
},
"maxFeeRaw": {
"anyOf": [
{
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$"
},
{
"type": "null"
}
],
"description": "Optional separate withdrawal fee cap in output-asset atomic units; null means undisclosed, while all-in loss and minimum receive remain enforced."
}
},
"required": [
"kind",
"input",
"quantity",
"output",
"recipient",
"minimumReceivedRaw",
"maxFeeRaw"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "send",
"description": "Not executable, and refused in new contracts: pay an address with withdraw_transfer."
},
"input": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action spends: pinned to one token, or any token the agent wallet holds."
},
"quantity": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_tokens",
"description": "Spend an exact amount of the input token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact input amount, in the input token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the input token, not its USD value: exactly 5 USDC at decimals 6 is amountRaw \"5000000\". No floating-point arithmetic or bash."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_input_value_usd",
"description": "Spend a USD-denominated value of the input token."
},
"value": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})(?:\\.\\d{1,18})?$",
"description": "The USD value to spend, as a decimal string."
}
},
"required": [
"kind",
"value"
],
"description": "A USD value of the input token: \"$5 worth of USDC\" is value \"5\", never exactly 5 USDC. The host converts it at live prices."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "exact_output_tokens",
"description": "Receive an exact amount of the output token."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The exact output amount, in the output token's smallest unit."
}
},
"required": [
"kind",
"amountRaw"
],
"description": "An exact quantity of the output token, scaled by its verified decimals; the host calculates the input."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "all_of_input",
"description": "Spend everything the agent wallet holds of the input asset."
}
},
"required": [
"kind"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_input",
"description": "Spend a fraction of the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to spend, in basis points of the input asset."
}
},
"required": [
"kind",
"bps"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "fraction_of_position",
"description": "Sell a fraction of this automation's own position in the input asset."
},
"bps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The fraction to sell, in basis points of this automation's own position; 10000 is all of it."
}
},
"required": [
"kind",
"bps"
],
"description": "A fraction of what THIS automation's own settled fills still hold of the input asset, never of the wallet balance; only on an action with an `exit` guard."
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "gain_of_position",
"description": "Sell only the gain on this automation's own position in the input asset."
}
},
"required": [
"kind"
],
"description": "Only the gain on THIS automation's own position, priced in the token its buys paid with; only with a take_profit or harvest_every `exit` guard and a pinned output other than that token."
}
],
"description": "How much moves: an exact token amount, an exact USD value, an exact output amount, all of the input, or a fraction of it."
},
"output": {
"anyOf": [
{
"type": "object",
"properties": {
"pinned": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
}
},
"required": [
"tokenId",
"decimals"
],
"description": "The exact token this asset is pinned to."
}
},
"required": [
"pinned"
]
},
{
"type": "object",
"properties": {
"any": {
"type": "boolean",
"const": true,
"description": "Any token the agent wallet holds; the executor picks one at execution."
}
},
"required": [
"any"
]
}
],
"description": "The asset this action produces: pinned to one token, or left open."
},
"recipient": {
"type": "object",
"properties": {
"chain": {
"type": "string",
"minLength": 1,
"maxLength": 32,
"description": "Which chain the destination address is on."
},
"address": {
"type": "string",
"pattern": "^[\\x21-\\x7e]{1,128}$",
"description": "The destination address on that chain."
}
},
"required": [
"chain",
"address"
],
"description": "The pinned destination this action pays."
}
},
"required": [
"kind",
"input",
"quantity",
"output",
"recipient"
]
}
]
},
"description": "The actions this contract authorizes, executed in order."
},
"validUntil": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
"description": "When this contract's authority expires."
},
"maxExecutions": {
"type": "integer",
"minimum": 1,
"maximum": 10000,
"description": "How many times this contract may be executed before it is exhausted."
},
"maxTotalInput": {
"description": "Optional total cap on what all executions together may spend, per input token, in raw units. A $500 budget paid in USDC is 500 USDC. Every action input must be pinned and capped.",
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"type": "object",
"properties": {
"tokenId": {
"type": "string",
"maxLength": 256,
"pattern": "^(?:nep141|nep245|1cs_v1):[\\x21-\\x7e]+$",
"description": "The exact ledger asset identifier, including its token standard namespace."
},
"decimals": {
"type": "integer",
"minimum": 0,
"maximum": 38,
"description": "How many decimal places the token's smallest unit represents."
},
"amountRaw": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,38})$",
"description": "The most this contract may spend of this token in total, across every execution, in the token's smallest unit."
}
},
"required": [
"tokenId",
"decimals",
"amountRaw"
],
"description": "One capped input token and its total spend ceiling."
}
},
"bounds": {
"type": "object",
"properties": {
"maxValueLossBps": {
"type": "string",
"pattern": "^(0|[1-9]\\d{0,4})$",
"description": "The most value an execution may give up to price movement and fees together, in basis points; 0 allows no loss."
},
"maxSignatureLifetimeSeconds": {
"type": "integer",
"minimum": 1,
"maximum": 259500,
"description": "Explicit maximum lifetime of each released transfer signature, in seconds. 1Click confidential swaps require up to 259500 seconds (72 hours 5 minutes). This does not extend the execution window or approval validity."
}
},
"required": [
"maxValueLossBps",
"maxSignatureLifetimeSeconds"
],
"description": "The value-loss and signature-lifetime limits every execution must respect."
},
"execution": {
"description": "Optional explicit recovery authority, signed with these exact actions and bounds; omitted on historical approvals.",
"anyOf": [
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"ordered",
"parallel_independent"
],
"description": "Ordered actions run in approved order. Parallel-independent actions run up to four concurrently after the complete initially funded request is reserved."
},
"maxPreparationAttempts": {
"type": "integer",
"minimum": 1,
"maximum": 3,
"description": "The maximum unsigned preparation attempts for each approved action, including its first attempt."
},
"dispatchWindowSeconds": {
"type": "integer",
"minimum": 60,
"maximum": 86400,
"description": "The maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues."
}
},
"required": [
"mode",
"maxPreparationAttempts",
"dispatchWindowSeconds"
]
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "dependency_graph"
},
"dependencies": {
"minItems": 1,
"maxItems": 16,
"type": "array",
"items": {
"maxItems": 16,
"type": "array",
"items": {
"type": "integer",
"minimum": 0,
"maximum": 15
}
},
"description": "One row per requested action, listing its sorted unique predecessor action indices. A successor requires confirmed predecessor settlement. Every action must be funded from initial holdings."
},
"maxPreparationAttempts": {
"type": "integer",
"minimum": 1,
"maximum": 3,
"description": "The maximum unsigned preparation attempts for each approved action, including its first attempt."
},
"dispatchWindowSeconds": {
"type": "integer",
"minimum": 60,
"maximum": 86400,
"description": "The maximum dispatch window in seconds for this operation, from when its approval opened: exactly 1200 for a new chat request, and up to its signed deadline for an automation's grant. Closing dispatch never proves a submitted transfer did not move; observation continues."
}
},
"required": [
"mode",
"dependencies",
"maxPreparationAttempts",
"dispatchWindowSeconds"
]
}
]
}
},
"required": [
"type",
"actions",
"validUntil",
"maxExecutions",
"bounds"
]
},
{
"$ref": "#/components/schemas/LimitOrderContract"
},
{
"$ref": "#/components/schemas/PerpsTransferContract"
},
{
"$ref": "#/components/schemas/PerpsOrderContract"
},
{
"$ref": "#/components/schemas/PerpsCancelContract"
},
{
"$ref": "#/components/schemas/PerpsAutomationContract"
},
{
"$ref": "#/components/schemas/PerpsMarginContract"
},
{
"$ref": "#/components/schemas/PredictionFundContract"
},
{
"$ref": "#/components/schemas/SolanaBuyContract"
},
{
"$ref": "#/components/schemas/SolanaSellContract"
},
{
"$ref": "#/components/schemas/SolanaFundContract"
},
{
"$ref": "#/components/schemas/SolanaWithdrawContract"
},
{
"$ref": "#/components/schemas/PredictionOrderContract"
},
{
"$ref": "#/components/schemas/PredictionWithdrawContract"
},
{
"$ref": "#/components/schemas/CompositeContract"
},
{
"$ref": "#/components/schemas/PredictionAutomationContract"
},
{
"$ref": "#/components/schemas/SolanaSellManyContract"
},
{
"$ref": "#/components/schemas/GridContract"
},
{
"$ref": "#/components/schemas/PerpsFreedWithdrawalContract"
},
{
"$ref": "#/components/schemas/PredictionFreedWithdrawalContract"
}
],
"description": "The exact approved authority: swap actions with their bounds, count and expiry, one limit order, one perps transfer/order/cancellation or margin change, one Polymarket funding/order/withdrawal, the exact Solana actions, or one grid."
}
},
"required": [
"domain",
"binding",
"owner_id",
"wallet_id",
"approval_id",
"nonce",
"issued_at_ms",
"source",
"contract"
],
"description": "Owner-signed authority for one exact financial contract."
},
"AutomationRule": {
"type": "object",
"properties": {
"schemaVersion": {
"type": "number",
"const": 1,
"description": "The rule schema's version; always `1`."
},
"delivery": {
"default": {
"overlap": "queue",
"maxPendingOccurrences": 100
},
"oneOf": [
{
"type": "object",
"properties": {
"overlap": {
"type": "string",
"const": "queue",
"description": "Queue a new occurrence and run it once the active one finishes."
},
"maxPendingOccurrences": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "How many occurrences may wait in the queue, not counting the one currently active, including one whose run is itself waiting on an approval."
}
},
"required": [
"overlap",
"maxPendingOccurrences"
]
},
{
"type": "object",
"properties": {
"overlap": {
"type": "string",
"const": "coalesce",
"description": "Close the occurrence already pending as `coalesced` and record the new match as a fresh occurrence, rather than queuing a second."
}
},
"required": [
"overlap"
]
},
{
"type": "object",
"properties": {
"overlap": {
"type": "string",
"const": "skip",
"description": "Drop a new match while an occurrence is already active."
}
},
"required": [
"overlap"
]
}
],
"description": "What happens when a new occurrence is ready before the previous one has finished."
},
"maxDeliveryLatenessSeconds": {
"default": 86400,
"description": "How long a new occurrence may wait to be delivered before its deadline passes and it is refused, in seconds.",
"type": "integer",
"minimum": 1,
"maximum": 86400
},
"maxEvaluationGapSeconds": {
"default": 600,
"description": "The longest gap allowed between evaluations before `firing.mode: rising_edge` treats its history as broken and waits for a fresh baseline, in seconds.",
"type": "integer",
"minimum": 1,
"maximum": 2678400
},
"wakes": {
"minItems": 1,
"maxItems": 7,
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "at",
"description": "A one-time wake at an exact moment; exhausted after that check, even if its condition is false."
},
"runAt": {
"type": "string",
"format": "date-time",
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
"description": "The exact moment this wake fires, as an ISO 8601 timestamp with an offset."
},
"misfire": {
"default": {
"mode": "latest",
"maxLatenessSeconds": null
},
"oneOf": [
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "skip",
"description": "Drop a wake the engine could not evaluate in time; wait for the next one."
},
"graceSeconds": {
"default": 5,
"description": "How late this wake may still run before it counts as missed, in seconds.",
"type": "integer",
"minimum": 1,
"maximum": 60
}
},
"required": [
"mode",
"graceSeconds"
]
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "latest",
"description": "Run once for the most recently missed wake, dropping any earlier ones."
},
"maxLatenessSeconds": {
"default": null,
"description": "How late a missed wake may still run, in seconds; null for no limit.",
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 2678400
},
{
"type": "null"
}
]
}
},
"required": [
"mode",
"maxLatenessSeconds"
]
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "all",
"description": "Run once for every missed wake, oldest first."
},
"maxLatenessSeconds": {
"default": null,
"description": "How late a missed wake may still run, in seconds; null for no limit.",
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 2678400
},
{
"type": "null"
}
]
}
},
"required": [
"mode",
"maxLatenessSeconds"
]
}
],
"description": "What happens when the engine could not evaluate this wake on time."
},
"evaluationTime": {
"default": "detection_time",
"description": "Which moment this wake is evaluated as of: `scheduled_time` the time it was due, `detection_time` when the engine actually ran it.",
"type": "string",
"enum": [
"scheduled_time",
"detection_time"
]
}
},
"required": [
"kind",
"runAt",
"misfire",
"evaluationTime"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "interval",
"description": "A wake that repeats on a fixed elapsed interval."
},
"intervalMinutes": {
"type": "integer",
"minimum": 1,
"maximum": 44640,
"description": "How often this wake repeats, in minutes."
},
"misfire": {
"default": {
"mode": "latest",
"maxLatenessSeconds": null
},
"oneOf": [
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "skip",
"description": "Drop a wake the engine could not evaluate in time; wait for the next one."
},
"graceSeconds": {
"default": 5,
"description": "How late this wake may still run before it counts as missed, in seconds.",
"type": "integer",
"minimum": 1,
"maximum": 60
}
},
"required": [
"mode",
"graceSeconds"
]
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "latest",
"description": "Run once for the most recently missed wake, dropping any earlier ones."
},
"maxLatenessSeconds": {
"default": null,
"description": "How late a missed wake may still run, in seconds; null for no limit.",
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 2678400
},
{
"type": "null"
}
]
}
},
"required": [
"mode",
"maxLatenessSeconds"
]
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "all",
"description": "Run once for every missed wake, oldest first."
},
"maxLatenessSeconds": {
"default": null,
"description": "How late a missed wake may still run, in seconds; null for no limit.",
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 2678400
},
{
"type": "null"
}
]
}
},
"required": [
"mode",
"maxLatenessSeconds"
]
}
],
"description": "What happens when the engine could not evaluate this wake on time."
},
"evaluationTime": {
"default": "detection_time",
"description": "Which moment this wake is evaluated as of: `scheduled_time` the time it was due, `detection_time` when the engine actually ran it.",
"type": "string",
"enum": [
"scheduled_time",
"detection_time"
]
}
},
"required": [
"kind",
"intervalMinutes",
"misfire",
"evaluationTime"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "calendar",
"description": "A wake on a recurring calendar schedule: local times, weekdays, months and days of the month."
},
"timeZone": {
"type": "string",
"minLength": 1,
"maxLength": 80,
"description": "The IANA time zone a calendar wake's local times are interpreted in."
},
"localTimes": {
"minItems": 1,
"maxItems": 24,
"type": "array",
"items": {
"type": "string",
"pattern": "^([01]\\d|2[0-3]):[0-5]\\d$"
},
"description": "The times of day this wake fires, each in 24-hour `HH:MM` form, in `timeZone`."
},
"weekdays": {
"default": [
1,
2,
3,
4,
5,
6,
7
],
"description": "Which ISO weekdays this wake fires on, 1 (Monday) through 7 (Sunday). Defaults to every day.",
"minItems": 1,
"maxItems": 7,
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 7
}
},
"months": {
"default": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12
],
"description": "Which months this wake fires in, 1 (January) through 12 (December). Defaults to every month.",
"minItems": 1,
"maxItems": 12,
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 12
}
},
"monthDays": {
"default": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31
],
"description": "Which days of the month this wake fires on, 1 through 31. Defaults to every day.",
"minItems": 1,
"maxItems": 31,
"type": "array",
"items": {
"type": "integer",
"minimum": 1,
"maximum": 31
}
},
"misfire": {
"default": {
"mode": "latest",
"maxLatenessSeconds": null
},
"oneOf": [
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "skip",
"description": "Drop a wake the engine could not evaluate in time; wait for the next one."
},
"graceSeconds": {
"default": 5,
"description": "How late this wake may still run before it counts as missed, in seconds.",
"type": "integer",
"minimum": 1,
"maximum": 60
}
},
"required": [
"mode",
"graceSeconds"
]
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "latest",
"description": "Run once for the most recently missed wake, dropping any earlier ones."
},
"maxLatenessSeconds": {
"default": null,
"description": "How late a missed wake may still run, in seconds; null for no limit.",
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 2678400
},
{
"type": "null"
}
]
}
},
"required": [
"mode",
"maxLatenessSeconds"
]
},
{
"type": "object",
"properties": {
"mode": {
"type": "string",
"const": "all",
"description": "Run once for every missed wake, oldest first."
},
"maxLatenessSeconds": {
"default": null,
"description": "How late a missed wake may still run, in seconds; null for no limit.",
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 2678400
},
{
"type": "null"
}
]
}
},
"required": [
"mode",
"maxLatenessSeconds"
]
}
],
"description": "What happens when the engine could not evaluate this wake on time."
},
"evaluationTime": {
"default": "detection_time",
"description": "Which moment this wake is evaluated as of: `scheduled_time` the time it was due, `detection_time` when the engine actually ran it.",
"type": "string",
"enum": [
"scheduled_time",
"detection_time"
]
}
},
"required": [
"kind",
"timeZone",
"localTimes",
"weekdays",
"months",
"monthDays",
"misfire",
"evaluationTime"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "event",
"description": "A wake evaluated each time a matching custom webhook event arrives."
},
"eventType": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z0-9_.:-]{0,79}$",
"description": "The event `type` this wake matches; a live webhook delivery of a different type is ignored before it reaches the condition."
},
"fields": {
"maxItems": 32,
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"minItems": 1,
"maxItems": 8,
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Za-z_][A-Za-z0-9_-]{0,63}$"
},
"description": "The keys to walk, in order, from an observation's top level down to this field."
},
"valueType": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "boolean",
"description": "A true/false value."
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "string",
"description": "A text value."
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "integer",
"description": "A whole-number value, compared exactly."
},
"unit": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "The unit an integer or decimal value is measured in, as the source or literal declares it."
}
},
"required": [
"type",
"unit"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "decimal",
"description": "An exact decimal value, as text, compared exactly."
},
"unit": {
"type": "string",
"minLength": 1,
"maxLength": 64,
"description": "The unit an integer or decimal value is measured in, as the source or literal declares it."
}
},
"required": [
"type",
"unit"
]
}
],
"description": "What type this field's value has, and the unit it carries when it has one."
},
"optional": {
"description": "Whether the provider may genuinely not observe this field, rather than fail to read it. When true, a missing value resolves a condition over it to `missing_field` and the rule's verdict to `unknown`, rather than zero, null or false.",
"type": "boolean"
}
},
"required": [
"path",
"valueType"
],
"description": "One data field an event or a source's observation carries: where it lives, and its type."
},
"description": "The data fields an event of this type is declared to carry."
}
},
"required": [
"kind",
"eventType",
"fields"
]
},
{
"type": "object",
"properties": {
"kind": {
"type": "string",
"const": "reader_update",
"description": "A wake evaluated each time the named reader delivers a fresh observation."
},
"binding": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z0-9_-]{0,31}$",
"description": "The binding name a rule or a plan gives one configured source."
}
},
"required": [
"kind",
"binding"
]
}
]
},
"description": "Occasions to evaluate the rule's condition: alternatives, not an AND of conditions. At most one clock and one event stream."
},
"readers": {
"maxItems": 4,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z0-9_-]{0,31}$",
"description": "The binding name a rule or a plan gives one configured source."
},
"readerId": {
"type": "string",
"pattern": "^[a-z][a-z0-9_.-]{0,79}$",
"description": "The installed source operation's id, as listed by List automation data sources."
},
"config": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/components/schemas/AutomationJsonValue"
},
"description": "Arbitrary JSON data: an event's data, a reader's configuration, or a source plan's configuration. Bounded to 16 KiB, 8 levels of nesting and 256 entries."
},
"delivery": {
"description": "Use reviewed push updates; omit for periodic snapshots.",
"type": "string",
"const": "push"
},
"pollIntervalSeconds": {
"type": "integer",
"minimum": 1,
"maximum": 2147483,
"description": "Polling cadence, or subscription lease/reconciliation cadence for push delivery, in seconds."
},
"maxAgeSeconds": {
"type": "integer",
"minimum": 1,
"maximum": 86400,
"description": "Maximum retained input age at evaluation, matching requirement.maxAgeSeconds when present. Snapshots use observation time; events use trusted receipt time. Collection separately enforces the provider's acquisition-age guarantee."
},
"requirement": {
"type": "object",
"properties": {
"maxLatencySeconds": {
"anyOf": [
{
"type": "integer",
"minimum": 1,
"maximum": 2147483
},
{
"type": "null"
}
],
"description": "The target delay between an observation and its delivery, in seconds; null when delivery has no target deadline."
},
"maxAgeSeconds": {
"type": "integer",
"minimum": 1,
"maximum": 86400,
"description": "Maximum acceptable input age at evaluation, matching the reader's maxAgeSeconds, measured from the provider's own observation time. The selected provider's acquisition guarantee must fit within this limit and does not reduce this evaluation window."
},
"allowDegradedLatency": {
"type": "boolean",
"description": "Whether delivery slower than the target delay is still accepted."
},
"maxAcceptedLatencySeconds": {
"description": "The slowest delivery still accepted, in seconds, when `allowDegradedLatency` is set.",
"type": "integer",
"minimum": 1,
"maximum": 2147483
}
},
"required": [
"maxLatencySeconds",
"maxAgeSeconds",
"allowDegradedLatency"
],
"description": "What a reader needs from its source: how fresh an answer must be, and whether a slower one is still acceptable."
}
},
"required": [
"name",
"readerId",
"config",
"pollIntervalSeconds",
"maxAgeSeconds"
]
},
"description": "The named source bindings this rule reads from, referenced by `condition` and by each `reader_update` wake's `binding`."
},
"condition": {
"description": "The rule's condition tree, up to 8 levels deep and 128 nodes total, built from five node kinds: `{op:\"bool\", value}` a fixed true/false leaf; `{op:\"compare\", comparator, left, right}` one of `eq`/`ne`/`lt`/`lte`/`gt`/`gte` between two operands — `lt`/`lte`/`gt`/`gte` require both operands to be `integer` or `decimal`, and both sides must share the same type and, for `integer`/`decimal`, the same unit; `{op:\"all\", args}` / `{op:\"any\", args}` AND/OR over one or more child nodes; `{op:\"not\", arg}` negates one child node. An operand is either `{kind:\"field\", binding, path}` — a bound reader's name and the key path into its data — or `{kind:\"literal\", type, value, unit?}` with `type` one of `boolean`/`string`/`integer`/`decimal` (`integer`/`decimal` values are exact decimal strings and carry `unit`)."
},
"exit": {
"description": "The exit watch, when this rule's automation has exit actions on its contract. Present exactly when the contract has an exit action.",
"type": "object",
"properties": {
"intervalSeconds": {
"type": "integer",
"minimum": 60,
"maximum": 2678400,
"description": "How often this automation re-checks its exit guards, in seconds; at least 60 and at most 2678400 (31 days), the same span an interval wake may cover. Recommend 300."
},
"readers": {
"type": "object",
"properties": {
"asset": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z0-9_-]{0,31}$",
"description": "The binding in `readers` that prices the asset this automation bought, in USD."
},
"quote": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z0-9_-]{0,31}$",
"description": "The binding in `readers` that prices the token this automation pays with, in USD."
}
},
"required": [
"asset",
"quote"
],
"description": "The two price bindings each exit guard is measured against; both must be the reviewed USD token-price operation."
},
"push": {
"description": "Additional push-delivered USD prices that may check exits between periodic 1Click checks.",
"type": "object",
"properties": {
"readers": {
"type": "object",
"properties": {
"asset": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z0-9_-]{0,31}$",
"description": "The binding name a rule or a plan gives one configured source."
},
"quote": {
"type": "string",
"pattern": "^[A-Za-z][A-Za-z0-9_-]{0,31}$",
"description": "The binding name a rule or a plan gives one configured source."
}
},
"required": [
"asset",
"quote"
],
"description": "The supplementary price bindings for the bought asset and its paying token."
}
},
"required": [
"readers"
]
}
},
"required": [
"intervalSeconds",
"readers"
]
},
"firing": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"each_match",
"rising_edge"
],
"description": "When a qualifying evaluation fires: `each_match` fires on every qualifying evaluation, including the first; `rising_edge` fires only on a known false-to-true transition."
},
"repeat": {
"type": "string",
"enum": [
"once",
"repeating"
],
"description": "Whether this rule fires at most once, or keeps watching after it fires."
},
"maxRuns": {
"description": "Maximum deliverable runs recorded for this automation across pauses and resumes. Missed or refused deliveries do not count; recorded runs count even if later canceled, coalesced or failed. Omit for no finite limit beyond repeat=once.",
"type": "integer",
"minimum": 1,
"maximum": 1000000
},
"initial": {
"type": "string",
"enum": [
"baseline",
"fire_if_true"
],
"description": "How `rising_edge` treats the first known state: `baseline` records it without firing, `fire_if_true` fires immediately if it is already true."
},
"cooldownSeconds": {
"type": "integer",
"minimum": 0,
"maximum": 2678400,
"description": "The minimum time between firings, in seconds; it does not require the condition to stay true that whole time. For `rising_edge`, a false-to-true edge that lands inside cooldown is discarded, not queued: it is not replayed once cooldown ends, so the rule needs an entirely fresh edge after cooldown lapses before it fires again — simply remaining true past the cooldown boundary does not trigger a firing."
}
},
"required": [
"mode",
"repeat",
"initial",
"cooldownSeconds"
],
"description": "How this rule turns a qualifying evaluation into a firing: which ones count, how often, and how many."
},
"news": {
"description": "Present only on a news exit: the owner's own words, which Fin's news judge reads new stories against. Its rule is fixed: one `news.judged` event wake, no readers, the judged condition and one firing, over a reduce-only perps contract.",
"type": "object",
"properties": {
"condition": {
"type": "string",
"minLength": 3,
"maxLength": 500,
"description": "The owner's condition in their own words, exactly as they said it, such as `right before Anthropic's IPO`. Never paraphrased: the judge reads the news against these words."
},
"match": {
"type": "string",
"minLength": 2,
"maxLength": 80,
"pattern": "^[\\p{L}\\p{N} .'&-]+$",
"description": "A few words every story the judge reads must contain in its headline or summary, such as `Anthropic IPO`: a broad filter, not the condition. The judge decides from the condition."
}
},
"required": [
"condition",
"match"
]
},
"maxSnapshotSkewSeconds": {
"type": "integer",
"minimum": 0,
"maximum": 86400,
"description": "The most that bound readers' observation times may disagree before evaluation reports `snapshot_skew`, in seconds."
}
},
"required": [
"schemaVersion",
"delivery",
"maxDeliveryLatenessSeconds",
"maxEvaluationGapSeconds",
"wakes",
"readers",
"condition",
"firing",
"maxSnapshotSkewSeconds"
],
"description": "One automation's rule: when it wakes, what condition it evaluates, and how it fires."
},
"AutomationJsonValue": {
"description": "Any JSON value: a string, number, boolean, null, array or object, nested to any depth.",
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"$ref": "#/components/schemas/AutomationJsonValue"
}
},
{
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"$ref": "#/components/schemas/AutomationJsonValue"
}
}
]
},
"ProblemDetails": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "The kind of problem as a URN, `urn:fin:error:<kind>`; stable, compare against it"
},
"title": {
"type": "string",
"description": "The kind's human title, for logs; never parse it"
},
"status": {
"type": "integer",
"minimum": 400,
"maximum": 599,
"description": "The HTTP status, repeated in the body"
},
"reason": {
"description": "The machine-readable why. One of:\n\n- `run_active` (409) — a run already holds this conversation\n- `budget_exhausted` (429) — the user's AI usage budget, or your partner account's AI spend limit, is used up until the next day or month, or an operator froze it\n- `approval_not_pending` (409) — the approval was already decided or has expired, or its id does not exist or belongs to a different conversation\n- `execution_capacity` (429) — no capacity is free to run this right now; honour `Retry-After`\n- `execution_unavailable` (503) — the service that runs the agent could not take the work; `retryable` says whether to try again\n- `stop_pending` (409) — a stop is already in progress and its cleanup is not yet confirmed\n- `automation_changed` (409) — the automation changed while this request was handled; read it again and retry\n- `automation_held` (409) — an operator holds the automation; it fires again when released\n- `automation_invalid` (409) — the automation's definition cannot run as written\n- `automation_paused` (409) — the automation is paused; resume it first\n- `automation_has_no_webhook` (409) — the automation does not run on incoming events, so it has no webhook\n- `automation_limit` (409) — the user already has as many automations as the deployment allows\n- `profile_unknown_tool` (400) — `profile.tools` names a tool this deployment does not have\n- `deployment_paused` (503) — an operator paused this kind of work for the deployment; try again later\n- `run_not_active` (409) — the run named in the path is not the conversation's live run\n- `withdrawal_changed` (409) — the request key already binds different withdrawal terms, or the current balance cannot cover the requested amount\n- `swap_changed` (409) — the swap cannot be made as asked: an asset is no longer available or the current balance cannot cover the amount; get a new quote\n- `order_changed` (409) — the order can no longer be placed as prepared: the agent wallet no longer holds the amount, an asset is no longer offered, or its minimum no longer matches the assets' precision; prepare it again\n- `prediction_order_changed` (409) — the Polymarket order can no longer be placed as signed: the market closed or stopped taking orders, its price is off the market's tick or its size off Polymarket's minimum, its fee or cost would exceed the signed caps, the Polymarket account cannot cover it, or the signature lapsed before it was placed. Nothing was placed; prepare it again\n- `solana_trade_changed` (409) — the Solana trade can no longer run as signed: the token's decimals or program changed, the agent's Solana account or holdings no longer fit it, another Solana trade is running, or the signature lapsed before it started. Nothing moved; prepare it again\n- `trade_not_recoverable` (409) — the original trade or a recovery attempt remains active or uncertain, its unfinished actions lack conclusive recovery proof, or its remaining proposal can no longer be used\n- `order_not_cancelable` (409) — the limit order can no longer be cancelled: it filled or expired, or the swap provider never took it. Read the order for where it stands\n- `grid_not_active` (409) — the grid is not running, so it cannot be paused: it is already paused, stopping or ended. Read the grid for where it stands\n- `grid_not_paused` (409) — the grid is not paused, so there is nothing to resume. Read the grid for where it stands\n- `suggestion_changed` (409) — the suggestion no longer holds: the account or the market moved since fin made it, the user set it aside, or it cannot be made where the user is now. Say it changed, and read the page's suggestions again\n- `request_key_conflict` (409) — the request identity already binds different terms; retrieve the original resource or use a new identity for a new request\n- `question_not_pending` (409) — the questionnaire has already been answered, closed, or is not awaiting this submission\n- `flag_changed` (409) — the flag's targeting changed since you read it; read it again and retry\n- `group_changed` (409) — the group changed or was deleted since you read it; read it again and retry\n- `group_in_use` (409) — a flag's rules still name this group; take it out of those rules first\n- `group_name_taken` (409) — another group already has this name\n- `agent_wallet_required` (409) — create the agent wallet before opening a perps, prediction-market or Solana account\n- `wallet_account_unsupported` (409) — the user's wallet is an Agent API wallet, whose Intents account is a 0x address this route cannot name; read it with Get wallet account, Get wallet account balances and Open a wallet account session instead\n- `conversation_deleted` (410) — the conversation was deleted; its history stays readable\n- `automation_deleted` (410) — the automation was deleted\n- `grid_ended` (410) — the grid stopped, expired or failed; it stays readable but takes no command. A new grid needs the user's approval in chat\n- `credential_expired` (401) — the user token has expired; obtain a fresh one\n- `account_disabled` (403) — an operator disabled the account\n- `perps_disabled` (403) — perps is not enabled for this user\n- `prediction_disabled` (403) — prediction-market trading is not enabled for this user\n- `solana_disabled` (403) — Solana trading is not enabled for this user\n- `no_account` (404) — the user has not opened the account this call reads; open it first\n- `not_available_in_region` (403) — perps funding is unavailable in the user's region for this request; withdrawals remain available\n- `steering_disabled` (403) — steering a working run is not turned on for this user; send the message with Start a run once the run ends\n- `baskets_disabled` (403) — idea baskets are not turned on for this user; hide the Ideas pages and their baskets\n- `basket_buying` (409) — the basket is still buying, so it cannot be deleted yet; try again once its result is in\n- `basket_awaiting_approval` (409) — an approval to buy this basket is still open; decline it in the chat, then delete the basket\n- `basket_step_not_failed` (409) — the step bought, or the basket is not partly bought, so no order can be linked to it; read the basket again\n- `basket_step_linked` (409) — another order is already linked to this step; a link is permanent, so read the basket again\n- `basket_order_not_linkable` (400) — the order cannot stand in for this step: it is not one of the step's `failures[].linkable` orders, or another basket step already holds it\n- `voice_disabled` (403) — voice input is not turned on for this user; let them type instead\n- `voice_unavailable` (503) — this deployment has no speech model, so it cannot transcribe recordings; let the user type instead\n- `provider_unavailable` (503) — an external provider the call depends on did not answer\n- `quote_refused` (400) — 1Click would not quote this request, usually an amount below what it routes or a pair it does not offer; nothing was reserved. Change the amount or the assets and quote again; for a deposit address, no address was issued, so offer another network\n- `invalid_input` (400) — the body or query failed validation; `issues` names each field\n- `internal` (500) — a fault on our side; quote `requestId` when reporting it\n- `partner_key_required` (401) — no `X-Api-Key` header was sent\n- `partner_key_invalid` (401) — the `X-Api-Key` is unknown or revoked\n- `subject_mismatch` (403) — the `{userId}` in the path is not the token's user\n- `origin_rejected` (403) — a browser `Origin` other than the configured web origin\n- `permission_required` (403) — the verified credential is not permitted to make this call\n- `signature_required` (403) — creating the agent wallet needs the user's signature: send the user's signature of `creation.message` from Get the agent wallet as `authorization`\n- `asset_not_withdrawable` (403) — tokenized stocks cannot be withdrawn; sell them first\n- `asset_not_swappable` (403) — the swap names an asset this user cannot buy or trade with this request: a tokenized stock with no `context.country`, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user's `earn` flag is off\n- `asset_not_tradable` (403) — the order names an asset this user cannot buy or trade with this request: a tokenized stock with no `context.country`, or one where tokenized stocks are not available, or bought while buying them is not enabled for the user; or a yield vault's share token bought while the user's `earn` flag is off\n- `solana_token_not_tradable` (403) — Fin won't trade this token: its mint lets someone freeze, move or charge for holdings or pause transfers, it can't be sold back, Fin couldn't read its mint, it has no reliable price, or it is wrapped SOL. A sale is refused only for what would stop it landing\n- `limit_orders_disabled` (403) — limit orders are not enabled for this user\n- `grid_trading_disabled` (403) — grid trading is not enabled for this user, so a paused grid cannot be resumed; pausing and cancelling a grid are never gated\n- `deposit_limit_exceeded` (429) — the deposit would take the agent wallet past the user's deposit limit, or, for a deposit address, the wallet has no room left under it; nothing was recorded. Read `depositLimit.availableCents` from Get balances for how much fits now, and deposit no more than that\n- `policy_change_throttled` (429) — the user's Agent API wallet changed what it allows a few minutes ago, and the NEAR Intents Agent API lets it change again only after a cooldown; nothing was asked or signed, so call again once `Retry-After` has passed\n- `agent_slippage_exceeded` (403) — the user's wallet is an Agent API wallet whose agent signs only trades that lose at most the share of their value its owner allowed (`max_slippage_bps`): fees, price and slippage together, by 1Click's own USD values at the quote's minimum output. This trade's quote loses more, states no USD value, or, before there is a quote, its loss bound is already quoted with more slippage than that (half the bound, plus 1Click's fee at the most it has been seen to take, 20 basis points, before an approval). Very small trades lose more to fixed fees; nothing was signed, so ask again with a larger amount or a smaller loss bound\n- `agent_api_orders_unavailable` (403) — the user's Agent API wallet needs wallet setup to enable limit orders, or the order exceeds this wallet's 168-hour maximum; finish wallet setup or choose at most 168 hours before trying again; nothing was approved or signed\n- `destination_not_allowed` (403) — the user's wallet is an Agent API wallet, whose agent pays a deposit only to itself, to a NEAR Intents account its owner listed (on the confidential ledger) or to an address on a chain its owner listed; allow this one with Add a withdrawal destination (one owner signature), then ask again. A public NEAR Intents account, or an address with no valid spelling on its chain, cannot be paid at all; nothing was signed\n- `rate_limited` (429) — the per-key or per-user limit is spent; honour `Retry-After`\n- `partner_request_capacity` (429) — this partner's request quota across all keys and replicas is spent; honour Retry-After\n- `partner_run_capacity` (429) — this partner's active run quota is full; honour Retry-After and reuse the same request identity\n- `stream_capacity` (429) — the partner, user or replica has no free stream capacity; honour `Retry-After`\n- `invalid_cursor` (400) — the `cursor` is not one this list minted\n- `invalid_question_answer` (400) — the questionnaire answer does not match its questions or allowed choices\n- `question_closed` (410) — the questionnaire expired or was cancelled\n- `unknown_target` (400) — a rule names a partner, group or user that does not exist, or a user outside the partners the same rule names\n- `scope_invalid` (400) — a subject in the scope is not a subject id, or appears twice\n- `subject_unsupported` (404) — a subject in the scope is not one market briefs cover; list them with List market subjects\n- `brief_not_found` (404) — no market brief job with this id was created with your partner key\n- `briefs_busy` (429) — your market briefs are at their limit of briefs generating at once; retry after `Retry-After`\n- `market_briefs_disabled` (403) — market briefs are not turned on for your partner key\n- `story_not_found` (404) — no market story with this id is current: it never was one, or Fin no longer shows it because its sources were withdrawn or its figures can no longer be read",
"type": "string",
"enum": [
"run_active",
"budget_exhausted",
"approval_not_pending",
"execution_capacity",
"execution_unavailable",
"stop_pending",
"automation_changed",
"automation_held",
"automation_invalid",
"automation_paused",
"automation_has_no_webhook",
"automation_limit",
"profile_unknown_tool",
"deployment_paused",
"run_not_active",
"withdrawal_changed",
"swap_changed",
"order_changed",
"prediction_order_changed",
"solana_trade_changed",
"trade_not_recoverable",
"order_not_cancelable",
"grid_not_active",
"grid_not_paused",
"suggestion_changed",
"request_key_conflict",
"question_not_pending",
"flag_changed",
"group_changed",
"group_in_use",
"group_name_taken",
"agent_wallet_required",
"wallet_account_unsupported",
"conversation_deleted",
"automation_deleted",
"grid_ended",
"credential_expired",
"account_disabled",
"perps_disabled",
"prediction_disabled",
"solana_disabled",
"no_account",
"not_available_in_region",
"steering_disabled",
"baskets_disabled",
"basket_buying",
"basket_awaiting_approval",
"basket_step_not_failed",
"basket_step_linked",
"basket_order_not_linkable",
"voice_disabled",
"voice_unavailable",
"provider_unavailable",
"quote_refused",
"invalid_input",
"internal",
"partner_key_required",
"partner_key_invalid",
"subject_mismatch",
"origin_rejected",
"permission_required",
"signature_required",
"asset_not_withdrawable",
"asset_not_swappable",
"asset_not_tradable",
"solana_token_not_tradable",
"limit_orders_disabled",
"grid_trading_disabled",
"deposit_limit_exceeded",
"policy_change_throttled",
"agent_slippage_exceeded",
"agent_api_orders_unavailable",
"destination_not_allowed",
"rate_limited",
"partner_request_capacity",
"partner_run_capacity",
"stream_capacity",
"invalid_cursor",
"invalid_question_answer",
"question_closed",
"unknown_target",
"scope_invalid",
"subject_unsupported",
"brief_not_found",
"briefs_busy",
"market_briefs_disabled",
"story_not_found"
]
},
"requestId": {
"type": "string",
"description": "The id Fin used for this request; quote it when reporting a problem"
},
"retryable": {
"type": "boolean",
"description": "Whether repeating the same request later can succeed without changing it"
},
"detail": {
"description": "Only on `invalid_input`: which part of the request failed validation",
"type": "string"
},
"issues": {
"description": "Only on `invalid_input`: one entry per failing field",
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "The JSON pointer of the failing field; empty for the root object"
},
"message": {
"type": "string",
"description": "Why the field failed"
}
},
"required": [
"path",
"message"
]
}
}
},
"required": [
"type",
"title",
"status",
"requestId",
"retryable"
],
"description": "RFC 9457 problem details: what every error response carries. Never a provider's message, a query or a stack."
}
},
"responses": {
"InvalidInput": {
"description": "The request could not be read as this operation expects.\n\n- `invalid_input` — the body or query failed validation; `issues` names each field\n- `invalid_cursor` — the `cursor` is not one this list minted",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"Unauthorized": {
"description": "A credential is missing, invalid or expired.\n\n- `partner_key_required` — no `X-Api-Key` header was sent\n- `partner_key_invalid` — the `X-Api-Key` is unknown or revoked\n- `credential_expired` — the user token has expired; obtain a fresh one",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"Forbidden": {
"description": "The credentials are valid but may not do this.\n\n- `subject_mismatch` — the `{userId}` in the path is not the token's user\n- `account_disabled` — an operator disabled the account\n- `origin_rejected` — a browser `Origin` other than the configured web origin\n- `permission_required` — the verified credential is not permitted to make this call",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"NotFound": {
"description": "The resource is missing, belongs to someone else, or its id is malformed: all three answer alike.",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"PayloadTooLarge": {
"description": "The body exceeds the size this deployment accepts.",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"Internal": {
"description": "A fault on our side; quote `requestId` when reporting it.\n\n- `internal` — a fault on our side; quote `requestId` when reporting it",
"content": {
"application/problem+json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
},
"securitySchemes": {
"apiKey": {
"type": "apiKey",
"in": "header",
"name": "X-Api-Key"
},
"userToken": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "fin_session_<opaque>",
"description": "A user's session token, from Create a session."
}
}
}
}