accountUsage
Reads the units an account's draws took, by UTC day and by operation, in the current period and in the period the last renewal replaced.
Cost: Free. Signed by the owner over method
GET, path/account/v1/<address lowercased>/usageand no body (the hash of no bytes), or sent with the account's key inARCGATE-KEY. The read draws nothing.Inputs:
address(path), any letter case.Returns:
accountId,currentandprevious, eachperiodStart,periodEnd,byDay(the UTCdayas YYYY-MM-DD with itsunits, oldest first, a day with no draw absent) andbyOperation(eachoperationwith itsunits, most units first, then by name). An operation is the operationId of a keyed call (tradeSearch,tradeQuote,agentSearch,agentProfile,agentWallet) or, for a linked box's watch hit, the message type (watch.token,watch.screen,watch.agent). Draws paid from credit past the period's units are counted. A refunded draw is not.previousis null before the first renewal. A draw made in the grace after a period ended is counted in that period, even when a renewal in grace then started the next period at itsperiodEnd.Errors:
404
account_not_found: the address has no account. Create one withaccountCreate.403
key_wrong_account: the key belongs to another account than the address in the path.
Next:
accountStatus: read the units left.accountCredit: buy credit for the draws past the period's units.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | The account owner's address, any letter case. One account per address, and a signed request must be signed by it. | |
| agentSignature | No | The owner's EIP-712 signature over this request, as the AGENT-SIGNATURE, AGENT-NONCE and AGENT-EXPIRY headers carry it over HTTP. Sign the typed data `AccountRequest` (not `AgentRequest`) with fields `origin` (the API's base URL with no trailing slash: the URL this request is sent to less its path, for example `https://api.arcgate.dev`; over MCP the same, not the /mcp URL), `address` (the owner), `method`, `path`, `bodyHash`, `nonce` and `expiry`, in that order. A signature made for another deployment's origin is a 401 invalid_signature, under the domain {name: "arcgate", version: "1"} with no chainId (a wallet that can only sign with one may add the chainId of the chain this deployment serves). The `path` is the request path with the address lowercased. The `bodyHash` is the keccak256 of the canonical JSON of the body you send (sorted keys, no whitespace), or of no bytes when there is none. Each nonce is accepted once per owner. Omitting it is a 401 signature_required, never a charge. |