OperationsUnified operations feed

Unified operations feed

MY activity in the Vault as a single feed (my transfers + deposits to my addresses), by (createdAt, id) desc, keyset pagination. userId comes from the session.

Scenarios:

  • my feed: no parameters
  • my deposits for March: ?direction=in&from=2026-03-01&to=2026-04-01
  • my stuck transfers: ?direction=out&status=pending
  • awaiting MY approval (other people's transfers): ?awaitingMyApproval=true
  • movements on my address: ?addressId=... or folder: ?folderId=...
  • by counterparty group: ?counterpartyGroupId=..., by counterparty address: ?counterpartyAddressId=...
  • external/internal only: ?flowType=external|internal
  • by category/purpose from metadata: ?category=... / ?paymentPurpose=...

Each item is enriched with reporting fields (§7): operationType, flowType, usdRate/usdValue (exact snapshot), metadata. The item's shape depends on direction: out carries the status/lifecycle, in is a completed fact from the webhook.

curl -X GET "https://policy-engine-rest.ezig.workers.dev/api/v1/vaults/demo_vault/history?userId=example_string&direction=in&status=awaiting_approval&awaitingMyApproval=true&asset=usdt&tokenId=example_string&network=tron&addressId=123%20Main%20St&folderId=example_string&counterpartyId=example_string&counterpartyGroupId=example_string&counterpartyAddressId=123%20Main%20St&flowType=internal&category=example_string&paymentPurpose=example_string&decisionPolicyId=example_string&includeShared=true&txHash=example_string&from=example_string&to=example_string&limit=42&cursor=example_string" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "items": [
    {
      "direction": "example_string",
      "operationType": "transfer",
      "network": "example_string",
      "flowType": "internal",
      "usdRate": "example_string",
      "usdValue": "example_string",
      "usdRateSource": "example_string",
      "metadata": {
        "category": "example_string",
        "tags": [
          "example_string"
        ],
        "paymentPurpose": "example_string",
        "note": "example_string"
      },
      "decisionPolicyId": "example_string",
      "id": "example_string",
      "status": "example_string",
      "txHash": "example_string",
      "amount": "example_string",
      "amountDecimal": "example_string",
      "asset": "example_string",
      "assetSymbol": "example_string",
      "fee": "example_string",
      "failureReason": "example_string",
      "fromAddress": {
        "id": "example_string",
        "address": "123 Main St",
        "label": "example_string"
      },
      "toAddress": "123 Main St",
      "initiatorId": "example_string",
      "decisionPolicyCode": "example_string",
      "counterparty": {
        "id": "example_string",
        "name": "John Doe"
      },
      "approvalThreshold": 42,
      "approvalsCount": 10,
      "createdAt": "2026-07-02T11:25:15.134000Z",
      "confirmedAt": "2026-07-02T11:25:15.134000Z"
    }
  ],
  "nextCursor": "example_string"
}
GET
/api/v1/vaults/{code}/history
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

Session token. Mobile/services. The web uses a cookie.

Session token. Mobile/services. The web uses a cookie.
API Key (cookie: session_token)
session_tokenstring
Required

API key (sent in cookie)

path
codestring
Required

Unique Vault code (slug)

query
userIdstring

Admin only: whose activity to show. Without the parameter, an admin sees the ENTIRE Vault (they have no operations of their own; it's an oversight role). A non-admin can only specify themselves, otherwise 403

query
directionstring

Only deposits (in) or only transfers (out)

Options: in, out
query
statusstring

Status of outgoing items; when specified, in items are excluded

Options: awaiting_approval, pending, confirmed, failed, rejected, cancelled
query
awaitingMyApprovalstring

true → transfers awaiting MY vote (I'm in the approvers snapshot and haven't voted yet). Shows other people's transfers: the only exception to "own activity only." Implies direction=out

Options: true, false
query
tokenIdstring

Token by id from the registry (alternative to asset)

query
networkstring

Network.slug

query
addressIdstring

My address: from for out, to for in

query
folderIdstring

Operations on addresses from MY folder (address-folders)

query
counterpartyIdstring

Operations of a specific counterparty (both sides)

query
counterpartyGroupIdstring

Operations of the group's counterparties (current membership)

query
counterpartyAddressIdstring

Operations of a specific counterparty address

query
flowTypestring

internal: the other side is the Vault's own address; external: an outside party

Options: internal, external
query
categorystring

Category from OperationMetadata

query
paymentPurposestring

Payment purpose from OperationMetadata

query
decisionPolicyIdstring

Transfers decided by a specific policy (out only)

query
includeSharedstring

true → include operations on addresses shared with me (view access). By default (D6), only own activity

Options: true, false
query
txHashstring

Exact on-chain hash

query
fromstring

createdAt >= (ISO or YYYY-MM-DD)

query
tostring

createdAt <= (ISO or YYYY-MM-DD)

query
limitinteger

Page size (default 20, max 100)

Min: 1 • Max: 100
query
cursorstring

nextCursor from the previous page

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Session token. Mobile/services. The web uses a cookie.

path
parameterstring
Required

API Key for authentication. Provide your API key in the cookie.

Path Parameters

codestring
Required

Unique Vault code (slug)

Example:
demo_vault

Query Parameters

userIdstring

Admin only: whose activity to show. Without the parameter, an admin sees the ENTIRE Vault (they have no operations of their own; it's an oversight role). A non-admin can only specify themselves, otherwise 403

directionstring

Only deposits (in) or only transfers (out)

Allowed values:inout
statusstring

Status of outgoing items; when specified, in items are excluded

Allowed values:awaiting_approvalpendingconfirmedfailedrejectedcancelled
awaitingMyApprovalstring

true → transfers awaiting MY vote (I'm in the approvers snapshot and haven't voted yet). Shows other people's transfers: the only exception to "own activity only." Implies direction=out

Allowed values:truefalse
assetstring

Token code

Example:
usdt
tokenIdstring

Token by id from the registry (alternative to asset)

networkstring

Network.slug

Example:
tron
addressIdstring

My address: from for out, to for in

folderIdstring

Operations on addresses from MY folder (address-folders)

counterpartyIdstring

Operations of a specific counterparty (both sides)

counterpartyGroupIdstring

Operations of the group's counterparties (current membership)

counterpartyAddressIdstring

Operations of a specific counterparty address

flowTypestring

internal: the other side is the Vault's own address; external: an outside party

Allowed values:internalexternal
categorystring

Category from OperationMetadata

paymentPurposestring

Payment purpose from OperationMetadata

decisionPolicyIdstring

Transfers decided by a specific policy (out only)

includeSharedstring

true → include operations on addresses shared with me (view access). By default (D6), only own activity

Allowed values:truefalse
txHashstring

Exact on-chain hash

fromstring

createdAt >= (ISO or YYYY-MM-DD)

tostring

createdAt <= (ISO or YYYY-MM-DD)

limitinteger

Page size (default 20, max 100)

cursorstring

nextCursor from the previous page

Responses

itemsstring[]
Required

Sorted by (createdAt, id) desc

nextCursorstring
Required

Next page cursor; null means the end