Asset Movement Report (§18, tokenId обязателен)
Интервал: 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/asset_movement?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&tokenId=example_string" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://policy-engine-rest.ezig.workers.dev/api/v1/vaults/demo_vault/reports/asset_movement?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&tokenId=example_string"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://policy-engine-rest.ezig.workers.dev/api/v1/vaults/demo_vault/reports/asset_movement?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&tokenId=example_string", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://policy-engine-rest.ezig.workers.dev/api/v1/vaults/demo_vault/reports/asset_movement?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&tokenId=example_string", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://policy-engine-rest.ezig.workers.dev/api/v1/vaults/demo_vault/reports/asset_movement?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&tokenId=example_string')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"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
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
{
"error": "Internal Server Error",
"message": "An unexpected error occurred on the server",
"code": 500,
"requestId": "req_1234567890"
}
/api/v1/vaults/{code}/reports/asset_movementTarget server for requests. Edit to use your own host.
better-auth session token. Мобилка/сервисы. Веб использует cookie.
API key (sent in cookie)
Уникальный код Vault'а (slug)
Ключи настраиваемых категорий (CSV)
Фильтр по ЗНАЧЕНИЮ поля категории: key:value, несколько условий через запятую, несколько значений одного ключа через |. Пример: ticker:EUR|USD,settlement:bank — «валюта EUR или USD И расчёт безналичный». Условия проверяются на ОДНОМ назначении категории (у операции их может быть несколько). Значения сравниваются как строки в канонизированном виде (число 84.1 при scale=2 — это "84.10"). Работает во ВСЕХ отчётах
admin: сузить до пользователя
Дополнительный разрез. 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) он игнорируется — там нет пооперационной выборки, по которой строится разрез.
Request Preview
Response
Response will appear here after sending the request
Authentication
Bearer token. better-auth session token. Мобилка/сервисы. Веб использует cookie.
API Key for authentication. Provide your API key in the cookie.
Path Parameters
Query Parameters
createdAtblockchainAtconfirmedAtdayweekmonthКлючи настраиваемых категорий (CSV)
Фильтр по ЗНАЧЕНИЮ поля категории: key:value, несколько условий через запятую, несколько значений одного ключа через |. Пример: ticker:EUR|USD,settlement:bank — «валюта EUR или USD И расчёт безналичный». Условия проверяются на ОДНОМ назначении категории (у операции их может быть несколько). Значения сравниваются как строки в канонизированном виде (число 84.1 при scale=2 — это "84.10"). Работает во ВСЕХ отчётах
ticker:EUR|USD,settlement:banktruefalsecurrenthistoricalcurrenthistoricalnoneprevious_periodprevious_yearadmin: сузить до пользователя
Дополнительный разрез. 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) он игнорируется — там нет пооперационной выборки, по которой строится разрез.
owner