MCPサーバー

Tokenbooks - crypto and fiat accounting and payments

io.tokenbooks/tokenbooks

このMCPでできること

Maintains double-entry accounting for crypto and fiat portfolios, including wallet synchronization, transaction classification, cost-basis lots, reconciliation, journal entries, reports, and audit-ready records.

add_wallet
Add Wallet(s) to Portfolio
Add one or more blockchain addresses and start their first sync. Omit the blockchain connection identifier (integrationId) to add an EVM 0x address on every supported EVM network; other addresses require an integrationId. This tool does not configure exchange accounts and reports which addresses were added or skipped.
外部アクセスあり
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'wallets'], 'properties': {'wallets': {'type': 'array', 'items': {'type': 'object', 'required': ['address'], 'properties': {'name': {'type': 'string', 'maxLength': 100, 'description': 'Optional wallet name'}, 'address': {'type': 'string', 'minLength': 1, 'description': 'Wallet address'}, 'integrationId': {'type': 'string', 'minLength': 1, 'description': "Integration id for chain resolution. Use 'evm' for automatic EVM chain discovery; use a specific integration id for direct chain add."}}, 'additionalProperties': False}, 'maxItems': 50, 'minItems': 1}, 'portfolioRef': {'type': 'string', 'minLength': 1, 'description': 'Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.'}, 'workspaceRef': {'type': 'string', 'minLength': 1, 'description': 'Workspace name or slug. Call list_workspaces to resolve it.'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['results', 'syncQueued'], 'properties': {'results': {'type': 'array', 'items': {'type': 'object', 'required': ['address', 'status'], 'properties': {'reason': {'type': 'string'}, 'status': {'enum': ['created', 'skipped'], 'type': 'string'}, 'address': {'type': 'string'}, 'chainRef': {'type': 'string'}}, 'additionalProperties': False}}, 'syncQueued': {'type': 'boolean'}}, 'additionalProperties': False}
apply_accounting_rules
Apply Accounting Rules
Re-run the current saved rules and default assignments for vendors, people, or organizations (counterparty defaults) across eligible existing accounting transactions; this destructive bulk job ignores unsaved edits, so preview first, then track its requestId with get_request_status.
破壊的操作あり 外部アクセスあり
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef'], 'properties': {'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['status', 'requestId'], 'properties': {'status': {'type': 'string', 'const': 'queued'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}
confirm_transaction
Confirm Portfolio Transaction
Post a proposed accounting transaction to the books; this queued action returns a requestId.
外部アクセスあり
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'transactionId'], 'properties': {'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}, 'transactionId': {'type': 'string', 'description': 'Portfolio transaction ID'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', 'oneOf': [{'type': 'object', 'required': ['status', 'requestId', 'transactionId'], 'properties': {'status': {'type': 'string', 'const': 'queued'}, 'requestId': {'type': 'string'}, 'transactionId': {'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['status', 'success', 'transactionId'], 'properties': {'error': {'type': 'object', 'required': ['name', 'message'], 'properties': {'name': {'type': 'string'}, 'message': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'type': 'string', 'const': 'completed'}, 'success': {'type': 'boolean'}, 'transactionId': {'type': 'string'}}, 'additionalProperties': False}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['status', 'transactionId'], 'properties': {'error': {'type': 'object', 'required': ['name', 'message'], 'properties': {'name': {'type': 'string'}, 'message': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'enum': ['queued', 'completed'], 'type': 'string'}, 'success': {'type': 'boolean'}, 'requestId': {'type': 'string'}, 'transactionId': {'type': 'string'}}, 'additionalProperties': False}
create_portfolio
Create Portfolio
Create an accounting portfolio in an existing workspace, optionally choosing jurisdiction and policies; Canada and US profiles require matching currency, entity type, and timezone. If no jurisdiction is selected, Tokenbooks uses generic accounting defaults. Search help for policy choices; workspace creation remains in the Tokenbooks UI.
外部アクセスあり
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'name'], 'properties': {'name': {'type': 'string', 'minLength': 1, 'description': 'Portfolio name'}, 'currency': {'type': 'string', 'pattern': '^[A-Z]{3}$', 'description': 'Functional currency (default USD)'}, 'workspaceRef': {'type': 'string', 'minLength': 1, 'description': 'Workspace name or slug. Call list_workspaces to resolve it.'}, 'legalEntityType': {'enum': ['CORPORATION', 'INDIVIDUAL', 'TRUST', 'PARTNERSHIP'], 'type': 'string', 'nullable': True, 'description': 'Legal entity classification for an explicit country profile'}, 'jurisdictionCode': {'type': 'string', 'description': 'Exact assigned ISO country code, or custom. If omitted, resolves Custom regardless of currency'}, 'reportingTimezone': {'type': 'string', 'description': 'Canonical IANA reporting timezone (default UTC)'}, 'costBasisLotMethod': {'enum': ['FIFO', 'LIFO', 'HIFO', 'ACB'], 'type': 'string', 'description': 'Lot-matching method for disposals'}, 'costBasisPerWallet': {'type': 'boolean', 'description': 'Whether acquisition lots stay scoped to each wallet'}, 'stablecoinTreatment': {'enum': ['BASE', 'ASSET'], 'type': 'string', 'description': 'Stablecoin valuation treatment; this does not change lot tracking'}, 'gasFeeAccountingTreatment': {'enum': ['DISPOSAL_AND_COST_BASIS', 'EXPENSE_ONLY'], 'type': 'string', 'description': 'Accounting treatment for gas spend'}, 'financialReportingFramework': {'enum': ['TAX_ONLY', 'US_GAAP_PRE_2025', 'US_GAAP_ASC350_60', 'IFRS_IAS38', 'IFRS_IAS38_REVAL', 'IFRS_IAS2_LCNRV', 'IFRS_IAS2_BROKER_TRADER_FVLCTS', 'ASPE', 'FRS_102', 'AASB_138', 'OTHER'], 'type': 'string', 'description': 'Financial reporting framework (default TAX_ONLY)'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['slug', 'name', 'createdAt', 'updatedAt', 'currency', 'accountingConfiguration', 'reportingTimezone'], 'properties': {'name': {'type': 'string'}, 'slug': {'type': 'string'}, 'currency': {'type': 'string'}, 'createdAt': {'type': 'string', 'format': 'date-time'}, 'updatedAt': {'type': 'string', 'format': 'date-time'}, 'legalEntityType': {'enum': ['BUSINESS', 'CORPORATION', 'INDIVIDUAL', 'TRUST', 'PARTNERSHIP'], 'type': 'string'}, 'reportingTimezone': {'type': 'string'}, 'accountingConfiguration': {'type': 'object', 'required': ['gasFeeAccountingTreatment', 'isPurchaseTaxable', 'costBasisLotMethod', 'baseCurrency', 'jurisdictionCode', 'stablecoinTreatment', 'costBasisPerWallet', 'defiDepositTreatment', 'separateIncomeExpenseLines', 'financialReportingFramework'], 'properties': {'baseCurrency': {'type': 'string'}, 'jurisdictionCode': {'type': 'string'}, 'isPurchaseTaxable': {'type': 'boolean'}, 'costBasisLotMethod': {'enum': ['FIFO', 'LIFO', 'HIFO', 'ACB'], 'type': 'string'}, 'costBasisPerWallet': {'type': 'boolean'}, 'stablecoinTreatment': {'enum': ['BASE', 'ASSET'], 'type': 'string'}, 'defiDepositTreatment': {'enum': ['TAXABLE_EXCHANGE', 'NON_TAXABLE_RESERVATION'], 'type': 'string'}, 'gasFeeAccountingTreatment': {'enum': ['DISPOSAL_AND_COST_BASIS', 'EXPENSE_ONLY'], 'type': 'string'}, 'separateIncomeExpenseLines': {'type': 'boolean'}, 'financialReportingFramework': {'enum': ['TAX_ONLY', 'US_GAAP_PRE_2025', 'US_GAAP_ASC350_60', 'IFRS_IAS38', 'IFRS_IAS38_REVAL', 'IFRS_IAS2_LCNRV', 'IFRS_IAS2_BROKER_TRADER_FVLCTS', 'ASPE', 'FRS_102', 'AASB_138', 'OTHER'], 'type': 'string', 'default': 'TAX_ONLY'}}, 'additionalProperties': False}}, 'additionalProperties': False}
edit_accounting_rules
Edit Accounting Rules
Create, update, enable/disable, reorder, or delete saved accounting rules -- the rule's whole authoring lifecycle. Pass preview: true on any of those to see the impact without saving; use operation: current to preview the saved ruleset as it stands. Results report when a scan is truncated.
破壊的操作あり 外部アクセスあり
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'operation'], 'properties': {'name': {'type': 'string', 'minLength': 1, 'description': 'Human-readable rule name, shown in the rules list. Only for operation create, update; required for operation create.'}, 'action': {'type': 'object', 'required': ['formatVersion', 'actions'], 'properties': {'actions': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['type', 'target', 'counterpartyName'], 'properties': {'type': {'enum': ['SET_COUNTERPARTY'], 'type': 'string', 'description': 'Which change this action makes.'}, 'target': {'enum': ['LINE'], 'type': 'string', 'description': 'What the change applies to: a journal line or the transaction.'}, 'counterpartyName': {'type': 'string', 'minLength': 1, 'description': 'Counterparty name, from list_journal_line_assignment_options (type: counterparty).'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['type', 'target', 'accountNumber'], 'properties': {'type': {'enum': ['SET_LEDGER_ACCOUNT'], 'type': 'string', 'description': 'Which change this action makes.'}, 'target': {'enum': ['LINE'], 'type': 'string', 'description': 'What the change applies to: a journal line or the transaction.'}, 'accountNumber': {'type': 'string', 'maxLength': 8, 'minLength': 1, 'description': 'Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account).'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['type', 'target', 'responsibilityCenterAssignments'], 'properties': {'type': {'enum': ['SET_RESPONSIBILITY_CENTERS'], 'type': 'string', 'description': 'Which change this action makes.'}, 'target': {'enum': ['LINE'], 'type': 'string', 'description': 'What the change applies to: a journal line or the transaction.'}, 'responsibilityCenterAssignments': {'type': 'array', 'items': {'type': 'object', 'required': ['responsibilityCenterTypeKey', 'responsibilityCenterName'], 'properties': {'responsibilityCenterName': {'type': 'string', 'minLength': 1, 'description': 'Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center).'}, 'responsibilityCenterTypeKey': {'type': 'string', 'pattern': '^[a-z0-9]+(_[a-z0-9]+)*$', 'description': 'Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments.'}}, 'additionalProperties': False}, 'minItems': 1}}, 'additionalProperties': False}]}, 'minItems': 1, 'description': 'What the rule changes when it matches. At most one action of each type.'}, 'formatVersion': {'enum': [1], 'type': 'number', 'description': 'Structure version of this envelope. Always 1.'}}, 'description': 'Only for operation create, update; required for operation create.', 'additionalProperties': False}, 'enabled': {'anyOf': [{'type': 'boolean', 'default': True, 'description': 'Whether the rule evaluates. A disabled rule is kept but never fires.'}, {'type': 'boolean', 'description': 'Whether the rule evaluates. A disabled rule is kept but never fires.'}], 'description': 'Whether the rule evaluates. A disabled rule is kept but never fires. Only for operation create, set_enabled; required for operation set_enabled.'}, 'preview': {'type': 'boolean', 'description': 'When true, evaluate the change and return its impact without saving it. Not for operation current.'}, 'ruleRef': {'type': 'string', 'minLength': 1, 'description': 'Saved rule handle, from list_accounting_rules. Only for operation update, set_enabled, delete; required for each.'}, 'operation': {'enum': ['create', 'update', 'set_enabled', 'reorder', 'delete', 'current'], 'type': 'string', 'description': 'create: Create a new rule, or preview creating one (preview: true). update: Change the name, conditions, or actions of an existing rule, or preview the change (preview: true). Provide at least one of name, conditions, action. set_enabled: Turn an existing rule on or off without changing it, or preview the change (preview: true). reorder: Set the evaluation order of every rule in the portfolio, or preview it (preview: true). delete: Remove one saved rule from active use, or preview removing it (preview: true). current: Preview the saved rules as they stand, changing nothing.'}, 'conditions': {'type': 'object', 'required': ['formatVersion', 'all'], 'properties': {'all': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['fromAddressLabel'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'type': 'string', 'minLength': 1, 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['equals', 'contains', 'notEquals', 'notContains'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['toAddressLabel'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'type': 'string', 'minLength': 1, 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['equals', 'contains', 'notEquals', 'notContains'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['fromAddress'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'type': 'string', 'minLength': 1, 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['equals', 'contains'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['toAddress'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'type': 'string', 'minLength': 1, 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['equals', 'contains'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['direction'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'enum': ['IN', 'OUT', 'GAS'], 'type': 'string', 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['equals', 'notEquals'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['asset'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'type': 'array', 'items': {'type': 'string', 'minLength': 1}, 'minItems': 1, 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['assetClass'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'type': 'array', 'items': {'enum': ['ERC20', 'FIAT', 'NATIVE', 'REBASE_LST', 'INTEREST_BEARING', 'VALUE_ACCRUING', 'LP_SHARE', 'DEBT', 'REFLECT', 'VOTE_ESCROWED', 'NFT'], 'type': 'string'}, 'minItems': 1, 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['stablecoin'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'type': 'boolean', 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['equals'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['chain'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'type': 'array', 'items': {'type': 'string', 'minLength': 1}, 'minItems': 1, 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['operationType'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'type': 'array', 'items': {'enum': ['DEPOSIT_FIAT', 'INCOME', 'REFUND', 'WITHDRAWAL_FIAT', 'EXPENSE', 'BUY', 'SELL', 'EXCHANGE', 'SWAP', 'MOVE', 'INTERCOMPANY_SEND', 'INTERCOMPANY_RECEIVE', 'STAKE', 'UNSTAKE', 'PROTOCOL_DEPOSIT', 'PROTOCOL_WITHDRAW', 'VAULT_DEPOSIT', 'VAULT_WITHDRAW', 'LP_IN', 'LP_OUT', 'LOAN_BORROW', 'LOAN_REPAY', 'LOAN_LIQUIDATION', 'LEND_GIVE', 'LEND_WITHDRAW', 'ADJUSTMENT', 'UNCATEGORIZED', 'SPAM'], 'type': 'string'}, 'minItems': 1, 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['accountSubType'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'type': 'array', 'items': {'enum': ['EXT', 'BNK', 'INC', 'EXP', 'LINT', 'LLIQ', 'LQLOSS', 'CLOSS', 'CBNK', 'CBAS', 'CRE', 'CGL', 'CEXP', 'CINC', 'TRADING_REVENUE', 'COGS', 'INVENTORY_VALUATION_ADJUSTMENT', 'INVENTORY_COGS_ADJUSTMENT', 'INVENTORY_WRITE_DOWN', 'INVENTORY_REMEASUREMENT_GAIN', 'INVENTORY_REMEASUREMENT_LOSS', 'CNP', 'UINC', 'UEXP', 'OFEXP', 'OFINC', 'ICINV', 'CAP', 'UNREALISED_FV_GAIN', 'UNREALISED_FV_LOSS', 'CFVA'], 'type': 'string'}, 'minItems': 1, 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}, {'oneOf': [{'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['fiatValue'], 'type': 'string', 'description': 'Condition field.'}, 'value': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$', 'description': 'Decimal fiat amount to compare against.'}, 'operator': {'enum': ['gt'], 'type': 'string', 'description': 'Comparison operator.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['fiatValue'], 'type': 'string', 'description': 'Condition field.'}, 'value': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$', 'description': 'Decimal fiat amount to compare against.'}, 'operator': {'enum': ['lt'], 'type': 'string', 'description': 'Comparison operator.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['fiatValue'], 'type': 'string', 'description': 'Condition field.'}, 'value': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$', 'description': 'Decimal fiat amount to compare against.'}, 'operator': {'enum': ['gte'], 'type': 'string', 'description': 'Comparison operator.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['fiatValue'], 'type': 'string', 'description': 'Condition field.'}, 'value': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$', 'description': 'Decimal fiat amount to compare against.'}, 'operator': {'enum': ['lte'], 'type': 'string', 'description': 'Comparison operator.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['fiatValue'], 'type': 'string', 'description': 'Condition field.'}, 'value': {'type': 'array', 'items': {'anyOf': [{'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}]}, 'maxItems': 2, 'minItems': 2, 'description': 'Inclusive [low, high] decimal-string range.'}, 'operator': {'enum': ['between'], 'type': 'string', 'description': 'Comparison operator.'}}, 'additionalProperties': False}]}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['entryType'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'enum': ['DR', 'CR'], 'type': 'string', 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['equals'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['accountType'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'type': 'array', 'items': {'enum': ['ASSET', 'LIABILITY', 'EQUITY', 'INCOME', 'EXPENSE'], 'type': 'string'}, 'minItems': 1, 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['wallet'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'type': 'array', 'items': {'type': 'object', 'required': ['chainId', 'address'], 'properties': {'address': {'type': 'string', 'minLength': 1, 'description': 'Wallet address'}, 'chainId': {'type': 'string', 'minLength': 1, 'description': 'Chain ID'}}, 'additionalProperties': False}, 'minItems': 1, 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['operator', 'field', 'value'], 'properties': {'field': {'enum': ['accountNumber'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'type': 'array', 'items': {'type': 'string', 'maxLength': 8, 'minLength': 1, 'description': 'Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account).'}, 'minItems': 1, 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'enum': ['counterparty'], 'type': 'string', 'description': 'Which part of the transaction this condition tests.'}, 'value': {'type': 'array', 'items': {'type': 'string', 'minLength': 1, 'description': 'Counterparty name, from list_journal_line_assignment_options (type: counterparty).'}, 'minItems': 1, 'description': 'The value the field is compared against.'}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string', 'description': 'How the field is compared with value.'}}, 'additionalProperties': False}]}, 'minItems': 1, 'description': 'Conditions that must all match for the rule to fire. At least one is required.'}, 'formatVersion': {'enum': [1], 'type': 'number', 'description': 'Structure version of this envelope. Always 1.'}}, 'description': 'Only for operation create, update; required for operation create.', 'additionalProperties': False}, 'maxAffected': {'type': 'integer', 'default': 10, 'maximum': 25, 'minimum': 1, 'description': 'Preview only: how many affected transactions to sample, at most 25. affectedCount in the result equals this sample size; check candidateCount for the true total match count.'}, 'portfolioRef': {'type': 'string', 'minLength': 1, 'description': 'Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.'}, 'workspaceRef': {'type': 'string', 'minLength': 1, 'description': 'Workspace name or slug. Call list_workspaces to resolve it.'}, 'orderedRuleRefs': {'type': 'array', 'items': {'type': 'string', 'minLength': 1, 'description': 'Saved rule handle, from list_accounting_rules.'}, 'minItems': 1, 'description': 'Every rule handle in the portfolio, in the order they should evaluate. Rules apply in order, so earlier rules win. Only for operation reorder; required for each.'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', 'anyOf': [{'type': 'object', 'required': ['mode'], 'properties': {'mode': {'$ref': '#/properties/mode'}, 'jobId': {'$ref': '#/properties/jobId'}, 'result': {'$ref': '#/properties/result'}, 'status': {'$ref': '#/properties/status'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['detail', 'scannedCount', 'candidateCount', 'affectedCount', 'changes'], 'properties': {'detail': {'type': 'string', 'const': 'compact'}, 'changes': {'$ref': '#/properties/changes'}, 'truncatedBy': {'$ref': '#/properties/truncatedBy'}, 'scannedCount': {'$ref': '#/properties/scannedCount'}, 'affectedCount': {'$ref': '#/properties/affectedCount'}, 'candidateCount': {'$ref': '#/properties/candidateCount'}, 'lastAffectedAt': {'$ref': '#/properties/lastAffectedAt'}, 'firstAffectedAt': {'$ref': '#/properties/firstAffectedAt'}, 'skippedRuleEvidence': {'$ref': '#/properties/skippedRuleEvidence'}}, 'additionalProperties': False}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'mode': {'enum': ['sync', 'async'], 'type': 'string'}, 'jobId': {'type': 'string'}, 'detail': {'type': 'string', 'const': 'compact'}, 'result': {'oneOf': [{'type': 'object', 'required': ['success'], 'properties': {'data': {}, 'success': {'type': 'boolean', 'const': True}}, 'additionalProperties': False}, {'type': 'object', 'required': ['success', 'error'], 'properties': {'error': {'type': 'object', 'required': ['name', 'message', 'body'], 'properties': {'body': {'anyOf': [{'type': 'object', 'required': ['usageType', 'currentUsage', 'limit'], 'properties': {'limit': {'type': 'number'}, 'usageType': {'type': 'string'}, 'currentUsage': {'type': 'number'}}, 'additionalProperties': False}, {}]}, 'name': {'type': 'string'}, 'message': {'type': 'string'}}, 'additionalProperties': False}, 'success': {'type': 'boolean', 'const': False}}, 'additionalProperties': False}]}, 'status': {'type': 'string', 'const': 'queued'}, 'changes': {'type': 'array', 'items': {'type': 'object', 'required': ['portfolioTransactionId', 'timestamp', 'lines'], 'properties': {'lines': {'type': 'array', 'items': {'type': 'object', 'required': ['lineNumber', 'responsibilityCenters', 'matchedButLost'], 'properties': {'account': {'type': 'object', 'required': ['from', 'to'], 'properties': {'to': {'type': 'string', 'maxLength': 8, 'minLength': 1}, 'from': {'type': 'string', 'maxLength': 8, 'minLength': 1}, 'byRule': {'oneOf': [{'type': 'object', 'required': ['kind', 'ruleRef', 'version'], 'properties': {'kind': {'type': 'string', 'const': 'saved'}, 'ruleRef': {'type': 'string', 'minLength': 1}, 'version': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['kind', 'label', 'version'], 'properties': {'kind': {'type': 'string', 'const': 'draft'}, 'label': {'type': 'string', 'const': 'draft'}, 'version': {'type': 'number', 'const': 1}}, 'additionalProperties': False}]}, 'lockedBy': {'enum': ['MANUAL', 'MANUAL_CLEARED', 'PAYMENT_LINK', 'SYSTEM_RULE'], 'type': 'string'}}, 'additionalProperties': False}, 'lineNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}, 'counterparty': {'type': 'object', 'properties': {'to': {'type': 'string', 'minLength': 1}, 'from': {'type': 'string', 'minLength': 1}, 'byRule': {'oneOf': [{'type': 'object', 'required': ['kind', 'ruleRef', 'version'], 'properties': {'kind': {'type': 'string', 'const': 'saved'}, 'ruleRef': {'type': 'string', 'minLength': 1}, 'version': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['kind', 'label', 'version'], 'properties': {'kind': {'type': 'string', 'const': 'draft'}, 'label': {'type': 'string', 'const': 'draft'}, 'version': {'type': 'number', 'const': 1}}, 'additionalProperties': False}]}, 'lockedBy': {'enum': ['MANUAL', 'MANUAL_CLEARED', 'PAYMENT_LINK', 'SYSTEM_RULE'], 'type': 'string'}}, 'additionalProperties': False}, 'matchedButLost': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['kind', 'ruleRef', 'version', 'output'], 'properties': {'kind': {'type': 'string', 'const': 'saved'}, 'output': {'oneOf': [{'type': 'object', 'required': ['kind'], 'properties': {'kind': {'enum': ['account', 'counterparty'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['kind', 'responsibilityCenterTypeKey'], 'properties': {'kind': {'type': 'string', 'const': 'responsibilityCenter'}, 'responsibilityCenterTypeKey': {'type': 'string', 'pattern': '^[a-z0-9]+(_[a-z0-9]+)*$'}}, 'additionalProperties': False}]}, 'ruleRef': {'type': 'string', 'minLength': 1}, 'version': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['kind', 'label', 'version', 'output'], 'properties': {'kind': {'type': 'string', 'const': 'draft'}, 'label': {'type': 'string', 'const': 'draft'}, 'output': {'oneOf': [{'type': 'object', 'required': ['kind'], 'properties': {'kind': {'enum': ['account', 'counterparty'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['kind', 'responsibilityCenterTypeKey'], 'properties': {'kind': {'type': 'string', 'const': 'responsibilityCenter'}, 'responsibilityCenterTypeKey': {'type': 'string', 'pattern': '^[a-z0-9]+(_[a-z0-9]+)*$'}}, 'additionalProperties': False}]}, 'version': {'type': 'number', 'const': 1}}, 'additionalProperties': False}]}}, 'assignmentChanged': {'type': 'boolean'}, 'responsibilityCenters': {'type': 'array', 'items': {'type': 'object', 'required': ['responsibilityCenterTypeKey'], 'properties': {'to': {'type': 'object', 'required': ['responsibilityCenterName', 'percentageBps'], 'properties': {'percentageBps': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}, 'responsibilityCenterName': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, 'from': {'type': 'object', 'required': ['responsibilityCenterName', 'percentageBps'], 'properties': {'percentageBps': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}, 'responsibilityCenterName': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, 'byRule': {'oneOf': [{'type': 'object', 'required': ['kind', 'ruleRef', 'version'], 'properties': {'kind': {'type': 'string', 'const': 'saved'}, 'ruleRef': {'type': 'string', 'minLength': 1}, 'version': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['kind', 'label', 'version'], 'properties': {'kind': {'type': 'string', 'const': 'draft'}, 'label': {'type': 'string', 'const': 'draft'}, 'version': {'type': 'number', 'const': 1}}, 'additionalProperties': False}]}, 'lockedBy': {'enum': ['MANUAL', 'MANUAL_CLEARED', 'PAYMENT_LINK', 'SYSTEM_RULE'], 'type': 'string'}, 'responsibilityCenterTypeKey': {'type': 'string', 'pattern': '^[a-z0-9]+(_[a-z0-9]+)*$'}}, 'additionalProperties': False}}}, 'additionalProperties': False}, 'minItems': 1}, 'timestamp': {'type': 'string', 'format': 'date-time'}, 'portfolioTransactionId': {'type': 'string', 'minLength': 1}, 'ruleEvaluationFailures': {'type': 'array', 'items': {'type': 'object', 'required': ['rule'], 'properties': {'rule': {'oneOf': [{'type': 'object', 'required': ['kind', 'ruleRef', 'version'], 'properties': {'kind': {'type': 'string', 'const': 'saved'}, 'ruleRef': {'type': 'string', 'minLength': 1}, 'version': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['kind', 'label', 'version'], 'properties': {'kind': {'type': 'string', 'const': 'draft'}, 'label': {'type': 'string', 'const': 'draft'}, 'version': {'type': 'number', 'const': 1}}, 'additionalProperties': False}]}, 'rejection': {'type': 'object', 'required': ['code', 'message'], 'properties': {'code': {'enum': ['ACCOUNT_FACTS_INCOMPLETE', 'ASSET_EVIDENCE_INCOMPLETE', 'CURRENCY_MISMATCH', 'WALLET_SCOPE_CONFLICT', 'WALLET_PROVENANCE_AMBIGUOUS', 'ASSET_EVIDENCE_CONFLICT', 'ASSET_EVIDENCE_MISSING', 'LOT_EVIDENCE_INCONSISTENT', 'INVALID_REPORT_CLASSIFICATION', 'CAPITAL_GAINS_LOT_EVIDENCE_REQUIRED', 'CAPITAL_LOSS_DISPOSAL_LOT_EVIDENCE_REQUIRED', 'COUNTERPARTY_NOT_SUPPORTED'], 'type': 'string'}, 'message': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}}, 'additionalProperties': False}}}, 'additionalProperties': False}, 'maxItems': 100}, 'truncatedBy': {'enum': ['affected', 'budget', 'details', 'scanned'], 'type': 'string'}, 'scannedCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'affectedCount': {'type': 'integer', 'maximum': 100, 'minimum': -9007199254740991}, 'candidateCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'lastAffectedAt': {'type': 'string', 'format': 'date-time'}, 'firstAffectedAt': {'type': 'string', 'format': 'date-time'}, 'skippedRuleEvidence': {'type': 'array', 'items': {'$ref': '#/properties/changes/items'}, 'maxItems': 2000}}, 'additionalProperties': False}
edit_transaction
Edit Transaction
Change one accounting transaction (a Portfolio Transaction): update_fields for memo, the full tag set, or operation type; update_journal_line for the ledger account, counterparty, or reporting-group assignments on one debit or credit line (read the line number first, look up selectable values with list_journal_line_assignment_options); or set_fmv_override to correct a fair market value and recompute dependent cost-basis records. Track returned requestIds, or pass waitForCompletion (update_fields, set_fmv_override) to wait for a terminal state.
外部アクセスあり
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'operation', 'transactionId'], 'properties': {'memo': {'type': 'string', 'nullable': True, 'description': 'New memo; pass null to clear it Only for operation update_fields.'}, 'tags': {'type': 'array', 'items': {'type': 'string', 'minLength': 1}, 'description': 'Replace the full set of transaction tags Only for operation update_fields.'}, 'reason': {'type': 'string', 'minLength': 1, 'description': 'Immutable root reason whose nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references Only for operation set_fmv_override.'}, 'assetId': {'type': 'string', 'minLength': 1, 'description': 'Asset ID to override (e.g. eth_1, as returned by the read tools) Only for operation set_fmv_override; required for each.'}, 'subType': {'type': 'string', 'minLength': 1, 'description': 'New operation sub-type (requires operationType) Only for operation update_fields.'}, 'operation': {'enum': ['update_fields', 'update_journal_line', 'set_fmv_override'], 'type': 'string', 'description': "update_fields: Change memo, the full tag set, or the accounting operation type. update_journal_line: Change the ledger account, counterparty, or reporting-group assignments on one transaction's debit or credit line. set_fmv_override: Set a corrected fair market value per unit for one asset on the transaction and recompute dependent cost-basis records."}, 'timeoutMs': {'type': 'integer', 'maximum': 60000, 'minimum': 1000, 'description': 'Maximum wait time in milliseconds, 1000 to 60000 (default 30000) Not for operation update_journal_line.'}, 'lineNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1, 'description': 'Journal entry line number (1-based) Only for operation update_journal_line; required for each.'}, 'quoteSource': {'type': 'string', 'minLength': 1, 'description': 'Optional source/justification for the price Only for operation set_fmv_override.'}, 'portfolioRef': {'type': 'string', 'minLength': 1, 'description': 'Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.'}, 'workspaceRef': {'type': 'string', 'minLength': 1, 'description': 'Workspace name or slug. Call list_workspaces to resolve it.'}, 'accountNumber': {'type': 'string', 'minLength': 1, 'description': 'Chart-of-accounts number to assign (from list_journal_line_assignment_options, type: ledger_account) Only for operation update_journal_line.'}, 'newValueQuote': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$', 'description': 'Exact per-unit decimal string in base currency, e.g. "0". Do not use price. Only for operation set_fmv_override; required for each.'}, 'operationType': {'enum': ['DEPOSIT_FIAT', 'INCOME', 'REFUND', 'WITHDRAWAL_FIAT', 'EXPENSE', 'BUY', 'SELL', 'EXCHANGE', 'SWAP', 'MOVE', 'INTERCOMPANY_SEND', 'INTERCOMPANY_RECEIVE', 'STAKE', 'UNSTAKE', 'PROTOCOL_DEPOSIT', 'PROTOCOL_WITHDRAW', 'VAULT_DEPOSIT', 'VAULT_WITHDRAW', 'LP_IN', 'LP_OUT', 'LOAN_BORROW', 'LOAN_REPAY', 'LOAN_LIQUIDATION', 'LEND_GIVE', 'LEND_WITHDRAW', 'ADJUSTMENT', 'UNCATEGORIZED', 'SPAM'], 'type': 'string', 'description': 'New accounting operation type Only for operation update_fields.'}, 'quoteCurrency': {'type': 'string', 'minLength': 1, 'description': 'Optional quote currency (defaults to base currency) Only for operation set_fmv_override.'}, 'transactionId': {'type': 'string', 'minLength': 1, 'description': 'Portfolio transaction ID'}, 'pollIntervalMs': {'type': 'integer', 'maximum': 5000, 'minimum': 100, 'description': 'Polling interval in milliseconds, 100 to 5000 (default 500) Not for operation update_journal_line.'}, 'counterpartyName': {'type': 'string', 'nullable': True, 'minLength': 1, 'description': 'Counterparty name to assign; pass null to unset Only for operation update_journal_line.'}, 'waitForCompletion': {'anyOf': [{'type': 'boolean', 'description': 'When true, poll queued request IDs and include terminal status/final state before returning'}, {'type': 'boolean', 'description': 'When true, poll the queued request and include terminal status/final state before returning'}], 'description': 'When true, poll queued request IDs and include terminal status/final state before returning Not for operation update_journal_line.'}, 'responsibilityCenterAssignments': {'type': 'array', 'items': {'type': 'object', 'required': ['responsibilityCenterTypeKey', 'responsibilityCenterName'], 'properties': {'responsibilityCenterName': {'type': 'string', 'minLength': 1, 'description': 'Responsibility-center name within that type'}, 'responsibilityCenterTypeKey': {'type': 'string', 'minLength': 1, 'description': 'Responsibility-center type key / dimension slug, e.g. primary, goal'}}, 'additionalProperties': False}, 'description': 'Typed responsibility-center assignment set, one per dimension. Replaces the line assignments; pass [] to clear every dimension. Type keys and center names come from list_journal_line_assignment_options, type: responsibility_center. Only for operation update_journal_line.'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', 'anyOf': [{'type': 'object', 'required': ['operation', 'transactionId', 'results'], 'properties': {'results': {'$ref': '#/properties/results'}, 'requests': {'$ref': '#/properties/requests'}, 'statuses': {'$ref': '#/properties/statuses'}, 'completed': {'$ref': '#/properties/completed'}, 'operation': {'type': 'string', 'const': 'update_fields'}, 'finalState': {'$ref': '#/properties/finalState'}, 'transactionId': {'$ref': '#/properties/transactionId'}, 'primaryRequestId': {'$ref': '#/properties/primaryRequestId'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['operation', 'transactionId', 'lineNumber', 'results'], 'properties': {'results': {'$ref': '#/properties/results'}, 'operation': {'type': 'string', 'const': 'update_journal_line'}, 'lineNumber': {'$ref': '#/properties/lineNumber'}, 'transactionId': {'$ref': '#/properties/transactionId'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['status', 'requestId', 'transactionId', 'operation'], 'properties': {'status': {'$ref': '#/properties/status'}, 'requests': {'$ref': '#/properties/requests'}, 'statuses': {'$ref': '#/properties/statuses'}, 'completed': {'$ref': '#/properties/completed'}, 'operation': {'type': 'string', 'const': 'set_fmv_override'}, 'requestId': {'$ref': '#/properties/requestId'}, 'finalState': {'$ref': '#/properties/finalState'}, 'transactionId': {'$ref': '#/properties/transactionId'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['status', 'success', 'transactionId', 'operation'], 'properties': {'error': {'$ref': '#/properties/error'}, 'status': {'$ref': '#/properties/status'}, 'success': {'$ref': '#/properties/success'}, 'operation': {'type': 'string', 'const': 'set_fmv_override'}, 'transactionId': {'$ref': '#/properties/transactionId'}}, 'additionalProperties': False}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['operation', 'transactionId'], 'properties': {'error': {'type': 'object', 'required': ['name', 'message'], 'properties': {'name': {'type': 'string'}, 'message': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'enum': ['queued', 'completed'], 'type': 'string'}, 'results': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['status', 'requestId', 'field'], 'properties': {'field': {'type': 'string'}, 'status': {'type': 'string', 'const': 'queued'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['status', 'success', 'field'], 'properties': {'error': {'type': 'object', 'required': ['name', 'message'], 'properties': {'name': {'type': 'string'}, 'message': {'type': 'string'}}, 'additionalProperties': False}, 'field': {'type': 'string'}, 'status': {'type': 'string', 'const': 'completed'}, 'success': {'type': 'boolean'}}, 'additionalProperties': False}]}}, 'success': {'type': 'boolean'}, 'requests': {'anyOf': [{'type': 'object', 'required': ['primary', 'all'], 'properties': {'all': {'type': 'array', 'items': {'anyOf': [{'type': 'object', 'required': ['field', 'requestId', 'status'], 'properties': {'field': {'type': 'string'}, 'status': {'type': 'string', 'const': 'queued'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['requestId', 'type', 'status', 'progress', 'createdAt', 'updatedAt', 'field'], 'properties': {'type': {'enum': ['sync', 'export', 'recompute', 'reclassify'], 'type': 'string'}, 'error': {'type': 'object', 'required': ['error'], 'properties': {'error': {'type': 'object', 'required': ['code', 'message', 'requestId'], 'properties': {'code': {'type': 'string'}, 'details': {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'message': {'type': 'string'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}, 'field': {'type': 'string'}, 'result': {'type': 'object', 'required': ['downloadUrl', 'fileSize', 'format'], 'properties': {'format': {'enum': ['xlsx', 'pdf', 'json'], 'type': 'string'}, 'fileSize': {'type': 'number'}, 'downloadUrl': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'enum': ['pending', 'active', 'delayed', 'completed', 'failed'], 'type': 'string'}, 'progress': {'type': 'number'}, 'createdAt': {'type': 'string', 'format': 'date-time'}, 'requestId': {'type': 'string'}, 'updatedAt': {'type': 'string', 'format': 'date-time'}, 'finishedOn': {'type': 'number'}, 'appProgress': {'type': 'object', 'required': ['completed', 'total', 'transactionsSynced'], 'properties': {'total': {'type': 'number'}, 'completed': {'type': 'number'}, 'transactionsSynced': {'type': 'number'}}, 'additionalProperties': False}, 'completedAt': {'type': 'string', 'format': 'date-time'}, 'returnValue': {}}, 'additionalProperties': False}]}}, 'primary': {'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['primary', 'all'], 'properties': {'all': {'type': 'array', 'items': {'type': 'object', 'required': ['requestId', 'type', 'status', 'progress', 'createdAt', 'updatedAt'], 'properties': {'type': {'enum': ['sync', 'export', 'recompute', 'reclassify'], 'type': 'string'}, 'error': {'type': 'object', 'required': ['error'], 'properties': {'error': {'type': 'object', 'required': ['code', 'message', 'requestId'], 'properties': {'code': {'type': 'string'}, 'details': {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'message': {'type': 'string'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}, 'result': {'type': 'object', 'required': ['downloadUrl', 'fileSize', 'format'], 'properties': {'format': {'enum': ['xlsx', 'pdf', 'json'], 'type': 'string'}, 'fileSize': {'type': 'number'}, 'downloadUrl': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'enum': ['pending', 'active', 'delayed', 'completed', 'failed'], 'type': 'string'}, 'progress': {'type': 'number'}, 'createdAt': {'type': 'string', 'format': 'date-time'}, 'requestId': {'type': 'string'}, 'updatedAt': {'type': 'string', 'format': 'date-time'}, 'finishedOn': {'type': 'number'}, 'appProgress': {'type': 'object', 'required': ['completed', 'total', 'transactionsSynced'], 'properties': {'total': {'type': 'number'}, 'completed': {'type': 'number'}, 'transactionsSynced': {'type': 'number'}}, 'additionalProperties': False}, 'completedAt': {'type': 'string', 'format': 'date-time'}, 'returnValue': {}}, 'additionalProperties': False}}, 'primary': {'type': 'string'}}, 'additionalProperties': False}]}, 'statuses': {'type': 'array', 'items': {'type': 'object', 'required': ['requestId', 'type', 'status', 'progress', 'createdAt', 'updatedAt'], 'properties': {'type': {'enum': ['sync', 'export', 'recompute', 'reclassify'], 'type': 'string'}, 'error': {'type': 'object', 'required': ['error'], 'properties': {'error': {'type': 'object', 'required': ['code', 'message', 'requestId'], 'properties': {'code': {'type': 'string'}, 'details': {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'message': {'type': 'string'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}, 'result': {'type': 'object', 'required': ['downloadUrl', 'fileSize', 'format'], 'properties': {'format': {'enum': ['xlsx', 'pdf', 'json'], 'type': 'string'}, 'fileSize': {'type': 'number'}, 'downloadUrl': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'enum': ['pending', 'active', 'delayed', 'completed', 'failed'], 'type': 'string'}, 'progress': {'type': 'number'}, 'createdAt': {'type': 'string', 'format': 'date-time'}, 'requestId': {'type': 'string'}, 'updatedAt': {'type': 'string', 'format': 'date-time'}, 'finishedOn': {'type': 'number'}, 'appProgress': {'type': 'object', 'required': ['completed', 'total', 'transactionsSynced'], 'properties': {'total': {'type': 'number'}, 'completed': {'type': 'number'}, 'transactionsSynced': {'type': 'number'}}, 'additionalProperties': False}, 'completedAt': {'type': 'string', 'format': 'date-time'}, 'returnValue': {}}, 'additionalProperties': False}}, 'completed': {'type': 'boolean'}, 'operation': {'enum': ['update_fields', 'update_journal_line', 'set_fmv_override'], 'type': 'string'}, 'requestId': {'type': 'string'}, 'finalState': {'type': 'object', 'required': ['hasError', 'errorTypes', 'suggestedAction'], 'properties': {'hasError': {'type': 'boolean'}, 'errorTypes': {'type': 'array', 'items': {'type': 'string'}}, 'operationType': {'type': 'string'}, 'suggestedAction': {}, 'classificationState': {'type': 'string'}}, 'additionalProperties': False}, 'lineNumber': {'type': 'number'}, 'transactionId': {'type': 'string'}, 'primaryRequestId': {'type': 'string'}}, 'additionalProperties': False}
full_resync
Full Resync (DANGER — wipes & rebuilds history)
DANGER: delete and rebuild the selected wallet transaction, journal, and cost-basis history from source data. Use only after the user explicitly requests this destructive reset and accepts the consequences; use incremental_sync for routine new activity.
破壊的操作あり 外部アクセスあり
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef'], 'properties': {'wallets': {'type': 'array', 'items': {'type': 'object', 'required': ['chainId', 'walletAddress'], 'properties': {'chainId': {'type': 'string', 'description': 'Exact chain ID for the wallet'}, 'walletAddress': {'type': 'string', 'description': 'Exact case-sensitive wallet address'}}, 'additionalProperties': False}, 'description': 'Optional exact wallet pairs; omit to wipe and rebuild every wallet in the portfolio'}, 'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['portfolioSlug', 'requestId'], 'properties': {'requestId': {'type': 'string'}, 'portfolioSlug': {'type': 'string'}}, 'additionalProperties': False}
get_accounting_reference
Get Accounting Reference
Look up valid accounting values—including operation types, transaction statuses, cost-basis methods, and lot event kinds—before classifying or filtering; use the returned exact values instead of guessing.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'properties': {}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['operationTypes', 'transactionStatuses', 'costBasisLotMethods', 'costBasisLotEntryKinds'], 'properties': {'operationTypes': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'description'], 'properties': {'value': {'type': 'string'}, 'description': {'type': 'string'}}, 'additionalProperties': False}}, 'costBasisLotMethods': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'description'], 'properties': {'value': {'type': 'string'}, 'description': {'type': 'string'}}, 'additionalProperties': False}}, 'transactionStatuses': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'description'], 'properties': {'value': {'type': 'string'}, 'description': {'type': 'string'}}, 'additionalProperties': False}}, 'costBasisLotEntryKinds': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'description'], 'properties': {'value': {'type': 'string'}, 'description': {'type': 'string'}}, 'additionalProperties': False}}}, 'additionalProperties': False}
get_asset_position
Get Asset Position
Summarize one cryptocurrency or token across every wallet with quantity, cost basis, market value, unrealized gain or loss, and portfolio totals. This covers wallet holdings rather than all ledger accounts; request a balance-sheet report for a complete accounting statement.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'assetRef'], 'properties': {'assetRef': {'type': 'string', 'description': 'Asset symbol or canonical asset id'}, 'includeSpam': {'type': 'boolean', 'description': 'Also match assets marked as spam'}, 'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['asset', 'currency', 'valuation', 'perWallet', 'totals'], 'properties': {'asset': {'type': 'object', 'required': ['id', 'symbol', 'name'], 'properties': {'id': {'type': 'string'}, 'name': {'type': 'string'}, 'symbol': {'type': 'string'}}, 'additionalProperties': False}, 'totals': {'type': 'object', 'required': ['quantity', 'walletCount'], 'properties': {'quantity': {'type': 'string'}, 'costBasis': {'type': 'string'}, 'marketValue': {'type': 'string'}, 'walletCount': {'type': 'number'}, 'unrealizedGainLoss': {'type': 'string'}}, 'additionalProperties': False}, 'currency': {'type': 'string'}, 'pricedAt': {'type': 'string'}, 'perWallet': {'type': 'array', 'items': {'type': 'object', 'required': ['chainRef', 'quantity'], 'properties': {'chainRef': {'type': 'string'}, 'quantity': {'type': 'string'}, 'costBasis': {'type': 'string'}, 'walletName': {'type': 'string'}, 'marketValue': {'type': 'string'}, 'walletAddress': {'type': 'string'}, 'unrealizedGainLoss': {'type': 'string'}}, 'additionalProperties': False}}, 'unitPrice': {'type': 'string'}, 'valuation': {'type': 'object', 'required': ['status'], 'properties': {'reason': {'type': 'string'}, 'source': {'enum': ['PORTFOLIO_CURRENCY', 'STABLECOIN_PEG', 'LIVE', 'LAST_CLOSE', 'HISTORICAL_CLOSE'], 'type': 'string'}, 'status': {'enum': ['PRICED', 'UNAVAILABLE'], 'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}
get_filter_options
Get Filter Options
List the available values for one portfolio filter—such as accounts, wallets, assets, transaction status, or warnings—before building a filtered query.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'filterName'], 'properties': {'mode': {'enum': ['from', 'to'], 'type': 'string', 'description': 'Address side to inspect for portfolio-transaction-addresses. Required for address filters. Use from for source addresses and to for destination addresses. Only for filterName portfolio-transaction-addresses; required for each.'}, 'filter': {'type': 'string', 'maxLength': 4000, 'description': 'Human-readable Portfolio Transactions filter expression. Only for filterName portfolio-transaction-status-counts.'}, 'search': {'type': 'string', 'description': 'Optional case-insensitive text search applied by the provider to labels, addresses, names, or other provider-owned searchable fields. Not for filterName accounts.'}, 'pageSize': {'type': 'integer', 'default': 50, 'maximum': 9007199254740991, 'minimum': 1, 'description': 'Requested number of resources to return. Oversized values are clamped to the route limit. Not for filterName accounts.'}, 'selected': {'anyOf': [{'type': 'string', 'minLength': 1, 'description': 'Stable option value that is already selected in the FilterBar. Example: from:eth-mainnet:0xabc.'}, {'type': 'array', 'items': {'type': 'string', 'minLength': 1, 'description': 'Stable option value that is already selected in the FilterBar. Example: from:eth-mainnet:0xabc.'}}], 'description': 'Already-selected option values for selected-value hydration from URL filter state. A single HTTP query value is accepted as a one-element array. Not for filterName accounts.'}, 'pageToken': {'type': 'string', 'minLength': 1, 'description': 'Opaque token returned by the previous list response. Not for filterName accounts.'}, 'filterName': {'enum': ['portfolio-transaction-addresses', 'portfolio-transaction-account-name', 'portfolio-transaction-assets', 'portfolio-transaction-counterparties', 'portfolio-transaction-wallets', 'portfolio-transaction-responsibility-centers', 'portfolio-transaction-lot-presence', 'portfolio-transaction-journal-entry-presence', 'portfolio-transaction-status-counts', 'portfolio-transaction-warnings', 'accounts'], 'type': 'string', 'description': 'Public filter option provider name.'}, 'portfolioRef': {'type': 'string', 'minLength': 1, 'description': 'Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.'}, 'workspaceRef': {'type': 'string', 'minLength': 1, 'description': 'Workspace name or slug. Call list_workspaces to resolve it.'}}, 'description': 'Flattened filter options request schema for all registered filter providers.', 'additionalProperties': False}
出力スキーマ
{'type': 'object', 'anyOf': [{'type': 'object', 'required': ['data', 'pagination', 'cacheStatus', 'revisionHash'], 'properties': {'data': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['optionKind', 'value', 'label', 'transfersCount', 'identity'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}}, 'identity': {'oneOf': [{'type': 'object', 'required': ['category', 'address'], 'properties': {'address': {'type': 'string', 'minLength': 1}, 'chainId': {'type': 'string', 'minLength': 1}, 'category': {'type': 'string', 'const': 'counterparty'}, 'chainName': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['category', 'address', 'addressBookItemType'], 'properties': {'address': {'type': 'string', 'minLength': 1}, 'category': {'type': 'string', 'const': 'addressBook'}, 'addressBookItemType': {'enum': ['CUSTOMER', 'VENDOR', 'EMPLOYEE', 'OTHER'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['category', 'address', 'walletName', 'walletType', 'childAddresses'], 'properties': {'address': {'type': 'string', 'minLength': 1}, 'chainId': {'type': 'string', 'minLength': 1}, 'category': {'type': 'string', 'const': 'wallet'}, 'chainName': {'type': 'string', 'minLength': 1}, 'walletName': {'type': 'string'}, 'walletType': {'enum': ['BLOCKCHAIN', 'EXCHANGE', 'BANK'], 'type': 'string'}, 'childAddresses': {'type': 'array', 'items': {'type': 'object', 'required': ['address', 'chainId'], 'properties': {'address': {'type': 'string', 'minLength': 1}, 'chainId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}}, 'walletOwnerPortfolio': {'type': 'object', 'required': ['slug', 'name'], 'properties': {'name': {'type': 'string', 'minLength': 1}, 'slug': {'type': 'string', 'pattern': '^[a-z0-9-]+$', 'minLength': 1}}, 'additionalProperties': False}}, 'additionalProperties': False}, {'type': 'object', 'required': ['category', 'address'], 'properties': {'address': {'type': 'string', 'minLength': 1}, 'chainId': {'type': 'string', 'minLength': 1}, 'category': {'type': 'string', 'const': 'raw'}, 'chainName': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}]}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionAddress'}, 'transfersCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'label', 'accountNumber', 'name', 'accountType', 'subType', 'currency', 'transactionCount', 'metrics'], 'properties': {'name': {'type': 'string', 'minLength': 1}, 'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'assetId': {'type': 'string', 'minLength': 1}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}, 'minItems': 1}, 'subType': {'type': 'string', 'minLength': 1}, 'currency': {'type': 'string', 'minLength': 1}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionAccountName'}, 'accountType': {'enum': ['ASSET', 'LIABILITY', 'EQUITY', 'INCOME', 'EXPENSE'], 'type': 'string'}, 'accountNumber': {'type': 'string', 'minLength': 1}, 'transactionCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'assetId', 'symbol', 'name', 'totalValue', 'quoteCurrency', 'isSpam', 'metrics'], 'properties': {'name': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'isSpam': {'type': 'boolean'}, 'symbol': {'type': 'string', 'minLength': 1}, 'assetId': {'type': 'string', 'minLength': 1}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionAsset'}, 'totalValue': {'type': 'string', 'pattern': '^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$'}, 'quoteCurrency': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'label', 'name', 'counterpartyId', 'lineCount', 'metrics'], 'properties': {'name': {'type': 'string', 'minLength': 1}, 'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}, 'minItems': 1}, 'lineCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionCounterparty'}, 'counterpartyId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'chainId', 'address', 'displayName', 'chainName', 'walletType', 'operationsCount', 'tokenCount', 'isBalanceMatch'], 'properties': {'value': {'type': 'string', 'minLength': 1}, 'address': {'type': 'string', 'minLength': 1}, 'chainId': {'type': 'string', 'minLength': 1}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}}, 'chainName': {'type': 'string', 'minLength': 1}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionWallet'}, 'tokenCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'valueQuote': {'type': 'string', 'minLength': 1}, 'walletType': {'enum': ['BLOCKCHAIN', 'EXCHANGE', 'BANK'], 'type': 'string'}, 'displayName': {'type': 'string', 'minLength': 1}, 'isBalanceMatch': {'type': 'boolean'}, 'operationsCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'lastTransactionTimestamp': {'type': 'string', 'format': 'date-time'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'label', 'responsibilityCenterName', 'responsibilityCenterTypeKey', 'responsibilityCenterTypeName', 'responsibilityCenterKind', 'transactionCount', 'metrics'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}, 'minItems': 1}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionResponsibilityCenter'}, 'transactionCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'responsibilityCenterCode': {'type': 'string', 'minLength': 1}, 'responsibilityCenterKind': {'enum': ['COST', 'REVENUE', 'PROFIT', 'INVESTMENT'], 'type': 'string'}, 'responsibilityCenterName': {'type': 'string', 'minLength': 1}, 'responsibilityCenterTypeKey': {'type': 'string', 'pattern': '^[a-z0-9]+(_[a-z0-9]+)*$'}, 'responsibilityCenterTypeName': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'label', 'transactionCount', 'metrics'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['withLots', 'withoutLots'], 'type': 'string'}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionLotPresence'}, 'transactionCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'label', 'transactionCount', 'metrics'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['withJournalEntries', 'withoutJournalEntries'], 'type': 'string'}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionJournalEntryPresence'}, 'transactionCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'label', 'transactionCount', 'metrics'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['PROPOSED', 'ERROR', 'POSTED', 'CLOSED'], 'type': 'string'}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionStatusCount'}, 'transactionCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'label', 'transactionCount', 'metrics'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}, 'minItems': 1}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionWarning'}, 'transactionCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}]}}, 'pagination': {'type': 'object', 'required': ['pageSize'], 'properties': {'pageSize': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}, 'nextPageToken': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, 'cacheStatus': {'enum': ['hit', 'miss', 'stale', 'bypass'], 'type': 'string'}, 'revisionHash': {'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['accountNumbers', 'accountTypes', 'subTypes', 'normalBalanceTypes', 'wallets', 'includeNoWallet', 'assets', 'currencies', 'statuses', 'paymentLabelStates', 'hierarchy', 'origins', 'cacheStatus', 'revisionHash'], 'properties': {'assets': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label', 'assetId', 'symbol'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'symbol': {'type': 'string', 'minLength': 1}, 'assetId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}}, 'origins': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['SYSTEM_MANAGED', 'SYSTEM_DEFAULT', 'USER_MANAGED'], 'type': 'string'}}, 'additionalProperties': False}}, 'wallets': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label', 'chainId', 'address', 'name'], 'properties': {'name': {'type': 'string'}, 'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'address': {'type': 'string', 'minLength': 1}, 'chainId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}}, 'statuses': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['active', 'archived'], 'type': 'string'}}, 'additionalProperties': False}}, 'subTypes': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}}, 'hierarchy': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['parent', 'leaf'], 'type': 'string'}}, 'additionalProperties': False}}, 'currencies': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label', 'assetId', 'symbol'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'symbol': {'type': 'string', 'minLength': 1}, 'assetId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}}, 'cacheStatus': {'enum': ['hit', 'miss', 'stale', 'bypass'], 'type': 'string'}, 'accountTypes': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['ASSET', 'LIABILITY', 'EQUITY', 'INCOME', 'EXPENSE'], 'type': 'string'}}, 'additionalProperties': False}}, 'revisionHash': {'type': 'string'}, 'accountNumbers': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label', 'accountNumber', 'name'], 'properties': {'name': {'type': 'string', 'minLength': 1}, 'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'accountNumber': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}}, 'includeNoWallet': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'const': 'No wallet'}, 'value': {'type': 'string', 'const': 'noWallet'}}, 'additionalProperties': False}, 'normalBalanceTypes': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['DR', 'CR'], 'type': 'string'}}, 'additionalProperties': False}}, 'paymentLabelStates': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['withLabel', 'withoutLabel'], 'type': 'string'}}, 'additionalProperties': False}}}, 'additionalProperties': False}, {'type': 'object', 'required': ['data', 'pagination', 'cacheStatus', 'revisionHash'], 'properties': {'data': {'type': 'array', 'items': {}, 'maxItems': 0, 'minItems': 0}, 'pagination': {'type': 'object', 'required': ['pageSize'], 'properties': {'pageSize': {'type': 'number'}}, 'additionalProperties': False}, 'cacheStatus': {'type': 'string', 'const': 'hit'}, 'revisionHash': {'type': 'string'}}, 'additionalProperties': False}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['cacheStatus', 'revisionHash'], 'properties': {'data': {'anyOf': [{'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['optionKind', 'value', 'label', 'transfersCount', 'identity'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}}, 'identity': {'oneOf': [{'type': 'object', 'required': ['category', 'address'], 'properties': {'address': {'type': 'string', 'minLength': 1}, 'chainId': {'type': 'string', 'minLength': 1}, 'category': {'type': 'string', 'const': 'counterparty'}, 'chainName': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['category', 'address', 'addressBookItemType'], 'properties': {'address': {'type': 'string', 'minLength': 1}, 'category': {'type': 'string', 'const': 'addressBook'}, 'addressBookItemType': {'enum': ['CUSTOMER', 'VENDOR', 'EMPLOYEE', 'OTHER'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['category', 'address', 'walletName', 'walletType', 'childAddresses'], 'properties': {'address': {'type': 'string', 'minLength': 1}, 'chainId': {'type': 'string', 'minLength': 1}, 'category': {'type': 'string', 'const': 'wallet'}, 'chainName': {'type': 'string', 'minLength': 1}, 'walletName': {'type': 'string'}, 'walletType': {'enum': ['BLOCKCHAIN', 'EXCHANGE', 'BANK'], 'type': 'string'}, 'childAddresses': {'type': 'array', 'items': {'type': 'object', 'required': ['address', 'chainId'], 'properties': {'address': {'type': 'string', 'minLength': 1}, 'chainId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}}, 'walletOwnerPortfolio': {'type': 'object', 'required': ['slug', 'name'], 'properties': {'name': {'type': 'string', 'minLength': 1}, 'slug': {'type': 'string', 'pattern': '^[a-z0-9-]+$', 'minLength': 1}}, 'additionalProperties': False}}, 'additionalProperties': False}, {'type': 'object', 'required': ['category', 'address'], 'properties': {'address': {'type': 'string', 'minLength': 1}, 'chainId': {'type': 'string', 'minLength': 1}, 'category': {'type': 'string', 'const': 'raw'}, 'chainName': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}]}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionAddress'}, 'transfersCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'label', 'accountNumber', 'name', 'accountType', 'subType', 'currency', 'transactionCount', 'metrics'], 'properties': {'name': {'type': 'string', 'minLength': 1}, 'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'assetId': {'type': 'string', 'minLength': 1}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}, 'minItems': 1}, 'subType': {'type': 'string', 'minLength': 1}, 'currency': {'type': 'string', 'minLength': 1}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionAccountName'}, 'accountType': {'enum': ['ASSET', 'LIABILITY', 'EQUITY', 'INCOME', 'EXPENSE'], 'type': 'string'}, 'accountNumber': {'type': 'string', 'minLength': 1}, 'transactionCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'assetId', 'symbol', 'name', 'totalValue', 'quoteCurrency', 'isSpam', 'metrics'], 'properties': {'name': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'isSpam': {'type': 'boolean'}, 'symbol': {'type': 'string', 'minLength': 1}, 'assetId': {'type': 'string', 'minLength': 1}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionAsset'}, 'totalValue': {'type': 'string', 'pattern': '^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$'}, 'quoteCurrency': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'label', 'name', 'counterpartyId', 'lineCount', 'metrics'], 'properties': {'name': {'type': 'string', 'minLength': 1}, 'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}, 'minItems': 1}, 'lineCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionCounterparty'}, 'counterpartyId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'chainId', 'address', 'displayName', 'chainName', 'walletType', 'operationsCount', 'tokenCount', 'isBalanceMatch'], 'properties': {'value': {'type': 'string', 'minLength': 1}, 'address': {'type': 'string', 'minLength': 1}, 'chainId': {'type': 'string', 'minLength': 1}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}}, 'chainName': {'type': 'string', 'minLength': 1}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionWallet'}, 'tokenCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'valueQuote': {'type': 'string', 'minLength': 1}, 'walletType': {'enum': ['BLOCKCHAIN', 'EXCHANGE', 'BANK'], 'type': 'string'}, 'displayName': {'type': 'string', 'minLength': 1}, 'isBalanceMatch': {'type': 'boolean'}, 'operationsCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'lastTransactionTimestamp': {'type': 'string', 'format': 'date-time'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'label', 'responsibilityCenterName', 'responsibilityCenterTypeKey', 'responsibilityCenterTypeName', 'responsibilityCenterKind', 'transactionCount', 'metrics'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}, 'minItems': 1}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionResponsibilityCenter'}, 'transactionCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'responsibilityCenterCode': {'type': 'string', 'minLength': 1}, 'responsibilityCenterKind': {'enum': ['COST', 'REVENUE', 'PROFIT', 'INVESTMENT'], 'type': 'string'}, 'responsibilityCenterName': {'type': 'string', 'minLength': 1}, 'responsibilityCenterTypeKey': {'type': 'string', 'pattern': '^[a-z0-9]+(_[a-z0-9]+)*$'}, 'responsibilityCenterTypeName': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'label', 'transactionCount', 'metrics'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['withLots', 'withoutLots'], 'type': 'string'}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionLotPresence'}, 'transactionCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'label', 'transactionCount', 'metrics'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['withJournalEntries', 'withoutJournalEntries'], 'type': 'string'}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionJournalEntryPresence'}, 'transactionCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'label', 'transactionCount', 'metrics'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['PROPOSED', 'ERROR', 'POSTED', 'CLOSED'], 'type': 'string'}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionStatusCount'}, 'transactionCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}, {'type': 'object', 'required': ['optionKind', 'value', 'label', 'transactionCount', 'metrics'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'metrics': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'count'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'currency'], 'properties': {'value': {'type': 'string'}, 'currency': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'money'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['metricKind', 'value', 'unit'], 'properties': {'unit': {'type': 'string', 'const': '%'}, 'value': {'type': 'string'}, 'metricKind': {'type': 'string', 'const': 'percentage'}}, 'additionalProperties': False}]}, 'minItems': 1}, 'optionKind': {'type': 'string', 'const': 'portfolioTransactionWarning'}, 'transactionCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}]}}, {'type': 'array', 'items': {}, 'maxItems': 0, 'minItems': 0}]}, 'assets': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label', 'assetId', 'symbol'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'symbol': {'type': 'string', 'minLength': 1}, 'assetId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}}, 'origins': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['SYSTEM_MANAGED', 'SYSTEM_DEFAULT', 'USER_MANAGED'], 'type': 'string'}}, 'additionalProperties': False}}, 'wallets': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label', 'chainId', 'address', 'name'], 'properties': {'name': {'type': 'string'}, 'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'address': {'type': 'string', 'minLength': 1}, 'chainId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}}, 'statuses': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['active', 'archived'], 'type': 'string'}}, 'additionalProperties': False}}, 'subTypes': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}}, 'hierarchy': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['parent', 'leaf'], 'type': 'string'}}, 'additionalProperties': False}}, 'currencies': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label', 'assetId', 'symbol'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'symbol': {'type': 'string', 'minLength': 1}, 'assetId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}}, 'pagination': {'anyOf': [{'type': 'object', 'required': ['pageSize'], 'properties': {'pageSize': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}, 'nextPageToken': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['pageSize'], 'properties': {'pageSize': {'type': 'number'}}, 'additionalProperties': False}]}, 'cacheStatus': {'enum': ['hit', 'miss', 'stale', 'bypass'], 'type': 'string'}, 'accountTypes': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['ASSET', 'LIABILITY', 'EQUITY', 'INCOME', 'EXPENSE'], 'type': 'string'}}, 'additionalProperties': False}}, 'revisionHash': {'type': 'string'}, 'accountNumbers': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label', 'accountNumber', 'name'], 'properties': {'name': {'type': 'string', 'minLength': 1}, 'label': {'type': 'string', 'minLength': 1}, 'value': {'type': 'string', 'minLength': 1}, 'accountNumber': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}}, 'includeNoWallet': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'const': 'No wallet'}, 'value': {'type': 'string', 'const': 'noWallet'}}, 'additionalProperties': False}, 'normalBalanceTypes': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['DR', 'CR'], 'type': 'string'}}, 'additionalProperties': False}}, 'paymentLabelStates': {'type': 'array', 'items': {'type': 'object', 'required': ['value', 'label'], 'properties': {'label': {'type': 'string', 'minLength': 1}, 'value': {'enum': ['withLabel', 'withoutLabel'], 'type': 'string'}}, 'additionalProperties': False}}}, 'additionalProperties': False}
get_help
Get Help
Find practical Tokenbooks instructions or accounting guidance. Pass query to search by topic (MCP workflow, cost basis, fair market value, gas fees, stablecoins, ...), or pass slug to open one article directly using a slug from a previous get_help search result.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'properties': {'slug': {'type': 'string', 'description': 'Help article slug to open directly, from a previous get_help search result. Omit when using query.'}, 'limit': {'anyOf': [{'type': 'integer', 'maximum': 10, 'minimum': 1, 'description': 'Maximum number of search results, only used with query'}, {'type': 'string', 'pattern': '^(?:1|2|3|4|5|6|7|8|9|10)$', 'description': 'Maximum number of search results, only used with query Numeric strings are accepted for MCP client compatibility.'}], 'description': 'Maximum number of search results, only used with query'}, 'query': {'type': 'string', 'description': 'Search query for Tokenbooks instructions or accounting guidance. Omit when using slug.'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', 'anyOf': [{'type': 'object', 'required': ['query', 'results'], 'properties': {'query': {'type': 'string'}, 'results': {'type': 'array', 'items': {'type': 'object', 'required': ['slug', 'title', 'excerpt', 'audience', 'relatedTools', 'tags', 'score'], 'properties': {'slug': {'type': 'string'}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'score': {'type': 'number'}, 'title': {'type': 'string'}, 'excerpt': {'type': 'string'}, 'audience': {'enum': ['user', 'agent', 'both'], 'type': 'string'}, 'relatedTools': {'type': 'array', 'items': {'type': 'string'}}}, 'additionalProperties': False}}}, 'additionalProperties': False}, {'type': 'object', 'required': ['slug', 'title', 'summary', 'body', 'audience', 'tags', 'relatedTools', 'relatedConcepts'], 'properties': {'body': {'type': 'string'}, 'slug': {'type': 'string'}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'title': {'type': 'string'}, 'summary': {'type': 'string'}, 'audience': {'enum': ['user', 'agent', 'both'], 'type': 'string'}, 'relatedTools': {'type': 'array', 'items': {'type': 'string'}}, 'relatedConcepts': {'type': 'array', 'items': {'type': 'string'}}}, 'additionalProperties': False}, {'type': 'object', 'required': ['slug', 'error', 'message'], 'properties': {'slug': {'type': 'string'}, 'error': {'type': 'string', 'const': 'not_found'}, 'message': {'type': 'string'}}, 'additionalProperties': False}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'properties': {'body': {'type': 'string'}, 'slug': {'type': 'string'}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'error': {'type': 'string', 'const': 'not_found'}, 'query': {'type': 'string'}, 'title': {'type': 'string'}, 'message': {'type': 'string'}, 'results': {'type': 'array', 'items': {'type': 'object', 'required': ['slug', 'title', 'excerpt', 'audience', 'relatedTools', 'tags', 'score'], 'properties': {'slug': {'type': 'string'}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'score': {'type': 'number'}, 'title': {'type': 'string'}, 'excerpt': {'type': 'string'}, 'audience': {'enum': ['user', 'agent', 'both'], 'type': 'string'}, 'relatedTools': {'type': 'array', 'items': {'type': 'string'}}}, 'additionalProperties': False}}, 'summary': {'type': 'string'}, 'audience': {'enum': ['user', 'agent', 'both'], 'type': 'string'}, 'relatedTools': {'type': 'array', 'items': {'type': 'string'}}, 'relatedConcepts': {'type': 'array', 'items': {'type': 'string'}}}, 'additionalProperties': False}
get_journal_entry
Get Journal Entry
Read every debit and credit line in one journal entry—the detailed accounting record—and trace each line to its cost-basis records and blockchain movements.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'journalEntryId'], 'properties': {'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}, 'journalEntryId': {'type': 'string', 'description': 'Journal entry ID'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['id', 'timestamp', 'status', 'isAdjustment', 'lines'], 'properties': {'id': {'type': 'string'}, 'memo': {'type': 'string'}, 'lines': {'type': 'array', 'items': {'type': 'object', 'required': ['lineNumber', 'entryType', 'fiatAmount', 'responsibilityCenterAssignments'], 'properties': {'lot': {'type': 'object', 'required': ['id', 'entryId', 'entryKind', 'lotMethod'], 'properties': {'id': {'type': 'string'}, 'entryId': {'type': 'string'}, 'entryKind': {'type': 'string'}, 'lotMethod': {'type': 'string'}}, 'additionalProperties': False}, 'memo': {'type': 'string'}, 'assetId': {'type': 'string'}, 'transfer': {'type': 'object', 'properties': {'txHash': {'type': 'string'}, 'chainId': {'type': 'string'}, 'txIndex': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}}, 'additionalProperties': False}, 'entryType': {'type': 'string'}, 'fiatAmount': {'type': 'string'}, 'lineNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'accountName': {'type': 'string'}, 'accountType': {'type': 'string'}, 'assetAmount': {'type': 'string'}, 'assetSymbol': {'type': 'string'}, 'accountNumber': {'type': 'string'}, 'accountSubType': {'type': 'string'}, 'counterpartyName': {'type': 'string'}, 'accountNormalBalanceType': {'type': 'string'}, 'responsibilityCenterAssignments': {'type': 'array', 'items': {'type': 'object', 'required': ['responsibilityCenterTypeId', 'responsibilityCenterId', 'value', 'responsibilityCenterType', 'responsibilityCenterName', 'percentageBps'], 'properties': {'value': {'type': 'string'}, 'percentageBps': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'responsibilityCenterId': {'type': 'string'}, 'responsibilityCenterCode': {'type': 'string'}, 'responsibilityCenterName': {'type': 'string'}, 'responsibilityCenterType': {'type': 'object', 'required': ['key', 'name', 'kind'], 'properties': {'key': {'type': 'string'}, 'kind': {'enum': ['COST', 'REVENUE', 'PROFIT', 'INVESTMENT'], 'type': 'string'}, 'name': {'type': 'string'}}, 'additionalProperties': False}, 'responsibilityCenterTypeId': {'type': 'string'}}, 'additionalProperties': False}}}, 'additionalProperties': False}}, 'status': {'type': 'string'}, 'subType': {'type': 'string'}, 'timestamp': {'type': 'string'}, 'systemNotes': {'type': 'string'}, 'isAdjustment': {'type': 'boolean'}, 'operationType': {'type': 'string'}, 'portfolioTransactionId': {'type': 'string'}, 'adjustmentJournalImportProvenance': {'type': 'object', 'required': ['importRef', 'sourceFile', 'sourceRows'], 'properties': {'importRef': {'type': 'string', 'pattern': '^adjustment-journal-import-[a-z0-9-]+$', 'maxLength': 128, 'minLength': 1}, 'sourceFile': {'type': 'object', 'required': ['name', 'uploadedAt', 'uploader'], 'properties': {'name': {'type': 'string', 'minLength': 1}, 'uploader': {'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, 'uploadedAt': {'type': 'string', 'format': 'date-time'}}, 'additionalProperties': False}, 'sourceRows': {'type': 'array', 'items': {'type': 'object', 'required': ['appliedResolutions', 'entryId', 'journalLineNumber', 'locator', 'normalizedValues', 'sourceRowHash'], 'properties': {'entryId': {'type': 'string', 'minLength': 1}, 'locator': {'oneOf': [{'type': 'object', 'required': ['format', 'lineNumber'], 'properties': {'format': {'type': 'string', 'const': 'csv'}, 'lineNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['format', 'rowNumber', 'sheetName'], 'properties': {'format': {'type': 'string', 'const': 'xlsx'}, 'rowNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}, 'sheetName': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}]}, 'sourceRowHash': {'type': 'string', 'minLength': 1}, 'normalizedValues': {'anyOf': [{'type': 'object', 'required': ['schemaVersion', 'values'], 'properties': {'values': {'type': 'object', 'propertyNames': {'anyOf': [{'enum': ['accountNumber', 'amount', 'counterpartyExternalId', 'counterpartyName', 'direction', 'effectiveDate', 'entryId', 'memo'], 'type': 'string'}, {'type': 'string', 'pattern': '^responsibilityCenter:[a-z0-9]+(_[a-z0-9]+)*$'}]}, 'additionalProperties': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'schemaVersion': {'type': 'number', 'const': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['schemaVersion', 'values'], 'properties': {'values': {'type': 'object', 'propertyNames': {'anyOf': [{'enum': ['accountNumber', 'amount', 'counterpartyExternalId', 'counterpartyName', 'direction', 'effectiveAt', 'effectiveDate', 'entryId', 'memo'], 'type': 'string'}, {'type': 'string', 'pattern': '^responsibilityCenter:[a-z0-9]+(_[a-z0-9]+)*$'}]}, 'additionalProperties': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'schemaVersion': {'type': 'number', 'const': 2}}, 'additionalProperties': False}]}, 'journalLineNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}, 'appliedResolutions': {'type': 'object', 'required': ['schemaVersion', 'values'], 'properties': {'values': {'type': 'object', 'propertyNames': {'anyOf': [{'enum': ['accountNumber', 'counterpartyExternalId', 'counterpartyName'], 'type': 'string'}, {'type': 'string', 'pattern': '^responsibilityCenter:[a-z0-9]+(_[a-z0-9]+)*$'}]}, 'additionalProperties': {'type': 'string', 'minLength': 1}}, 'schemaVersion': {'type': 'number', 'const': 1}}, 'additionalProperties': False}}, 'additionalProperties': False}, 'minItems': 1}}, 'additionalProperties': False}}, 'additionalProperties': False}
get_lot_ledger
Get Cost-Basis Lot Ledger
Trace paginated cost-basis acquisition, disposal, transfer, and adjustment history across a portfolio, optionally narrowed by asset, wallet, event kind, accounting transaction, or date.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef'], 'properties': {'page': {'type': 'integer', 'description': 'Page number, starting at 1'}, 'sort': {'type': 'string', 'description': 'Single public sort field. Prefix with - for descending. Supported fields: timestamp, diff, value, price'}, 'limit': {'anyOf': [{'type': 'integer', 'maximum': 100, 'minimum': 1, 'description': 'Maximum items to return, maximum 100. Preferred MCP pagination field.'}, {'type': 'string', 'pattern': '^(?: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|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$', 'description': 'Maximum items to return, maximum 100. Preferred MCP pagination field. Numeric strings are accepted for MCP client compatibility.'}], 'description': 'Maximum items to return, maximum 100. Preferred MCP pagination field.'}, 'filter': {'type': 'string', 'description': 'Public AIP-160 filter string. Supported fields: id lot identifier (=, !=, in, not in), entry_id ledger-row identifier (=, !=, in, not in), asset_id (=, !=, in, not in), asset_spam (= true or false), entry_kind (=, !=, in, not in), wallet (=, !=, in, not in using chainId:address), portfolio_transaction_id (=, !=, in, not in), timestamp (=, !=, >, >=, <, <= with ISO datetimes). The asset display name is not filterable.'}, 'toDate': {'type': 'string', 'description': 'Optional ISO timestamp upper bound'}, 'chainId': {'type': 'string', 'description': 'Exact chain ID when filtering to one wallet; requires walletAddress'}, 'assetRef': {'type': 'string', 'description': 'Deprecated compatibility selector for asset symbol or asset id. Prefer filter=asset_id.'}, 'fromDate': {'type': 'string', 'description': 'Optional ISO timestamp lower bound'}, 'pageSize': {'anyOf': [{'type': 'integer', 'maximum': 100, 'minimum': 1, 'description': 'Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls.'}, {'type': 'string', 'pattern': '^(?: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|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$', 'description': 'Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls. Numeric strings are accepted for MCP client compatibility.'}], 'description': 'Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls.'}, 'entryKind': {'type': 'array', 'items': {'enum': ['ADD', 'DSP', 'CUT', 'MVE', 'RES', 'REL'], 'type': 'string'}, 'description': 'Filter by lot entry kind (any of)'}, 'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}, 'walletAddress': {'type': 'string', 'description': 'Exact case-sensitive wallet address when filtering to one wallet; requires chainId'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['data', 'pagination'], 'properties': {'data': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'entryId', 'timestamp', 'acquisitionTimestamp', 'entryKind', 'lotMethod', 'diff', 'value', 'assetId', 'assetIsSpam', 'portfolioTransactionId', 'walletTransactionTransfers'], 'properties': {'id': {'type': 'string'}, 'diff': {'type': 'string'}, 'price': {'type': 'string'}, 'value': {'type': 'string'}, 'txHash': {'type': 'string', 'minLength': 1}, 'assetId': {'type': 'string'}, 'entryId': {'type': 'string'}, 'assetName': {'type': 'string'}, 'entryKind': {'enum': ['ADD', 'DSP', 'CUT', 'MVE', 'RES', 'REL'], 'type': 'string'}, 'lotMethod': {'type': 'string'}, 'timestamp': {'type': 'string'}, 'positionId': {'type': 'string'}, 'walletName': {'type': 'string'}, 'assetIsSpam': {'type': 'boolean'}, 'assetSymbol': {'type': 'string'}, 'operationType': {'enum': ['DEPOSIT_FIAT', 'INCOME', 'REFUND', 'WITHDRAWAL_FIAT', 'EXPENSE', 'BUY', 'SELL', 'EXCHANGE', 'SWAP', 'MOVE', 'INTERCOMPANY_SEND', 'INTERCOMPANY_RECEIVE', 'STAKE', 'UNSTAKE', 'PROTOCOL_DEPOSIT', 'PROTOCOL_WITHDRAW', 'VAULT_DEPOSIT', 'VAULT_WITHDRAW', 'LP_IN', 'LP_OUT', 'LOAN_BORROW', 'LOAN_REPAY', 'LOAN_LIQUIDATION', 'LEND_GIVE', 'LEND_WITHDRAW', 'ADJUSTMENT', 'UNCATEGORIZED', 'SPAM'], 'type': 'string'}, 'walletAddress': {'type': 'string'}, 'walletChainId': {'type': 'string'}, 'acquisitionTimestamp': {'type': 'string'}, 'portfolioTransactionId': {'type': 'string'}, 'walletTransactionTransfers': {'type': 'array', 'items': {'type': 'object', 'required': ['chainId', 'txHash'], 'properties': {'txHash': {'type': 'string', 'minLength': 1}, 'chainId': {'type': 'string'}}, 'additionalProperties': False}}}, 'additionalProperties': False}}, 'pagination': {'type': 'object', 'required': ['page', 'pageSize', 'totalCount', 'totalPages'], 'properties': {'page': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'pageSize': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'totalCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'totalPages': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}}, 'additionalProperties': False}}, 'additionalProperties': False}
get_portfolio
Get Portfolio
Read one portfolio's settings and accounting policy by exact name or slug, including its financial reporting framework and legal entity type. If legalEntityType is omitted, it is unset.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef'], 'properties': {'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['slug', 'name', 'createdAt', 'updatedAt', 'currency', 'accountingConfiguration', 'reportingTimezone'], 'properties': {'name': {'type': 'string'}, 'slug': {'type': 'string'}, 'currency': {'type': 'string'}, 'createdAt': {'type': 'string', 'format': 'date-time'}, 'updatedAt': {'type': 'string', 'format': 'date-time'}, 'legalEntityType': {'enum': ['BUSINESS', 'CORPORATION', 'INDIVIDUAL', 'TRUST', 'PARTNERSHIP'], 'type': 'string'}, 'reportingTimezone': {'type': 'string'}, 'accountingConfiguration': {'type': 'object', 'required': ['gasFeeAccountingTreatment', 'isPurchaseTaxable', 'costBasisLotMethod', 'baseCurrency', 'jurisdictionCode', 'stablecoinTreatment', 'costBasisPerWallet', 'defiDepositTreatment', 'separateIncomeExpenseLines', 'financialReportingFramework'], 'properties': {'baseCurrency': {'type': 'string'}, 'jurisdictionCode': {'type': 'string'}, 'isPurchaseTaxable': {'type': 'boolean'}, 'costBasisLotMethod': {'enum': ['FIFO', 'LIFO', 'HIFO', 'ACB'], 'type': 'string'}, 'costBasisPerWallet': {'type': 'boolean'}, 'stablecoinTreatment': {'enum': ['BASE', 'ASSET'], 'type': 'string'}, 'defiDepositTreatment': {'enum': ['TAXABLE_EXCHANGE', 'NON_TAXABLE_RESERVATION'], 'type': 'string'}, 'gasFeeAccountingTreatment': {'enum': ['DISPOSAL_AND_COST_BASIS', 'EXPENSE_ONLY'], 'type': 'string'}, 'separateIncomeExpenseLines': {'type': 'boolean'}, 'financialReportingFramework': {'enum': ['TAX_ONLY', 'US_GAAP_PRE_2025', 'US_GAAP_ASC350_60', 'IFRS_IAS38', 'IFRS_IAS38_REVAL', 'IFRS_IAS2_LCNRV', 'IFRS_IAS2_BROKER_TRADER_FVLCTS', 'ASPE', 'FRS_102', 'AASB_138', 'OTHER'], 'type': 'string', 'default': 'TAX_ONLY'}}, 'additionalProperties': False}}, 'additionalProperties': False}
get_portfolio_balances
Get Portfolio Balances
Check whether each wallet's computed token balances match its latest synchronized snapshot; returns per-wallet match status, token count, last transaction time, and an overall match flag.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef'], 'properties': {'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['data', 'allBalancesMatch'], 'properties': {'data': {'type': 'array', 'items': {'type': 'object', 'required': ['chainId', 'address', 'isBalanceMatch', 'tokenCount'], 'properties': {'address': {'type': 'string'}, 'chainId': {'type': 'string'}, 'tokenCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'isBalanceMatch': {'type': 'boolean'}, 'lastTransactionTimestamp': {'type': 'string', 'format': 'date-time'}}, 'additionalProperties': False}}, 'allBalancesMatch': {'type': 'boolean'}}, 'additionalProperties': False}
get_portfolio_issue_summary
Get Portfolio Issue Summary
Summarize accounting problems that need review with exact counts for uncategorized, errored, and spam-related transactions, plus examples of uncategorized and errored transactions.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef'], 'properties': {'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['isClean', 'counts', 'errorsByType', 'samples'], 'properties': {'counts': {'type': 'object', 'required': ['total', 'uncategorized', 'withErrors', 'spamInvolved'], 'properties': {'total': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'withErrors': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'spamInvolved': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'uncategorized': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}, 'isClean': {'type': 'boolean'}, 'samples': {'type': 'object', 'required': ['uncategorized', 'errors'], 'properties': {'errors': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'operationType', 'classification', 'timestamp', 'status', 'tags'], 'properties': {'id': {'type': 'string'}, 'memo': {'type': 'string'}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'status': {'type': 'string'}, 'subType': {'type': 'string'}, 'timestamp': {'type': 'string'}, 'errorDetails': {'type': 'array', 'items': {}}, 'errorMessage': {'type': 'string'}, 'operationType': {'type': 'string'}, 'classification': {'type': 'object', 'required': ['state'], 'properties': {'state': {'enum': ['categorized', 'uncategorized', 'error'], 'type': 'string'}, 'detail': {'type': 'string'}, 'reason': {'type': 'string'}, 'suggestedAction': {'type': 'object', 'required': ['description'], 'properties': {'tool': {'type': 'string'}, 'description': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}}, 'additionalProperties': False}}, 'uncategorized': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'operationType', 'classification', 'timestamp', 'status', 'tags'], 'properties': {'id': {'type': 'string'}, 'memo': {'type': 'string'}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'status': {'type': 'string'}, 'subType': {'type': 'string'}, 'timestamp': {'type': 'string'}, 'errorDetails': {'type': 'array', 'items': {}}, 'errorMessage': {'type': 'string'}, 'operationType': {'type': 'string'}, 'classification': {'type': 'object', 'required': ['state'], 'properties': {'state': {'enum': ['categorized', 'uncategorized', 'error'], 'type': 'string'}, 'detail': {'type': 'string'}, 'reason': {'type': 'string'}, 'suggestedAction': {'type': 'object', 'required': ['description'], 'properties': {'tool': {'type': 'string'}, 'description': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}}, 'additionalProperties': False}}}, 'additionalProperties': False}, 'errorsByType': {'type': 'array', 'items': {'type': 'object', 'required': ['errorType', 'count'], 'properties': {'count': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'errorType': {'type': 'string'}}, 'additionalProperties': False}}}, 'additionalProperties': False}
get_request_status
Get Request Status
Check the status of any queued background work — report generation, wallet sync, rule application, or a transaction change — using the requestId returned when it was queued. Works for every request kind; there is no separate report-status tool.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'requestId'], 'properties': {'requestId': {'type': 'string', 'description': 'Request ID returned by the call that queued the work (e.g. incremental_sync, full_resync, request_report_export)'}, 'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}, 'transactionId': {'type': 'string', 'description': 'Optional transaction ID that caused the async request, for agent context'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', 'oneOf': [{'type': 'object', 'required': ['requestId', 'type', 'status', 'progress', 'createdAt', 'updatedAt', 'kind'], 'properties': {'kind': {'type': 'string', 'const': 'job'}, 'type': {'enum': ['sync', 'export', 'recompute', 'reclassify'], 'type': 'string'}, 'error': {'type': 'object', 'required': ['error'], 'properties': {'error': {'type': 'object', 'required': ['code', 'message', 'requestId'], 'properties': {'code': {'type': 'string'}, 'details': {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'message': {'type': 'string'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}, 'result': {'type': 'object', 'required': ['downloadUrl', 'fileSize', 'format'], 'properties': {'format': {'enum': ['xlsx', 'pdf', 'json'], 'type': 'string'}, 'fileSize': {'type': 'number'}, 'downloadUrl': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'enum': ['pending', 'active', 'delayed', 'completed', 'failed'], 'type': 'string'}, 'outcome': {'type': 'object', 'required': ['type', 'transactionId', 'hasError', 'errorTypes', 'suggestedAction'], 'properties': {'type': {'type': 'string', 'const': 'portfolio_transaction'}, 'hasError': {'type': 'boolean'}, 'errorTypes': {'type': 'array', 'items': {'type': 'string'}}, 'operationType': {'type': 'string'}, 'transactionId': {'type': 'string'}, 'suggestedAction': {}, 'classificationState': {'type': 'string'}}, 'additionalProperties': False}, 'subject': {'type': 'object', 'required': ['kind', 'transactionId'], 'properties': {'kind': {'type': 'string', 'const': 'portfolio_transaction'}, 'commandType': {'type': 'string'}, 'transactionId': {'type': 'string'}}, 'additionalProperties': False}, 'progress': {'type': 'number'}, 'createdAt': {'type': 'string', 'format': 'date-time'}, 'requestId': {'type': 'string'}, 'updatedAt': {'type': 'string', 'format': 'date-time'}, 'finishedOn': {'type': 'number'}, 'appProgress': {'type': 'object', 'required': ['completed', 'total', 'transactionsSynced'], 'properties': {'total': {'type': 'number'}, 'completed': {'type': 'number'}, 'transactionsSynced': {'type': 'number'}}, 'additionalProperties': False}, 'completedAt': {'type': 'string', 'format': 'date-time'}, 'returnValue': {}}, 'additionalProperties': False}, {'type': 'object', 'required': ['status', 'progressPercent', 'createdAt', 'kind', 'requestId'], 'properties': {'kind': {'type': 'string', 'const': 'report'}, 'error': {'type': 'object', 'required': ['error'], 'properties': {'error': {'type': 'object', 'required': ['code', 'message', 'requestId'], 'properties': {'code': {'type': 'string'}, 'details': {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'message': {'type': 'string'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}, 'result': {'oneOf': [{'type': 'object', 'required': ['type', 'totals'], 'properties': {'type': {'type': 'string', 'const': 'totals'}, 'totals': {}}, 'additionalProperties': False}, {'type': 'object', 'required': ['type', 'totals'], 'properties': {'type': {'type': 'string', 'const': 'full'}, 'totals': {}, 'downloadUrl': {'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['type', 'rows', 'totals'], 'properties': {'rows': {}, 'type': {'type': 'string', 'const': 'json'}, 'totals': {}, 'totalsOnly': {'type': 'boolean'}}, 'additionalProperties': False}]}, 'status': {'enum': ['pending', 'processing', 'completed', 'failed'], 'type': 'string'}, 'createdAt': {'type': 'string', 'format': 'date-time'}, 'requestId': {'type': 'string'}, 'completedAt': {'type': 'string', 'format': 'date-time'}, 'progressPercent': {'type': 'number', 'maximum': 100, 'minimum': 0}}, 'additionalProperties': False}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['requestId', 'status', 'createdAt', 'kind'], 'properties': {'kind': {'enum': ['job', 'report'], 'type': 'string'}, 'type': {'enum': ['sync', 'export', 'recompute', 'reclassify'], 'type': 'string'}, 'error': {'anyOf': [{'type': 'object', 'required': ['error'], 'properties': {'error': {'type': 'object', 'required': ['code', 'message', 'requestId'], 'properties': {'code': {'type': 'string'}, 'details': {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'message': {'type': 'string'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}, {'type': 'object', 'required': ['error'], 'properties': {'error': {'type': 'object', 'required': ['code', 'message', 'requestId'], 'properties': {'code': {'type': 'string'}, 'details': {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'message': {'type': 'string'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}]}, 'result': {'anyOf': [{'type': 'object', 'required': ['downloadUrl', 'fileSize', 'format'], 'properties': {'format': {'enum': ['xlsx', 'pdf', 'json'], 'type': 'string'}, 'fileSize': {'type': 'number'}, 'downloadUrl': {'type': 'string'}}, 'additionalProperties': False}, {'oneOf': [{'type': 'object', 'required': ['type', 'totals'], 'properties': {'type': {'type': 'string', 'const': 'totals'}, 'totals': {}}, 'additionalProperties': False}, {'type': 'object', 'required': ['type', 'totals'], 'properties': {'type': {'type': 'string', 'const': 'full'}, 'totals': {}, 'downloadUrl': {'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['type', 'rows', 'totals'], 'properties': {'rows': {}, 'type': {'type': 'string', 'const': 'json'}, 'totals': {}, 'totalsOnly': {'type': 'boolean'}}, 'additionalProperties': False}]}]}, 'status': {'enum': ['pending', 'active', 'delayed', 'completed', 'failed', 'processing'], 'type': 'string'}, 'outcome': {'type': 'object', 'required': ['type', 'transactionId', 'hasError', 'errorTypes', 'suggestedAction'], 'properties': {'type': {'type': 'string', 'const': 'portfolio_transaction'}, 'hasError': {'type': 'boolean'}, 'errorTypes': {'type': 'array', 'items': {'type': 'string'}}, 'operationType': {'type': 'string'}, 'transactionId': {'type': 'string'}, 'suggestedAction': {}, 'classificationState': {'type': 'string'}}, 'additionalProperties': False}, 'subject': {'type': 'object', 'required': ['kind', 'transactionId'], 'properties': {'kind': {'type': 'string', 'const': 'portfolio_transaction'}, 'commandType': {'type': 'string'}, 'transactionId': {'type': 'string'}}, 'additionalProperties': False}, 'progress': {'type': 'number'}, 'createdAt': {'anyOf': [{'type': 'string', 'format': 'date-time'}, {'type': 'string', 'format': 'date-time'}]}, 'requestId': {'anyOf': [{'type': 'string'}, {'type': 'string'}]}, 'updatedAt': {'type': 'string', 'format': 'date-time'}, 'finishedOn': {'type': 'number'}, 'appProgress': {'type': 'object', 'required': ['completed', 'total', 'transactionsSynced'], 'properties': {'total': {'type': 'number'}, 'completed': {'type': 'number'}, 'transactionsSynced': {'type': 'number'}}, 'additionalProperties': False}, 'completedAt': {'anyOf': [{'type': 'string', 'format': 'date-time'}, {'type': 'string', 'format': 'date-time'}]}, 'returnValue': {}, 'progressPercent': {'type': 'number', 'maximum': 100, 'minimum': 0}}, 'additionalProperties': False}
get_server_info
Get Server Info
Learn what this accounting server covers before connecting: supported blockchains and fiat sources, accounting standards, plans with their capacity limits and what each tier adds, how to sign up, connection endpoint and authentication methods, and what it deliberately leaves out. Needs no credentials, so call it first when evaluating a connection, answering what Tokenbooks costs or includes, or debugging a connection.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'properties': {}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['name', 'title', 'summary', 'endpoint', 'documentationUrl', 'authentication', 'notes', 'gettingStarted', 'coverage', 'pricing', 'limitations'], 'properties': {'name': {'type': 'string'}, 'notes': {'type': 'array', 'items': {'type': 'string'}}, 'title': {'type': 'string'}, 'pricing': {'type': 'object', 'required': ['url', 'note', 'plans'], 'properties': {'url': {'type': 'string'}, 'note': {'type': 'string'}, 'plans': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['name', 'capacity', 'unlocks'], 'properties': {'name': {'type': 'string'}, 'unlocks': {'type': 'array', 'items': {'type': 'string'}}, 'capacity': {'type': 'string', 'const': 'negotiated'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['name', 'capacity', 'limits', 'unlocks'], 'properties': {'name': {'type': 'string'}, 'limits': {'type': 'object', 'required': ['portfolios', 'wallets', 'transactions'], 'properties': {'wallets': {'type': 'number'}, 'portfolios': {'type': 'number'}, 'transactions': {'type': 'number'}}, 'additionalProperties': False}, 'unlocks': {'type': 'array', 'items': {'type': 'string'}}, 'capacity': {'type': 'string', 'const': 'published'}}, 'additionalProperties': False}]}}}, 'additionalProperties': False}, 'summary': {'type': 'string'}, 'coverage': {'type': 'object', 'required': ['blockchains', 'fiat', 'accountingFrameworks'], 'properties': {'fiat': {'type': 'string'}, 'blockchains': {'type': 'string'}, 'accountingFrameworks': {'type': 'string'}}, 'additionalProperties': False}, 'endpoint': {'type': 'string'}, 'limitations': {'type': 'array', 'items': {'type': 'string'}}, 'authentication': {'type': 'array', 'items': {'type': 'string'}}, 'gettingStarted': {'type': 'object', 'required': ['accessRequirement', 'signUpUrl', 'steps'], 'properties': {'steps': {'type': 'array', 'items': {'type': 'string'}}, 'signUpUrl': {'type': 'string'}, 'accessRequirement': {'type': 'string'}}, 'additionalProperties': False}, 'documentationUrl': {'type': 'string'}}, 'additionalProperties': False}
get_sync_status
Get Sync Status
Check sync health across every wallet in a portfolio. Current activity takes priority over each latest finished result; safe codes and messages tell you whether to retry or reconnect credentials.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef'], 'properties': {'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['status', 'wallets', 'updatedAt'], 'properties': {'status': {'enum': ['pending', 'processing', 'completed', 'failed'], 'type': 'string'}, 'wallets': {'type': 'array', 'items': {'type': 'object', 'required': ['syncMessages', 'chainId', 'address', 'status', 'progressPercent'], 'properties': {'status': {'enum': ['pending', 'processing', 'completed', 'failed'], 'type': 'string'}, 'address': {'type': 'string'}, 'chainId': {'type': 'string'}, 'lastSyncAt': {'type': 'string', 'format': 'date-time'}, 'errorMessage': {'type': 'string'}, 'syncMessages': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['code', 'message', 'severity', 'details'], 'properties': {'code': {'type': 'string', 'const': 'EXCHANGE_RECONNECT_REQUIRED'}, 'details': {'type': 'object', 'required': ['provider', 'reconnectRequired', 'errorType'], 'properties': {'provider': {'type': 'string', 'minLength': 1}, 'errorType': {'type': 'string', 'const': 'ExternalServiceAuthenticationError'}, 'reconnectRequired': {'type': 'boolean', 'const': True}}, 'additionalProperties': False}, 'message': {'type': 'string', 'minLength': 1}, 'severity': {'enum': ['ERROR', 'WARN'], 'type': 'string', 'default': 'ERROR'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['code', 'message', 'severity', 'details'], 'properties': {'code': {'type': 'string', 'const': 'SYNC_PROCESSING_FAILED'}, 'details': {'type': 'object', 'required': ['retryable', 'errorType'], 'properties': {'errorType': {'type': 'string', 'const': 'SyncProcessingError'}, 'retryable': {'type': 'boolean', 'const': True}}, 'additionalProperties': False}, 'message': {'type': 'string', 'minLength': 1}, 'severity': {'enum': ['ERROR', 'WARN'], 'type': 'string', 'default': 'ERROR'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['code', 'message', 'severity', 'details'], 'properties': {'code': {'type': 'string', 'const': 'SYNC_WARNING'}, 'details': {'type': 'object', 'required': ['errorType'], 'properties': {'errorType': {'type': 'string', 'const': 'SyncWarning'}}, 'additionalProperties': False}, 'message': {'type': 'string', 'minLength': 1}, 'severity': {'enum': ['ERROR', 'WARN'], 'type': 'string', 'default': 'ERROR'}}, 'additionalProperties': False}]}}, 'progressPercent': {'type': 'number', 'maximum': 100, 'minimum': 0}, 'totalTransactions': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'transactionsSynced': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}}, 'additionalProperties': False}}, 'startedAt': {'type': 'string', 'format': 'date-time'}, 'updatedAt': {'type': 'string', 'format': 'date-time'}, 'completedAt': {'type': 'string', 'format': 'date-time'}}, 'additionalProperties': False}
import_adjustment_journals
Import Adjustment Journals
Preview or post a complete CSV or XLSX file of balanced manual adjustment journals for one portfolio. Preview first; post only after reviewing every blocking issue, then resend the unchanged source with its preview token and any resolutions.
外部アクセスあり
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'action', 'contentBase64', 'fileName'], 'properties': {'action': {'enum': ['preview', 'post'], 'type': 'string', 'description': 'preview: Parse the file and report what it would import, writing nothing. Always preview before posting. post: Commit the import that a preview of the same file produced.'}, 'fileName': {'type': 'string', 'pattern': '^[^/\\\\]+\\.(?:csv|xlsx)$', 'maxLength': 255, 'minLength': 1, 'description': 'Original CSV or XLSX source filename.'}, 'resolutions': {'type': 'array', 'items': {'anyOf': [{'type': 'object', 'required': ['accountNumber', 'kind', 'locator'], 'properties': {'kind': {'enum': ['account'], 'type': 'string', 'description': 'Kind of reference this row fixes.'}, 'locator': {'oneOf': [{'type': 'object', 'required': ['format', 'lineNumber'], 'properties': {'format': {'enum': ['csv'], 'type': 'string', 'description': 'Source file format.'}, 'lineNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1, 'description': '1-based line number in the CSV file.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['format', 'rowNumber', 'sheetName'], 'properties': {'format': {'enum': ['xlsx'], 'type': 'string', 'description': 'Source file format.'}, 'rowNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1, 'description': '1-based row number within the sheet.'}, 'sheetName': {'type': 'string', 'minLength': 1, 'description': 'Worksheet the row belongs to.'}}, 'additionalProperties': False}]}, 'accountNumber': {'type': 'string', 'minLength': 1, 'description': 'Ledger account to use for that row, from list_journal_line_assignment_options (type: ledger_account).'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['externalId', 'kind', 'locator'], 'properties': {'kind': {'enum': ['counterparty'], 'type': 'string', 'description': 'Kind of reference this row fixes.'}, 'locator': {'oneOf': [{'type': 'object', 'required': ['format', 'lineNumber'], 'properties': {'format': {'enum': ['csv'], 'type': 'string', 'description': 'Source file format.'}, 'lineNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1, 'description': '1-based line number in the CSV file.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['format', 'rowNumber', 'sheetName'], 'properties': {'format': {'enum': ['xlsx'], 'type': 'string', 'description': 'Source file format.'}, 'rowNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1, 'description': '1-based row number within the sheet.'}, 'sheetName': {'type': 'string', 'minLength': 1, 'description': 'Worksheet the row belongs to.'}}, 'additionalProperties': False}]}, 'externalId': {'type': 'string', 'minLength': 1, 'description': "Counterparty's external identifier, as recorded on the counterparty."}}, 'additionalProperties': False}, {'type': 'object', 'required': ['kind', 'locator', 'name'], 'properties': {'kind': {'enum': ['counterparty'], 'type': 'string', 'description': 'Kind of reference this row fixes.'}, 'name': {'type': 'string', 'minLength': 1, 'description': 'Counterparty name to use for that row, from list_journal_line_assignment_options (type: counterparty).'}, 'locator': {'oneOf': [{'type': 'object', 'required': ['format', 'lineNumber'], 'properties': {'format': {'enum': ['csv'], 'type': 'string', 'description': 'Source file format.'}, 'lineNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1, 'description': '1-based line number in the CSV file.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['format', 'rowNumber', 'sheetName'], 'properties': {'format': {'enum': ['xlsx'], 'type': 'string', 'description': 'Source file format.'}, 'rowNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1, 'description': '1-based row number within the sheet.'}, 'sheetName': {'type': 'string', 'minLength': 1, 'description': 'Worksheet the row belongs to.'}}, 'additionalProperties': False}]}}, 'additionalProperties': False}, {'type': 'object', 'required': ['centerName', 'kind', 'locator', 'typeKey'], 'properties': {'kind': {'enum': ['responsibilityCenter'], 'type': 'string', 'description': 'Kind of reference this row fixes.'}, 'locator': {'oneOf': [{'type': 'object', 'required': ['format', 'lineNumber'], 'properties': {'format': {'enum': ['csv'], 'type': 'string', 'description': 'Source file format.'}, 'lineNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1, 'description': '1-based line number in the CSV file.'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['format', 'rowNumber', 'sheetName'], 'properties': {'format': {'enum': ['xlsx'], 'type': 'string', 'description': 'Source file format.'}, 'rowNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1, 'description': '1-based row number within the sheet.'}, 'sheetName': {'type': 'string', 'minLength': 1, 'description': 'Worksheet the row belongs to.'}}, 'additionalProperties': False}]}, 'typeKey': {'type': 'string', 'minLength': 1, 'description': 'Responsibility center type the name belongs to, such as costCenter.'}, 'centerName': {'type': 'string', 'minLength': 1, 'description': 'Responsibility center to use for that row, from list_journal_line_assignment_options (type: responsibility_center).'}}, 'additionalProperties': False}]}, 'description': 'Only for action post; required for each.'}, 'portfolioRef': {'type': 'string', 'minLength': 1, 'description': 'Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.'}, 'previewToken': {'type': 'string', 'pattern': '^[0-9a-f]{64}$', 'description': 'Token returned by the matching preview, proving the file has not changed since. Only for action post; required for each.'}, 'workspaceRef': {'type': 'string', 'minLength': 1, 'description': 'Workspace name or slug. Call list_workspaces to resolve it.'}, 'contentBase64': {'type': 'string', 'minLength': 1, 'description': 'CSV or XLSX source file content as base64-encoded bytes (max 5 MiB).'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$defs': {'AjIssue': {'anyOf': [{'anyOf': [{'type': 'object', 'required': ['code'], 'properties': {'code': {'enum': ['ADJUSTMENT_JOURNAL_SOURCE_LAYOUT_INVALID', 'ADJUSTMENT_JOURNAL_SOURCE_UNREADABLE'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['code', 'locator'], 'properties': {'code': {'enum': ['ADJUSTMENT_JOURNAL_SOURCE_VALUE_INVALID', 'ADJUSTMENT_JOURNAL_REQUIRED_VALUE_MISSING', 'ADJUSTMENT_JOURNAL_EFFECTIVE_DATE_INVALID', 'ADJUSTMENT_JOURNAL_AMOUNT_INVALID', 'ADJUSTMENT_JOURNAL_DEBIT_CREDIT_INVALID', 'ADJUSTMENT_JOURNAL_EFFECTIVE_TIMESTAMP_CONFLICT', 'ADJUSTMENT_JOURNAL_MEMO_CONFLICT', 'ADJUSTMENT_JOURNAL_DEBIT_MISSING', 'ADJUSTMENT_JOURNAL_CREDIT_MISSING', 'ADJUSTMENT_JOURNAL_UNBALANCED'], 'type': 'string'}, 'column': {'type': 'string', 'minLength': 1}, 'entryId': {'type': 'string', 'minLength': 1}, 'locator': {'$ref': '#/$defs/AjLocator'}}, 'additionalProperties': False}]}, {'type': 'object', 'required': ['accountNumber', 'code', 'kind', 'locator'], 'properties': {'code': {'enum': ['ADJUSTMENT_JOURNAL_ACCOUNT_NOT_FOUND_OR_INELIGIBLE', 'ADJUSTMENT_JOURNAL_ACCOUNT_AMBIGUOUS', 'ADJUSTMENT_JOURNAL_ACCOUNT_BASE_CURRENCY_REQUIRED'], 'type': 'string'}, 'kind': {'type': 'string', 'const': 'account'}, 'locator': {'$ref': '#/$defs/AjLocator'}, 'accountNumber': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['code', 'kind', 'locator', 'reference'], 'properties': {'code': {'enum': ['ADJUSTMENT_JOURNAL_COUNTERPARTY_NOT_FOUND_OR_INELIGIBLE', 'ADJUSTMENT_JOURNAL_COUNTERPARTY_AMBIGUOUS'], 'type': 'string'}, 'kind': {'type': 'string', 'const': 'counterparty'}, 'locator': {'$ref': '#/$defs/AjLocator'}, 'reference': {'oneOf': [{'type': 'object', 'required': ['externalId', 'kind'], 'properties': {'kind': {'type': 'string', 'const': 'external-id'}, 'name': {'type': 'string', 'minLength': 1}, 'externalId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['kind', 'name'], 'properties': {'kind': {'type': 'string', 'const': 'name'}, 'name': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}]}}, 'additionalProperties': False}, {'type': 'object', 'required': ['code', 'kind', 'locator', 'name', 'typeKey'], 'properties': {'code': {'enum': ['ADJUSTMENT_JOURNAL_RESPONSIBILITY_CENTER_NOT_FOUND_OR_INELIGIBLE', 'ADJUSTMENT_JOURNAL_RESPONSIBILITY_CENTER_AMBIGUOUS'], 'type': 'string'}, 'kind': {'type': 'string', 'const': 'responsibilityCenter'}, 'name': {'type': 'string', 'minLength': 1}, 'locator': {'$ref': '#/$defs/AjLocator'}, 'typeKey': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}]}, 'AjLocator': {'oneOf': [{'type': 'object', 'required': ['format', 'lineNumber'], 'properties': {'format': {'type': 'string', 'const': 'csv'}, 'lineNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['format', 'rowNumber', 'sheetName'], 'properties': {'format': {'type': 'string', 'const': 'xlsx'}, 'rowNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}, 'sheetName': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}]}, 'AjFullIssues': {'type': 'object', 'required': ['mode', 'items', 'candidates'], 'properties': {'mode': {'type': 'string', 'const': 'full'}, 'items': {'type': 'array', 'items': {'$ref': '#/$defs/AjIssue'}}, 'candidates': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['accountNumber', 'kind', 'name'], 'properties': {'kind': {'type': 'string', 'const': 'account'}, 'name': {'type': 'string', 'minLength': 1}, 'accountNumber': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['kind', 'name'], 'properties': {'kind': {'type': 'string', 'const': 'counterparty'}, 'name': {'type': 'string', 'minLength': 1}, 'externalId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['kind', 'name', 'typeKey', 'typeName'], 'properties': {'kind': {'type': 'string', 'const': 'responsibilityCenter'}, 'name': {'type': 'string', 'minLength': 1}, 'typeKey': {'type': 'string', 'minLength': 1}, 'typeName': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}]}}}, 'additionalProperties': False}, 'AjPostJournal': {'type': 'object', 'required': ['sourceEntryId', 'transactionId'], 'properties': {'sourceEntryId': {'type': 'string', 'minLength': 1}, 'transactionId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, 'AjIssueSummary': {'type': 'object', 'required': ['mode', 'counts', 'examples', 'omittedIssueCount', 'omittedCandidateCount', 'nextAction'], 'properties': {'mode': {'type': 'string', 'const': 'summary'}, 'counts': {'type': 'array', 'items': {'type': 'object', 'required': ['code', 'count'], 'properties': {'code': {'enum': ['ADJUSTMENT_JOURNAL_SOURCE_LAYOUT_INVALID', 'ADJUSTMENT_JOURNAL_SOURCE_UNREADABLE', 'ADJUSTMENT_JOURNAL_SOURCE_VALUE_INVALID', 'ADJUSTMENT_JOURNAL_REQUIRED_VALUE_MISSING', 'ADJUSTMENT_JOURNAL_EFFECTIVE_DATE_INVALID', 'ADJUSTMENT_JOURNAL_AMOUNT_INVALID', 'ADJUSTMENT_JOURNAL_DEBIT_CREDIT_INVALID', 'ADJUSTMENT_JOURNAL_EFFECTIVE_TIMESTAMP_CONFLICT', 'ADJUSTMENT_JOURNAL_MEMO_CONFLICT', 'ADJUSTMENT_JOURNAL_DEBIT_MISSING', 'ADJUSTMENT_JOURNAL_CREDIT_MISSING', 'ADJUSTMENT_JOURNAL_UNBALANCED', 'ADJUSTMENT_JOURNAL_ACCOUNT_NOT_FOUND_OR_INELIGIBLE', 'ADJUSTMENT_JOURNAL_ACCOUNT_AMBIGUOUS', 'ADJUSTMENT_JOURNAL_ACCOUNT_BASE_CURRENCY_REQUIRED', 'ADJUSTMENT_JOURNAL_COUNTERPARTY_NOT_FOUND_OR_INELIGIBLE', 'ADJUSTMENT_JOURNAL_COUNTERPARTY_AMBIGUOUS', 'ADJUSTMENT_JOURNAL_RESPONSIBILITY_CENTER_NOT_FOUND_OR_INELIGIBLE', 'ADJUSTMENT_JOURNAL_RESPONSIBILITY_CENTER_AMBIGUOUS'], 'type': 'string'}, 'count': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}}, 'examples': {'type': 'array', 'items': {'$ref': '#/$defs/AjIssue'}, 'maxItems': 5}, 'nextAction': {'type': 'string', 'const': 'Correct the source file, then preview the complete file again before posting.'}, 'omittedIssueCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'omittedCandidateCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}, 'AjPreviewJournal': {'type': 'object', 'required': ['credit', 'debit', 'effectiveDate', 'entryId'], 'properties': {'memo': {'type': 'string', 'minLength': 1}, 'debit': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, 'credit': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, 'entryId': {'type': 'string', 'minLength': 1}, 'effectiveDate': {'type': 'string', 'pattern': '^\\d{4}-\\d{2}-\\d{2}$'}}, 'additionalProperties': False}, 'AjPreviewSummary': {'type': 'object', 'required': ['baseCurrency', 'journalCount', 'sourceRowCount', 'totalCredit', 'totalDebit'], 'properties': {'totalDebit': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, 'totalCredit': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, 'baseCurrency': {'type': 'string', 'minLength': 1}, 'journalCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'sourceRowCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}}, 'oneOf': [{'type': 'object', 'required': ['action', 'previewToken', 'readyToPost', 'summary', 'journals', 'omittedJournalCount', 'issues'], 'properties': {'action': {'type': 'string', 'const': 'preview'}, 'issues': {'oneOf': [{'$ref': '#/$defs/AjFullIssues'}, {'$ref': '#/$defs/AjIssueSummary'}]}, 'summary': {'$ref': '#/$defs/AjPreviewSummary'}, 'journals': {'type': 'array', 'items': {'$ref': '#/$defs/AjPreviewJournal'}, 'maxItems': 3}, 'readyToPost': {'type': 'boolean'}, 'previewToken': {'type': 'string', 'pattern': '^[0-9a-f]{64}$'}, 'omittedJournalCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}, {'type': 'object', 'required': ['action', 'importRef', 'createdJournalCount', 'journals', 'omittedJournalCount'], 'properties': {'action': {'type': 'string', 'const': 'post'}, 'journals': {'type': 'array', 'items': {'$ref': '#/$defs/AjPostJournal'}, 'maxItems': 3}, 'importRef': {'type': 'string', 'pattern': '^adjustment-journal-import-[a-z0-9-]+$', 'maxLength': 128, 'minLength': 1}, 'createdJournalCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}, 'omittedJournalCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['action', 'journals', 'omittedJournalCount'], 'properties': {'action': {'enum': ['preview', 'post'], 'type': 'string'}, 'issues': {'oneOf': [{'$ref': '#/$defs/AjFullIssues'}, {'$ref': '#/$defs/AjIssueSummary'}]}, 'summary': {'$ref': '#/$defs/AjPreviewSummary'}, 'journals': {'anyOf': [{'type': 'array', 'items': {'$ref': '#/$defs/AjPreviewJournal'}, 'maxItems': 3}, {'type': 'array', 'items': {'$ref': '#/$defs/AjPostJournal'}, 'maxItems': 3}]}, 'importRef': {'type': 'string', 'pattern': '^adjustment-journal-import-[a-z0-9-]+$', 'maxLength': 128, 'minLength': 1}, 'readyToPost': {'type': 'boolean'}, 'previewToken': {'type': 'string', 'pattern': '^[0-9a-f]{64}$'}, 'createdJournalCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}, 'omittedJournalCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}}, 'additionalProperties': False}
incremental_sync
Incremental Sync
Pull only recent blockchain and wallet activity while keeping all existing transaction and accounting history; use this routine refresh before reports or when new activity is missing, then track its requestId with get_request_status.
外部アクセスあり
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef'], 'properties': {'wallets': {'type': 'array', 'items': {'type': 'object', 'required': ['chainId', 'walletAddress'], 'properties': {'chainId': {'type': 'string', 'description': 'Exact chain ID for the wallet'}, 'walletAddress': {'type': 'string', 'description': 'Exact case-sensitive wallet address'}}, 'additionalProperties': False}, 'description': 'Optional exact wallet pairs; omit to sync every wallet in the portfolio'}, 'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['portfolioSlug', 'requestId'], 'properties': {'requestId': {'type': 'string'}, 'portfolioSlug': {'type': 'string'}}, 'additionalProperties': False}
list_accounting_rules
List Accounting Rules
Find saved accounting rules, filter them, or recover the exact ruleRef needed to preview, edit, or delete one rule.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef'], 'properties': {'limit': {'type': 'integer', 'default': 50, 'maximum': 9007199254740991, 'minimum': 1, 'description': 'Requested number of resources to return. Oversized values are clamped to the route limit.'}, 'search': {'type': 'string', 'maxLength': 200, 'minLength': 1, 'description': 'Free-text match against rule names.'}, 'enabled': {'type': 'boolean', 'description': 'Keep only enabled rules, or only disabled ones. Omit to return both.'}, 'ruleRef': {'type': 'string', 'minLength': 1, 'description': 'Saved rule handle, from list_accounting_rules.'}, 'wallets': {'type': 'array', 'items': {'type': 'string', 'minLength': 3, 'description': 'Wallet as chainId:walletAddress, e.g. eth-mainnet:0xabc.'}, 'maxItems': 100, 'description': 'Wallet selectors as chainId:walletAddress values.'}, 'assetIds': {'type': 'array', 'items': {'type': 'string', 'minLength': 1}, 'maxItems': 100, 'description': 'Asset ids as CSV or repeated query values.'}, 'pageToken': {'type': 'string', 'minLength': 1, 'description': 'Opaque token returned by the previous list response.'}, 'actionTypes': {'type': 'array', 'items': {'enum': ['SET_COUNTERPARTY', 'SET_LEDGER_ACCOUNT', 'SET_RESPONSIBILITY_CENTERS'], 'type': 'string', 'description': 'What a rule changes when it matches.'}, 'maxItems': 25, 'description': 'Action types as CSV or repeated query values.'}, 'portfolioRef': {'type': 'string', 'minLength': 1, 'description': 'Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.'}, 'workspaceRef': {'type': 'string', 'minLength': 1, 'description': 'Workspace name or slug. Call list_workspaces to resolve it.'}, 'accountNumbers': {'type': 'array', 'items': {'type': 'string', 'maxLength': 8, 'minLength': 1, 'description': 'Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account).'}, 'maxItems': 100, 'description': 'Ledger account numbers as CSV or repeated query values.'}, 'conditionFields': {'type': 'array', 'items': {'enum': ['fromAddressLabel', 'toAddressLabel', 'fromAddress', 'toAddress', 'direction', 'wallet', 'asset', 'assetClass', 'stablecoin', 'chain', 'operationType', 'accountSubType', 'accountNumber', 'counterparty', 'fiatValue', 'entryType', 'accountType'], 'type': 'string', 'description': 'Which part of a transaction the condition tests.'}, 'maxItems': 50, 'description': 'Condition fields as CSV or repeated query values.'}, 'counterpartyNames': {'type': 'array', 'items': {'type': 'string', 'minLength': 1, 'description': 'Counterparty name, from list_journal_line_assignment_options (type: counterparty).'}, 'maxItems': 100, 'description': 'Counterparty names as CSV or repeated query values.'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['data', 'pagination'], 'properties': {'data': {'type': 'array', 'items': {'type': 'object', 'required': ['name', 'enabled', 'version', 'hasInvalidDefinition', 'hasUnresolvedReferences', 'createdAt', 'updatedAt', 'ruleRef'], 'properties': {'name': {'type': 'string'}, 'action': {'type': 'object', 'required': ['formatVersion', 'actions'], 'properties': {'actions': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['type', 'target'], 'properties': {'type': {'type': 'string', 'const': 'SET_COUNTERPARTY'}, 'target': {'type': 'string', 'const': 'LINE'}, 'counterpartyName': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['type', 'target'], 'properties': {'type': {'type': 'string', 'const': 'SET_LEDGER_ACCOUNT'}, 'target': {'type': 'string', 'const': 'LINE'}, 'accountNumber': {'type': 'string', 'maxLength': 8, 'minLength': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['type', 'target', 'responsibilityCenterAssignments'], 'properties': {'type': {'type': 'string', 'const': 'SET_RESPONSIBILITY_CENTERS'}, 'target': {'type': 'string', 'const': 'LINE'}, 'responsibilityCenterAssignments': {'type': 'array', 'items': {'type': 'object', 'properties': {'responsibilityCenterName': {'type': 'string', 'minLength': 1}, 'responsibilityCenterTypeKey': {'type': 'string', 'pattern': '^[a-z0-9]+(_[a-z0-9]+)*$'}}, 'additionalProperties': False}, 'minItems': 1}}, 'additionalProperties': False}]}, 'minItems': 1}, 'formatVersion': {'type': 'number', 'const': 1}}, 'additionalProperties': False}, 'enabled': {'type': 'boolean'}, 'ruleRef': {'type': 'string', 'minLength': 1}, 'version': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'createdAt': {'type': 'string', 'format': 'date-time'}, 'updatedAt': {'type': 'string', 'format': 'date-time'}, 'conditions': {'type': 'object', 'required': ['formatVersion', 'all'], 'properties': {'all': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'fromAddressLabel'}, 'value': {'type': 'string', 'minLength': 1}, 'operator': {'enum': ['equals', 'contains', 'notEquals', 'notContains'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'toAddressLabel'}, 'value': {'type': 'string', 'minLength': 1}, 'operator': {'enum': ['equals', 'contains', 'notEquals', 'notContains'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'fromAddress'}, 'value': {'type': 'string', 'minLength': 1}, 'operator': {'enum': ['equals', 'contains'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'toAddress'}, 'value': {'type': 'string', 'minLength': 1}, 'operator': {'enum': ['equals', 'contains'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'direction'}, 'value': {'enum': ['IN', 'OUT', 'GAS'], 'type': 'string'}, 'operator': {'enum': ['equals', 'notEquals'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'asset'}, 'value': {'type': 'array', 'items': {'type': 'string', 'minLength': 1}, 'minItems': 1}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'assetClass'}, 'value': {'type': 'array', 'items': {'enum': ['ERC20', 'FIAT', 'NATIVE', 'REBASE_LST', 'INTEREST_BEARING', 'VALUE_ACCRUING', 'LP_SHARE', 'DEBT', 'REFLECT', 'VOTE_ESCROWED', 'NFT'], 'type': 'string'}, 'minItems': 1}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'stablecoin'}, 'value': {'type': 'boolean'}, 'operator': {'enum': ['equals'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'chain'}, 'value': {'type': 'array', 'items': {'type': 'string', 'minLength': 1}, 'minItems': 1}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'operationType'}, 'value': {'type': 'array', 'items': {'enum': ['DEPOSIT_FIAT', 'INCOME', 'REFUND', 'WITHDRAWAL_FIAT', 'EXPENSE', 'BUY', 'SELL', 'EXCHANGE', 'SWAP', 'MOVE', 'INTERCOMPANY_SEND', 'INTERCOMPANY_RECEIVE', 'STAKE', 'UNSTAKE', 'PROTOCOL_DEPOSIT', 'PROTOCOL_WITHDRAW', 'VAULT_DEPOSIT', 'VAULT_WITHDRAW', 'LP_IN', 'LP_OUT', 'LOAN_BORROW', 'LOAN_REPAY', 'LOAN_LIQUIDATION', 'LEND_GIVE', 'LEND_WITHDRAW', 'ADJUSTMENT', 'UNCATEGORIZED', 'SPAM'], 'type': 'string'}, 'minItems': 1}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'accountSubType'}, 'value': {'type': 'array', 'items': {'enum': ['EXT', 'BNK', 'INC', 'EXP', 'LINT', 'LLIQ', 'LQLOSS', 'CLOSS', 'CBNK', 'CBAS', 'CRE', 'CGL', 'CEXP', 'CINC', 'TRADING_REVENUE', 'COGS', 'INVENTORY_VALUATION_ADJUSTMENT', 'INVENTORY_COGS_ADJUSTMENT', 'INVENTORY_WRITE_DOWN', 'INVENTORY_REMEASUREMENT_GAIN', 'INVENTORY_REMEASUREMENT_LOSS', 'CNP', 'UINC', 'UEXP', 'OFEXP', 'OFINC', 'ICINV', 'CAP', 'UNREALISED_FV_GAIN', 'UNREALISED_FV_LOSS', 'CFVA'], 'type': 'string'}, 'minItems': 1}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string'}}, 'additionalProperties': False}, {'oneOf': [{'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'fiatValue'}, 'value': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, 'operator': {'type': 'string', 'const': 'gt'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'fiatValue'}, 'value': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, 'operator': {'type': 'string', 'const': 'lt'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'fiatValue'}, 'value': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, 'operator': {'type': 'string', 'const': 'gte'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'fiatValue'}, 'value': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, 'operator': {'type': 'string', 'const': 'lte'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'fiatValue'}, 'value': {'type': 'array', 'maxItems': 2, 'minItems': 2, 'prefixItems': [{'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}]}, 'operator': {'type': 'string', 'const': 'between'}}, 'additionalProperties': False}]}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'entryType'}, 'value': {'enum': ['DR', 'CR'], 'type': 'string'}, 'operator': {'enum': ['equals'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'accountType'}, 'value': {'type': 'array', 'items': {'enum': ['ASSET', 'LIABILITY', 'EQUITY', 'INCOME', 'EXPENSE'], 'type': 'string'}, 'minItems': 1}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'wallet'}, 'value': {'type': 'array', 'items': {'type': 'object', 'required': ['chainId', 'address'], 'properties': {'address': {'type': 'string', 'minLength': 1}, 'chainId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['operator', 'field', 'value'], 'properties': {'field': {'type': 'string', 'const': 'accountNumber'}, 'value': {'type': 'array', 'items': {'type': 'string', 'maxLength': 8, 'minLength': 1}}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['field', 'operator', 'value'], 'properties': {'field': {'type': 'string', 'const': 'counterparty'}, 'value': {'type': 'array', 'items': {'type': 'string', 'minLength': 1}}, 'operator': {'enum': ['in', 'notIn'], 'type': 'string'}}, 'additionalProperties': False}]}, 'minItems': 1}, 'formatVersion': {'type': 'number', 'const': 1}}, 'additionalProperties': False}, 'hasInvalidDefinition': {'type': 'boolean'}, 'hasUnresolvedReferences': {'type': 'boolean'}}, 'additionalProperties': False}}, 'pagination': {'type': 'object', 'required': ['pageSize'], 'properties': {'pageSize': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}, 'nextPageToken': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}}, 'additionalProperties': False}
list_chains
List Supported Chains
Find which blockchains support wallet syncing by name, Tokenbooks chain slug, or numeric EVM network ID; results identify EVM networks whose shared 0x address can be added together with add_wallet.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'properties': {'query': {'type': 'string', 'description': 'Optional chain name, slug, or EVM chain id (e.g. "Optimism", "optimism-mainnet", "10")'}, 'evmOnly': {'type': 'boolean', 'description': 'When true, return only EVM-compatible chains'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['data'], 'properties': {'data': {'type': 'array', 'items': {'type': 'object', 'required': ['chainRef', 'name', 'isEvm'], 'properties': {'name': {'type': 'string'}, 'isEvm': {'type': 'boolean'}, 'logoUrl': {'type': 'string'}, 'chainRef': {'type': 'string'}, 'evmChainId': {'type': 'string'}, 'description': {'type': 'string'}}, 'additionalProperties': False}}}, 'additionalProperties': False}
list_journal_line_assignment_options
List Journal Line Assignment Options
Find the ledger accounts, saved counterparties, or responsibility centers (departments, projects, or other reporting groups) that can be assigned to an accounting entry line. Pass type to choose the lookup: ledger_account returns each account's accountNumber, counterparty returns the counterparty name, and responsibility_center returns its type key and center name.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'type'], 'properties': {'page': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1, 'description': 'Page number, starting at 1 Only for type counterparty.'}, 'type': {'enum': ['ledger_account', 'counterparty', 'responsibility_center'], 'type': 'string', 'description': 'ledger_account: Ledger accounts assignable to a journal line. counterparty: Saved vendors, people, or organizations assignable to a journal line. responsibility_center: Departments, projects, or other reporting groups (responsibility centers) assignable to a journal line.'}, 'limit': {'type': 'integer', 'maximum': 100, 'minimum': 1, 'description': 'Maximum items to return, maximum 100. Preferred MCP pagination field. Only for type counterparty.'}, 'search': {'type': 'string', 'minLength': 1, 'description': 'Filter by name (also matches account number for ledger accounts)'}, 'pageSize': {'type': 'integer', 'maximum': 100, 'minimum': 1, 'description': 'Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls. Only for type counterparty.'}, 'portfolioRef': {'type': 'string', 'minLength': 1, 'description': 'Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.'}, 'workspaceRef': {'type': 'string', 'minLength': 1, 'description': 'Workspace name or slug. Call list_workspaces to resolve it.'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', 'oneOf': [{'type': 'object', 'required': ['type', 'accounts'], 'properties': {'type': {'type': 'string', 'const': 'ledger_account'}, 'accounts': {'$ref': '#/properties/accounts'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['type', 'counterparties', 'total', 'hasMore'], 'properties': {'type': {'type': 'string', 'const': 'counterparty'}, 'total': {'$ref': '#/properties/total'}, 'hasMore': {'$ref': '#/properties/hasMore'}, 'counterparties': {'$ref': '#/properties/counterparties'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['type', 'responsibilityCenters'], 'properties': {'type': {'type': 'string', 'const': 'responsibility_center'}, 'responsibilityCenters': {'$ref': '#/properties/responsibilityCenters'}}, 'additionalProperties': False}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['type'], 'properties': {'type': {'enum': ['ledger_account', 'counterparty', 'responsibility_center'], 'type': 'string'}, 'total': {'type': 'number'}, 'hasMore': {'type': 'boolean'}, 'accounts': {'type': 'array', 'items': {'type': 'object', 'required': ['accountNumber', 'name', 'accountType', 'currency', 'isActive'], 'properties': {'name': {'type': 'string'}, 'subType': {'type': 'string'}, 'currency': {'type': 'string'}, 'isActive': {'type': 'boolean'}, 'accountType': {'type': 'string'}, 'accountNumber': {'type': 'string'}}, 'additionalProperties': False}}, 'counterparties': {'type': 'array', 'items': {'type': 'object', 'required': ['name', 'type', 'isActive'], 'properties': {'name': {'type': 'string'}, 'type': {'type': 'string'}, 'isActive': {'type': 'boolean'}}, 'additionalProperties': False}}, 'responsibilityCenters': {'type': 'array', 'items': {'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string'}, 'description': {'type': 'string'}, 'responsibilityCenterType': {'type': 'object', 'required': ['key', 'name', 'kind'], 'properties': {'key': {'type': 'string'}, 'kind': {'enum': ['COST', 'REVENUE', 'PROFIT', 'INVESTMENT'], 'type': 'string'}, 'name': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}}}, 'additionalProperties': False}
list_portfolios
List Portfolios
List portfolios available in a workspace, or search by name or slug.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef'], 'properties': {'page': {'type': 'integer', 'description': 'Page number, starting at 1'}, 'limit': {'anyOf': [{'type': 'integer', 'maximum': 100, 'minimum': 1, 'description': 'Maximum items to return, maximum 100. Preferred MCP pagination field.'}, {'type': 'string', 'pattern': '^(?: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|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$', 'description': 'Maximum items to return, maximum 100. Preferred MCP pagination field. Numeric strings are accepted for MCP client compatibility.'}], 'description': 'Maximum items to return, maximum 100. Preferred MCP pagination field.'}, 'query': {'type': 'string', 'description': 'Optional portfolio name or slug search query'}, 'pageSize': {'anyOf': [{'type': 'integer', 'maximum': 100, 'minimum': 1, 'description': 'Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls.'}, {'type': 'string', 'pattern': '^(?: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|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$', 'description': 'Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls. Numeric strings are accepted for MCP client compatibility.'}], 'description': 'Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls.'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['data', 'pagination'], 'properties': {'data': {'type': 'array', 'items': {'type': 'object', 'required': ['slug', 'name', 'createdAt', 'updatedAt'], 'properties': {'name': {'type': 'string'}, 'slug': {'type': 'string'}, 'createdAt': {'type': 'string', 'format': 'date-time'}, 'updatedAt': {'type': 'string', 'format': 'date-time'}}, 'additionalProperties': False}}, 'pagination': {'type': 'object', 'required': ['page', 'pageSize', 'totalCount', 'totalPages'], 'properties': {'page': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'pageSize': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'totalCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'totalPages': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}}, 'additionalProperties': False}}, 'additionalProperties': False}
list_portfolio_transactions
List Portfolio Transactions
Find accounting transactions—called Portfolio Transactions in Tokenbooks—for review or reconciliation; filter by status, type, errors, spam, wallet, or asset, optionally attaching grouped contributing raw source records (10-record page cap). Pass transactionId to explain full details of one transaction instead: classification, journal entry, cost-basis links, and (rawWithDetails) its sanitized event logs and contract calls.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef'], 'properties': {'sort': {'enum': ['timestamp', '-timestamp'], 'type': 'string', 'default': '-timestamp', 'description': 'Timestamp sort. Prefix with - for descending order.'}, 'limit': {'anyOf': [{'type': 'integer', 'maximum': 100, 'minimum': 1, 'description': 'Maximum Portfolio Transactions to return, maximum 100.'}, {'type': 'string', 'pattern': '^(?: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|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$', 'description': 'Maximum Portfolio Transactions to return, maximum 100. Numeric strings are accepted for MCP client compatibility.'}], 'description': 'Maximum Portfolio Transactions to return, maximum 100.'}, 'isSpam': {'type': 'boolean', 'description': 'true: transfers involve spam tokens; false: non-spam only'}, 'search': {'type': 'string', 'minLength': 1, 'description': 'Free-text search over memo, tx hash, transaction ID'}, 'status': {'type': 'array', 'items': {'enum': ['PROPOSED', 'ERROR', 'POSTED', 'CLOSED'], 'type': 'string'}, 'minItems': 1, 'description': 'Filter by status, e.g. ["POSTED"]'}, 'toDate': {'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': 'Optional ISO timestamp upper bound'}, 'txHash': {'type': 'string', 'minLength': 1, 'description': 'Filter by exact on-chain transaction hash'}, 'address': {'type': 'string', 'minLength': 1, 'description': 'Match transfer from/to address (case-insensitive)'}, 'chainId': {'type': 'string', 'minLength': 1, 'description': 'Public wallet chain ID.'}, 'hasLots': {'type': 'boolean', 'description': 'true: produced cost-basis lots; false: did not'}, 'include': {'enum': ['raw', 'rawWithDetails'], 'type': 'string', 'description': 'Include grouped contributing raw source transactions; rawWithDetails adds sanitized provider details and requires transactionId'}, 'subType': {'type': 'array', 'items': {'type': 'string', 'minLength': 1}, 'minItems': 1, 'description': 'Filter by operation sub-type (case-insensitive)'}, 'chainIds': {'type': 'array', 'items': {'type': 'string', 'minLength': 1}, 'minItems': 1, 'description': 'Optional chain ID filters'}, 'fromDate': {'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': 'Optional ISO timestamp lower bound'}, 'hasError': {'type': 'boolean', 'description': 'true: has a processing error; false: error-free'}, 'maxValue': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$', 'description': 'Maximum transfer fiat quote value (inclusive), as a decimal string'}, 'minValue': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$', 'description': 'Minimum transfer fiat quote value (inclusive), as a decimal string'}, 'assetRefs': {'type': 'array', 'items': {'type': 'string', 'minLength': 1}, 'minItems': 1, 'description': 'Filter by asset symbol (case-insensitive)'}, 'errorType': {'type': 'array', 'items': {'type': 'string', 'minLength': 1}, 'minItems': 1, 'description': 'Filter by error/warning code, e.g. ["FmvNotAvailable"]'}, 'pageToken': {'type': 'string', 'minLength': 1, 'description': 'Opaque token returned by the previous list response.'}, 'counterparty': {'type': 'array', 'items': {'type': 'string', 'minLength': 1}, 'minItems': 1, 'description': 'Filter by counterparty name (case-insensitive)'}, 'portfolioRef': {'type': 'string', 'minLength': 1, 'description': 'Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.'}, 'workspaceRef': {'type': 'string', 'minLength': 1, 'description': 'Workspace name or slug. Call list_workspaces to resolve it.'}, 'operationType': {'type': 'array', 'items': {'enum': ['DEPOSIT_FIAT', 'INCOME', 'REFUND', 'WITHDRAWAL_FIAT', 'EXPENSE', 'BUY', 'SELL', 'EXCHANGE', 'SWAP', 'MOVE', 'INTERCOMPANY_SEND', 'INTERCOMPANY_RECEIVE', 'STAKE', 'UNSTAKE', 'PROTOCOL_DEPOSIT', 'PROTOCOL_WITHDRAW', 'VAULT_DEPOSIT', 'VAULT_WITHDRAW', 'LP_IN', 'LP_OUT', 'LOAN_BORROW', 'LOAN_REPAY', 'LOAN_LIQUIDATION', 'LEND_GIVE', 'LEND_WITHDRAW', 'ADJUSTMENT', 'UNCATEGORIZED', 'SPAM'], 'type': 'string'}, 'minItems': 1, 'description': 'Filter by operation type, e.g. ["UNCATEGORIZED"]'}, 'transactionId': {'type': 'string', 'minLength': 1, 'description': 'Look up one transaction by handle instead of listing'}, 'walletAddress': {'type': 'string', 'minLength': 1, 'description': 'Public wallet address on the selected chain.'}, 'defiPositionKey': {'type': 'string', 'minLength': 1, 'description': 'Filter by protocol-defined DeFi position key'}, 'hasJournalEntry': {'type': 'boolean', 'description': 'true: has a non-empty journal entry; false: does not'}, 'defiPositionWalletAddress': {'type': 'string', 'minLength': 1, 'description': 'Filter by DeFi position wallet address'}, 'defiPositionWalletChainId': {'type': 'string', 'minLength': 1, 'description': 'Filter by DeFi position wallet chain ID'}, 'responsibilityCenterTypeKeys': {'type': 'array', 'items': {'type': 'string', 'pattern': '^[a-z0-9]+(_[a-z0-9]+)*$', 'description': 'Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments.'}, 'minItems': 1, 'description': 'Filter by journal-line responsibility-center type key (e.g. primary, goal; from list_journal_line_assignment_options)'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$defs': {'JournalEntryResponseDto': {'type': 'object', 'required': ['id', 'timestamp', 'status', 'isAdjustment', 'lines'], 'properties': {'id': {'type': 'string'}, 'memo': {'type': 'string'}, 'lines': {'type': 'array', 'items': {'type': 'object', 'required': ['lineNumber', 'entryType', 'fiatAmount', 'responsibilityCenterAssignments'], 'properties': {'lot': {'type': 'object', 'required': ['id', 'entryId', 'entryKind', 'lotMethod'], 'properties': {'id': {'type': 'string'}, 'entryId': {'type': 'string'}, 'entryKind': {'type': 'string'}, 'lotMethod': {'type': 'string'}}, 'additionalProperties': False}, 'memo': {'type': 'string'}, 'assetId': {'type': 'string'}, 'transfer': {'type': 'object', 'properties': {'txHash': {'type': 'string'}, 'chainId': {'type': 'string'}, 'txIndex': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}}, 'additionalProperties': False}, 'entryType': {'type': 'string'}, 'fiatAmount': {'type': 'string'}, 'lineNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'accountName': {'type': 'string'}, 'accountType': {'type': 'string'}, 'assetAmount': {'type': 'string'}, 'assetSymbol': {'type': 'string'}, 'accountNumber': {'type': 'string'}, 'accountSubType': {'type': 'string'}, 'counterpartyName': {'type': 'string'}, 'accountNormalBalanceType': {'type': 'string'}, 'responsibilityCenterAssignments': {'type': 'array', 'items': {'type': 'object', 'required': ['responsibilityCenterTypeId', 'responsibilityCenterId', 'value', 'responsibilityCenterType', 'responsibilityCenterName', 'percentageBps'], 'properties': {'value': {'type': 'string'}, 'percentageBps': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'responsibilityCenterId': {'type': 'string'}, 'responsibilityCenterCode': {'type': 'string'}, 'responsibilityCenterName': {'type': 'string'}, 'responsibilityCenterType': {'type': 'object', 'required': ['key', 'name', 'kind'], 'properties': {'key': {'type': 'string'}, 'kind': {'enum': ['COST', 'REVENUE', 'PROFIT', 'INVESTMENT'], 'type': 'string'}, 'name': {'type': 'string'}}, 'additionalProperties': False}, 'responsibilityCenterTypeId': {'type': 'string'}}, 'additionalProperties': False}}}, 'additionalProperties': False}}, 'status': {'type': 'string'}, 'subType': {'type': 'string'}, 'timestamp': {'type': 'string'}, 'systemNotes': {'type': 'string'}, 'isAdjustment': {'type': 'boolean'}, 'operationType': {'type': 'string'}, 'portfolioTransactionId': {'type': 'string'}, 'adjustmentJournalImportProvenance': {'type': 'object', 'required': ['importRef', 'sourceFile', 'sourceRows'], 'properties': {'importRef': {'type': 'string', 'pattern': '^adjustment-journal-import-[a-z0-9-]+$', 'maxLength': 128, 'minLength': 1}, 'sourceFile': {'type': 'object', 'required': ['name', 'uploadedAt', 'uploader'], 'properties': {'name': {'type': 'string', 'minLength': 1}, 'uploader': {'type': 'object', 'required': ['name'], 'properties': {'name': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, 'uploadedAt': {'type': 'string', 'format': 'date-time'}}, 'additionalProperties': False}, 'sourceRows': {'type': 'array', 'items': {'type': 'object', 'required': ['appliedResolutions', 'entryId', 'journalLineNumber', 'locator', 'normalizedValues', 'sourceRowHash'], 'properties': {'entryId': {'type': 'string', 'minLength': 1}, 'locator': {'oneOf': [{'type': 'object', 'required': ['format', 'lineNumber'], 'properties': {'format': {'type': 'string', 'const': 'csv'}, 'lineNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['format', 'rowNumber', 'sheetName'], 'properties': {'format': {'type': 'string', 'const': 'xlsx'}, 'rowNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}, 'sheetName': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}]}, 'sourceRowHash': {'type': 'string', 'minLength': 1}, 'normalizedValues': {'anyOf': [{'type': 'object', 'required': ['schemaVersion', 'values'], 'properties': {'values': {'type': 'object', 'propertyNames': {'anyOf': [{'enum': ['accountNumber', 'amount', 'counterpartyExternalId', 'counterpartyName', 'direction', 'effectiveDate', 'entryId', 'memo'], 'type': 'string'}, {'type': 'string', 'pattern': '^responsibilityCenter:[a-z0-9]+(_[a-z0-9]+)*$'}]}, 'additionalProperties': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'schemaVersion': {'type': 'number', 'const': 1}}, 'additionalProperties': False}, {'type': 'object', 'required': ['schemaVersion', 'values'], 'properties': {'values': {'type': 'object', 'propertyNames': {'anyOf': [{'enum': ['accountNumber', 'amount', 'counterpartyExternalId', 'counterpartyName', 'direction', 'effectiveAt', 'effectiveDate', 'entryId', 'memo'], 'type': 'string'}, {'type': 'string', 'pattern': '^responsibilityCenter:[a-z0-9]+(_[a-z0-9]+)*$'}]}, 'additionalProperties': {'anyOf': [{'type': 'string'}, {'type': 'null'}]}}, 'schemaVersion': {'type': 'number', 'const': 2}}, 'additionalProperties': False}]}, 'journalLineNumber': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}, 'appliedResolutions': {'type': 'object', 'required': ['schemaVersion', 'values'], 'properties': {'values': {'type': 'object', 'propertyNames': {'anyOf': [{'enum': ['accountNumber', 'counterpartyExternalId', 'counterpartyName'], 'type': 'string'}, {'type': 'string', 'pattern': '^responsibilityCenter:[a-z0-9]+(_[a-z0-9]+)*$'}]}, 'additionalProperties': {'type': 'string', 'minLength': 1}}, 'schemaVersion': {'type': 'number', 'const': 1}}, 'additionalProperties': False}}, 'additionalProperties': False}, 'minItems': 1}}, 'additionalProperties': False}}, 'additionalProperties': False}, 'RawTransactionCompleteDto': {'type': 'object', 'required': ['id', 'wallet', 'hash', 'blockHeight', 'timestamp', 'processingState', 'walletOperations'], 'properties': {'id': {'type': 'string', 'minLength': 1}, 'hash': {'type': 'string'}, 'memo': {'type': 'string'}, 'wallet': {'type': 'object', 'required': ['chainId', 'address', 'type'], 'properties': {'name': {'type': 'string'}, 'type': {'enum': ['BLOCKCHAIN', 'EXCHANGE', 'BANK'], 'type': 'string'}, 'address': {'type': 'string'}, 'chainId': {'type': 'string'}}, 'additionalProperties': False}, 'timestamp': {'type': 'string', 'format': 'date-time'}, 'blockHeight': {'type': 'string', 'pattern': '^\\d+$'}, 'processingState': {'enum': ['PROCESSED', 'PARTIAL', 'UNPROCESSED'], 'type': 'string'}, 'walletOperations': {'type': 'array', 'items': {'type': 'object', 'required': ['txIndex', 'type', 'from', 'to', 'token', 'value'], 'properties': {'to': {'type': 'object', 'required': ['address'], 'properties': {'label': {'type': 'string'}, 'address': {'type': 'string'}}, 'additionalProperties': False}, 'defi': {'type': 'object', 'properties': {'operation': {'anyOf': [{'type': 'string', 'const': 'PROTOCOL_DEPOSIT'}, {'type': 'string', 'const': 'PROTOCOL_WITHDRAW'}, {'type': 'string', 'const': 'VAULT_DEPOSIT'}, {'type': 'string', 'const': 'VAULT_WITHDRAW'}, {'type': 'string', 'const': 'SWAP'}, {'type': 'string', 'const': 'PROVIDE_LIQUIDITY'}, {'type': 'string', 'const': 'REMOVE_LIQUIDITY'}, {'type': 'string', 'const': 'LEND'}, {'type': 'string', 'const': 'WITHDRAW_LEND'}, {'type': 'string', 'const': 'LEND_REDUCE'}, {'type': 'string', 'const': 'BORROW'}, {'type': 'string', 'const': 'REPAY'}, {'type': 'string', 'const': 'LOAN_LIQUIDATION'}, {'type': 'string', 'const': 'STAKE'}, {'type': 'string', 'const': 'UNSTAKE'}, {'type': 'string', 'const': 'CLAIM_REWARDS'}]}, 'tokenRole': {'anyOf': [{'type': 'string', 'const': 'UNDERLYING'}, {'type': 'string', 'const': 'COLLATERAL'}, {'type': 'string', 'const': 'RECEIPT_TOKEN'}, {'type': 'string', 'const': 'LP_SHARE'}, {'type': 'string', 'const': 'LIABILITY_TOKEN'}, {'type': 'string', 'const': 'REWARD'}, {'type': 'string', 'const': 'OTHER'}]}, 'positionRef': {'type': 'string'}}, 'additionalProperties': False}, 'from': {'type': 'object', 'required': ['address'], 'properties': {'label': {'type': 'string'}, 'address': {'type': 'string'}}, 'additionalProperties': False}, 'type': {'enum': ['IN', 'OUT', 'GAS', 'SELF'], 'type': 'string'}, 'quote': {'type': 'object', 'properties': {'meta': {'type': 'object', 'required': ['s'], 'properties': {'s': {'enum': ['SYNC_SOURCE', 'FMV_ENGINE', 'DERIVED_REPRESENTED', 'DERIVED_SIBLING', 'POLICY', 'MANUAL'], 'type': 'string'}, 'ts': {'type': 'integer', 'maximum': 8210266876799, 'minimum': 1}}, 'additionalProperties': False}, 'value': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, 'source': {'type': 'string'}, 'currency': {'type': 'string'}}, 'additionalProperties': False}, 'token': {'type': 'object', 'required': ['chainId', 'address', 'assetId', 'symbol', 'type', 'decimals', 'isSpam'], 'properties': {'type': {'anyOf': [{'type': 'string', 'const': 'ERC20'}, {'type': 'string', 'const': 'NATIVE'}, {'type': 'string', 'const': 'FIAT'}, {'type': 'string', 'const': 'NFT'}, {'type': 'string', 'const': 'REBASE_LST'}, {'type': 'string', 'const': 'INTEREST_BEARING'}, {'type': 'string', 'const': 'VALUE_ACCRUING'}, {'type': 'string', 'const': 'LP_SHARE'}, {'type': 'string', 'const': 'DEBT'}, {'type': 'string', 'const': 'REFLECT'}, {'type': 'string', 'const': 'VOTE_ESCROWED'}]}, 'isSpam': {'type': 'boolean'}, 'symbol': {'type': 'string'}, 'address': {'type': 'string'}, 'assetId': {'type': 'string'}, 'chainId': {'type': 'string'}, 'decimals': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'representsTokenAddress': {'type': 'string'}, 'stablecoinPeggedFiatCurrency': {'type': 'string'}}, 'additionalProperties': False}, 'value': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, 'txIndex': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'portfolioTransactionId': {'type': 'string'}}, 'additionalProperties': False}}}, 'additionalProperties': False}, 'RawTransactionWithDetailsDto__schema0': {'anyOf': [{'type': 'string'}, {'type': 'number'}, {'type': 'boolean'}, {'type': 'null'}, {'type': 'array', 'items': {'$ref': '#/$defs/RawTransactionWithDetailsDto__schema0'}}, {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {'$ref': '#/$defs/RawTransactionWithDetailsDto__schema0'}}]}}, 'anyOf': [{'type': 'object', 'required': ['data', 'pagination', 'resultType'], 'properties': {'data': {'$ref': '#/properties/data'}, 'pagination': {'$ref': '#/properties/pagination'}, 'resultType': {'type': 'string', 'const': 'transactionList'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['id', 'operationType', 'classification', 'timestamp', 'status', 'tags', 'fileAttachments', 'walletOperations', 'resultType'], 'properties': {'id': {'$ref': '#/properties/id'}, 'memo': {'$ref': '#/properties/memo'}, 'tags': {'$ref': '#/properties/tags'}, 'status': {'$ref': '#/properties/status'}, 'subType': {'$ref': '#/properties/subType'}, 'timestamp': {'$ref': '#/properties/timestamp'}, 'resultType': {'type': 'string', 'const': 'transaction'}, 'systemNotes': {'$ref': '#/properties/systemNotes'}, 'errorDetails': {'$ref': '#/properties/errorDetails'}, 'errorMessage': {'$ref': '#/properties/errorMessage'}, 'journalEntry': {'$ref': '#/properties/journalEntry'}, 'walletSource': {'$ref': '#/properties/walletSource'}, 'operationType': {'$ref': '#/properties/operationType'}, 'classification': {'$ref': '#/properties/classification'}, 'fileAttachments': {'$ref': '#/properties/fileAttachments'}, 'rawTransactions': {'$ref': '#/properties/rawTransactions'}, 'intercompanyPair': {'$ref': '#/properties/intercompanyPair'}, 'walletOperations': {'$ref': '#/properties/walletOperations'}, 'portfolioTransactionContext': {'$ref': '#/properties/portfolioTransactionContext'}}, 'additionalProperties': False}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['resultType'], 'properties': {'id': {'type': 'string'}, 'data': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'operationType', 'classification', 'timestamp', 'status', 'tags', 'fileAttachments', 'walletOperations'], 'properties': {'id': {'type': 'string'}, 'memo': {'type': 'string'}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'status': {'type': 'string'}, 'subType': {'type': 'string'}, 'timestamp': {'type': 'string'}, 'systemNotes': {'type': 'string'}, 'errorDetails': {'type': 'array', 'items': {}}, 'errorMessage': {'type': 'string'}, 'journalEntry': {'$ref': '#/$defs/JournalEntryResponseDto'}, 'walletSource': {'type': 'object', 'required': ['wallet', 'walletType', 'rawTransactionId', 'rawTransactionSource', 'blockHeight', 'timestamp'], 'properties': {'wallet': {'type': 'object', 'required': ['chainId', 'address'], 'properties': {'address': {'type': 'string'}, 'chainId': {'type': 'string'}}, 'additionalProperties': False}, 'timestamp': {'type': 'string'}, 'walletType': {'enum': ['BLOCKCHAIN', 'EXCHANGE', 'BANK'], 'type': 'string'}, 'blockHeight': {'type': 'string'}, 'rawTransactionId': {'type': 'string'}, 'rawTransactionSource': {'type': 'string'}}, 'additionalProperties': False}, 'operationType': {'type': 'string'}, 'classification': {'type': 'object', 'required': ['state'], 'properties': {'state': {'enum': ['categorized', 'uncategorized', 'error'], 'type': 'string'}, 'detail': {'type': 'string'}, 'reason': {'type': 'string'}, 'suggestedAction': {'type': 'object', 'required': ['description'], 'properties': {'tool': {'type': 'string'}, 'description': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}, 'fileAttachments': {'type': 'array', 'items': {}}, 'rawTransactions': {'type': 'array', 'items': {'$ref': '#/$defs/RawTransactionCompleteDto'}}, 'intercompanyPair': {'type': 'object', 'required': ['pairId', 'side', 'counterpartPortfolioName', 'counterpartPortfolioSlug', 'counterpartPortfolioTransactionId', 'counterpartOperationType', 'counterpartStatus', 'lotLinkCount'], 'properties': {'side': {'enum': ['SEND', 'RECEIVE'], 'type': 'string'}, 'pairId': {'type': 'string'}, 'treatment': {'type': 'string'}, 'lotLinkCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'counterpartStatus': {'enum': ['PROPOSED', 'ERROR', 'POSTED', 'CLOSED'], 'type': 'string'}, 'counterpartSubType': {'type': 'string'}, 'counterpartOperationType': {'type': 'string'}, 'counterpartPortfolioName': {'type': 'string'}, 'counterpartPortfolioSlug': {'type': 'string', 'pattern': '^[a-z0-9-]+$', 'minLength': 1}, 'counterpartPortfolioTransactionId': {'type': 'string'}}, 'additionalProperties': False}, 'walletOperations': {'type': 'array', 'items': {'type': 'object', 'required': ['type', 'txHash', 'chainId', 'txIndex', 'walletTransactionId', 'fromAddress', 'toAddress', 'value', 'tokenAddress', 'isSpam', 'walletName', 'walletAddress'], 'properties': {'type': {'type': 'string'}, 'value': {'type': 'string'}, 'isSpam': {'type': 'boolean'}, 'txHash': {'type': 'string'}, 'assetId': {'type': 'string'}, 'chainId': {'type': 'string'}, 'txIndex': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'quoteMeta': {'type': 'object', 'required': ['s'], 'properties': {'s': {'enum': ['SYNC_SOURCE', 'FMV_ENGINE', 'DERIVED_REPRESENTED', 'DERIVED_SIBLING', 'POLICY', 'MANUAL'], 'type': 'string'}, 'ts': {'type': 'integer', 'maximum': 8210266876799, 'minimum': 1}}, 'additionalProperties': False}, 'toAddress': {'type': 'string'}, 'valueQuote': {'type': 'string'}, 'walletName': {'type': 'string'}, 'assetSymbol': {'type': 'string'}, 'fromAddress': {'type': 'string'}, 'quoteSource': {'type': 'string'}, 'tokenAddress': {'type': 'string'}, 'defiOperation': {'type': 'string'}, 'quoteCurrency': {'type': 'string'}, 'walletAddress': {'type': 'string'}, 'defiPositionId': {'type': 'string'}, 'toAddressLabel': {'type': 'string'}, 'defiPositionRef': {'type': 'string'}, 'fromAddressLabel': {'type': 'string'}, 'walletTransactionId': {'type': 'string'}, 'stablecoinPeggedFiatCurrency': {'type': 'string'}}, 'additionalProperties': False}}, 'portfolioTransactionContext': {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}}, 'additionalProperties': False}}, 'memo': {'type': 'string'}, 'tags': {'type': 'array', 'items': {'type': 'string'}}, 'status': {'type': 'string'}, 'subType': {'type': 'string'}, 'timestamp': {'type': 'string'}, 'pagination': {'type': 'object', 'required': ['pageSize'], 'properties': {'pageSize': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}, 'nextPageToken': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, 'resultType': {'enum': ['transactionList', 'transaction'], 'type': 'string'}, 'systemNotes': {'type': 'string'}, 'errorDetails': {'type': 'array', 'items': {}}, 'errorMessage': {'type': 'string'}, 'journalEntry': {'$ref': '#/$defs/JournalEntryResponseDto'}, 'walletSource': {'type': 'object', 'required': ['wallet', 'walletType', 'rawTransactionId', 'rawTransactionSource', 'blockHeight', 'timestamp'], 'properties': {'wallet': {'type': 'object', 'required': ['chainId', 'address'], 'properties': {'address': {'type': 'string'}, 'chainId': {'type': 'string'}}, 'additionalProperties': False}, 'timestamp': {'type': 'string'}, 'walletType': {'enum': ['BLOCKCHAIN', 'EXCHANGE', 'BANK'], 'type': 'string'}, 'blockHeight': {'type': 'string'}, 'rawTransactionId': {'type': 'string'}, 'rawTransactionSource': {'type': 'string'}}, 'additionalProperties': False}, 'operationType': {'type': 'string'}, 'classification': {'type': 'object', 'required': ['state'], 'properties': {'state': {'enum': ['categorized', 'uncategorized', 'error'], 'type': 'string'}, 'detail': {'type': 'string'}, 'reason': {'type': 'string'}, 'suggestedAction': {'type': 'object', 'required': ['description'], 'properties': {'tool': {'type': 'string'}, 'description': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}, 'fileAttachments': {'type': 'array', 'items': {}}, 'rawTransactions': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'wallet', 'hash', 'blockHeight', 'timestamp', 'processingState', 'walletOperations'], 'properties': {'id': {'type': 'string', 'minLength': 1}, 'hash': {'type': 'string'}, 'memo': {'type': 'string'}, 'wallet': {'type': 'object', 'required': ['chainId', 'address', 'type'], 'properties': {'name': {'type': 'string'}, 'type': {'enum': ['BLOCKCHAIN', 'EXCHANGE', 'BANK'], 'type': 'string'}, 'address': {'type': 'string'}, 'chainId': {'type': 'string'}}, 'additionalProperties': False}, 'details': {'$ref': '#/$defs/RawTransactionWithDetailsDto__schema0'}, 'timestamp': {'type': 'string', 'format': 'date-time'}, 'blockHeight': {'type': 'string', 'pattern': '^\\d+$'}, 'processingState': {'enum': ['PROCESSED', 'PARTIAL', 'UNPROCESSED'], 'type': 'string'}, 'walletOperations': {'type': 'array', 'items': {'type': 'object', 'required': ['txIndex', 'type', 'from', 'to', 'token', 'value'], 'properties': {'to': {'type': 'object', 'required': ['address'], 'properties': {'label': {'type': 'string'}, 'address': {'type': 'string'}}, 'additionalProperties': False}, 'defi': {'type': 'object', 'properties': {'operation': {'anyOf': [{'type': 'string', 'const': 'PROTOCOL_DEPOSIT'}, {'type': 'string', 'const': 'PROTOCOL_WITHDRAW'}, {'type': 'string', 'const': 'VAULT_DEPOSIT'}, {'type': 'string', 'const': 'VAULT_WITHDRAW'}, {'type': 'string', 'const': 'SWAP'}, {'type': 'string', 'const': 'PROVIDE_LIQUIDITY'}, {'type': 'string', 'const': 'REMOVE_LIQUIDITY'}, {'type': 'string', 'const': 'LEND'}, {'type': 'string', 'const': 'WITHDRAW_LEND'}, {'type': 'string', 'const': 'LEND_REDUCE'}, {'type': 'string', 'const': 'BORROW'}, {'type': 'string', 'const': 'REPAY'}, {'type': 'string', 'const': 'LOAN_LIQUIDATION'}, {'type': 'string', 'const': 'STAKE'}, {'type': 'string', 'const': 'UNSTAKE'}, {'type': 'string', 'const': 'CLAIM_REWARDS'}]}, 'tokenRole': {'anyOf': [{'type': 'string', 'const': 'UNDERLYING'}, {'type': 'string', 'const': 'COLLATERAL'}, {'type': 'string', 'const': 'RECEIPT_TOKEN'}, {'type': 'string', 'const': 'LP_SHARE'}, {'type': 'string', 'const': 'LIABILITY_TOKEN'}, {'type': 'string', 'const': 'REWARD'}, {'type': 'string', 'const': 'OTHER'}]}, 'positionRef': {'type': 'string'}}, 'additionalProperties': False}, 'from': {'type': 'object', 'required': ['address'], 'properties': {'label': {'type': 'string'}, 'address': {'type': 'string'}}, 'additionalProperties': False}, 'type': {'enum': ['IN', 'OUT', 'GAS', 'SELF'], 'type': 'string'}, 'quote': {'type': 'object', 'properties': {'meta': {'type': 'object', 'required': ['s'], 'properties': {'s': {'enum': ['SYNC_SOURCE', 'FMV_ENGINE', 'DERIVED_REPRESENTED', 'DERIVED_SIBLING', 'POLICY', 'MANUAL'], 'type': 'string'}, 'ts': {'type': 'integer', 'maximum': 8210266876799, 'minimum': 1}}, 'additionalProperties': False}, 'value': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, 'source': {'type': 'string'}, 'currency': {'type': 'string'}}, 'additionalProperties': False}, 'token': {'type': 'object', 'required': ['chainId', 'address', 'assetId', 'symbol', 'type', 'decimals', 'isSpam'], 'properties': {'type': {'anyOf': [{'type': 'string', 'const': 'ERC20'}, {'type': 'string', 'const': 'NATIVE'}, {'type': 'string', 'const': 'FIAT'}, {'type': 'string', 'const': 'NFT'}, {'type': 'string', 'const': 'REBASE_LST'}, {'type': 'string', 'const': 'INTEREST_BEARING'}, {'type': 'string', 'const': 'VALUE_ACCRUING'}, {'type': 'string', 'const': 'LP_SHARE'}, {'type': 'string', 'const': 'DEBT'}, {'type': 'string', 'const': 'REFLECT'}, {'type': 'string', 'const': 'VOTE_ESCROWED'}]}, 'isSpam': {'type': 'boolean'}, 'symbol': {'type': 'string'}, 'address': {'type': 'string'}, 'assetId': {'type': 'string'}, 'chainId': {'type': 'string'}, 'decimals': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'representsTokenAddress': {'type': 'string'}, 'stablecoinPeggedFiatCurrency': {'type': 'string'}}, 'additionalProperties': False}, 'value': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, 'txIndex': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'portfolioTransactionId': {'type': 'string'}}, 'additionalProperties': False}}}, 'additionalProperties': False}}, 'intercompanyPair': {'type': 'object', 'required': ['pairId', 'side', 'counterpartPortfolioName', 'counterpartPortfolioSlug', 'counterpartPortfolioTransactionId', 'counterpartOperationType', 'counterpartStatus', 'lotLinkCount'], 'properties': {'side': {'enum': ['SEND', 'RECEIVE'], 'type': 'string'}, 'pairId': {'type': 'string'}, 'treatment': {'type': 'string'}, 'lotLinkCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'counterpartStatus': {'enum': ['PROPOSED', 'ERROR', 'POSTED', 'CLOSED'], 'type': 'string'}, 'counterpartSubType': {'type': 'string'}, 'counterpartOperationType': {'type': 'string'}, 'counterpartPortfolioName': {'type': 'string'}, 'counterpartPortfolioSlug': {'type': 'string', 'pattern': '^[a-z0-9-]+$', 'minLength': 1}, 'counterpartPortfolioTransactionId': {'type': 'string'}}, 'additionalProperties': False}, 'walletOperations': {'type': 'array', 'items': {'type': 'object', 'required': ['type', 'txHash', 'chainId', 'txIndex', 'walletTransactionId', 'fromAddress', 'toAddress', 'value', 'tokenAddress', 'isSpam', 'walletName', 'walletAddress'], 'properties': {'type': {'type': 'string'}, 'value': {'type': 'string'}, 'isSpam': {'type': 'boolean'}, 'txHash': {'type': 'string'}, 'assetId': {'type': 'string'}, 'chainId': {'type': 'string'}, 'txIndex': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'quoteMeta': {'type': 'object', 'required': ['s'], 'properties': {'s': {'enum': ['SYNC_SOURCE', 'FMV_ENGINE', 'DERIVED_REPRESENTED', 'DERIVED_SIBLING', 'POLICY', 'MANUAL'], 'type': 'string'}, 'ts': {'type': 'integer', 'maximum': 8210266876799, 'minimum': 1}}, 'additionalProperties': False}, 'toAddress': {'type': 'string'}, 'valueQuote': {'type': 'string'}, 'walletName': {'type': 'string'}, 'assetSymbol': {'type': 'string'}, 'fromAddress': {'type': 'string'}, 'quoteSource': {'type': 'string'}, 'tokenAddress': {'type': 'string'}, 'defiOperation': {'type': 'string'}, 'quoteCurrency': {'type': 'string'}, 'walletAddress': {'type': 'string'}, 'defiPositionId': {'type': 'string'}, 'toAddressLabel': {'type': 'string'}, 'defiPositionRef': {'type': 'string'}, 'fromAddressLabel': {'type': 'string'}, 'walletTransactionId': {'type': 'string'}, 'stablecoinPeggedFiatCurrency': {'type': 'string'}}, 'additionalProperties': False}}, 'portfolioTransactionContext': {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}}, 'additionalProperties': False}
list_raw_transactions
List Raw Transactions
Find compact source transactions first, called Raw Transactions in Tokenbooks, including unprocessed or partially linked activity. Pass rawTransactionId to show how one maps to wallet movements and accounting transactions; add includeDetails for its sanitized event logs and decoded contract calls (untrusted provider evidence).
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef'], 'properties': {'sort': {'enum': ['timestamp', '-timestamp'], 'type': 'string', 'default': '-timestamp', 'description': 'Timestamp order. Use timestamp for ascending or -timestamp for descending; defaults to -timestamp.'}, 'limit': {'anyOf': [{'type': 'integer', 'maximum': 100, 'minimum': 1, 'description': 'Maximum raw transaction summaries to return, maximum 100.'}, {'type': 'string', 'pattern': '^(?: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|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$', 'description': 'Maximum raw transaction summaries to return, maximum 100. Numeric strings are accepted for MCP client compatibility.'}], 'description': 'Maximum raw transaction summaries to return, maximum 100.'}, 'toDate': {'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': 'Latest transaction timestamp to include, as an ISO 8601 datetime.'}, 'txHash': {'type': 'string', 'description': 'Exact on-chain transaction hash.'}, 'chainId': {'type': 'string', 'minLength': 1, 'description': 'Blockchain to filter by, such as eth-mainnet. Call list_chains for the supported set.'}, 'chainIds': {'type': 'array', 'items': {'type': 'string', 'minLength': 1}, 'description': 'Blockchains to filter by, such as eth-mainnet. Call list_chains for the supported set.'}, 'fromDate': {'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': 'Earliest transaction timestamp to include, as an ISO 8601 datetime.'}, 'pageToken': {'type': 'string', 'minLength': 1, 'description': 'Opaque token returned by the previous list response.'}, 'portfolioRef': {'type': 'string', 'minLength': 1, 'description': 'Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.'}, 'workspaceRef': {'type': 'string', 'minLength': 1, 'description': 'Workspace name or slug. Call list_workspaces to resolve it.'}, 'walletAddress': {'type': 'string', 'minLength': 1, 'description': 'Wallet to filter by. Supply chainId alongside it.'}, 'includeDetails': {'type': 'boolean', 'default': False, 'description': 'With rawTransactionId, also return blockchain event logs and decoded contract calls'}, 'processingState': {'enum': ['PROCESSED', 'PARTIAL', 'UNPROCESSED'], 'type': 'string', 'description': 'Keep only source transactions in this processing state.'}, 'rawTransactionId': {'type': 'string', 'minLength': 1, 'description': 'Look up one source transaction by handle instead of listing'}, 'includeSpamTokens': {'type': 'boolean', 'default': False, 'description': 'Include transactions whose operations contain only spam tokens; defaults to false.'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$defs': {'RawTransactionWithDetailsDto__schema0': {'anyOf': [{'type': 'string'}, {'type': 'number'}, {'type': 'boolean'}, {'type': 'null'}, {'type': 'array', 'items': {'$ref': '#/$defs/RawTransactionWithDetailsDto__schema0'}}, {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {'$ref': '#/$defs/RawTransactionWithDetailsDto__schema0'}}]}}, 'anyOf': [{'type': 'object', 'required': ['data', 'pagination', 'resultType'], 'properties': {'data': {'$ref': '#/properties/data'}, 'pagination': {'$ref': '#/properties/pagination'}, 'resultType': {'type': 'string', 'const': 'rawTransactionList'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['id', 'wallet', 'hash', 'blockHeight', 'timestamp', 'processingState', 'walletOperations', 'resultType'], 'properties': {'id': {'$ref': '#/properties/id'}, 'hash': {'$ref': '#/properties/hash'}, 'memo': {'$ref': '#/properties/memo'}, 'wallet': {'$ref': '#/properties/wallet'}, 'details': {'$ref': '#/properties/details'}, 'timestamp': {'$ref': '#/properties/timestamp'}, 'resultType': {'type': 'string', 'const': 'rawTransaction'}, 'blockHeight': {'$ref': '#/properties/blockHeight'}, 'processingState': {'$ref': '#/properties/processingState'}, 'walletOperations': {'$ref': '#/properties/walletOperations'}}, 'additionalProperties': False}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['resultType'], 'properties': {'id': {'type': 'string', 'minLength': 1}, 'data': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'wallet', 'hash', 'blockHeight', 'timestamp', 'processingState'], 'properties': {'id': {'type': 'string', 'minLength': 1}, 'hash': {'type': 'string'}, 'memo': {'type': 'string'}, 'wallet': {'type': 'object', 'required': ['chainId', 'address', 'type'], 'properties': {'name': {'type': 'string'}, 'type': {'enum': ['BLOCKCHAIN', 'EXCHANGE', 'BANK'], 'type': 'string'}, 'address': {'type': 'string'}, 'chainId': {'type': 'string'}}, 'additionalProperties': False}, 'timestamp': {'type': 'string', 'format': 'date-time'}, 'blockHeight': {'type': 'string', 'pattern': '^\\d+$'}, 'processingState': {'enum': ['PROCESSED', 'PARTIAL', 'UNPROCESSED'], 'type': 'string'}}, 'additionalProperties': False}}, 'hash': {'type': 'string'}, 'memo': {'type': 'string'}, 'wallet': {'type': 'object', 'required': ['chainId', 'address', 'type'], 'properties': {'name': {'type': 'string'}, 'type': {'enum': ['BLOCKCHAIN', 'EXCHANGE', 'BANK'], 'type': 'string'}, 'address': {'type': 'string'}, 'chainId': {'type': 'string'}}, 'additionalProperties': False}, 'details': {'$ref': '#/$defs/RawTransactionWithDetailsDto__schema0'}, 'timestamp': {'type': 'string', 'format': 'date-time'}, 'pagination': {'type': 'object', 'required': ['pageSize'], 'properties': {'pageSize': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 1}, 'nextPageToken': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, 'resultType': {'enum': ['rawTransactionList', 'rawTransaction'], 'type': 'string'}, 'blockHeight': {'type': 'string', 'pattern': '^\\d+$'}, 'processingState': {'enum': ['PROCESSED', 'PARTIAL', 'UNPROCESSED'], 'type': 'string'}, 'walletOperations': {'type': 'array', 'items': {'type': 'object', 'required': ['txIndex', 'type', 'from', 'to', 'token', 'value'], 'properties': {'to': {'type': 'object', 'required': ['address'], 'properties': {'label': {'type': 'string'}, 'address': {'type': 'string'}}, 'additionalProperties': False}, 'defi': {'type': 'object', 'properties': {'operation': {'anyOf': [{'type': 'string', 'const': 'PROTOCOL_DEPOSIT'}, {'type': 'string', 'const': 'PROTOCOL_WITHDRAW'}, {'type': 'string', 'const': 'VAULT_DEPOSIT'}, {'type': 'string', 'const': 'VAULT_WITHDRAW'}, {'type': 'string', 'const': 'SWAP'}, {'type': 'string', 'const': 'PROVIDE_LIQUIDITY'}, {'type': 'string', 'const': 'REMOVE_LIQUIDITY'}, {'type': 'string', 'const': 'LEND'}, {'type': 'string', 'const': 'WITHDRAW_LEND'}, {'type': 'string', 'const': 'LEND_REDUCE'}, {'type': 'string', 'const': 'BORROW'}, {'type': 'string', 'const': 'REPAY'}, {'type': 'string', 'const': 'LOAN_LIQUIDATION'}, {'type': 'string', 'const': 'STAKE'}, {'type': 'string', 'const': 'UNSTAKE'}, {'type': 'string', 'const': 'CLAIM_REWARDS'}]}, 'tokenRole': {'anyOf': [{'type': 'string', 'const': 'UNDERLYING'}, {'type': 'string', 'const': 'COLLATERAL'}, {'type': 'string', 'const': 'RECEIPT_TOKEN'}, {'type': 'string', 'const': 'LP_SHARE'}, {'type': 'string', 'const': 'LIABILITY_TOKEN'}, {'type': 'string', 'const': 'REWARD'}, {'type': 'string', 'const': 'OTHER'}]}, 'positionRef': {'type': 'string'}}, 'additionalProperties': False}, 'from': {'type': 'object', 'required': ['address'], 'properties': {'label': {'type': 'string'}, 'address': {'type': 'string'}}, 'additionalProperties': False}, 'type': {'enum': ['IN', 'OUT', 'GAS', 'SELF'], 'type': 'string'}, 'quote': {'type': 'object', 'properties': {'meta': {'type': 'object', 'required': ['s'], 'properties': {'s': {'enum': ['SYNC_SOURCE', 'FMV_ENGINE', 'DERIVED_REPRESENTED', 'DERIVED_SIBLING', 'POLICY', 'MANUAL'], 'type': 'string'}, 'ts': {'type': 'integer', 'maximum': 8210266876799, 'minimum': 1}}, 'additionalProperties': False}, 'value': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, 'source': {'type': 'string'}, 'currency': {'type': 'string'}}, 'additionalProperties': False}, 'token': {'type': 'object', 'required': ['chainId', 'address', 'assetId', 'symbol', 'type', 'decimals', 'isSpam'], 'properties': {'type': {'anyOf': [{'type': 'string', 'const': 'ERC20'}, {'type': 'string', 'const': 'NATIVE'}, {'type': 'string', 'const': 'FIAT'}, {'type': 'string', 'const': 'NFT'}, {'type': 'string', 'const': 'REBASE_LST'}, {'type': 'string', 'const': 'INTEREST_BEARING'}, {'type': 'string', 'const': 'VALUE_ACCRUING'}, {'type': 'string', 'const': 'LP_SHARE'}, {'type': 'string', 'const': 'DEBT'}, {'type': 'string', 'const': 'REFLECT'}, {'type': 'string', 'const': 'VOTE_ESCROWED'}]}, 'isSpam': {'type': 'boolean'}, 'symbol': {'type': 'string'}, 'address': {'type': 'string'}, 'assetId': {'type': 'string'}, 'chainId': {'type': 'string'}, 'decimals': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'representsTokenAddress': {'type': 'string'}, 'stablecoinPeggedFiatCurrency': {'type': 'string'}}, 'additionalProperties': False}, 'value': {'type': 'string', 'pattern': '^-?\\d+(\\.\\d+)?$'}, 'txIndex': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': 0}, 'portfolioTransactionId': {'type': 'string'}}, 'additionalProperties': False}}}, 'additionalProperties': False}
list_wallets
List Wallets
List wallets in a portfolio with sync status and transaction counts. Pass chainId and walletAddress to check one wallet instead — safe codes/messages show whether to retry or reconnect credentials. EVM addresses are normalized; other networks may be case-sensitive.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef'], 'properties': {'page': {'type': 'integer', 'description': 'Page number, starting at 1'}, 'limit': {'anyOf': [{'type': 'integer', 'maximum': 100, 'minimum': 1, 'description': 'Maximum items to return, maximum 100. Preferred MCP pagination field.'}, {'type': 'string', 'pattern': '^(?: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|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$', 'description': 'Maximum items to return, maximum 100. Preferred MCP pagination field. Numeric strings are accepted for MCP client compatibility.'}], 'description': 'Maximum items to return, maximum 100. Preferred MCP pagination field.'}, 'chainId': {'type': 'string', 'description': 'Optional chain filter, or with walletAddress'}, 'pageSize': {'anyOf': [{'type': 'integer', 'maximum': 100, 'minimum': 1, 'description': 'Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls.'}, {'type': 'string', 'pattern': '^(?: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|32|33|34|35|36|37|38|39|40|41|42|43|44|45|46|47|48|49|50|51|52|53|54|55|56|57|58|59|60|61|62|63|64|65|66|67|68|69|70|71|72|73|74|75|76|77|78|79|80|81|82|83|84|85|86|87|88|89|90|91|92|93|94|95|96|97|98|99|100)$', 'description': 'Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls. Numeric strings are accepted for MCP client compatibility.'}], 'description': 'Deprecated alias for limit, maximum 100. Prefer limit for new MCP calls.'}, 'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}, 'walletAddress': {'type': 'string', 'description': 'Look up one wallet; requires chainId'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$defs': {'WalletDetailsResponseDto': {'type': 'object', 'required': ['chainId', 'address', 'createdAt', 'syncMessages', 'syncStatus', 'transactionCount'], 'properties': {'name': {'type': 'string'}, 'address': {'type': 'string'}, 'chainId': {'type': 'string'}, 'createdAt': {'type': 'string', 'format': 'date-time'}, 'lastSyncAt': {'type': 'string', 'format': 'date-time'}, 'syncStatus': {'enum': ['pending', 'syncing', 'synced', 'failed'], 'type': 'string'}, 'syncMessages': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['code', 'message', 'severity', 'details'], 'properties': {'code': {'type': 'string', 'const': 'EXCHANGE_RECONNECT_REQUIRED'}, 'details': {'type': 'object', 'required': ['provider', 'reconnectRequired', 'errorType'], 'properties': {'provider': {'type': 'string', 'minLength': 1}, 'errorType': {'type': 'string', 'const': 'ExternalServiceAuthenticationError'}, 'reconnectRequired': {'type': 'boolean', 'const': True}}, 'additionalProperties': False}, 'message': {'type': 'string', 'minLength': 1}, 'severity': {'enum': ['ERROR', 'WARN'], 'type': 'string', 'default': 'ERROR'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['code', 'message', 'severity', 'details'], 'properties': {'code': {'type': 'string', 'const': 'SYNC_PROCESSING_FAILED'}, 'details': {'type': 'object', 'required': ['retryable', 'errorType'], 'properties': {'errorType': {'type': 'string', 'const': 'SyncProcessingError'}, 'retryable': {'type': 'boolean', 'const': True}}, 'additionalProperties': False}, 'message': {'type': 'string', 'minLength': 1}, 'severity': {'enum': ['ERROR', 'WARN'], 'type': 'string', 'default': 'ERROR'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['code', 'message', 'severity', 'details'], 'properties': {'code': {'type': 'string', 'const': 'SYNC_WARNING'}, 'details': {'type': 'object', 'required': ['errorType'], 'properties': {'errorType': {'type': 'string', 'const': 'SyncWarning'}}, 'additionalProperties': False}, 'message': {'type': 'string', 'minLength': 1}, 'severity': {'enum': ['ERROR', 'WARN'], 'type': 'string', 'default': 'ERROR'}}, 'additionalProperties': False}]}}, 'transactionCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}}, 'additionalProperties': False}}, 'anyOf': [{'type': 'object', 'required': ['data', 'pagination', 'resultType'], 'properties': {'data': {'$ref': '#/properties/data'}, 'pagination': {'$ref': '#/properties/pagination'}, 'resultType': {'type': 'string', 'const': 'walletList'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['chainId', 'address', 'createdAt', 'syncMessages', 'syncStatus', 'transactionCount', 'resultType'], 'properties': {'name': {'$ref': '#/properties/name'}, 'address': {'$ref': '#/properties/address'}, 'chainId': {'$ref': '#/properties/chainId'}, 'createdAt': {'$ref': '#/properties/createdAt'}, 'lastSyncAt': {'$ref': '#/properties/lastSyncAt'}, 'resultType': {'type': 'string', 'const': 'wallet'}, 'syncStatus': {'$ref': '#/properties/syncStatus'}, 'syncMessages': {'$ref': '#/properties/syncMessages'}, 'transactionCount': {'$ref': '#/properties/transactionCount'}}, 'additionalProperties': False}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['resultType'], 'properties': {'data': {'type': 'array', 'items': {'$ref': '#/$defs/WalletDetailsResponseDto'}}, 'name': {'type': 'string'}, 'address': {'type': 'string'}, 'chainId': {'type': 'string'}, 'createdAt': {'type': 'string', 'format': 'date-time'}, 'lastSyncAt': {'type': 'string', 'format': 'date-time'}, 'pagination': {'type': 'object', 'required': ['page', 'pageSize', 'totalCount', 'totalPages'], 'properties': {'page': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'pageSize': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'totalCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}, 'totalPages': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}}, 'additionalProperties': False}, 'resultType': {'enum': ['walletList', 'wallet'], 'type': 'string'}, 'syncStatus': {'enum': ['pending', 'syncing', 'synced', 'failed'], 'type': 'string'}, 'syncMessages': {'type': 'array', 'items': {'oneOf': [{'type': 'object', 'required': ['code', 'message', 'severity', 'details'], 'properties': {'code': {'type': 'string', 'const': 'EXCHANGE_RECONNECT_REQUIRED'}, 'details': {'type': 'object', 'required': ['provider', 'reconnectRequired', 'errorType'], 'properties': {'provider': {'type': 'string', 'minLength': 1}, 'errorType': {'type': 'string', 'const': 'ExternalServiceAuthenticationError'}, 'reconnectRequired': {'type': 'boolean', 'const': True}}, 'additionalProperties': False}, 'message': {'type': 'string', 'minLength': 1}, 'severity': {'enum': ['ERROR', 'WARN'], 'type': 'string', 'default': 'ERROR'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['code', 'message', 'severity', 'details'], 'properties': {'code': {'type': 'string', 'const': 'SYNC_PROCESSING_FAILED'}, 'details': {'type': 'object', 'required': ['retryable', 'errorType'], 'properties': {'errorType': {'type': 'string', 'const': 'SyncProcessingError'}, 'retryable': {'type': 'boolean', 'const': True}}, 'additionalProperties': False}, 'message': {'type': 'string', 'minLength': 1}, 'severity': {'enum': ['ERROR', 'WARN'], 'type': 'string', 'default': 'ERROR'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['code', 'message', 'severity', 'details'], 'properties': {'code': {'type': 'string', 'const': 'SYNC_WARNING'}, 'details': {'type': 'object', 'required': ['errorType'], 'properties': {'errorType': {'type': 'string', 'const': 'SyncWarning'}}, 'additionalProperties': False}, 'message': {'type': 'string', 'minLength': 1}, 'severity': {'enum': ['ERROR', 'WARN'], 'type': 'string', 'default': 'ERROR'}}, 'additionalProperties': False}]}}, 'transactionCount': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}}, 'additionalProperties': False}
list_workspaces
List Workspaces
List workspaces available to the authenticated Tokenbooks user, or search by name or slug.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'properties': {'query': {'type': 'string', 'description': 'Optional workspace name or slug search query'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['data'], 'properties': {'data': {'type': 'array', 'items': {'type': 'object', 'required': ['name', 'planName', 'role', 'slug', 'usage'], 'properties': {'name': {'type': 'string'}, 'role': {'type': 'string'}, 'slug': {'type': 'string'}, 'usage': {'type': 'object', 'required': ['portfolios', 'transactions', 'users', 'wallets'], 'properties': {'users': {'type': 'number'}, 'wallets': {'type': 'number'}, 'portfolios': {'type': 'number'}, 'transactions': {'type': 'number'}}, 'additionalProperties': False}, 'planName': {'type': 'string'}}, 'additionalProperties': False}}}, 'additionalProperties': False}
mark_token_spam
Mark Token as Spam
Mark or unmark a token as spam so unwanted dust or airdrops are excluded from accounting and existing records are updated; this queued action defaults to marking spam and returns a requestId.
外部アクセスあり
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'chainId', 'tokenAddress'], 'properties': {'isSpam': {'type': 'boolean', 'description': 'Spam flag to set (default true; false unmarks)'}, 'reason': {'type': 'string', 'description': 'Optional immutable root reason. Nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references.'}, 'chainId': {'type': 'string', 'description': 'Chain ID of the token (from a walletOperation)'}, 'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'tokenAddress': {'type': 'string', 'description': 'Token contract address (from a walletOperation)'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', 'oneOf': [{'type': 'object', 'required': ['status', 'requestId'], 'properties': {'status': {'type': 'string', 'const': 'queued'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['status', 'success'], 'properties': {'error': {'type': 'object', 'required': ['name', 'message'], 'properties': {'name': {'type': 'string'}, 'message': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'type': 'string', 'const': 'completed'}, 'success': {'type': 'boolean'}}, 'additionalProperties': False}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['status'], 'properties': {'error': {'type': 'object', 'required': ['name', 'message'], 'properties': {'name': {'type': 'string'}, 'message': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'enum': ['queued', 'completed'], 'type': 'string'}, 'success': {'type': 'boolean'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}
merge_transactions
Merge Portfolio Transactions
Destructively combine wallet movements from several accounting transactions into one target transaction and reclassify it; preview the grouping first, then track the queued requestId.
破壊的操作あり 外部アクセスあり
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'transactionId', 'operations', 'operationType'], 'properties': {'reason': {'type': 'string', 'description': 'Optional immutable root reason. Nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references.'}, 'subType': {'type': 'string', 'description': 'Optional operation sub-type'}, 'operations': {'type': 'array', 'items': {'type': 'object', 'required': ['walletTransactionId', 'txIndex', 'portfolioTransactionId'], 'properties': {'txIndex': {'type': 'integer', 'description': 'Transfer index within the wallet transaction'}, 'walletTransactionId': {'type': 'string', 'description': 'Wallet transaction handle (from a walletOperation)'}, 'portfolioTransactionId': {'type': 'string', 'description': 'Portfolio transaction the operation currently belongs to'}}, 'additionalProperties': False}, 'description': 'Operations to merge into the target'}, 'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}, 'operationType': {'enum': ['DEPOSIT_FIAT', 'INCOME', 'REFUND', 'WITHDRAWAL_FIAT', 'EXPENSE', 'BUY', 'SELL', 'EXCHANGE', 'SWAP', 'MOVE', 'INTERCOMPANY_SEND', 'INTERCOMPANY_RECEIVE', 'STAKE', 'UNSTAKE', 'PROTOCOL_DEPOSIT', 'PROTOCOL_WITHDRAW', 'VAULT_DEPOSIT', 'VAULT_WITHDRAW', 'LP_IN', 'LP_OUT', 'LOAN_BORROW', 'LOAN_REPAY', 'LOAN_LIQUIDATION', 'LEND_GIVE', 'LEND_WITHDRAW', 'ADJUSTMENT', 'UNCATEGORIZED', 'SPAM'], 'type': 'string', 'description': 'Accounting operation type for the merged transaction'}, 'transactionId': {'type': 'string', 'description': 'Target transaction the operations are merged into'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', 'oneOf': [{'type': 'object', 'required': ['status', 'requestId', 'transactionId'], 'properties': {'status': {'type': 'string', 'const': 'queued'}, 'requestId': {'type': 'string'}, 'transactionId': {'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['status', 'success', 'transactionId'], 'properties': {'error': {'type': 'object', 'required': ['name', 'message'], 'properties': {'name': {'type': 'string'}, 'message': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'type': 'string', 'const': 'completed'}, 'success': {'type': 'boolean'}, 'transactionId': {'type': 'string'}}, 'additionalProperties': False}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['status', 'transactionId'], 'properties': {'error': {'type': 'object', 'required': ['name', 'message'], 'properties': {'name': {'type': 'string'}, 'message': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'enum': ['queued', 'completed'], 'type': 'string'}, 'success': {'type': 'boolean'}, 'requestId': {'type': 'string'}, 'transactionId': {'type': 'string'}}, 'additionalProperties': False}
preview_transaction_classification
Preview Transaction Classification
Preview how selected wallet movements would be grouped and labeled as accounting transactions. Returns every proposal in order and saves nothing.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'operations'], 'properties': {'operations': {'type': 'array', 'items': {'type': 'object', 'required': ['portfolioTransactionId', 'walletTransactionId', 'txIndex'], 'properties': {'txIndex': {'type': 'integer', 'maximum': 2147483647, 'minimum': 0, 'description': 'Position of the movement within that source transaction, from the same walletOperation.'}, 'walletTransactionId': {'type': 'string', 'minLength': 1, 'description': 'Source transaction the wallet movement belongs to, from a walletOperation in a read tool result.'}, 'portfolioTransactionId': {'type': 'string', 'minLength': 1, 'description': 'Accounting transaction the movement currently belongs to.'}}, 'additionalProperties': False}, 'minItems': 1, 'description': 'Exact transfer-operation handles returned by transaction reads, including the accounting transaction each operation currently belongs to'}, 'portfolioRef': {'type': 'string', 'minLength': 1, 'description': 'Portfolio name or slug inside that workspace. Call list_portfolios to resolve it.'}, 'workspaceRef': {'type': 'string', 'minLength': 1, 'description': 'Workspace name or slug. Call list_workspaces to resolve it.'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['transactions'], 'properties': {'transactions': {'type': 'array', 'items': {'type': 'object', 'required': ['operationType', 'timestamp', 'operations'], 'properties': {'subType': {'type': 'string'}, 'timestamp': {'type': 'string', 'format': 'date-time'}, 'operations': {'type': 'array', 'items': {'type': 'object', 'required': ['portfolioTransactionId', 'walletTransactionId', 'txIndex'], 'properties': {'txIndex': {'type': 'integer', 'maximum': 2147483647, 'minimum': 0}, 'walletTransactionId': {'type': 'string', 'minLength': 1}, 'portfolioTransactionId': {'type': 'string', 'minLength': 1}}, 'additionalProperties': False}, 'minItems': 1}, 'systemNotes': {'type': 'string'}, 'operationType': {'enum': ['DEPOSIT_FIAT', 'INCOME', 'REFUND', 'WITHDRAWAL_FIAT', 'EXPENSE', 'BUY', 'SELL', 'EXCHANGE', 'SWAP', 'MOVE', 'INTERCOMPANY_SEND', 'INTERCOMPANY_RECEIVE', 'STAKE', 'UNSTAKE', 'PROTOCOL_DEPOSIT', 'PROTOCOL_WITHDRAW', 'VAULT_DEPOSIT', 'VAULT_WITHDRAW', 'LP_IN', 'LP_OUT', 'LOAN_BORROW', 'LOAN_REPAY', 'LOAN_LIQUIDATION', 'LEND_GIVE', 'LEND_WITHDRAW', 'ADJUSTMENT', 'UNCATEGORIZED', 'SPAM'], 'type': 'string'}}, 'additionalProperties': False}}}, 'additionalProperties': False}
reprocess_transaction
Reprocess Portfolio Transaction
Recalculate one accounting transaction after correcting its inputs; this destructive queued job may regroup only its assigned wallet movements, and waitForCompletion can return the final state.
破壊的操作あり 外部アクセスあり
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'transactionId'], 'properties': {'reason': {'type': 'string', 'minLength': 1, 'description': 'Optional immutable root reason; nonempty bytes are preserved exactly'}, 'timeoutMs': {'type': 'integer', 'maximum': 60000, 'minimum': 1000, 'description': 'Maximum wait time in milliseconds'}, 'portfolioRef': {'type': 'string', 'minLength': 1, 'description': 'Portfolio name or slug'}, 'workspaceRef': {'type': 'string', 'minLength': 1, 'description': 'Workspace name or slug'}, 'transactionId': {'type': 'string', 'minLength': 1, 'description': 'Selected portfolio transaction ID to reprocess'}, 'pollIntervalMs': {'type': 'integer', 'maximum': 5000, 'minimum': 100, 'description': 'Request-status polling interval in milliseconds'}, 'waitForCompletion': {'type': 'boolean', 'description': 'Wait for the queued reprocess request to reach a terminal state before returning'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', 'oneOf': [{'type': 'object', 'required': ['status', 'requestId', 'transactionId'], 'properties': {'status': {'type': 'string', 'const': 'queued'}, 'requests': {'type': 'object', 'required': ['primary', 'all'], 'properties': {'all': {'type': 'array', 'items': {'type': 'object', 'required': ['requestId', 'type', 'status', 'progress', 'createdAt', 'updatedAt'], 'properties': {'type': {'enum': ['sync', 'export', 'recompute', 'reclassify'], 'type': 'string'}, 'error': {'type': 'object', 'required': ['error'], 'properties': {'error': {'type': 'object', 'required': ['code', 'message', 'requestId'], 'properties': {'code': {'type': 'string'}, 'details': {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'message': {'type': 'string'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}, 'result': {'type': 'object', 'required': ['downloadUrl', 'fileSize', 'format'], 'properties': {'format': {'enum': ['xlsx', 'pdf', 'json'], 'type': 'string'}, 'fileSize': {'type': 'number'}, 'downloadUrl': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'enum': ['pending', 'active', 'delayed', 'completed', 'failed'], 'type': 'string'}, 'progress': {'type': 'number'}, 'createdAt': {'type': 'string', 'format': 'date-time'}, 'requestId': {'type': 'string'}, 'updatedAt': {'type': 'string', 'format': 'date-time'}, 'finishedOn': {'type': 'number'}, 'appProgress': {'type': 'object', 'required': ['completed', 'total', 'transactionsSynced'], 'properties': {'total': {'type': 'number'}, 'completed': {'type': 'number'}, 'transactionsSynced': {'type': 'number'}}, 'additionalProperties': False}, 'completedAt': {'type': 'string', 'format': 'date-time'}, 'returnValue': {}}, 'additionalProperties': False}}, 'primary': {'type': 'string'}}, 'additionalProperties': False}, 'statuses': {'type': 'array', 'items': {'type': 'object', 'required': ['requestId', 'type', 'status', 'progress', 'createdAt', 'updatedAt'], 'properties': {'type': {'enum': ['sync', 'export', 'recompute', 'reclassify'], 'type': 'string'}, 'error': {'type': 'object', 'required': ['error'], 'properties': {'error': {'type': 'object', 'required': ['code', 'message', 'requestId'], 'properties': {'code': {'type': 'string'}, 'details': {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'message': {'type': 'string'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}, 'result': {'type': 'object', 'required': ['downloadUrl', 'fileSize', 'format'], 'properties': {'format': {'enum': ['xlsx', 'pdf', 'json'], 'type': 'string'}, 'fileSize': {'type': 'number'}, 'downloadUrl': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'enum': ['pending', 'active', 'delayed', 'completed', 'failed'], 'type': 'string'}, 'progress': {'type': 'number'}, 'createdAt': {'type': 'string', 'format': 'date-time'}, 'requestId': {'type': 'string'}, 'updatedAt': {'type': 'string', 'format': 'date-time'}, 'finishedOn': {'type': 'number'}, 'appProgress': {'type': 'object', 'required': ['completed', 'total', 'transactionsSynced'], 'properties': {'total': {'type': 'number'}, 'completed': {'type': 'number'}, 'transactionsSynced': {'type': 'number'}}, 'additionalProperties': False}, 'completedAt': {'type': 'string', 'format': 'date-time'}, 'returnValue': {}}, 'additionalProperties': False}}, 'completed': {'type': 'boolean'}, 'requestId': {'type': 'string'}, 'finalState': {'type': 'object', 'required': ['hasError', 'errorTypes', 'suggestedAction'], 'properties': {'hasError': {'type': 'boolean'}, 'errorTypes': {'type': 'array', 'items': {'type': 'string'}}, 'operationType': {'type': 'string'}, 'suggestedAction': {}, 'classificationState': {'type': 'string'}}, 'additionalProperties': False}, 'transactionId': {'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['status', 'success', 'transactionId'], 'properties': {'error': {'type': 'object', 'required': ['name', 'message'], 'properties': {'name': {'type': 'string'}, 'message': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'type': 'string', 'const': 'completed'}, 'success': {'type': 'boolean'}, 'transactionId': {'type': 'string'}}, 'additionalProperties': False}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['status', 'transactionId'], 'properties': {'error': {'type': 'object', 'required': ['name', 'message'], 'properties': {'name': {'type': 'string'}, 'message': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'enum': ['queued', 'completed'], 'type': 'string'}, 'success': {'type': 'boolean'}, 'requests': {'type': 'object', 'required': ['primary', 'all'], 'properties': {'all': {'type': 'array', 'items': {'type': 'object', 'required': ['requestId', 'type', 'status', 'progress', 'createdAt', 'updatedAt'], 'properties': {'type': {'enum': ['sync', 'export', 'recompute', 'reclassify'], 'type': 'string'}, 'error': {'type': 'object', 'required': ['error'], 'properties': {'error': {'type': 'object', 'required': ['code', 'message', 'requestId'], 'properties': {'code': {'type': 'string'}, 'details': {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'message': {'type': 'string'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}, 'result': {'type': 'object', 'required': ['downloadUrl', 'fileSize', 'format'], 'properties': {'format': {'enum': ['xlsx', 'pdf', 'json'], 'type': 'string'}, 'fileSize': {'type': 'number'}, 'downloadUrl': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'enum': ['pending', 'active', 'delayed', 'completed', 'failed'], 'type': 'string'}, 'progress': {'type': 'number'}, 'createdAt': {'type': 'string', 'format': 'date-time'}, 'requestId': {'type': 'string'}, 'updatedAt': {'type': 'string', 'format': 'date-time'}, 'finishedOn': {'type': 'number'}, 'appProgress': {'type': 'object', 'required': ['completed', 'total', 'transactionsSynced'], 'properties': {'total': {'type': 'number'}, 'completed': {'type': 'number'}, 'transactionsSynced': {'type': 'number'}}, 'additionalProperties': False}, 'completedAt': {'type': 'string', 'format': 'date-time'}, 'returnValue': {}}, 'additionalProperties': False}}, 'primary': {'type': 'string'}}, 'additionalProperties': False}, 'statuses': {'type': 'array', 'items': {'type': 'object', 'required': ['requestId', 'type', 'status', 'progress', 'createdAt', 'updatedAt'], 'properties': {'type': {'enum': ['sync', 'export', 'recompute', 'reclassify'], 'type': 'string'}, 'error': {'type': 'object', 'required': ['error'], 'properties': {'error': {'type': 'object', 'required': ['code', 'message', 'requestId'], 'properties': {'code': {'type': 'string'}, 'details': {'type': 'object', 'propertyNames': {'type': 'string'}, 'additionalProperties': {}}, 'message': {'type': 'string'}, 'requestId': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}, 'result': {'type': 'object', 'required': ['downloadUrl', 'fileSize', 'format'], 'properties': {'format': {'enum': ['xlsx', 'pdf', 'json'], 'type': 'string'}, 'fileSize': {'type': 'number'}, 'downloadUrl': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'enum': ['pending', 'active', 'delayed', 'completed', 'failed'], 'type': 'string'}, 'progress': {'type': 'number'}, 'createdAt': {'type': 'string', 'format': 'date-time'}, 'requestId': {'type': 'string'}, 'updatedAt': {'type': 'string', 'format': 'date-time'}, 'finishedOn': {'type': 'number'}, 'appProgress': {'type': 'object', 'required': ['completed', 'total', 'transactionsSynced'], 'properties': {'total': {'type': 'number'}, 'completed': {'type': 'number'}, 'transactionsSynced': {'type': 'number'}}, 'additionalProperties': False}, 'completedAt': {'type': 'string', 'format': 'date-time'}, 'returnValue': {}}, 'additionalProperties': False}}, 'completed': {'type': 'boolean'}, 'requestId': {'type': 'string'}, 'finalState': {'type': 'object', 'required': ['hasError', 'errorTypes', 'suggestedAction'], 'properties': {'hasError': {'type': 'boolean'}, 'errorTypes': {'type': 'array', 'items': {'type': 'string'}}, 'operationType': {'type': 'string'}, 'suggestedAction': {}, 'classificationState': {'type': 'string'}}, 'additionalProperties': False}, 'transactionId': {'type': 'string'}}, 'additionalProperties': False}
request_report_export
Request Report Export
Queue generation of the requested spreadsheet, PDF, or JSON accounting report—such as profit and loss, trial balance, balance sheet, journal, or transaction export—for a reporting period; track the returned requestId with get_request_status.
外部アクセスあり
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'reportType', 'format', 'fromDate', 'toDate'], 'properties': {'format': {'enum': ['xlsx', 'pdf', 'json'], 'type': 'string', 'description': 'Export format'}, 'toDate': {'type': 'string', 'description': 'Report period end ISO timestamp'}, 'fromDate': {'type': 'string', 'description': 'Report period start ISO timestamp'}, 'reportType': {'enum': ['transactions', 'journal-entries', 'gains-losses', 'cost-basis-ledger', 'income-expense', 'profit-and-loss', 'statement', 'balance-sheet', 'trial-balance'], 'type': 'string', 'description': 'Report type'}, 'totalsOnly': {'type': 'boolean', 'description': 'Return summary only when true'}, 'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['requestId'], 'properties': {'requestId': {'type': 'string'}}, 'additionalProperties': False}
simulate_fiat_quote
Simulate Fiat Payout Quote
Estimate exchange rates, processing fees, amount received, and corridor limits for a bank payout before sending money; use it to compare supported rails such as ACH, SEPA, EFT, FPS, IMPS, or SWIFT.
読み取り専用 冪等
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'network', 'receivingAmount'], 'properties': {'network': {'enum': ['SWIFT', 'ACH', 'SEPA', 'FPS', 'EFT', 'FAST', 'CHATS', 'KFTC', 'ZENGIN', 'INSTAPAY', 'PESONET', 'PROMPTPAY', 'BECS', 'IMPS', 'NEFT', 'BI-FAST', 'UAEFTS', 'SPEI', 'SPID', 'PIX'], 'type': 'string', 'description': 'Fiat payout rail / bank method'}, 'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}, 'senderCurrency': {'enum': ['USDC', 'USDT', 'USDe'], 'type': 'string', 'description': 'Stablecoin funding the payout (default USDC)'}, 'receivingAmount': {'type': 'string', 'description': 'Amount the recipient should receive, as a decimal string in the receiving currency (e.g. "500000")'}, 'purposeOfPayment': {'enum': ['payment_for_goods', 'payment_for_business_services', 'payment_for_salary_or_benefits', 'capital_investment_or_item', 'other'], 'type': 'string', 'description': 'Purpose-of-payment classification'}, 'receivingCurrency': {'type': 'string', 'description': 'ISO 4217 receiving currency; defaults to the network default'}, 'recipientBankCountry': {'type': 'string', 'description': 'ISO 3166-1 alpha-2 recipient bank country; defaults to the network default'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['status', 'corridor'], 'properties': {'note': {'type': 'string'}, 'quote': {'type': 'object', 'required': ['exchangeRate', 'senderCurrency', 'receivingCurrency', 'processingFee', 'itemizedFees', 'totalReceivable', 'quoteValiditySeconds', 'summary'], 'properties': {'summary': {'type': 'string'}, 'exchangeRate': {'type': 'string'}, 'itemizedFees': {'type': 'array', 'items': {'type': 'object', 'required': ['key', 'label', 'amount'], 'properties': {'key': {'type': 'string'}, 'label': {'type': 'string'}, 'amount': {'type': 'string'}, 'percentage': {'type': 'string'}}, 'additionalProperties': False}}, 'processingFee': {'type': 'string'}, 'senderCurrency': {'type': 'string'}, 'totalReceivable': {'type': 'string'}, 'receivingCurrency': {'type': 'string'}, 'quoteValiditySeconds': {'type': 'integer', 'maximum': 9007199254740991, 'minimum': -9007199254740991}}, 'additionalProperties': False}, 'status': {'enum': ['quoted', 'corridor_unavailable', 'amount_out_of_range', 'limit_skipped'], 'type': 'string'}, 'corridor': {'type': 'object', 'required': ['network', 'receivingCurrency', 'recipientBankCountry', 'senderCurrency'], 'properties': {'network': {'type': 'string'}, 'amountBounds': {'type': 'object', 'required': ['minAmount', 'maxAmount'], 'properties': {'maxAmount': {'type': 'string'}, 'minAmount': {'type': 'string'}}, 'additionalProperties': False}, 'senderCurrency': {'type': 'string'}, 'receivingCurrency': {'type': 'string'}, 'recipientBankCountry': {'type': 'string'}}, 'additionalProperties': False}}, 'additionalProperties': False}
split_transactions
Split Portfolio Transaction
Destructively move selected whole existing operation handles unchanged out of one accounting transaction into a new classified transaction; use this only when the needed economic legs already exist as operation handles. It cannot divide one transfer amount into new economic legs: repair sync normalization or use a supported persisted replacement lifecycle for a missing leg. Preview the grouping first, then track the queued requestId.
破壊的操作あり 外部アクセスあり
入力スキーマ
{'type': 'object', 'required': ['workspaceRef', 'portfolioRef', 'transactionId', 'operations', 'operationType'], 'properties': {'reason': {'type': 'string', 'description': 'Optional immutable root reason. Nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references.'}, 'subType': {'type': 'string', 'description': 'Optional operation sub-type'}, 'operations': {'type': 'array', 'items': {'type': 'object', 'required': ['walletTransactionId', 'txIndex', 'portfolioTransactionId'], 'properties': {'txIndex': {'type': 'integer', 'description': 'Transfer index within the wallet transaction'}, 'walletTransactionId': {'type': 'string', 'description': 'Wallet transaction handle (from a walletOperation)'}, 'portfolioTransactionId': {'type': 'string', 'description': 'Portfolio transaction the operation currently belongs to'}}, 'additionalProperties': False}, 'description': 'Whole existing operation handles to move unchanged into a new transaction; do not use this to divide one normalized transfer amount into new economic legs'}, 'portfolioRef': {'type': 'string', 'description': 'Portfolio exact name or slug'}, 'workspaceRef': {'type': 'string', 'description': 'Workspace exact name or slug'}, 'operationType': {'enum': ['DEPOSIT_FIAT', 'INCOME', 'REFUND', 'WITHDRAWAL_FIAT', 'EXPENSE', 'BUY', 'SELL', 'EXCHANGE', 'SWAP', 'MOVE', 'INTERCOMPANY_SEND', 'INTERCOMPANY_RECEIVE', 'STAKE', 'UNSTAKE', 'PROTOCOL_DEPOSIT', 'PROTOCOL_WITHDRAW', 'VAULT_DEPOSIT', 'VAULT_WITHDRAW', 'LP_IN', 'LP_OUT', 'LOAN_BORROW', 'LOAN_REPAY', 'LOAN_LIQUIDATION', 'LEND_GIVE', 'LEND_WITHDRAW', 'ADJUSTMENT', 'UNCATEGORIZED', 'SPAM'], 'type': 'string', 'description': 'Accounting operation type for the new transaction'}, 'transactionId': {'type': 'string', 'description': 'Source transaction to split operations out of'}}, 'additionalProperties': False}
出力スキーマ
{'type': 'object', 'oneOf': [{'type': 'object', 'required': ['status', 'requestId', 'transactionId'], 'properties': {'status': {'type': 'string', 'const': 'queued'}, 'requestId': {'type': 'string'}, 'transactionId': {'type': 'string'}}, 'additionalProperties': False}, {'type': 'object', 'required': ['status', 'success', 'transactionId'], 'properties': {'error': {'type': 'object', 'required': ['name', 'message'], 'properties': {'name': {'type': 'string'}, 'message': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'type': 'string', 'const': 'completed'}, 'success': {'type': 'boolean'}, 'transactionId': {'type': 'string'}}, 'additionalProperties': False}], '$schema': 'https://json-schema.org/draft/2020-12/schema', 'required': ['status', 'transactionId'], 'properties': {'error': {'type': 'object', 'required': ['name', 'message'], 'properties': {'name': {'type': 'string'}, 'message': {'type': 'string'}}, 'additionalProperties': False}, 'status': {'enum': ['queued', 'completed'], 'type': 'string'}, 'success': {'type': 'boolean'}, 'requestId': {'type': 'string'}, 'transactionId': {'type': 'string'}}, 'additionalProperties': False}
変更
get_asset_position
2026年10月1日2:50
変更
edit_accounting_rules
2026年10月1日2:50
変更
get_request_status
2026年9月29日2:59
変更
get_filter_options
2026年9月29日2:59
変更
get_help
2026年9月27日2:50
変更
list_chains
2026年9月27日2:50
変更
get_asset_position
2026年9月27日2:50
変更
create_portfolio
2026年9月27日2:50
変更
add_wallet
2026年9月27日2:50
変更
get_request_status
2026年9月27日2:50
変更
request_report_export
2026年9月27日2:50
変更
get_lot_ledger
2026年9月27日2:50
変更
get_journal_entry
2026年9月27日2:50
変更
simulate_fiat_quote
2026年9月27日2:50
変更
mark_token_spam
2026年9月27日2:50
変更
split_transactions
2026年9月27日2:50
変更
merge_transactions
2026年9月27日2:50
変更
preview_transaction_classification
2026年9月27日2:50
変更
reprocess_transaction
2026年9月27日2:50
変更
confirm_transaction
2026年9月27日2:50
変更
get_portfolio_issue_summary
2026年9月27日2:50
変更
get_filter_options
2026年9月27日2:50
変更
list_raw_transactions
2026年9月27日2:50
変更
list_portfolio_transactions
2026年9月27日2:50
変更
full_resync
2026年9月27日2:50
変更
incremental_sync
2026年9月27日2:50
変更
get_sync_status
2026年9月27日2:50
変更
import_adjustment_journals
2026年9月27日2:50
変更
edit_transaction
2026年9月27日2:50
変更
list_journal_line_assignment_options
2026年9月27日2:50