ReportsAddress Activity Report (§19, addressId XOR folderId)

Address Activity Report (§19, addressId XOR folderId)

Интервал: from inclusive, to exclusive; timezone — IANA; decimal — строки. Scope: user — только свои операции; admin — Vault-wide (+?userId=).

curl -X GET "https://policy-engine-rest.ezig.workers.dev/api/v1/vaults/demo_vault/reports/address_activity?from=example_string&to=example_string&timezone=UTC&dateBasis=createdAt&groupBy=day&baseCurrency=example_string&statuses=example_string&flowTypes=example_string&tokenIds=example_string&assets=example_string&networkIds=example_string&ownAddressIds=123%20Main%20St&addressIds=123%20Main%20St&folderIds=example_string&counterpartyIds=example_string&counterpartyGroupIds=example_string&counterpartyAddressIds=123%20Main%20St&categories=example_string&categoryKeys=example_string&categoryField=ticker%3AEUR%7CUSD%2Csettlement%3Abank&initiatorIds=example_string&minimumAmount=example_string&maximumAmount=example_string&includeInternal=true&counterpartyClassification=current&folderClassification=current&comparison=none&userId=example_string&breakdownBy=owner&includeShared=true&addressId=123%20Main%20St&folderId=example_string" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "report": {
    "id": "example_string",
    "type": "example_string",
    "from": "example_string",
    "to": "example_string",
    "timezone": "example_string",
    "dateBasis": "example_string",
    "baseCurrency": "example_string",
    "classificationMode": "example_string",
    "dataCutoff": "example_string",
    "schemaVersion": "example_string",
    "generatedAt": "example_string",
    "generatedById": "example_string"
  },
  "summary": {
    "operationsCount": 3.14,
    "incomingCount": 3.14,
    "outgoingCount": 3.14,
    "incomingUsd": "example_string",
    "outgoingUsd": "example_string",
    "grossTurnoverUsd": "example_string",
    "netFlowUsd": "example_string",
    "incomingAmountByAsset": [
      {
        "tokenId": "example_string",
        "assetCode": "example_string",
        "assetSymbol": "example_string",
        "network": "example_string",
        "contractAddress": "123 Main St",
        "amount": "example_string"
      }
    ],
    "outgoingAmountByAsset": [
      {
        "tokenId": "example_string",
        "assetCode": "example_string",
        "assetSymbol": "example_string",
        "network": "example_string",
        "contractAddress": "123 Main St",
        "amount": "example_string"
      }
    ],
    "grossTurnoverByAsset": [
      {
        "tokenId": "example_string",
        "assetCode": "example_string",
        "assetSymbol": "example_string",
        "network": "example_string",
        "contractAddress": "123 Main St",
        "amount": "example_string"
      }
    ],
    "netFlowByAsset": [
      {
        "tokenId": "example_string",
        "assetCode": "example_string",
        "assetSymbol": "example_string",
        "network": "example_string",
        "contractAddress": "123 Main St",
        "amount": "example_string"
      }
    ],
    "averageAmountByAsset": [
      {
        "tokenId": "example_string",
        "assetCode": "example_string",
        "assetSymbol": "example_string",
        "network": "example_string",
        "contractAddress": "123 Main St",
        "amount": "example_string"
      }
    ],
    "medianAmountByAsset": [
      {
        "tokenId": "example_string",
        "assetCode": "example_string",
        "assetSymbol": "example_string",
        "network": "example_string",
        "contractAddress": "123 Main St",
        "amount": "example_string"
      }
    ],
    "minimumAmountByAsset": [
      {
        "tokenId": "example_string",
        "assetCode": "example_string",
        "assetSymbol": "example_string",
        "network": "example_string",
        "contractAddress": "123 Main St",
        "amount": "example_string"
      }
    ],
    "maximumAmountByAsset": [
      {
        "tokenId": "example_string",
        "assetCode": "example_string",
        "assetSymbol": "example_string",
        "network": "example_string",
        "contractAddress": "123 Main St",
        "amount": "example_string"
      }
    ],
    "confirmedCount": 3.14,
    "pendingCount": 3.14,
    "awaitingApprovalCount": 3.14,
    "rejectedCount": 3.14,
    "cancelledCount": 3.14,
    "failedCount": 3.14,
    "activeDays": 3.14,
    "firstOperationAt": "example_string",
    "lastOperationAt": "example_string"
  },
  "byAsset": [
    {
      "tokenId": "example_string",
      "assetCode": "example_string",
      "assetSymbol": "example_string",
      "network": "example_string",
      "contractAddress": "123 Main St",
      "incoming": "example_string",
      "outgoing": "example_string",
      "netFlow": "example_string",
      "grossTurnover": "example_string",
      "incomingUsd": "example_string",
      "outgoingUsd": "example_string",
      "netFlowUsd": "example_string",
      "grossTurnoverUsd": "example_string",
      "operationsCount": 3.14,
      "incomingCount": 3.14,
      "outgoingCount": 3.14,
      "averageAmount": "example_string",
      "medianAmount": "example_string",
      "minimumAmount": "example_string",
      "maximumAmount": "example_string"
    }
  ],
  "byCounterparty": [
    {
      "counterpartyId": "example_string",
      "name": "John Doe",
      "kind": "example_string",
      "incomingByAsset": [
        {
          "tokenId": "example_string",
          "assetCode": "example_string",
          "assetSymbol": "example_string",
          "network": "example_string",
          "contractAddress": "123 Main St",
          "amount": "example_string"
        }
      ],
      "outgoingByAsset": [
        {
          "tokenId": "example_string",
          "assetCode": "example_string",
          "assetSymbol": "example_string",
          "network": "example_string",
          "contractAddress": "123 Main St",
          "amount": "example_string"
        }
      ],
      "grossTurnoverUsd": "example_string",
      "netFlowUsd": "example_string",
      "operationsCount": 3.14
    }
  ],
  "byOwnAddress": [
    {
      "addressId": "123 Main St",
      "address": "123 Main St",
      "label": "example_string",
      "derivationPath": "example_string",
      "segments": {},
      "folderSnapshots": [
        "null"
      ],
      "incomingByAsset": [
        {
          "tokenId": "example_string",
          "assetCode": "example_string",
          "assetSymbol": "example_string",
          "network": "example_string",
          "contractAddress": "123 Main St",
          "amount": "example_string"
        }
      ],
      "outgoingByAsset": [
        {
          "tokenId": "example_string",
          "assetCode": "example_string",
          "assetSymbol": "example_string",
          "network": "example_string",
          "contractAddress": "123 Main St",
          "amount": "example_string"
        }
      ],
      "grossTurnoverUsd": "example_string",
      "operationsCount": 3.14
    }
  ],
  "byStatus": [
    {
      "status": "example_string",
      "count": 3.14,
      "amountsByAsset": [
        {
          "tokenId": "example_string",
          "assetCode": "example_string",
          "assetSymbol": "example_string",
          "network": "example_string",
          "contractAddress": "123 Main St",
          "amount": "example_string"
        }
      ],
      "usdValue": "example_string"
    }
  ],
  "byCategory": [
    {
      "category": "example_string",
      "count": 3.14,
      "incomingByAsset": [
        {
          "tokenId": "example_string",
          "assetCode": "example_string",
          "assetSymbol": "example_string",
          "network": "example_string",
          "contractAddress": "123 Main St",
          "amount": "example_string"
        }
      ],
      "outgoingByAsset": [
        {
          "tokenId": "example_string",
          "assetCode": "example_string",
          "assetSymbol": "example_string",
          "network": "example_string",
          "contractAddress": "123 Main St",
          "amount": "example_string"
        }
      ],
      "usdValue": "example_string"
    }
  ],
  "byAddressOwner": [
    {
      "ownerId": "example_string",
      "owner": {},
      "isMe": true,
      "operationsCount": 3.14,
      "grossTurnoverUsd": "example_string"
    }
  ],
  "timeline": [
    {
      "periodStart": "example_string",
      "periodEnd": "example_string",
      "incomingByAsset": [
        {
          "tokenId": "example_string",
          "assetCode": "example_string",
          "assetSymbol": "example_string",
          "network": "example_string",
          "contractAddress": "123 Main St",
          "amount": "example_string"
        }
      ],
      "outgoingByAsset": [
        {
          "tokenId": "example_string",
          "assetCode": "example_string",
          "assetSymbol": "example_string",
          "network": "example_string",
          "contractAddress": "123 Main St",
          "amount": "example_string"
        }
      ],
      "netFlowByAsset": [
        {
          "tokenId": "example_string",
          "assetCode": "example_string",
          "assetSymbol": "example_string",
          "network": "example_string",
          "contractAddress": "123 Main St",
          "amount": "example_string"
        }
      ],
      "incomingUsd": "example_string",
      "outgoingUsd": "example_string",
      "netFlowUsd": "example_string",
      "operationsCount": 3.14
    }
  ],
  "approvals": {
    "operationsRequiringApproval": 3.14,
    "approvedOperations": 3.14,
    "rejectedOperations": 3.14,
    "cancelledOperations": 3.14,
    "pendingOperations": 3.14,
    "averageApprovalSeconds": 3.14,
    "medianApprovalSeconds": 3.14,
    "maximumApprovalSeconds": 3.14
  },
  "observations": [
    {
      "code": "example_string",
      "severity": "example_string",
      "title": "example_string",
      "description": "example_string",
      "metric": "example_string",
      "currentValue": "example_string",
      "comparisonValue": "example_string",
      "changePercent": 3.14,
      "drilldownFilters": {}
    }
  ],
  "dataQuality": {
    "totalOperations": 3.14,
    "unmatchedOperations": 3.14,
    "retroactivelyMatchedOperations": 3.14,
    "operationsWithoutUsdRate": 3.14,
    "operationsWithoutSelectedDate": 3.14,
    "operationsWithoutBlockchainTime": 3.14,
    "operationsWithoutPaymentPurpose": 3.14,
    "operationsWithoutBusinessReference": 3.14,
    "uncategorizedOperations": 3.14,
    "conflictingCounterpartyClassifications": 3.14,
    "invalidOperationRelations": 3.14,
    "missingLedgerEntries": 3.14,
    "ledgerReconciliationDifferences": 3.14
  },
  "comparison": {
    "mode": "example_string",
    "previousFrom": "example_string",
    "previousTo": "example_string",
    "incomingUsdChangePercent": 3.14,
    "outgoingUsdChangePercent": 3.14,
    "grossTurnoverUsdChangePercent": 3.14,
    "operationsCountChangePercent": 3.14,
    "averageOperationUsdChangePercent": 3.14
  }
}
GET
/api/v1/vaults/{code}/reports/address_activity
GET
Base URLstring

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

Bearer Token
Bearer Tokenstring
Required

better-auth session token. Мобилка/сервисы. Веб использует cookie.

better-auth session token. Мобилка/сервисы. Веб использует cookie.
API Key (cookie: better-auth.session_token)
path
codestring
Required

Уникальный код Vault'а (slug)

query
dateBasisstring
Options: createdAt, blockchainAt, confirmedAt
query
groupBystring
Options: day, week, month
query
categoryKeysstring

Ключи настраиваемых категорий (CSV)

query
categoryFieldstring

Фильтр по ЗНАЧЕНИЮ поля категории: key:value, несколько условий через запятую, несколько значений одного ключа через |. Пример: ticker:EUR|USD,settlement:bank — «валюта EUR или USD И расчёт безналичный». Условия проверяются на ОДНОМ назначении категории (у операции их может быть несколько). Значения сравниваются как строки в канонизированном виде (число 84.1 при scale=2 — это "84.10"). Работает во ВСЕХ отчётах

query
includeInternalstring
Options: true, false
query
counterpartyClassificationstring
Options: current, historical
query
folderClassificationstring
Options: current, historical
query
comparisonstring
Options: none, previous_period, previous_year
query
userIdstring

admin: сузить до пользователя

query
breakdownBystring

Дополнительный разрез. owner — по ВЛАДЕЛЬЦУ нашего адреса: отвечает на вопрос «сколько из общего оборота моё, а сколько с расшаренных мне адресов». Осмысленен вместе с includeShared=true; без него разрез выродится в одну строку. Появляется блоком byAddressOwner с флагом isMe. Флаг считается от вызывающего, поэтому один и тот же отчёт у двух людей разложится по-разному — «моё» у каждого своё. ПОДДЕРЖАН НЕ ВЕЗДЕ. Параметр приходит из общей схемы фильтров, но блок byAddressOwner появляется только в отчётах, построенных на движке активности: counterparty-activity, counterparty-group-activity, transaction-activity, asset-movement, address-activity. В остальных (account-statement, operations-exceptions, approval-activity, category-analytics) он игнорируется — там нет пооперационной выборки, по которой строится разрез.

Options: owner
query
includeSharedstring

true → включить расшаренные мне адреса в scope (D6, opt-in)

Options: true, false
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. better-auth session token. Мобилка/сервисы. Веб использует cookie.

path
parameterstring
Required

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

Path Parameters

codestring
Required

Уникальный код Vault'а (slug)

Example:
demo_vault

Query Parameters

dateBasisstring
Allowed values:createdAtblockchainAtconfirmedAt
groupBystring
Allowed values:dayweekmonth
categoryKeysstring

Ключи настраиваемых категорий (CSV)

categoryFieldstring

Фильтр по ЗНАЧЕНИЮ поля категории: key:value, несколько условий через запятую, несколько значений одного ключа через |. Пример: ticker:EUR|USD,settlement:bank — «валюта EUR или USD И расчёт безналичный». Условия проверяются на ОДНОМ назначении категории (у операции их может быть несколько). Значения сравниваются как строки в канонизированном виде (число 84.1 при scale=2 — это "84.10"). Работает во ВСЕХ отчётах

Example:
ticker:EUR|USD,settlement:bank
includeInternalstring
Allowed values:truefalse
counterpartyClassificationstring
Allowed values:currenthistorical
folderClassificationstring
Allowed values:currenthistorical
comparisonstring
Allowed values:noneprevious_periodprevious_year
userIdstring

admin: сузить до пользователя

breakdownBystring

Дополнительный разрез. owner — по ВЛАДЕЛЬЦУ нашего адреса: отвечает на вопрос «сколько из общего оборота моё, а сколько с расшаренных мне адресов». Осмысленен вместе с includeShared=true; без него разрез выродится в одну строку.

Появляется блоком byAddressOwner с флагом isMe. Флаг считается от вызывающего, поэтому один и тот же отчёт у двух людей разложится по-разному — «моё» у каждого своё.

ПОДДЕРЖАН НЕ ВЕЗДЕ. Параметр приходит из общей схемы фильтров, но блок byAddressOwner появляется только в отчётах, построенных на движке активности: counterparty-activity, counterparty-group-activity, transaction-activity, asset-movement, address-activity. В остальных (account-statement, operations-exceptions, approval-activity, category-analytics) он игнорируется — там нет пооперационной выборки, по которой строится разрез.

Allowed values:owner
includeSharedstring

true → включить расшаренные мне адреса в scope (D6, opt-in)

Allowed values:truefalse

Responses

reportobject
Required
summaryobject
byAssetarray
byCounterpartyarray
byOwnAddressarray
byStatusarray
byCategoryarray
byAddressOwnerarray
timelinearray
approvalsobject
observationsarray
dataQualityobject
comparisonstring