{"openapi":"3.0.0","paths":{"/v1/auth/register":{"post":{"operationId":"AuthController_register","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RegistrationVerificationRequiredResponseDto"},{"$ref":"#/components/schemas/RegistrationCompletedResponseDto"}],"type":"object","discriminator":{"propertyName":"status","mapping":{"verification-required":"#/components/schemas/RegistrationVerificationRequiredResponseDto","registered":"#/components/schemas/RegistrationCompletedResponseDto"}}}}}},"429":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationRateLimitedResponseDto"}}}}},"tags":["Auth"]}},"/v1/assets":{"get":{"deprecated":true,"operationId":"AssetsController_listAssets","parameters":[{"name":"page","required":false,"in":"query","schema":{"default":1,"description":"Page number","type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","required":false,"in":"query","schema":{"default":50,"description":"Items per page (max 100)","type":"integer","minimum":1,"maximum":100}},{"name":"id","required":false,"in":"query","schema":{"description":"Filter by asset ID","type":"string"}},{"name":"symbol","required":false,"in":"query","schema":{"description":"Filter by asset symbol","type":"string"}},{"name":"name","required":false,"in":"query","schema":{"description":"Filter by asset name","type":"string"}},{"name":"search","required":false,"in":"query","schema":{"description":"Search asset ID, symbol, or name","type":"string"}},{"name":"tokenSearch","required":false,"in":"query","schema":{"description":"Search token symbol or address","type":"string"}},{"name":"tokenIsSpam","required":false,"in":"query","schema":{"description":"Filter by token spam status","type":"boolean"}},{"name":"hasExchangeToken","required":false,"in":"query","schema":{"description":"Filter assets by whether they have exchange tokens","type":"boolean"}},{"name":"hasStablecoinPeg","required":false,"in":"query","schema":{"description":"Filter by stablecoin peg presence","type":"boolean"}},{"name":"stablecoinPeggedFiatCurrency","required":false,"in":"query","schema":{"description":"Filter by stablecoin pegged fiat currency","type":"string"}},{"name":"includeTokens","required":false,"in":"query","schema":{"description":"Include tokens for the returned asset page","type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedAssetsResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Assets"]}},"/v1/assets/{assetId}":{"get":{"operationId":"AssetsController_getAsset","parameters":[{"name":"assetId","required":true,"in":"path","description":"Asset ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Assets"]}},"/v1/assets/{assetId}/price/{isoCurrency}/{date}":{"get":{"operationId":"AssetsController_getAssetDayPrice","parameters":[{"name":"assetId","required":true,"in":"path","schema":{"type":"string","minLength":1,"description":"Global asset id"}},{"name":"isoCurrency","required":true,"in":"path","schema":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 4217 currency code (3 letters)"}},{"name":"date","required":true,"in":"path","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"UTC calendar day (YYYY-MM-DD)"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetDayPriceResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Assets"]}},"/v1/chains":{"get":{"deprecated":true,"operationId":"ChainsController_listChains","parameters":[{"name":"page","required":false,"in":"query","schema":{"default":1,"description":"Page number","type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","required":false,"in":"query","schema":{"default":50,"description":"Items per page (max 100)","type":"integer","minimum":1,"maximum":100}},{"name":"chainId","required":false,"in":"query","schema":{"description":"Filter by public chain ID","type":"string"}},{"name":"nativeChainId","required":false,"in":"query","schema":{"description":"Filter by native numeric chain ID","type":"string","pattern":"^\\d+$"}},{"name":"name","required":false,"in":"query","schema":{"description":"Filter by chain name","type":"string"}},{"name":"type","required":false,"in":"query","schema":{"description":"Filter by chain type","type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"]}},{"name":"coinGeckoAssetPlatformId","required":false,"in":"query","schema":{"description":"Filter by CoinGecko asset platform ID","type":"string"}},{"name":"search","required":false,"in":"query","schema":{"description":"Search chain ID or name","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedChainsResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Chains"]}},"/v1/chains/{chainId}":{"get":{"operationId":"ChainsController_getChain","parameters":[{"name":"chainId","required":true,"in":"path","description":"Chain ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Chains"]},"patch":{"operationId":"ChainsController_updateChainTestnet","parameters":[{"name":"chainId","required":true,"in":"path","description":"Chain ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChainTestnetRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChainTestnetResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Chains"]}},"/v1/tokens":{"get":{"deprecated":true,"operationId":"TokensController_listTokens","parameters":[{"name":"page","required":false,"in":"query","schema":{"default":1,"description":"Page number","type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","required":false,"in":"query","schema":{"default":50,"description":"Items per page (max 100)","type":"integer","minimum":1,"maximum":100}},{"name":"chainId","required":false,"in":"query","schema":{"description":"Filter by chain ID","type":"string"}},{"name":"address","required":false,"in":"query","schema":{"description":"Filter by token address","type":"string"}},{"name":"assetIds","required":false,"in":"query","schema":{"description":"Asset IDs as CSV or repeated query values","type":"array","items":{"type":"string","minLength":1}}},{"name":"symbol","required":false,"in":"query","schema":{"description":"Filter by token symbol","type":"string"}},{"name":"name","required":false,"in":"query","schema":{"description":"Filter by token name","type":"string"}},{"name":"type","required":false,"in":"query","schema":{"description":"Filter by token type","type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"]}},{"name":"sortBy","required":false,"in":"query","schema":{"description":"Sort by a public token field","type":"string","enum":["symbol","name","address"]}},{"name":"sortDirection","required":false,"in":"query","schema":{"description":"Sort direction for sortBy","type":"string","enum":["asc","desc"]}},{"name":"search","required":false,"in":"query","schema":{"description":"Search token address, symbol, or name","type":"string"}},{"name":"portfolioSlug","required":false,"in":"query","schema":{"description":"Filter balances/preferences to a public portfolio slug","type":"string"}},{"name":"walletAddress","required":false,"in":"query","schema":{"description":"Filter balances to a wallet address on chainId","type":"string"}},{"name":"withComputedBalance","required":false,"in":"query","schema":{"description":"Only return tokens with computed wallet balance rows","type":"boolean"}},{"name":"safeWalletOnly","required":false,"in":"query","schema":{"description":"Only return tokens from Safe-enabled wallets","type":"boolean"}},{"name":"isSpam","required":false,"in":"query","schema":{"description":"Filter by token spam status","type":"boolean"}},{"name":"whitelist","required":false,"in":"query","schema":{"description":"Whitelisted tokens as chainId:address values","type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedTokensResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Tokens"]}},"/v1/coin-gecko-coins":{"get":{"deprecated":true,"operationId":"CoinGeckoCoinsController_listCoinGeckoCoins","parameters":[{"name":"page","required":false,"in":"query","schema":{"default":1,"description":"Page number","type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","required":false,"in":"query","schema":{"default":50,"description":"Items per page (max 100)","type":"integer","minimum":1,"maximum":100}},{"name":"id","required":false,"in":"query","schema":{"description":"Filter by CoinGecko coin ID","type":"string"}},{"name":"coinGeckoAssetPlatformId","required":false,"in":"query","schema":{"description":"Filter by CoinGecko asset platform ID","type":"string"}},{"name":"name","required":false,"in":"query","schema":{"description":"Filter by CoinGecko coin name","type":"string"}},{"name":"symbol","required":false,"in":"query","schema":{"description":"Filter by CoinGecko coin symbol","type":"string"}},{"name":"address","required":false,"in":"query","schema":{"description":"Filter by token address","type":"string"}},{"name":"search","required":false,"in":"query","schema":{"description":"Search coin ID, name, or symbol","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCoinGeckoCoinsResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["CoinGeckoCoins"]}},"/v1/integrations/{integrationRef}":{"get":{"description":"Returns the authenticated member or elevated integration projection based on the caller role. Returns 404 when unavailable.","operationId":"IntegrationsController_getIntegration","parameters":[{"name":"integrationRef","required":true,"in":"path","schema":{"type":"string","pattern":"^[a-z0-9-]+$"},"description":"Public integration reference"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationCatalogDetailResponseDto"}}}}},"security":[{"api-key":[]}],"summary":"Get an integration","tags":["Integrations"]},"patch":{"operationId":"IntegrationsController_updateIntegration","parameters":[{"name":"integrationRef","required":true,"in":"path","description":"Public integration reference","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIntegrationRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Integrations"]}},"/v1/integrations":{"get":{"description":"Returns the authenticated member catalog or the elevated integration management projection based on the caller role.","operationId":"IntegrationsController_listIntegrations","parameters":[{"name":"pageSize","required":false,"in":"query","schema":{"description":"Requested number of resources to return. Oversized values are clamped to the route limit.","default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageToken","required":false,"in":"query","schema":{"description":"Opaque token returned by the previous list response.","type":"string","minLength":1}},{"name":"integrationRef","required":false,"in":"query","schema":{"description":"Filter by public integration reference","type":"string","pattern":"^[a-z0-9-]+$"}},{"name":"chainId","required":false,"in":"query","schema":{"description":"Filter by linked chain ID","type":"string"}},{"name":"type","required":false,"in":"query","schema":{"description":"Filter by integration type","type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"]}},{"name":"status","required":false,"in":"query","schema":{"description":"Filter by integration status","type":"string","enum":["ACTIVE","ALPHA","BETA","DISABLED"]}},{"name":"mode","required":false,"in":"query","schema":{"description":"Filter by integration mode","type":"string","enum":["API","FILE_UPLOAD"]}},{"name":"isEvm","required":false,"in":"query","schema":{"description":"Filter by EVM compatibility","type":"boolean"}},{"name":"name","required":false,"in":"query","schema":{"description":"Filter by integration name","type":"string"}},{"name":"search","required":false,"in":"query","schema":{"description":"Search integration name, description, or ID","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationCatalogListResponseDto"}}}}},"security":[{"api-key":[]}],"summary":"List integrations","tags":["Integrations"]}},"/v1/subscription-plans":{"get":{"deprecated":true,"operationId":"SubscriptionPlansController_listSubscriptionPlans","parameters":[{"name":"page","required":false,"in":"query","schema":{"default":1,"description":"Page number","type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","required":false,"in":"query","schema":{"default":50,"description":"Items per page (max 100)","type":"integer","minimum":1,"maximum":100}},{"name":"id","required":false,"in":"query","schema":{"description":"Filter by subscription plan ID","type":"string"}},{"name":"name","required":false,"in":"query","schema":{"description":"Filter by subscription plan name","type":"string"}},{"name":"stripeProductId","required":false,"in":"query","schema":{"description":"Filter by Stripe product ID","type":"string"}},{"name":"search","required":false,"in":"query","schema":{"description":"Search subscription plan ID, name, or Stripe product ID","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedSubscriptionPlansResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["SubscriptionPlans"]},"post":{"operationId":"SubscriptionPlansController_createSubscriptionPlan","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionPlanRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPlanResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["SubscriptionPlans"]}},"/v1/subscription-plans/{id}":{"get":{"operationId":"SubscriptionPlansController_getSubscriptionPlan","parameters":[{"name":"id","required":true,"in":"path","description":"Subscription plan ID","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPlanResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["SubscriptionPlans"]},"patch":{"operationId":"SubscriptionPlansController_updateSubscriptionPlan","parameters":[{"name":"id","required":true,"in":"path","description":"Subscription plan ID","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionPlanRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPlanResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["SubscriptionPlans"]}},"/v1/add-ons":{"get":{"operationId":"AddOnsController_listAddOns","parameters":[{"name":"pageSize","required":false,"in":"query","schema":{"description":"Requested number of resources to return. Oversized values are clamped to the route limit.","default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageToken","required":false,"in":"query","schema":{"description":"Opaque token returned by the previous list response.","type":"string","minLength":1}},{"name":"category","required":false,"in":"query","schema":{"description":"Filter by add-on commercial category","type":"string","enum":["MODULE","CAPACITY","SERVICE"]}},{"name":"search","required":false,"in":"query","schema":{"description":"Search add-on ID, display name, or Stripe product ID","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOnsListResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["AddOns"]},"post":{"operationId":"AddOnsController_createAddOn","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAddOnRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOnResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["AddOns"]}},"/v1/add-ons/{id}":{"get":{"operationId":"AddOnsController_getAddOn","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","pattern":"^[a-z0-9-]+$","description":"Add-on catalog ID"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOnResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["AddOns"]},"patch":{"operationId":"AddOnsController_updateAddOn","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string","pattern":"^[a-z0-9-]+$","description":"Add-on catalog ID"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAddOnRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddOnResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["AddOns"]}},"/v1/workspaces":{"post":{"operationId":"WorkspacesController_createWorkspace","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Workspaces"]}},"/v1/workspaces/{workspaceId}":{"get":{"operationId":"WorkspacesController_getWorkspace","parameters":[{"name":"workspaceId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Workspaces"]},"delete":{"operationId":"WorkspacesController_deleteWorkspace","parameters":[{"name":"workspaceId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Workspace deleted"}},"security":[{"api-key":[]}],"tags":["Workspaces"]}},"/v1/workspaces/{workspaceId}/members/invite":{"post":{"operationId":"WorkspacesController_inviteMember","parameters":[{"name":"workspaceId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteMemberRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteMemberResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Workspaces"]}},"/v1/workspaces/{workspaceId}/members":{"get":{"operationId":"WorkspacesController_listMembers","parameters":[{"name":"workspaceId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamMemberResponseDto"}}}}}},"security":[{"api-key":[]}],"tags":["Workspaces"]}},"/v1/workspaces/{workspaceId}/members/{userId}/offboarding":{"get":{"description":"Returns a read-only plan of automatic changes and dependencies requiring manual action. A blocked preview is still returned with HTTP 200 because no changes are attempted.","operationId":"WorkspacesController_previewMemberOffboarding","parameters":[{"name":"workspaceId","required":true,"in":"path","schema":{"type":"string"}},{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Read-only ready or blocked offboarding preview.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMemberOffboardingPreviewResponseDto"}}}}},"security":[{"api-key":[]}],"summary":"Preview member offboarding","tags":["Workspaces"]}},"/v1/workspaces/{workspaceId}/members/{userId}":{"delete":{"description":"Executes member offboarding. HTTP 200 returns completed with performed actions, or already_removed with no actions field when the membership no longer exists. Dependencies requiring manual resolution return HTTP 409 with blockers.","operationId":"WorkspacesController_removeMember","parameters":[{"name":"workspaceId","required":true,"in":"path","schema":{"type":"string"}},{"name":"userId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Offboarding completed or already_removed; completed includes performed actions, while already_removed has no actions field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMemberOffboardingExecutionResultDto"}}}},"409":{"description":"Offboarding could not run because blockers require manual resolution.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMemberOffboardingConflictResponseDto"}}}}},"security":[{"api-key":[]}],"summary":"Remove workspace member","tags":["Workspaces"]}},"/v1/portfolios":{"post":{"operationId":"PortfoliosController_createPortfolio","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePortfolioRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioDetailsResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]},"get":{"deprecated":true,"operationId":"PortfoliosController_listPortfolios","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedPortfoliosResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/tokens/spam":{"post":{"operationId":"PortfoliosController_markTokenSpam","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkTokenSpamRequestDto"}}}},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCommandResultDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/tokens/spam/bulk":{"post":{"operationId":"PortfoliosController_markTokensSpam","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkTokensSpamRequestDto"}}}},"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCommandResultDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}":{"get":{"operationId":"PortfoliosController_getPortfolio","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioDetailsResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/assets/overview":{"get":{"operationId":"PortfoliosController_getPortfolioAssetOverview","parameters":[{"name":"asOfDate","required":false,"in":"query","schema":{"description":"Optional snapshot timestamp for historical balance reads","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))$"}},{"name":"showSpam","required":false,"in":"query","schema":{"description":"Whether spam tokens should be included","type":"boolean"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioAssetOverviewDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/wallets/unrealized-gains":{"get":{"operationId":"PortfoliosController_getWalletUnrealizedGains","parameters":[{"name":"pageSize","required":false,"in":"query","schema":{"description":"Requested number of resources to return. Oversized values are clamped to the route limit.","default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageToken","required":false,"in":"query","schema":{"description":"Opaque token returned by the previous list response.","type":"string","minLength":1}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletUnrealizedGainsListResponseDto"}}}}},"security":[{"api-key":[]}],"summary":"List wallet unrealized gains and losses","tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/assets":{"get":{"operationId":"PortfoliosController_getPortfolioAssets","parameters":[{"name":"pageSize","required":false,"in":"query","schema":{"description":"Requested number of resources to return. Oversized values are clamped to the route limit.","default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageToken","required":false,"in":"query","schema":{"description":"Opaque token returned by the previous list response.","type":"string","minLength":1}},{"name":"asOfDate","required":false,"in":"query","schema":{"description":"Optional snapshot timestamp for historical balance reads","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))$"}},{"name":"showSpam","required":false,"in":"query","schema":{"description":"Whether spam tokens should be included","type":"boolean"}},{"name":"assetIds","required":false,"in":"query","schema":{"description":"Asset IDs as CSV or repeated query values","type":"array","items":{"type":"string","minLength":1}}},{"name":"hasDefiExposure","required":false,"in":"query","schema":{"description":"Whether only assets with DeFi exposure should be included","type":"boolean"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioAssetBalancesListResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/wallet-holdings/{address}/{chainId}/balances":{"get":{"operationId":"PortfoliosController_getWalletTokenBalances","parameters":[{"name":"address","required":true,"in":"path","schema":{"type":"string"}},{"name":"chainId","required":true,"in":"path","schema":{"type":"string"}},{"name":"pageSize","required":false,"in":"query","schema":{"description":"Requested number of resources to return. Oversized values are clamped to the route limit.","default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageToken","required":false,"in":"query","schema":{"description":"Opaque token returned by the previous list response.","type":"string","minLength":1}},{"name":"asOfDate","required":false,"in":"query","schema":{"description":"Optional snapshot timestamp for historical balance reads","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))$"}},{"name":"showSpam","required":false,"in":"query","schema":{"description":"Whether spam tokens should be included","type":"boolean"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTokenBalancesListResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/wallet-holdings/{address}/{chainId}/overview":{"get":{"operationId":"PortfoliosController_getWalletHoldingsOverview","parameters":[{"name":"address","required":true,"in":"path","schema":{"type":"string"}},{"name":"chainId","required":true,"in":"path","schema":{"type":"string"}},{"name":"asOfDate","required":false,"in":"query","schema":{"description":"Optional snapshot timestamp for historical balance reads","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))$"}},{"name":"showSpam","required":false,"in":"query","schema":{"description":"Whether spam tokens should be included","type":"boolean"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletHoldingsOverviewDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/address-holdings/{address}/balances":{"get":{"operationId":"PortfoliosController_getAddressTokenBalances","parameters":[{"name":"address","required":true,"in":"path","schema":{"type":"string"}},{"name":"pageSize","required":false,"in":"query","schema":{"description":"Requested number of resources to return. Oversized values are clamped to the route limit.","default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageToken","required":false,"in":"query","schema":{"description":"Opaque token returned by the previous list response.","type":"string","minLength":1}},{"name":"asOfDate","required":false,"in":"query","schema":{"description":"Optional snapshot timestamp for historical balance reads","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))$"}},{"name":"showSpam","required":false,"in":"query","schema":{"description":"Whether spam tokens should be included","type":"boolean"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressTokenBalancesListResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/address-holdings/{address}/overview":{"get":{"operationId":"PortfoliosController_getAddressHoldingsOverview","parameters":[{"name":"address","required":true,"in":"path","schema":{"type":"string"}},{"name":"asOfDate","required":false,"in":"query","schema":{"description":"Optional snapshot timestamp for historical balance reads","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))$"}},{"name":"showSpam","required":false,"in":"query","schema":{"description":"Whether spam tokens should be included","type":"boolean"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressHoldingsOverviewDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/value-history":{"post":{"operationId":"PortfoliosController_getPortfolioValueHistory","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioValueHistoryRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioValueHistoryResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/assets/value-history":{"post":{"operationId":"PortfoliosController_getPortfolioAssetValueHistory","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioAssetValueHistoryRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioAssetValueHistoryResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/address-holdings/{address}/value-history":{"post":{"operationId":"PortfoliosController_getAddressValueHistory","parameters":[{"name":"address","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressValueHistoryRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressValueHistoryResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/wallet-holdings/{address}/{chainId}/value-history":{"post":{"operationId":"PortfoliosController_getWalletTokenValueHistory","parameters":[{"name":"address","required":true,"in":"path","schema":{"type":"string"}},{"name":"chainId","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTokenValueHistoryRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTokenValueHistoryResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/address-holdings/{address}/token-value-history":{"post":{"operationId":"PortfoliosController_getAddressTokenValueHistory","parameters":[{"name":"address","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressTokenValueHistoryRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressTokenValueHistoryResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/defi-positions/value-history":{"post":{"operationId":"PortfoliosController_getDefiPositionValueHistory","parameters":[{"name":"chainId","required":true,"in":"query","schema":{"type":"string","minLength":1,"description":"Wallet chain ID"}},{"name":"walletAddress","required":true,"in":"query","schema":{"type":"string","minLength":1,"description":"Wallet address"}},{"name":"positionKey","required":true,"in":"query","schema":{"type":"string","minLength":1,"description":"Position key"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefiPositionValueHistoryRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefiPositionValueHistoryResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/balances":{"get":{"operationId":"PortfoliosController_getBalanceReconciliation","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BalanceReconciliationResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}":{"get":{"operationId":"PortfoliosController_getPortfolioTransaction","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"include","required":false,"in":"query","schema":{"type":"string","enum":["raw","rawWithDetails"],"description":"Optionally include contributing raw transactions. rawWithDetails returns sanitized details that may still contain untrusted provider-controlled content."}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PortfolioTransactionResponseDto"},{"$ref":"#/components/schemas/PortfolioTransactionWithRawResponseDto"},{"$ref":"#/components/schemas/PortfolioTransactionWithRawDetailsResponseDto"}]}}}},"400":{"description":"Raw transaction details cannot be returned safely. Omit include or use include=raw."}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/defi-positions":{"get":{"description":"Lists every DeFi position in the portfolio with its wallet, contract, protocol, and aggregate transfer totals, and takes no query parameters. This is a breaking change: the path previously returned a single position selected by walletChainId, walletAddress, and positionKey, and that selector form moved to GET :portfolioSlug/defi-positions/by-selector. Each list item now carries its own positionRef for GET :portfolioSlug/defi-positions/:positionRef. Token snapshot history is excluded, so fetch a single position by its ref to get it.","operationId":"PortfoliosController_listDefiPositions","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefiPositionListResponseDto"}}}}},"security":[{"api-key":[]}],"summary":"List DeFi positions","tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/defi-positions/by-selector":{"get":{"deprecated":true,"description":"Deprecated. Use GET :portfolioSlug/defi-positions/:positionRef with the positionRef returned by the list route. A reference identifies a position unambiguously, while positionKey is unique only within one wallet. This selector form will be removed once every caller has moved to the reference.","operationId":"PortfoliosController_getDefiPosition","parameters":[{"name":"walletChainId","required":true,"in":"query","schema":{"type":"string","minLength":1,"description":"Owning wallet chain ID"}},{"name":"walletAddress","required":true,"in":"query","schema":{"type":"string","minLength":1,"description":"Owning wallet address"}},{"name":"positionKey","required":true,"in":"query","schema":{"type":"string","minLength":1,"description":"Protocol-defined stable logical position key"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefiPositionResponseDto"}}}}},"security":[{"api-key":[]}],"summary":"Get a DeFi position by wallet selector (deprecated)","tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/defi-positions/{positionRef}":{"get":{"operationId":"PortfoliosController_getDefiPositionByRef","parameters":[{"name":"positionRef","required":true,"in":"path","description":"Public DeFi position reference, as returned by the list route. An opaque base64url token, for example WyJldGgtbWFpbm5ldCIsIjB4d2FsbGV0IiwicG9vbDoxIl0","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefiPositionResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/journal-entries/{journalEntryId}":{"get":{"operationId":"PortfoliosController_getJournalEntry","parameters":[{"name":"journalEntryId","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalEntryResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/cost-basis-lots/stats":{"get":{"deprecated":true,"description":"Deprecated. Use the portfolio-transaction-period filter-options provider, which reports one activity period covering transactions and journal entries. Returns the oldest and newest cost-basis lot ledger timestamps for a portfolio without loading ledger rows.","operationId":"PortfoliosController_getCostBasisLotStats","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostBasisLotStatsResponseDto"}}}}},"security":[{"api-key":[]}],"summary":"Get cost-basis lot timestamp bounds","tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/cost-basis-lots":{"get":{"deprecated":true,"description":"Returns a paginated cost-basis lot ledger for a portfolio. Supports AIP-160 filter strings and optional legacy assetRef. Response rows include diff as the signed lot quantity.","operationId":"PortfoliosController_listCostBasisLots","parameters":[{"name":"page","required":false,"in":"query","schema":{"default":1,"description":"Page number","type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","required":false,"in":"query","schema":{"default":50,"description":"Items per page (max 100)","type":"integer","minimum":1,"maximum":100}},{"name":"chainId","required":false,"in":"query","schema":{"type":"string"}},{"name":"walletAddress","required":false,"in":"query","schema":{"description":"Wallet address","type":"string"}},{"name":"entryKind","required":false,"in":"query","schema":{"description":"Comma-separated lot entry kinds (ADD, DSP, CUT, MVE, RES, REL)","type":"array","items":{"type":"string","enum":["ADD","DSP","CUT","MVE","RES","REL"]}}},{"name":"fromDate","required":false,"in":"query","schema":{"description":"Start timestamp (ISO 8601)","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"toDate","required":false,"in":"query","schema":{"description":"End timestamp (ISO 8601)","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"filter","required":false,"in":"query","schema":{"description":"AIP-160 style filter. 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.","type":"string","minLength":1}},{"name":"assetRef","required":false,"in":"query","schema":{"description":"Deprecated compatibility selector for asset symbol or asset id. Prefer filter=asset_id.","type":"string","minLength":1}},{"name":"sort","required":false,"in":"query","schema":{"description":"Single sort field: timestamp, diff, value, price. Prefix with - for descending.","type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCostBasisLotsResponseDto"}}}}},"security":[{"api-key":[]}],"summary":"List cost-basis lot ledger entries","tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/cost-basis-lots/history":{"post":{"deprecated":true,"description":"Returns one paginated history page for requested cost-basis lot IDs inside an asset. asOfTimestamp is required.","operationId":"PortfoliosController_listCostBasisLotHistory","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CostBasisLotHistoryRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedCostBasisLotsResponseDto"}}}}},"security":[{"api-key":[]}],"summary":"List selected cost-basis lot history","tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/transactions":{"get":{"operationId":"PortfoliosController_listPortfolioTransactions","parameters":[{"name":"pageSize","required":false,"in":"query","schema":{"description":"Requested number of resources to return. Oversized values are clamped to the route limit.","default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageToken","required":false,"in":"query","schema":{"description":"Opaque token returned by the previous list response.","type":"string","minLength":1}},{"name":"activeStatus","required":false,"in":"query","schema":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]}},{"name":"sort","required":false,"in":"query","schema":{"description":"Timestamp sort. Prefix with - for descending order.","default":"-timestamp","type":"string","enum":["timestamp","-timestamp"]}},{"name":"filter","required":false,"in":"query","schema":{"description":"Human-readable filter expression, for example asset in (\"eth\").","type":"string","maxLength":4000}},{"name":"includeTransactionIds","required":false,"in":"query","schema":{"description":"Repeated string query parameter.","anyOf":[{"type":"string","minLength":1},{"type":"array","items":{"type":"string","minLength":1}}]}},{"name":"viewTransactionId","required":false,"in":"query","schema":{"type":"string","minLength":1}},{"name":"viewWindowSize","required":false,"in":"query","schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"include","required":false,"in":"query","schema":{"type":"string","enum":["raw","rawWithDetails"],"description":"Optionally include contributing raw transactions. rawWithDetails returns sanitized details that may still contain untrusted provider-controlled content."}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PortfolioTransactionListResponseDto"},{"$ref":"#/components/schemas/PortfolioTransactionListWithRawResponseDto"},{"$ref":"#/components/schemas/PortfolioTransactionListWithRawDetailsResponseDto"}],"description":"Portfolio Transactions list response."}}}},"400":{"description":"Raw transaction details cannot be returned safely. Omit include or use include=raw."}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/reports/export":{"post":{"operationId":"PortfoliosController_requestReportExport","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioReportExportRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportJobResponseDto"}}}},"403":{"description":"The caller lacks permission to view portfolio reports."}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/reports/jobs/{jobId}":{"get":{"operationId":"PortfoliosController_getReportStatus","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportJobStatusResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolios/{portfolioSlug}/reports/jobs/{jobId}/download":{"get":{"operationId":"PortfoliosController_downloadReport","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"Binary report file"}},"security":[{"api-key":[]}],"tags":["Portfolios"]}},"/v1/portfolio/{portfolioSlug}/portfolio-transactions/preview-classification":{"post":{"description":"Runs the accounting classifier without saving changes. Returns zero or more proposed transactions in the order produced by the native classifier, preserving each selected owner-qualified operation handle exactly (portfolioTransactionId, walletTransactionId, and txIndex). The app enables its merge or split action only when exactly one proposal is returned. API clients issue any mutation as a separate explicit command.","operationId":"PortfolioTransactionsController_previewClassification","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewTransactionClassificationRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewTransactionClassificationResponseDto"}}}}},"security":[{"api-key":[]}],"summary":"Preview transaction classification proposals","tags":["PortfolioTransactions"]}},"/v1/portfolio/{portfolioSlug}/portfolio-transactions/intercompany-move-pair-preview":{"post":{"operationId":"PortfolioTransactionsController_previewIntercompanyMovePair","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntercompanyMovePairPreviewRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntercompanyMovePairPreviewResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["PortfolioTransactions"]}},"/v1/portfolio/{portfolioSlug}/portfolio-transactions/intercompany-bulk-pair-preview":{"post":{"description":"Finds unlinked expense and income transactions that can be converted into intercompany send and receive pairs without persisting changes.","operationId":"PortfolioTransactionsController_previewIntercompanyBulkPairs","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntercompanyBulkPairPreviewRequestDto"}}}},"responses":{"200":{"description":"Candidate pairs with proposed operation types, matcher evidence, and discovery status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntercompanyBulkPairPreviewResponseDto"}}}}},"security":[{"api-key":[]}],"summary":"Preview bulk intercompany pair candidates","tags":["PortfolioTransactions"]}},"/v1/portfolios/{portfolioSlug}/adjustment-journal-imports/template":{"get":{"operationId":"AdjustmentJournalImportsController_downloadTemplate","parameters":[{"name":"format","required":true,"in":"query","schema":{"type":"string","enum":["csv","xlsx"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":""}},"security":[{"api-key":[]}],"tags":["AdjustmentJournalImports"]}},"/v1/portfolios/{portfolioSlug}/adjustment-journal-imports/preview":{"post":{"operationId":"AdjustmentJournalImportsController_previewImport","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustmentJournalImportPreviewRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustmentJournalImportPreviewResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["AdjustmentJournalImports"]}},"/v1/portfolios/{portfolioSlug}/adjustment-journal-imports":{"post":{"operationId":"AdjustmentJournalImportsController_createImport","parameters":[{"name":"Idempotency-Key","in":"header","description":"Caller-owned retry key (1-128 printable ASCII characters)","required":true,"schema":{"type":"string","maxLength":128,"minLength":1,"pattern":"^[\\x21-\\x7e]+$"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustmentJournalImportCreateRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustmentJournalImportCreateResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["AdjustmentJournalImports"]},"get":{"operationId":"AdjustmentJournalImportsController_listImports","parameters":[{"name":"pageSize","required":false,"in":"query","schema":{"description":"Requested number of resources to return. Oversized values are clamped to the route limit.","default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageToken","required":false,"in":"query","schema":{"description":"Opaque token returned by the previous list response.","type":"string","minLength":1}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustmentJournalImportHistoryListResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["AdjustmentJournalImports"]}},"/v1/portfolios/{portfolioSlug}/adjustment-journal-imports/provenance":{"post":{"operationId":"AdjustmentJournalImportsController_getProvenance","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustmentJournalImportProvenanceBatchRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustmentJournalImportProvenanceBatchResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["AdjustmentJournalImports"]}},"/v1/portfolios/{portfolioSlug}/adjustment-journal-imports/{importRef}":{"get":{"operationId":"AdjustmentJournalImportsController_getImport","parameters":[{"name":"importRef","required":true,"in":"path","description":"Public successful adjustment-journal import reference","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustmentJournalImportDetailDto"}}}}},"security":[{"api-key":[]}],"tags":["AdjustmentJournalImports"]}},"/v1/portfolios/{portfolioSlug}/adjustment-journal-imports/{importRef}/rows":{"get":{"operationId":"AdjustmentJournalImportsController_listRows","parameters":[{"name":"importRef","required":true,"in":"path","description":"Public successful adjustment-journal import reference","schema":{"type":"string"}},{"name":"pageSize","required":false,"in":"query","schema":{"description":"Requested number of resources to return. Oversized values are clamped to the route limit.","default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageToken","required":false,"in":"query","schema":{"description":"Opaque token returned by the previous list response.","type":"string","minLength":1}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdjustmentJournalImportRowsListResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["AdjustmentJournalImports"]}},"/v1/portfolios/{portfolioSlug}/adjustment-journal-imports/{importRef}/source-file":{"get":{"operationId":"AdjustmentJournalImportsController_downloadSourceFile","parameters":[{"name":"importRef","required":true,"in":"path","description":"Public successful adjustment-journal import reference","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":""}},"security":[{"api-key":[]}],"tags":["AdjustmentJournalImports"]}},"/v1/portfolios/{portfolioSlug}/accounting-rules/apply":{"post":{"operationId":"AccountingRulesController_applyAccountingRules","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"202":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCommandResultDto"}}}}},"security":[{"api-key":[]}],"tags":["AccountingRules"]}},"/v1/portfolios/{portfolioSlug}/accounting-rules/preview":{"post":{"operationId":"AccountingRulesController_previewAccountingRules","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewAccountingRulesRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AugmentedZodDto"}}}}},"security":[{"api-key":[]}],"tags":["AccountingRules"]}},"/v1/portfolios/{portfolioSlug}/accounting-rules/order":{"put":{"operationId":"AccountingRulesController_reorderAccountingRules","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderAccountingRulesRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"tags":["AccountingRules"]}},"/v1/portfolios/{portfolioSlug}/accounting-rules":{"post":{"operationId":"AccountingRulesController_createAccountingRule","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountingRuleRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"tags":["AccountingRules"]},"get":{"operationId":"AccountingRulesController_listAccountingRules","parameters":[{"name":"pageSize","required":false,"in":"query","schema":{"description":"Requested number of resources to return. Oversized values are clamped to the route limit.","default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageToken","required":false,"in":"query","schema":{"description":"Opaque token returned by the previous list response.","type":"string","minLength":1}},{"name":"search","required":false,"in":"query","schema":{"description":"Free-text match against rule names.","type":"string","minLength":1,"maxLength":200}},{"name":"enabled","required":false,"in":"query","schema":{"description":"Keep only enabled rules, or only disabled ones. Omit to return both.","type":"boolean"}},{"name":"actionTypes","required":false,"in":"query","schema":{"description":"Action types as CSV or repeated query values.","maxItems":25,"type":"array","items":{"type":"string","enum":["SET_COUNTERPARTY","SET_LEDGER_ACCOUNT","SET_RESPONSIBILITY_CENTERS"],"description":"What a rule changes when it matches."}}},{"name":"conditionFields","required":false,"in":"query","schema":{"description":"Condition fields as CSV or repeated query values.","maxItems":50,"type":"array","items":{"type":"string","enum":["fromAddressLabel","toAddressLabel","fromAddress","toAddress","direction","wallet","asset","assetClass","stablecoin","chain","operationType","accountSubType","accountNumber","counterparty","fiatValue","entryType","accountType","transactionDate"],"description":"Which part of a transaction the condition tests."}}},{"name":"wallets","required":false,"in":"query","schema":{"description":"Wallet selectors as chainId:walletAddress values.","maxItems":100,"type":"array","items":{"type":"string","minLength":3,"description":"Wallet as chainId:walletAddress, e.g. eth-mainnet:0xabc."}}},{"name":"accountNumbers","required":false,"in":"query","schema":{"description":"Ledger account numbers as CSV or repeated query values.","maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."}}},{"name":"counterpartyNames","required":false,"in":"query","schema":{"description":"Counterparty names as CSV or repeated query values.","maxItems":100,"type":"array","items":{"type":"string","minLength":1,"description":"Counterparty name, from list_journal_line_assignment_options (type: counterparty)."}}},{"name":"assetIds","required":false,"in":"query","schema":{"description":"Asset ids as CSV or repeated query values.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},{"name":"ruleIds","required":false,"in":"query","schema":{"description":"Exact rule ids as CSV or repeated query values. Duplicate ids are removed.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRulesListResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["AccountingRules"]}},"/v1/portfolios/{portfolioSlug}/accounting-rules/{ruleId}/enabled":{"put":{"operationId":"AccountingRulesController_setAccountingRuleEnabled","parameters":[{"name":"ruleId","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetAccountingRuleEnabledRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"tags":["AccountingRules"]}},"/v1/portfolios/{portfolioSlug}/accounting-rules/{ruleId}":{"patch":{"operationId":"AccountingRulesController_updateAccountingRule","parameters":[{"name":"ruleId","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountingRuleRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"tags":["AccountingRules"]},"delete":{"operationId":"AccountingRulesController_deleteAccountingRule","parameters":[{"name":"ruleId","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"tags":["AccountingRules"]}},"/v1/portfolios/{portfolioSlug}/accounts":{"get":{"description":"Returns one continuation-paginated Chart of Accounts page using the requested metadata sort and account number as the deterministic cursor identity and tie-breaker. Asset sorting uses the visible asset symbol or currency symbol when the account has no asset. Set includeBalances=true to replay the requested account-number keyset against current state with draft-inclusive balances. Metadata-only and enriched requests are independent current-state reads, so account changes can alter rows or pagination between requests. Omit it for the faster metadata-only response.","operationId":"AccountsController_listAccounts","parameters":[{"name":"pageSize","required":false,"in":"query","schema":{"description":"Requested number of resources to return. Oversized values are clamped to the route limit.","default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageToken","required":false,"in":"query","schema":{"description":"Opaque token returned by the previous list response.","type":"string","minLength":1}},{"name":"sort","required":false,"in":"query","schema":{"default":"accountNumber","description":"Metadata sort with an optional - prefix for descending order. Asset sorting uses the visible asset symbol or currency symbol when the account has no asset.","type":"string","enum":["accountNumber","-accountNumber","name","-name","subType","-subType","asset","-asset"]}},{"name":"search","required":false,"in":"query","schema":{"description":"Case-insensitive account number or name search.","type":"string","minLength":1}},{"name":"accountNumbers","required":false,"in":"query","schema":{"description":"Account numbers to include.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},{"name":"accountTypes","required":false,"in":"query","schema":{"description":"Top-level account types to include.","maxItems":100,"type":"array","items":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]}}},{"name":"origins","required":false,"in":"query","schema":{"description":"Exact persisted origin values.","maxItems":100,"type":"array","items":{"type":"string","enum":["SYSTEM_MANAGED","SYSTEM_DEFAULT","USER_MANAGED"]}}},{"name":"subTypes","required":false,"in":"query","schema":{"description":"Persisted account subtypes to include.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},{"name":"normalBalanceTypes","required":false,"in":"query","schema":{"description":"Normal-balance entry types to include.","maxItems":100,"type":"array","items":{"type":"string","enum":["DR","CR"]}}},{"name":"wallets","required":false,"in":"query","schema":{"description":"Current wallet identities to include as repeated or CSV chainId:address values.","maxItems":100,"type":"array","items":{"type":"string","minLength":3}}},{"name":"includeNoWallet","required":false,"in":"query","schema":{"description":"Select only accounts without a current wallet when wallets is omitted, or include them alongside selected wallets.","type":"boolean"}},{"name":"assetIds","required":false,"in":"query","schema":{"description":"Public account asset identifiers to include.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},{"name":"currencyAssetIds","required":false,"in":"query","schema":{"description":"Public account currency identifiers to include.","maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},{"name":"isActive","required":false,"in":"query","schema":{"description":"Whether to include only active or only archived accounts.","type":"boolean"}},{"name":"paymentLabel","required":false,"in":"query","schema":{"description":"Payment-label presence state to include.","type":"string","enum":["withLabel","withoutLabel"]}},{"name":"hierarchy","required":false,"in":"query","schema":{"description":"Whether to include parent or leaf accounts.","type":"string","enum":["parent","leaf"]}},{"name":"includeBalances","required":false,"in":"query","schema":{"description":"Whether returned logical page rows include current balances.","type":"boolean"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"Continuation-paginated account metadata, optionally enriched with current balances.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountsListResponseDto"}}}}},"security":[{"api-key":[]}],"summary":"List portfolio accounts","tags":["Accounts"]},"post":{"description":"Creates one Chart of Accounts row. Requires Advanced Ledger; when it is unavailable, returns HTTP 403 with the flat response fields statusCode: 403, code: \"FeatureNotEnabledError\", and message containing the complete actionable reason: \"Advanced Ledger is required to create accounts. Ask a workspace owner or billing manager to enable it.\" Omit subType and normalBalanceType to derive them from the account type and currency. A requested parent must have the same account type as the new account and must not carry journal activity. Returning the canonical account response also requires ledger-account view permission.","operationId":"AccountsController_createAccount","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountRequestDto"}}}},"responses":{"201":{"description":"The created account in the shared account row shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponseDto"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StateConflictResponseDto"}}}}},"security":[{"api-key":[]}],"summary":"Create a portfolio account","tags":["Accounts"]}},"/v1/portfolios/{portfolioSlug}/accounts/{accountNumber}":{"patch":{"description":"Applies the supplied fields to one Chart of Accounts row. Omitted fields are unchanged and an explicit null parentAccountNumber detaches the account. A newly requested parent must have the same account type as the child and must not carry journal activity. Returning the canonical account response also requires ledger-account view permission. Advanced Ledger is required after the existing account permissions; unavailable Advanced Ledger returns HTTP 403 (FeatureNotEnabledError).","operationId":"AccountsController_updateAccount","parameters":[{"name":"accountNumber","required":true,"in":"path","description":"Current portfolio-unique ledger account number.","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountRequestDto"}}}},"responses":{"200":{"description":"The account after the update in the shared account row shape.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponseDto"}}}},"409":{"description":"","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/StateConflictResponseDto"},{"$ref":"#/components/schemas/BulkArchiveLedgerAccountsConflictResponseDto"}]}}}}},"security":[{"api-key":[]}],"summary":"Update a portfolio account","tags":["Accounts"]}},"/v1/portfolios/{portfolioSlug}/accounting-rules/{ruleId}/audit-trail":{"get":{"operationId":"AccountingRuleAuditTrailController_getAuditTrail","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}},{"name":"ruleId","required":true,"in":"path","schema":{"type":"string"}},{"name":"minVersion","required":false,"in":"query","schema":{"description":"Only return events at or after this version.","type":"number"}},{"name":"maxVersion","required":false,"in":"query","schema":{"description":"Only return events at or before this version.","type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"description":"Maximum number of events to return.","type":"number"}},{"name":"reverse","required":false,"in":"query","schema":{"description":"Return events in descending version order.","type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingRuleAuditTrailResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["AccountingRuleAuditTrail"]}},"/v1/portfolios/{portfolioSlug}/payment-requests/{paymentRequestId}/audit-trail":{"get":{"operationId":"PaymentRequestAuditTrailController_getAuditTrail","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}},{"name":"paymentRequestId","required":true,"in":"path","schema":{"type":"string"}},{"name":"minVersion","required":false,"in":"query","schema":{"description":"Only return events at or after this version.","type":"number"}},{"name":"maxVersion","required":false,"in":"query","schema":{"description":"Only return events at or before this version.","type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"description":"Maximum number of events to return.","type":"number"}},{"name":"reverse","required":false,"in":"query","schema":{"description":"Return events in descending version order.","type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequestAuditTrailResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["PaymentRequestAuditTrail"]}},"/v1/portfolios/{portfolioSlug}/payment-transactions/{paymentId}/audit-trail":{"get":{"operationId":"PaymentTransactionAuditTrailController_getAuditTrail","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}},{"name":"paymentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"minVersion","required":false,"in":"query","schema":{"description":"Only return events at or after this version.","type":"number"}},{"name":"maxVersion","required":false,"in":"query","schema":{"description":"Only return events at or before this version.","type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"description":"Maximum number of events to return.","type":"number"}},{"name":"reverse","required":false,"in":"query","schema":{"description":"Return events in descending version order.","type":"boolean"}},{"name":"connectedWalletAddress","required":false,"in":"query","schema":{"description":"Widens visibility to a payment transaction reachable only through this connected wallet.","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentTransactionAuditTrailResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["PaymentTransactionAuditTrail"]}},"/v1/portfolio/{portfolioSlug}/portfolio-transactions/{portfolioTransactionId}/audit-trail":{"get":{"operationId":"PortfolioTransactionAuditTrailController_getAuditTrail","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}},{"name":"portfolioTransactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"minVersion","required":false,"in":"query","schema":{"description":"Only return events at or after this version.","type":"number"}},{"name":"maxVersion","required":false,"in":"query","schema":{"description":"Only return events at or before this version.","type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"description":"Maximum number of events to return.","type":"number"}},{"name":"reverse","required":false,"in":"query","schema":{"description":"Return events in descending version order.","type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioTransactionAuditTrailResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["PortfolioTransactionAuditTrail"]}},"/v1/portfolios/{portfolioSlug}/wallet-transactions/{walletTransactionId}/audit-trail":{"get":{"operationId":"WalletTransactionAuditTrailController_getAuditTrail","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}},{"name":"walletTransactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"minVersion","required":false,"in":"query","schema":{"description":"Only return events at or after this version.","type":"number"}},{"name":"maxVersion","required":false,"in":"query","schema":{"description":"Only return events at or before this version.","type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"description":"Maximum number of events to return.","type":"number"}},{"name":"reverse","required":false,"in":"query","schema":{"description":"Return events in descending version order.","type":"boolean"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTransactionAuditTrailResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["WalletTransactionAuditTrail"]}},"/v1/portfolios/{portfolioSlug}/period-close/preview":{"post":{"operationId":"PeriodCloseCommandsController_previewPeriodClose","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodClosePreviewRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeriodClosePreviewResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["PeriodCloseCommands"]}},"/v1/portfolios/{portfolioSlug}/period-close/commands/{commandType}":{"post":{"operationId":"PeriodCloseCommandsController_runPortfolioCommand","parameters":[{"name":"commandType","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"tags":["PeriodCloseCommands"]}},"/v1/portfolios/{portfolioSlug}/payment-requests/commands/{commandType}":{"post":{"operationId":"PaymentRequestCommandsController_runPortfolioCommand","parameters":[{"name":"commandType","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"tags":["PaymentRequestCommands"]}},"/v1/portfolios/{portfolioSlug}/payment-requests/{paymentRequestId}/commands/{commandType}":{"post":{"operationId":"PaymentRequestCommandsController_runScopedCommand","parameters":[{"name":"paymentRequestId","required":true,"in":"path","schema":{"type":"string"}},{"name":"commandType","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"tags":["PaymentRequestCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/RemoveWalletOperationsFromPortfolioTransactionCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_removeWalletOperationsFromPortfolioTransaction","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"removedOperations":{"minItems":1,"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"},"portfolioTransactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["txId","txIdx","portfolioTransactionId"]}},"reason":{"type":"string"}},"required":["removedOperations"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Remove wallet operations from a transaction.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/ApplyIntercompanyMoveProcessingCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_applyIntercompanyMoveProcessing","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currentSide":{"type":"string","enum":["SEND","RECEIVE"]},"counterpartPortfolioId":{"type":"integer","minimum":1,"maximum":9007199254740991},"counterpartPortfolioTransactionId":{"type":"string"},"treatment":{"type":"string","enum":["OPERATING_FUNDING","CARRYOVER_BASIS_TRANSFER"]},"reason":{"type":"string"}},"required":["currentSide","counterpartPortfolioId","counterpartPortfolioTransactionId","treatment"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Apply intercompany move processing to a transaction. The returned pair id reports staging, not posting: the runner applies the paired accounting after this command commits.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/RemoveIntercompanyMoveProcessingCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_removeIntercompanyMoveProcessing","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"currentReplacementOperationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"currentReplacementSubType":{"type":"string"},"counterpartReplacementOperationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"counterpartReplacementSubType":{"type":"string"},"reason":{"type":"string"}},"required":["currentReplacementOperationType","counterpartReplacementOperationType"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Remove intercompany move processing from a transaction.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/ReprocessPortfolioTransactionCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_reprocessPortfolioTransaction","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"triggeringTransactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"seq":{"type":"integer","minimum":1,"maximum":9007199254740991},"triggerCascadeRecomputation":{"type":"boolean"},"reason":{"type":"string"},"allowFallbackToUncategorized":{"type":"boolean"}},"required":["triggeringTransactionId","seq","triggerCascadeRecomputation"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Reprocess a transaction through the accounting engine.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/RefreshPortfolioTransactionFmvCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_refreshPortfolioTransactionFmv","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"overwriteManualQuotes":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Refresh a transaction's fair market value from price sources.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/UpdatePortfolioTransactionFmvCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_updatePortfolioTransactionFmv","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string"},"newValueQuote":{"type":"string","description":"The new price for the asset in the base currency"},"newQuoteSource":{"description":"The source of the new price","type":"string"},"newQuoteCurrency":{"description":"The currency of the new price","type":"string"},"reason":{"type":"string"}},"required":["assetId","newValueQuote"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Override a transaction's fair market value for one asset.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/UpdatePortfolioTransactionOperationTypeCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_updatePortfolioTransactionOperationType","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newOperationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"newSubType":{"nullable":true,"type":"string"},"reason":{"type":"string"}},"required":["newOperationType"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Change a transaction's operation type.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/commands/MergePortfolioTransactionsCommand":{"post":{"description":"Portfolio-scoped, keeping the URL callers already use. The command spans several transactions, so there is no single route transaction; the target travels in the body as `txId`.","operationId":"PortfolioTransactionCommandsController_mergePortfolioTransactions","parameters":[{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"txId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transactionOperations":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"},"portfolioTransactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["txId","txIdx","portfolioTransactionId"]}},"newOperationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"newSubType":{"type":"string"},"reason":{"type":"string"}},"required":["txId","transactionOperations","newOperationType"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Merge wallet operations from other transactions into one target.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/commands/SplitPortfolioTransactionCommand":{"post":{"description":"Portfolio-scoped, keeping the URL callers already use. Each entry of `operationsToSplit` names the transaction it comes from, so the command has no single route transaction.","operationId":"PortfolioTransactionCommandsController_splitPortfolioTransaction","parameters":[{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newOperationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"newSubType":{"type":"string"},"reason":{"type":"string"},"operationsToSplit":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"},"portfolioTransactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["txId","txIdx","portfolioTransactionId"]}}},"required":["newOperationType","operationsToSplit"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Split wallet operations out into a new transaction. The returned new transaction id is allocated, not created: the runner creates that transaction after this command commits.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/UpdatePortfolioTransactionJournalEntryLineCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_updatePortfolioTransactionJournalEntryLine","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"counterpartyId":{"nullable":true,"type":"string"},"memo":{"nullable":true,"type":"string"}},"required":["lineNumber"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Update one journal entry line on a transaction.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/UpsertJournalEntryLineCostCenterCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_upsertJournalEntryLineCostCenter","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"]}}},"required":["lineNumber","responsibilityCenterAssignments"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Set the responsibility-center assignments on one journal entry line.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/LinkPaymentToPortfolioTransactionCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_linkPaymentToPortfolioTransaction","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paymentTransactionId":{"type":"string"}},"required":["paymentTransactionId"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Link a payment transaction to this transaction.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/UpdatePortfolioTransactionMemoCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_updatePortfolioTransactionMemo","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"memo":{"nullable":true,"type":"string"}},"required":["memo"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Update a transaction's memo.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/UpsertPortfolioTransactionTagsCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_upsertPortfolioTransactionTags","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}}},"required":["tags"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Replace a transaction's tags.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/AttachFileToPortfolioTransactionCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_attachFileToPortfolioTransaction","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"fileSize":{"type":"integer","minimum":1,"maximum":10485760},"mimeType":{"type":"string"},"uploadedByUserId":{"type":"string"},"uploadedAt":{"type":"string"}},"required":["id","fileName","fileSize","mimeType","uploadedByUserId","uploadedAt"]}},"required":["file"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Attach a file to a transaction.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/RemoveFileFromPortfolioTransactionCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_removeFileFromPortfolioTransaction","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"fileId":{"type":"string"}},"required":["fileId"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Remove an attached file from a transaction.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/DeletePortfolioTransactionCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_deletePortfolioTransaction","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Delete a transaction.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/{transactionId}/commands/UpdatePortfolioTransactionStatusCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_updatePortfolioTransactionStatus","parameters":[{"name":"transactionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"newStatus":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"reason":{"type":"string"}},"required":["newStatus"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Change a transaction's lifecycle status.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/commands/ApplyPortfolioConversionCommand":{"post":{"description":"Each token snapshot names its wallet by the public `{ chainId, walletAddress }` pair. The command takes an internal wallet id, so the selectors are resolved inside the authenticated portfolio before dispatch.","operationId":"PortfolioTransactionCommandsController_applyPortfolioConversion","parameters":[{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cutoffExclusiveTimestamp":{"anyOf":[{"type":"string"},{"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))$"}]},"tokenSnapshots":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","minLength":1},"walletAddress":{"type":"string","minLength":1,"description":"Address of the wallet holding the token"},"tokenAddress":{"type":"string","minLength":1},"balance":{"type":"string","x-json-output":{"type":"string"},"description":"A decimal number sent as a string, so no precision is lost in JSON.","example":"1.5"},"fiatValue":{"type":"string","x-json-output":{"type":"string"},"description":"A decimal number sent as a string, so no precision is lost in JSON.","example":"1.5"},"lotSnapshots":{"type":"array","items":{"type":"object","properties":{"lotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"quantity":{"type":"string","x-json-output":{"type":"string"},"description":"A decimal number sent as a string, so no precision is lost in JSON.","example":"1.5"},"fiatValue":{"type":"string","x-json-output":{"type":"string"},"description":"A decimal number sent as a string, so no precision is lost in JSON.","example":"1.5"},"acquisitionTimestamp":{"anyOf":[{"type":"string"},{"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))$"}]}},"required":["lotMethod","quantity","fiatValue","acquisitionTimestamp"],"additionalProperties":false}}},"required":["chainId","walletAddress","tokenAddress","balance","fiatValue","lotSnapshots"],"additionalProperties":false}},"ledgerAccountSnapshots":{"type":"array","items":{"type":"object","properties":{"ledgerAccountId":{"type":"string","minLength":1},"balance":{"type":"string","x-json-output":{"type":"string"},"description":"A decimal number sent as a string, so no precision is lost in JSON.","example":"1.5"},"fiatCurrency":{"type":"string","minLength":1}},"required":["ledgerAccountId","balance","fiatCurrency"],"additionalProperties":false}},"balancingAccountId":{"type":"string","minLength":1},"workbookFile":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"fileSize":{"type":"integer","minimum":1,"maximum":10485760},"mimeType":{"type":"string"},"uploadedByUserId":{"type":"string"},"uploadedAt":{"type":"string"}},"required":["id","fileName","fileSize","mimeType","uploadedByUserId","uploadedAt"]},"expectedPreviewHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"acceptedWarningHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"acceptedWarningCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["cutoffExclusiveTimestamp","tokenSnapshots","ledgerAccountSnapshots","balancingAccountId","workbookFile","expectedPreviewHash"],"additionalProperties":false}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Apply a portfolio conversion from a prepared workbook. The adjustment transaction exists once this returns, but its accounting is staged: the runner recomputes it after this command commits.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/commands/ApplyIntercompanyMovePairsBulkCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_applyIntercompanyMovePairsBulk","parameters":[{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string"},"pairs":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"txId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"currentSide":{"type":"string","enum":["SEND","RECEIVE"]},"counterpartPortfolioId":{"type":"integer","minimum":1,"maximum":9007199254740991},"counterpartPortfolioTransactionId":{"type":"string"},"treatment":{"type":"string","enum":["OPERATING_FUNDING","CARRYOVER_BASIS_TRANSFER"]},"reason":{"type":"string"}},"required":["txId","currentSide","counterpartPortfolioId","counterpartPortfolioTransactionId","treatment"]}}},"required":["pairs"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedCommandResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Apply intercompany move treatment to many pairs at once. Each returned row reports whether its pair was staged, not that its accounting was posted.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/transactions/commands/CreateManualJournalEntryCommand":{"post":{"operationId":"PortfolioTransactionCommandsController_createManualJournalEntry","parameters":[{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["sync","async"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"memo":{"type":"string"},"effectiveAt":{"type":"string"},"entries":{"minItems":2,"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"entryType":{"type":"string","enum":["DR","CR"]},"fiatAmount":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","x-json-output":{"type":"string"},"description":"A decimal number sent as a string, so no precision is lost in JSON.","example":"1.5"},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"]},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"]}},"counterpartyId":{"nullable":true,"type":"string"}},"required":["accountId","entryType","fiatAmount"]}}},"required":["entries"]}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateManualJournalEntryResultDto"}}}}},"security":[{"api-key":[]}],"summary":"Create a manual journal entry.","tags":["PortfolioTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/payment-transactions/commands/{commandType}":{"post":{"operationId":"PaymentTransactionCommandsController_runPortfolioCommand","parameters":[{"name":"commandType","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"tags":["PaymentTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/payment-transactions/{paymentId}/commands/{commandType}":{"post":{"operationId":"PaymentTransactionCommandsController_runPaymentTransactionCommand","parameters":[{"name":"paymentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"commandType","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandResultDto"}}}}},"security":[{"api-key":[]}],"tags":["PaymentTransactionCommands"]}},"/v1/portfolios/{portfolioSlug}/ledger-accounts/archive/bulk":{"post":{"description":"Sets active state for unique accounts in the active portfolio. Requires ledger-account update permission and Advanced Ledger; unavailable Advanced Ledger returns HTTP 403 (FeatureNotEnabledError). Existing account safety checks apply.","operationId":"LedgerAccountsController_bulkArchiveLedgerAccounts","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkArchiveLedgerAccountsRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkArchiveLedgerAccountsResponseDto"}}}},"409":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkArchiveLedgerAccountsConflictResponseDto"}}}}},"security":[{"api-key":[]}],"summary":"Archive or unarchive portfolio accounts","tags":["LedgerAccounts"]}},"/v1/portfolios/{portfolioSlug}/wallets":{"post":{"operationId":"WalletsController_addWallets","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWalletsRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWalletsResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Wallets"]},"get":{"deprecated":true,"operationId":"WalletsController_listWallets","parameters":[{"name":"page","required":false,"in":"query","schema":{"default":1,"description":"Page number","type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","required":false,"in":"query","schema":{"default":50,"description":"Items per page (max 100)","type":"integer","minimum":1,"maximum":100}},{"name":"chainId","required":false,"in":"query","schema":{"description":"Filter by chain ID","type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedWalletsResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Wallets"]}},"/v1/portfolios/{portfolioSlug}/wallets/{chainId}/{walletAddress}":{"get":{"operationId":"WalletsController_getWallet","parameters":[{"name":"chainId","required":true,"in":"path","schema":{"type":"string"}},{"name":"walletAddress","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletDetailsResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Wallets"]}},"/v1/portfolios/{portfolioSlug}/wallets/{chainId}/{walletAddress}/credentials":{"patch":{"description":"Updates only the supplied credential fields for an existing exchange wallet in the selected portfolio. Provide at least one non-null credential value; omitted fields remain unchanged, and a request containing only null values is rejected. Requires portfolio.wallets.update permission. OAuth token fields may be supplied only from an authorization flow controlled by the caller. Returns 204 with an empty body.","operationId":"WalletsController_updateWalletCredentials","parameters":[{"name":"chainId","required":true,"in":"path","schema":{"type":"string"}},{"name":"walletAddress","required":true,"in":"path","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"description":"API key or RPC URL","nullable":true,"type":"string","minLength":1},"secret":{"description":"API secret or explorer URL","nullable":true,"type":"string","minLength":1},"uid":{"description":"Optional exchange uid","nullable":true,"type":"string","minLength":1},"login":{"description":"Optional exchange login","nullable":true,"type":"string","minLength":1},"password":{"description":"Optional exchange password","nullable":true,"type":"string","minLength":1},"privateKey":{"description":"Integration authentication private key. Never provide a wallet signing or spending key.","nullable":true,"type":"string","minLength":1},"walletAddress":{"description":"Optional credential wallet address","nullable":true,"type":"string","minLength":1},"accountId":{"description":"Optional exchange subaccount identifier","nullable":true,"type":"string","minLength":1},"token":{"description":"OAuth or bearer token. API-key callers may provide this when creating or updating a wallet only from an authorization flow they control.","nullable":true,"type":"string","minLength":1},"refreshToken":{"description":"OAuth refresh token. API-key callers may provide this when creating or updating a wallet only from an authorization flow they control.","nullable":true,"type":"string","minLength":1},"tokenExpiresAt":{"description":"OAuth token expiry timestamp. API-key callers may provide this when creating or updating a wallet only from an authorization flow they control.","nullable":true,"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))$"}}}}}},"responses":{"204":{"description":"Wallet credentials updated."}},"security":[{"api-key":[]}],"summary":"Update exchange wallet credentials","tags":["Wallets"]}},"/v1/portfolio/{portfolioSlug}/bank-accounts":{"post":{"operationId":"BankAccountsController_createBankAccount","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBankAccountRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBankAccountResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["BankAccounts"]}},"/v1/portfolio/{portfolioSlug}/bank-accounts/{chainId}/{walletAddress}/import":{"post":{"operationId":"BankAccountsController_importStatement","parameters":[{"name":"chainId","required":true,"in":"path","description":"Chain identifier — must be \"banking\" for bank accounts","schema":{"type":"string"}},{"name":"walletAddress","required":true,"in":"path","description":"BANK wallet address returned by the create endpoint","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankStatementImportRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankStatementImportResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["BankAccounts"]}},"/v1/portfolios/{portfolioSlug}/transaction-imports":{"post":{"operationId":"TransactionImportsController_startImport","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartTransactionImportRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartTransactionImportResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["TransactionImports"]},"get":{"operationId":"TransactionImportsController_listImports","parameters":[{"name":"pageSize","required":false,"in":"query","schema":{"description":"Requested number of resources to return. Oversized values are clamped to the route limit.","default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageToken","required":false,"in":"query","schema":{"description":"Opaque token returned by the previous list response.","type":"string","minLength":1}},{"name":"chainId","required":false,"in":"query","schema":{"description":"Optional wallet chain filter used with walletAddress","type":"string","minLength":1}},{"name":"fromDate","required":false,"in":"query","schema":{"description":"Optional inclusive import-created-at lower bound","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"status","required":false,"in":"query","schema":{"description":"Optional lifecycle status filter. Omit to include active imports, committed imports, and retryable deleted imports with pending undo replay.","type":"string","enum":["UPLOADED","ANALYZING","PREVIEW_READY","FINALIZING","COMMITTED","FAILED","DELETED"]}},{"name":"toDate","required":false,"in":"query","schema":{"description":"Optional inclusive import-created-at upper bound","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"walletAddress","required":false,"in":"query","schema":{"description":"Optional wallet address filter used with chainId","type":"string","minLength":1}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionImportHistoryListResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["TransactionImports"]}},"/v1/portfolios/{portfolioSlug}/transaction-imports/{importRef}/source-file":{"get":{"operationId":"TransactionImportsController_downloadSourceFile","parameters":[{"name":"importRef","required":true,"in":"path","description":"Public transaction import reference","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"Original transaction import source file","content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}}}},"security":[{"api-key":[]}],"tags":["TransactionImports"]}},"/v1/portfolios/{portfolioSlug}/transaction-imports/{importRef}/audit-presentment":{"get":{"operationId":"TransactionImportsController_downloadAuditPresentment","parameters":[{"name":"importRef","required":true,"in":"path","description":"Public transaction import reference","schema":{"type":"string"}},{"name":"format","required":true,"in":"query","schema":{"type":"string","enum":["pdf","xlsx","csv"],"description":"Requested accountant-facing audit export format"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"Sanitized audit presentment export","content":{"application/pdf":{"schema":{"format":"binary","type":"string"}},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"format":"binary","type":"string"}},"application/octet-stream":{"schema":{"format":"binary","type":"string"}}}}},"security":[{"api-key":[]}],"tags":["TransactionImports"]}},"/v1/portfolios/{portfolioSlug}/transaction-imports/{importRef}":{"get":{"operationId":"TransactionImportsController_getImport","parameters":[{"name":"importRef","required":true,"in":"path","description":"Public transaction import reference","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionImportSummaryDto"}}}}},"security":[{"api-key":[]}],"tags":["TransactionImports"]},"delete":{"operationId":"TransactionImportsController_deleteImport","parameters":[{"name":"importRef","required":true,"in":"path","description":"Public transaction import reference","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionImportJobResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["TransactionImports"]}},"/v1/portfolios/{portfolioSlug}/transaction-imports/{importRef}/records":{"get":{"operationId":"TransactionImportsController_listRecords","parameters":[{"name":"importRef","required":true,"in":"path","description":"Public transaction import reference","schema":{"type":"string"}},{"name":"pageSize","required":false,"in":"query","schema":{"description":"Requested number of resources to return. Oversized values are clamped to the route limit.","default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageToken","required":false,"in":"query","schema":{"description":"Opaque token returned by the previous list response.","type":"string","minLength":1}},{"name":"fromDate","required":false,"in":"query","schema":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"hasUnresolved","required":false,"in":"query","schema":{"type":"boolean"}},{"name":"status","required":false,"in":"query","schema":{"type":"string","enum":["PENDING","RESOLVED","FLAGGED","IN_LEDGER","EXCLUDED"]}},{"name":"toDate","required":false,"in":"query","schema":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionImportRecordsListResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["TransactionImports"]}},"/v1/portfolios/{portfolioSlug}/transaction-imports/{importRef}/resolutions":{"post":{"operationId":"TransactionImportsController_resolveImport","parameters":[{"name":"importRef","required":true,"in":"path","description":"Public transaction import reference","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveTransactionImportRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionImportSummaryDto"}}}}},"security":[{"api-key":[]}],"tags":["TransactionImports"]}},"/v1/portfolios/{portfolioSlug}/transaction-imports/{importRef}/finalize":{"post":{"operationId":"TransactionImportsController_finalizeImport","parameters":[{"name":"importRef","required":true,"in":"path","description":"Public transaction import reference","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeTransactionImportRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionImportJobResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["TransactionImports"]}},"/v1/portfolios/{portfolioSlug}/filter-options/accounts":{"get":{"description":"Returns the complete unpaginated grouped option set for Chart of Accounts filters after checking ledger account view permission. Responses include an ETag for conditional requests with If-None-Match.","operationId":"FilterOptionsController_getAccountFilterOptions","parameters":[{"name":"If-None-Match","in":"header","description":"Optional ETag from a previous account options response","required":false,"schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountFilterOptionsResponseDto"}}}},"304":{"description":"Account filter options have not changed for the supplied ETag"}},"security":[{"api-key":[]}],"summary":"List Chart of Accounts filter options","tags":["FilterOptions"]}},"/v1/portfolios/{portfolioSlug}/filter-options/portfolio-transaction-period":{"get":{"description":"Returns the inclusive timestamp range spanning every recorded portfolio transaction and journal entry, or a null period when the portfolio records neither. The range is the portfolio full extent, not the extent matching an active filter expression, so date-range pickers keep stable bounds while the user filters. Responses include an ETag for conditional requests with If-None-Match.","operationId":"FilterOptionsController_getPortfolioTransactionPeriodFilterOptions","parameters":[{"name":"If-None-Match","in":"header","description":"Optional ETag from a previous activity period response","required":false,"schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioTransactionPeriodOptionsResponseDto"}}}},"304":{"description":"The activity period has not changed for the supplied ETag"}},"security":[{"api-key":[]}],"summary":"Get the portfolio activity period","tags":["FilterOptions"]}},"/v1/portfolios/{portfolioSlug}/filter-options/{filterName}":{"get":{"operationId":"FilterOptionsController_getPortfolioFilterOptions","parameters":[{"name":"If-None-Match","in":"header","description":"Optional ETag from a previous filter options response","required":false,"schema":{"type":"string"}},{"name":"filterName","required":true,"in":"path","description":"Registered public filter option provider name","schema":{"type":"string","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","raw-transaction-processing-states"],"description":"Public filter option provider name."}},{"name":"pageSize","required":false,"in":"query","schema":{"description":"Requested number of resources to return. Oversized values are clamped to the route limit.","default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageToken","required":false,"in":"query","schema":{"description":"Opaque token returned by the previous list response.","type":"string","minLength":1}},{"name":"search","required":false,"in":"query","schema":{"description":"Optional case-insensitive text search applied by the provider to labels, addresses, names, or other provider-owned searchable fields.","type":"string"}},{"name":"selected","required":false,"in":"query","schema":{"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.","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."}}]}},{"name":"mode","required":false,"in":"query","schema":{"type":"string","enum":["from","to"],"description":"Address side to inspect for portfolio-transaction-addresses. Required for address filters. Use from for source addresses and to for destination addresses."}},{"name":"reportType","required":false,"in":"query","schema":{"description":"Count effective counterparties from this report, including address matches. Omit to count stored journal assignments for portfolio transactions.","type":"string","enum":["profit-and-loss","income-expense"]}},{"name":"filter","required":false,"in":"query","schema":{"description":"Human-readable Portfolio Transactions filter expression.","type":"string","maxLength":4000}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterOptionsResponseDto"}}}},"304":{"description":"Filter options have not changed for the supplied ETag"}},"security":[{"api-key":[]}],"tags":["FilterOptions"]}},"/v1/portfolios/{portfolioSlug}/filter-options/invalidate":{"post":{"operationId":"FilterOptionsController_invalidatePortfolioFilterOptionsForModels","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterOptionsModelInvalidationRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterOptionsModelInvalidationResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["FilterOptions"]}},"/v1/portfolios/{portfolioSlug}/raw-transactions":{"get":{"description":"Returns complete wallet operations with cursor pagination. When spam-only transactions are excluded, a successful page may contain fewer items than requested after scanning 10,000 matching raw transactions; use nextPageToken to continue. Optional details are sanitized and bounded but may still contain untrusted provider-controlled content. The effective page size is capped at 10 records when include=details.","operationId":"RawTransactionsController_listRawTransactions","parameters":[{"name":"pageSize","required":false,"in":"query","schema":{"description":"Requested number of resources to return. Oversized values are clamped to the route limit.","default":50,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageToken","required":false,"in":"query","schema":{"description":"Opaque token returned by the previous list response.","type":"string","minLength":1}},{"name":"fromDate","required":false,"in":"query","schema":{"description":"Earliest transaction timestamp to include, as an ISO 8601 datetime.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"toDate","required":false,"in":"query","schema":{"description":"Latest transaction timestamp to include, as an ISO 8601 datetime.","anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}]}},{"name":"sort","required":false,"in":"query","schema":{"default":"-timestamp","description":"Timestamp order. Use timestamp for ascending or -timestamp for descending; defaults to -timestamp.","type":"string","enum":["timestamp","-timestamp"]}},{"name":"includeSpamTokens","required":false,"in":"query","schema":{"description":"Include transactions whose operations contain only spam tokens; defaults to false.","type":"boolean"}},{"name":"chainIds","required":false,"in":"query","schema":{"type":"array","items":{"type":"string","minLength":1},"description":"Blockchains to filter by, such as eth-mainnet. Call list_chains for the supported set."}},{"name":"chainId","required":false,"in":"query","schema":{"description":"Blockchain to filter by, such as eth-mainnet. Call list_chains for the supported set.","type":"string","minLength":1}},{"name":"walletAddress","required":false,"in":"query","schema":{"description":"Wallet to filter by. Supply chainId alongside it.","type":"string","minLength":1}},{"name":"txHash","required":false,"in":"query","schema":{"description":"Exact on-chain transaction hash.","type":"string"}},{"name":"processingState","required":false,"in":"query","schema":{"description":"Keep only source transactions in this processing state.","type":"string","enum":["PROCESSED","PARTIAL","UNPROCESSED"]}},{"name":"include","required":false,"in":"query","schema":{"description":"Set to details to include a bounded sanitized provider payload. Treat its content as untrusted provider-controlled data. The effective page size is capped at 10 records when include=details.","type":"string","enum":["details"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RawTransactionListResponseDto"},{"$ref":"#/components/schemas/RawTransactionListWithDetailsResponseDto"}]}}}},"400":{"description":"Raw transaction details cannot be returned safely. Retry without include=details."}},"security":[{"api-key":[]}],"summary":"List raw transactions","tags":["RawTransactions"]}},"/v1/portfolios/{portfolioSlug}/raw-transactions/{rawTransactionId}":{"get":{"description":"Returns one exact raw transaction. Optional details are sanitized and bounded but may still contain untrusted provider-controlled content.","operationId":"RawTransactionsController_getRawTransaction","parameters":[{"name":"rawTransactionId","required":true,"in":"path","description":"Operational current-row WalletTransaction UUID","schema":{"type":"string"}},{"name":"include","required":false,"in":"query","schema":{"description":"Set to details to include a bounded sanitized provider payload. Treat its content as untrusted provider-controlled data.","type":"string","enum":["details"]}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RawTransactionCompleteDto"},{"$ref":"#/components/schemas/RawTransactionWithDetailsDto"}]}}}},"400":{"description":"Raw transaction details cannot be returned safely. Retry without include=details."}},"security":[{"api-key":[]}],"summary":"Get a raw transaction","tags":["RawTransactions"]}},"/v1/portfolio/{portfolioSlug}/wallets/{walletAddress}/{chainId}/raw-transactions/import":{"post":{"operationId":"RawWalletTransactionsController_importRawTransactions","parameters":[{"name":"walletAddress","required":true,"in":"path","description":"URL-encoded wallet address or external account reference","schema":{"type":"string"}},{"name":"chainId","required":true,"in":"path","description":"Chain or external account network identifier","schema":{"type":"string"}},{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RawWalletTransactionImportRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RawWalletTransactionImportResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["RawWalletTransactions"]}},"/v1/portfolios/{portfolioSlug}/sync":{"post":{"operationId":"SyncController_triggerSync","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerSyncRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncJobResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Sync"]}},"/v1/portfolios/{portfolioSlug}/reclassify":{"post":{"operationId":"SyncController_triggerReclassify","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReclassifySyncRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncJobResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Sync"]}},"/v1/portfolios/{portfolioSlug}/sync/progress":{"get":{"operationId":"SyncController_getSyncProgress","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncProgressResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Sync"]}},"/v1/reports/export":{"post":{"operationId":"ReportsController_requestWorkspaceReportExport","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceReportExportRequestDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportJobResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Reports"]}},"/v1/reports/jobs/{jobId}/download":{"get":{"operationId":"ReportsController_downloadReport","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Binary report file"}},"security":[{"api-key":[]}],"tags":["Reports"]}},"/v1/reports/jobs/{jobId}":{"get":{"operationId":"ReportsController_getReportStatus","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportJobStatusResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Reports"]}},"/v1/jobs/{jobId}":{"get":{"operationId":"JobsController_getJobStatus","parameters":[{"name":"jobId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobStatusResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["Jobs"]}},"/v1/portfolio/{portfolioSlug}/reap/simulate-quote":{"post":{"operationId":"ReapQuoteSimulatorController_simulateQuote","parameters":[{"name":"portfolioSlug","required":true,"in":"path","description":"Workspace-scoped portfolio slug","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReapQuoteSimulationRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReapQuoteSimulationResponseDto"}}}}},"security":[{"api-key":[]}],"tags":["ReapQuoteSimulator"]}}},"info":{"title":"Tokenbooks Public API","description":"REST API for third-party developers and enterprise customers to programmatically access crypto accounting services.","version":"1.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"RegistrationRequestDto":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"User email address"},"password":{"type":"string","minLength":8,"maxLength":128,"description":"User password (minimum 8 characters)"},"workspace":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Workspace name"},"slug":{"description":"Workspace slug (auto-generated if not supplied","type":"string","minLength":3,"maxLength":50,"pattern":"^[a-z0-9-]+$"}},"required":["name"]}},"required":["email","password","workspace"]},"RegistrationVerificationRequiredResponseDto":{"type":"object","properties":{"status":{"type":"string","enum":["verification-required"],"description":"Check the address for an email verification link"}},"required":["status"],"additionalProperties":false},"RegistrationCompletedResponseDto":{"type":"object","properties":{"status":{"type":"string","enum":["registered"]},"user":{"type":"object","properties":{"id":{"type":"string","description":"User ID"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"User email"}},"required":["id","email"],"additionalProperties":false},"workspace":{"type":"object","properties":{"id":{"type":"string","description":"Workspace ID"},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Workspace name"},"slug":{"type":"string","description":"Workspace slug"}},"required":["id","name","slug"],"additionalProperties":false},"apiKey":{"type":"string","description":"Workspace-scoped API key (store securely!)"}},"required":["status","user","workspace","apiKey"],"additionalProperties":false},"RegistrationRateLimitedResponseDto":{"type":"object","properties":{"code":{"type":"string","enum":["RATE_LIMIT_EXCEEDED"]},"message":{"type":"string","description":"Human-readable rate-limit message"},"path":{"type":"string","description":"Request path that exceeded the rate limit"},"retryAfter":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Seconds until the request may be retried"},"statusCode":{"type":"number","enum":[429]},"timestamp":{"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":"When the response was produced"}},"required":["code","message","path","retryAfter","statusCode","timestamp"],"additionalProperties":false},"PaginatedAssetsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Asset ID"},"symbol":{"type":"string","description":"Asset symbol"},"name":{"type":"string","description":"Asset name"},"logoUrl":{"nullable":true,"description":"Asset logo URL","type":"string"},"coingeckoId":{"nullable":true,"description":"CoinGecko coin ID","type":"string"},"stablecoinPeggedFiatCurrency":{"nullable":true,"description":"Pegged fiat currency for stablecoins","type":"string"},"fairValueScope":{"type":"string","enum":["IN_SCOPE","OUT_OF_SCOPE","NEEDS_REVIEW"],"description":"ASC 350-60 fair-value remeasurement scope for this asset"},"isFiat":{"type":"boolean","description":"Whether this asset is fiat currency"},"tokensCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of tokens linked to asset"},"createdAt":{"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":"Creation timestamp (ISO 8601)"},"updatedAt":{"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":"Last update timestamp (ISO 8601)"},"tokens":{"description":"Tokens linked to this asset when includeTokens=true","type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Token contract or mint address"},"name":{"type":"string","description":"Token name"},"symbol":{"type":"string","description":"Token symbol"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Token decimals"},"logoUrl":{"nullable":true,"description":"Token logo URL","type":"string"},"type":{"type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"],"description":"Token type"},"description":{"nullable":true,"description":"Token description","type":"string"},"metadata":{"nullable":true,"description":"Token metadata","type":"object","additionalProperties":{}},"nftContractAddress":{"nullable":true,"description":"NFT contract address","type":"string"},"coingeckoId":{"nullable":true,"description":"CoinGecko coin ID","type":"string"},"assetId":{"type":"string","description":"Asset ID"},"isSpam":{"type":"boolean","description":"Whether the token is marked as spam"},"chain":{"type":"object","properties":{"chainId":{"type":"string","description":"Public chain ID"},"name":{"type":"string","description":"Chain name"},"type":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Chain type"}},"required":["chainId","name","type"],"additionalProperties":false,"description":"Token chain"},"createdAt":{"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":"Creation timestamp (ISO 8601)"},"updatedAt":{"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":"Last update timestamp (ISO 8601)"}},"required":["chainId","address","name","symbol","decimals","logoUrl","type","description","metadata","nftContractAddress","coingeckoId","assetId","isSpam","chain","createdAt","updatedAt"],"additionalProperties":false}}},"required":["id","symbol","name","logoUrl","coingeckoId","stablecoinPeggedFiatCurrency","fairValueScope","isFiat","tokensCount","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Current page number"},"pageSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items per page"},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of items"},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of pages"}},"required":["page","pageSize","totalCount","totalPages"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"AssetResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Asset ID"},"symbol":{"type":"string","description":"Asset symbol"},"name":{"type":"string","description":"Asset name"},"logoUrl":{"nullable":true,"description":"Asset logo URL","type":"string"},"coingeckoId":{"nullable":true,"description":"CoinGecko coin ID","type":"string"},"stablecoinPeggedFiatCurrency":{"nullable":true,"description":"Pegged fiat currency for stablecoins","type":"string"},"fairValueScope":{"type":"string","enum":["IN_SCOPE","OUT_OF_SCOPE","NEEDS_REVIEW"],"description":"ASC 350-60 fair-value remeasurement scope for this asset"},"isFiat":{"type":"boolean","description":"Whether this asset is fiat currency"},"tokensCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of tokens linked to asset"},"createdAt":{"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":"Creation timestamp (ISO 8601)"},"updatedAt":{"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":"Last update timestamp (ISO 8601)"}},"required":["id","symbol","name","logoUrl","coingeckoId","stablecoinPeggedFiatCurrency","fairValueScope","isFiat","tokensCount","createdAt","updatedAt"],"additionalProperties":false},"AssetDayPriceResponseDto":{"type":"object","properties":{"assetId":{"type":"string"},"date":{"type":"string"},"currency":{"type":"string"},"price":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"basis":{"nullable":true,"type":"string","enum":["MARKET","RATE_DERIVED",null]}},"required":["assetId","date","currency","price","source","basis"],"additionalProperties":false},"PaginatedChainsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChainResponseDto"}},"pagination":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Current page number"},"pageSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items per page"},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of items"},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of pages"}},"required":["page","pageSize","totalCount","totalPages"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"ChainResponseDto":{"type":"object","properties":{"chainId":{"type":"string","pattern":"^[a-z0-9-]+$","description":"Public chain ID"},"name":{"type":"string","description":"Chain name"},"nativeChainId":{"type":"string","pattern":"^\\d+$","description":"Native chain ID as a decimal string"},"logos":{"type":"object","additionalProperties":{},"description":"Chain logo metadata"},"coinGeckoAssetPlatformId":{"nullable":true,"description":"CoinGecko asset platform ID","type":"string"},"coinGeckoNetworkId":{"nullable":true,"description":"CoinGecko network ID","type":"string"},"type":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Chain type"},"exchangeRequiredCredentials":{"nullable":true,"description":"Required exchange credential metadata","type":"string"},"createdAt":{"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":"Creation timestamp (ISO 8601)"},"updatedAt":{"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":"Last update timestamp (ISO 8601)"}},"required":["chainId","name","nativeChainId","logos","coinGeckoAssetPlatformId","coinGeckoNetworkId","type","exchangeRequiredCredentials","createdAt","updatedAt"],"additionalProperties":false},"UpdateChainTestnetRequestDto":{"type":"object","properties":{"isTestnet":{"type":"boolean","description":"Whether the chain is a testnet"}},"required":["isTestnet"],"additionalProperties":false},"ChainTestnetResponseDto":{"type":"object","properties":{"isTestnet":{"type":"boolean","description":"Whether the chain is a testnet"}},"required":["isTestnet"],"additionalProperties":false},"PaginatedTokensResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Token contract or mint address"},"name":{"type":"string","description":"Token name"},"symbol":{"type":"string","description":"Token symbol"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Token decimals"},"logoUrl":{"nullable":true,"description":"Token logo URL","type":"string"},"type":{"type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"],"description":"Token type"},"description":{"nullable":true,"description":"Token description","type":"string"},"metadata":{"nullable":true,"description":"Token metadata","type":"object","additionalProperties":{}},"nftContractAddress":{"nullable":true,"description":"NFT contract address","type":"string"},"coingeckoId":{"nullable":true,"description":"CoinGecko coin ID","type":"string"},"assetId":{"type":"string","description":"Asset ID"},"isSpam":{"type":"boolean","description":"Whether the token is marked as spam"},"chain":{"type":"object","properties":{"chainId":{"type":"string","description":"Public chain ID"},"name":{"type":"string","description":"Chain name"},"type":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Chain type"}},"required":["chainId","name","type"],"additionalProperties":false,"description":"Token chain"},"createdAt":{"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":"Creation timestamp (ISO 8601)"},"updatedAt":{"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":"Last update timestamp (ISO 8601)"}},"required":["chainId","address","name","symbol","decimals","logoUrl","type","description","metadata","nftContractAddress","coingeckoId","assetId","isSpam","chain","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Current page number"},"pageSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items per page"},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of items"},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of pages"}},"required":["page","pageSize","totalCount","totalPages"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"PaginatedCoinGeckoCoinsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"CoinGecko coin ID"},"coinGeckoAssetPlatformId":{"type":"string","description":"CoinGecko asset platform ID"},"name":{"type":"string","description":"CoinGecko coin name"},"symbol":{"type":"string","description":"CoinGecko coin symbol"},"address":{"nullable":true,"description":"CoinGecko token address","type":"string"}},"required":["id","coinGeckoAssetPlatformId","name","symbol","address"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Current page number"},"pageSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items per page"},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of items"},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of pages"}},"required":["page","pageSize","totalCount","totalPages"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"IntegrationCatalogDetailResponseDto":{"anyOf":[{"$ref":"#/components/schemas/IntegrationResponseDto"},{"$ref":"#/components/schemas/UserIntegrationCatalogItemDto"}]},"IntegrationResponseDto":{"type":"object","properties":{"integrationRef":{"type":"string","pattern":"^[a-z0-9-]+$","description":"Public integration reference"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integration display priority"},"name":{"type":"string","description":"Integration name"},"logoUrl":{"nullable":true,"description":"Integration logo URL","type":"string"},"description":{"type":"string","description":"Integration description"},"type":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Integration type"},"chainId":{"nullable":true,"description":"Linked chain ID","type":"string"},"chain":{"nullable":true,"description":"Linked chain testnet classification","type":"object","properties":{"isTestnet":{"type":"boolean"}},"required":["isTestnet"],"additionalProperties":false},"exchangeRequiredCredentials":{"nullable":true,"description":"Required exchange credential metadata","type":"string"},"status":{"type":"string","enum":["ACTIVE","ALPHA","BETA","DISABLED"],"description":"Integration status"},"isEvm":{"type":"boolean","description":"Whether the integration is EVM-compatible"},"mode":{"type":"string","enum":["API","FILE_UPLOAD"],"description":"Integration mode"},"processor":{"nullable":true,"description":"Integration processor key","type":"string"},"walletsCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of wallets using the linked chain"},"createdAt":{"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":"Creation timestamp (ISO 8601)"},"updatedAt":{"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":"Last update timestamp (ISO 8601)"}},"required":["integrationRef","priority","name","logoUrl","description","type","chainId","chain","exchangeRequiredCredentials","status","isEvm","mode","processor","walletsCount","createdAt","updatedAt"],"additionalProperties":false},"UserIntegrationCatalogItemDto":{"type":"object","properties":{"integrationRef":{"type":"string","pattern":"^[a-z0-9-]+$","description":"Public integration reference"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Integration display priority"},"name":{"type":"string","description":"Integration name"},"logoUrl":{"nullable":true,"description":"Integration logo URL","type":"string"},"description":{"type":"string","description":"Integration description"},"type":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Integration type"},"chainId":{"nullable":true,"description":"Linked chain ID","type":"string"},"chain":{"nullable":true,"description":"Linked chain testnet classification","type":"object","properties":{"isTestnet":{"type":"boolean"}},"required":["isTestnet"],"additionalProperties":false},"exchangeRequiredCredentials":{"nullable":true,"description":"Required exchange credential metadata","type":"string"},"status":{"type":"string","enum":["ACTIVE","ALPHA","BETA","DISABLED"],"description":"Integration status"},"isEvm":{"type":"boolean","description":"Whether the integration is EVM-compatible"},"mode":{"type":"string","enum":["API","FILE_UPLOAD"],"description":"Integration mode"},"processor":{"nullable":true,"description":"Integration processor key","type":"string"}},"required":["integrationRef","priority","name","logoUrl","description","type","chainId","chain","exchangeRequiredCredentials","status","isEvm","mode","processor"],"additionalProperties":false},"IntegrationCatalogListResponseDto":{"anyOf":[{"$ref":"#/components/schemas/IntegrationsListResponseDto"},{"$ref":"#/components/schemas/UserIntegrationCatalogListResponseDto"}]},"IntegrationsListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationResponseDto"}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"UserIntegrationCatalogListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UserIntegrationCatalogItemDto"}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"UpdateIntegrationRequestDto":{"type":"object","properties":{"priority":{"description":"Integration priority","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"name":{"description":"Integration name","type":"string"},"logoUrl":{"description":"Integration logo URL","nullable":true,"type":"string"},"description":{"description":"Integration description","type":"string"},"type":{"description":"Integration type","type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"]},"chainId":{"description":"Linked chain ID","nullable":true,"type":"string"},"exchangeRequiredCredentials":{"description":"Required exchange credential metadata","nullable":true,"type":"string"},"status":{"description":"Integration status","type":"string","enum":["ACTIVE","ALPHA","BETA","DISABLED"]},"isEvm":{"description":"Whether the integration is EVM-compatible","type":"boolean"},"mode":{"description":"Integration mode","type":"string","enum":["API","FILE_UPLOAD"]},"processor":{"description":"Integration processor key","nullable":true,"type":"string"}},"additionalProperties":false},"PaginatedSubscriptionPlansResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionPlanResponseDto"}},"pagination":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Current page number"},"pageSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items per page"},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of items"},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of pages"}},"required":["page","pageSize","totalCount","totalPages"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"SubscriptionPlanResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Subscription plan ID"},"name":{"type":"string","description":"Subscription plan name"},"stripeProductId":{"type":"string","description":"Stripe product ID"},"features":{"type":"object","additionalProperties":{},"description":"Legacy feature configuration"},"featureIds":{"type":"array","items":{"type":"string"},"description":"Enabled feature IDs"},"limitTransactions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Transaction limit"},"limitUsers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"User limit"},"limitPortfolios":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Portfolio limit"},"limitWallets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet limit"},"isAutoUpdateEnabled":{"type":"boolean","description":"Whether auto-update is enabled"},"isPublic":{"default":false,"description":"Whether the plan is offered publicly on pricing and /subscribe","type":"boolean"},"canUpgrade":{"default":true,"description":"Whether workspaces on this plan are shown an upgrade path","type":"boolean"},"createdAt":{"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":"Creation timestamp (ISO 8601)"},"updatedAt":{"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":"Last update timestamp (ISO 8601)"}},"required":["id","name","stripeProductId","features","featureIds","limitTransactions","limitUsers","limitPortfolios","limitWallets","isAutoUpdateEnabled","isPublic","canUpgrade","createdAt","updatedAt"],"additionalProperties":false},"CreateSubscriptionPlanRequestDto":{"type":"object","properties":{"id":{"type":"string","description":"Subscription plan ID"},"name":{"type":"string","description":"Subscription plan name"},"stripeProductId":{"type":"string","description":"Stripe product ID"},"features":{"type":"object","additionalProperties":{},"description":"Legacy feature configuration"},"featureIds":{"default":[],"description":"Enabled feature IDs","type":"array","items":{"type":"string"}},"limitTransactions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Transaction limit"},"limitUsers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"User limit"},"limitPortfolios":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Portfolio limit"},"limitWallets":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet limit"},"isAutoUpdateEnabled":{"default":false,"description":"Whether auto-update is enabled","type":"boolean"},"isPublic":{"default":false,"description":"Whether the plan is offered publicly on pricing and /subscribe","type":"boolean"},"canUpgrade":{"default":true,"description":"Whether workspaces on this plan are shown an upgrade path","type":"boolean"}},"required":["id","name","stripeProductId","features","limitTransactions","limitUsers","limitPortfolios","limitWallets"],"additionalProperties":false},"UpdateSubscriptionPlanRequestDto":{"type":"object","properties":{"name":{"description":"Subscription plan name","type":"string"},"stripeProductId":{"description":"Stripe product ID","type":"string"},"features":{"description":"Legacy feature configuration","type":"object","additionalProperties":{}},"featureIds":{"description":"Enabled feature IDs","type":"array","items":{"type":"string"}},"limitTransactions":{"description":"Transaction limit","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limitUsers":{"description":"User limit","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limitPortfolios":{"description":"Portfolio limit","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limitWallets":{"description":"Wallet limit","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"isAutoUpdateEnabled":{"description":"Whether auto-update is enabled","type":"boolean"},"isPublic":{"description":"Whether the plan is offered publicly on pricing and /subscribe","type":"boolean"},"canUpgrade":{"description":"Whether workspaces on this plan are shown an upgrade path","type":"boolean"}},"additionalProperties":false},"AddOnsListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AddOnResponseDto"}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"AddOnResponseDto":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9-]+$","description":"Add-on catalog ID"},"displayName":{"type":"string","description":"Add-on display name"},"description":{"type":"string","description":"Add-on description"},"category":{"type":"string","enum":["MODULE","CAPACITY","SERVICE"],"description":"Add-on commercial category"},"eligiblePlanIds":{"type":"array","items":{"type":"string"},"description":"Subscription plan IDs allowed to purchase this add-on"},"stripeProductId":{"type":"string","description":"Stripe product ID"},"monthlyPriceId":{"nullable":true,"description":"Stripe price ID for monthly billing","type":"string"},"annualPriceId":{"nullable":true,"description":"Stripe price ID for annual billing","type":"string"},"oneTimePriceId":{"nullable":true,"description":"Stripe price ID for one-time billing","type":"string"},"featureIdsGranted":{"type":"array","items":{"type":"string"},"description":"Feature IDs this add-on grants while it stays active"},"limitTransactionsDelta":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Transaction limit increase per purchased unit"},"limitUsersDelta":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"User limit increase per purchased unit"},"limitPortfoliosDelta":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Portfolio limit increase per purchased unit"},"limitWalletsDelta":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet limit increase per purchased unit"},"maxQuantity":{"nullable":true,"description":"Highest quantity one workspace may hold; null when unbounded","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"salesApproved":{"type":"boolean","description":"Whether self-serve purchase is blocked and sales approval is required"},"createdAt":{"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":"Creation timestamp (ISO 8601)"},"updatedAt":{"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":"Last update timestamp (ISO 8601)"}},"required":["id","displayName","description","category","eligiblePlanIds","stripeProductId","monthlyPriceId","annualPriceId","oneTimePriceId","featureIdsGranted","limitTransactionsDelta","limitUsersDelta","limitPortfoliosDelta","limitWalletsDelta","maxQuantity","salesApproved","createdAt","updatedAt"],"additionalProperties":false},"CreateAddOnRequestDto":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9-]+$","description":"Add-on catalog ID"},"displayName":{"type":"string","minLength":1,"description":"Add-on display name"},"description":{"type":"string","description":"Add-on description"},"category":{"type":"string","enum":["MODULE","CAPACITY","SERVICE"],"description":"Add-on commercial category"},"eligiblePlanIds":{"default":[],"description":"Subscription plan IDs allowed to purchase this add-on","type":"array","items":{"type":"string","minLength":1}},"stripeProductId":{"type":"string","minLength":1,"description":"Stripe product ID"},"monthlyPriceId":{"default":null,"description":"Stripe price ID for monthly billing","nullable":true,"type":"string","minLength":1},"annualPriceId":{"default":null,"description":"Stripe price ID for annual billing","nullable":true,"type":"string","minLength":1},"oneTimePriceId":{"default":null,"description":"Stripe price ID for one-time billing","nullable":true,"type":"string","minLength":1},"featureIdsGranted":{"default":[],"description":"Feature IDs this add-on grants while it stays active","type":"array","items":{"type":"string","minLength":1}},"limitTransactionsDelta":{"default":0,"description":"Transaction limit increase per purchased unit","type":"integer","minimum":0,"maximum":9007199254740991},"limitUsersDelta":{"default":0,"description":"User limit increase per purchased unit","type":"integer","minimum":0,"maximum":9007199254740991},"limitPortfoliosDelta":{"default":0,"description":"Portfolio limit increase per purchased unit","type":"integer","minimum":0,"maximum":9007199254740991},"limitWalletsDelta":{"default":0,"description":"Wallet limit increase per purchased unit","type":"integer","minimum":0,"maximum":9007199254740991},"maxQuantity":{"default":null,"description":"Highest quantity one workspace may hold; null when unbounded","nullable":true,"type":"integer","minimum":1,"maximum":9007199254740991},"salesApproved":{"default":false,"description":"Whether self-serve purchase is blocked and sales approval is required","type":"boolean"}},"required":["id","displayName","description","category","stripeProductId"],"additionalProperties":false},"UpdateAddOnRequestDto":{"type":"object","properties":{"displayName":{"description":"Add-on display name","type":"string","minLength":1},"description":{"description":"Add-on description","type":"string"},"category":{"description":"Add-on commercial category","type":"string","enum":["MODULE","CAPACITY","SERVICE"]},"eligiblePlanIds":{"description":"Subscription plan IDs allowed to purchase this add-on","type":"array","items":{"type":"string","minLength":1}},"stripeProductId":{"description":"Stripe product ID","type":"string","minLength":1},"monthlyPriceId":{"description":"Stripe price ID for monthly billing","nullable":true,"type":"string","minLength":1},"annualPriceId":{"description":"Stripe price ID for annual billing","nullable":true,"type":"string","minLength":1},"oneTimePriceId":{"description":"Stripe price ID for one-time billing","nullable":true,"type":"string","minLength":1},"featureIdsGranted":{"description":"Feature IDs this add-on grants while it stays active","type":"array","items":{"type":"string","minLength":1}},"limitTransactionsDelta":{"description":"Transaction limit increase per purchased unit","type":"integer","minimum":0,"maximum":9007199254740991},"limitUsersDelta":{"description":"User limit increase per purchased unit","type":"integer","minimum":0,"maximum":9007199254740991},"limitPortfoliosDelta":{"description":"Portfolio limit increase per purchased unit","type":"integer","minimum":0,"maximum":9007199254740991},"limitWalletsDelta":{"description":"Wallet limit increase per purchased unit","type":"integer","minimum":0,"maximum":9007199254740991},"maxQuantity":{"description":"Highest quantity one workspace may hold; null when unbounded","nullable":true,"type":"integer","minimum":1,"maximum":9007199254740991},"salesApproved":{"description":"Whether self-serve purchase is blocked and sales approval is required","type":"boolean"}},"additionalProperties":false},"CreateWorkspaceRequestDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Workspace name"},"slug":{"description":"Workspace slug (auto-generated if not supplied","type":"string","minLength":3,"maxLength":50,"pattern":"^[a-z0-9-]+$"},"environment":{"description":"Use \"test\" only when calling with a test API key (tb_test_…); assigns relaxed testing plan. Live keys must omit or use production.","type":"string","enum":["production","test"]}},"required":["name"]},"CreateWorkspaceResponseDto":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string","description":"Workspace ID"},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Workspace name"},"slug":{"type":"string","description":"Workspace slug"}},"required":["id","name","slug"],"additionalProperties":false},"apiKey":{"type":"string","description":"Workspace-scoped API key"}},"required":["workspace","apiKey"],"additionalProperties":false},"WorkspaceResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Workspace ID"},"createdAt":{"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":"Creation timestamp (ISO 8601)"},"name":{"type":"string","minLength":1,"maxLength":100,"description":"Workspace name"},"slug":{"type":"string","description":"Workspace slug"}},"required":["id","createdAt","name","slug"],"additionalProperties":false},"InviteMemberRequestDto":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"Email of the person to invite"},"role":{"type":"string","enum":["admin","member","restricted_member"],"description":"Role to assign to the invited member"}},"required":["email","role"],"additionalProperties":{}},"InviteMemberResponseDto":{"type":"object","properties":{"message":{"type":"string","description":"Success message"}},"required":["message"],"additionalProperties":false},"TeamMemberResponseDto":{"type":"object","properties":{"userId":{"type":"string","description":"User ID"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"User email"},"role":{"type":"string","description":"Member role"},"joinedAt":{"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":"When member joined"}},"required":["userId","email","role","joinedAt"],"additionalProperties":false},"WorkspaceMemberOffboardingPreviewResponseDto":{"oneOf":[{"type":"object","properties":{"actions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["PORTFOLIO_MEMBERSHIPS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["portfolio"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["TEAM_MEMBERSHIPS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["team"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["TEAM_MANAGER_ASSIGNMENTS_CLEARED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["team"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["API_KEYS_DISABLED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["api_key"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["SLACK_LINKS_DISABLED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["slack_link"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["ACTIVE_SESSIONS_CLEARED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["session"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["COUNTERPARTIES_UNLINKED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["counterparty"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["INVITATIONS_CANCELED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["invitation"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["APPROVAL_POLICY_USERS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval_rule"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["WORKSPACE_MEMBERSHIPS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["workspace"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["WORKSPACE_USAGE_REFRESHED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["workspace"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false}],"type":"object"}},"status":{"type":"string","enum":["ready"]}},"required":["actions","status"],"additionalProperties":false},{"type":"object","properties":{"actions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["PORTFOLIO_MEMBERSHIPS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["portfolio"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["TEAM_MEMBERSHIPS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["team"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["TEAM_MANAGER_ASSIGNMENTS_CLEARED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["team"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["API_KEYS_DISABLED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["api_key"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["SLACK_LINKS_DISABLED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["slack_link"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["ACTIVE_SESSIONS_CLEARED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["session"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["COUNTERPARTIES_UNLINKED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["counterparty"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["INVITATIONS_CANCELED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["invitation"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["APPROVAL_POLICY_USERS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval_rule"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["WORKSPACE_MEMBERSHIPS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["workspace"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["WORKSPACE_USAGE_REFRESHED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["workspace"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false}],"type":"object"}},"blockers":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","enum":["LAST_WORKSPACE_OWNER"]},"description":{"type":"string","minLength":1},"resolutionUrl":{"type":"string"},"resource":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["workspace"]}},"required":["name","type"],"additionalProperties":false}},"required":["code","description","resolutionUrl","resource"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["SOLE_PORTFOLIO_OWNER"]},"description":{"type":"string","minLength":1},"resolutionUrl":{"type":"string"},"resource":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["portfolio"]}},"required":["name","type"],"additionalProperties":false}},"required":["code","description","resolutionUrl","resource"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["SPECIFIC_USER_APPROVAL_THRESHOLD"]},"description":{"type":"string","minLength":1},"resolutionUrl":{"type":"string"},"resource":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["portfolio"]}},"required":["name","type"],"additionalProperties":false}},"required":["code","description","resolutionUrl","resource"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["PERMISSION_HOLDER_APPROVAL_THRESHOLD"]},"description":{"type":"string","minLength":1},"resolutionUrl":{"type":"string"},"resource":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["portfolio"]}},"required":["name","type"],"additionalProperties":false}},"required":["code","description","resolutionUrl","resource"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["TEAM_MANAGER_APPROVAL_ROUTE"]},"description":{"type":"string","minLength":1},"resolutionUrl":{"type":"string"},"resource":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["portfolio"]}},"required":["name","type"],"additionalProperties":false}},"required":["code","description","resolutionUrl","resource"],"additionalProperties":false}],"type":"object"}},"status":{"type":"string","enum":["blocked"]}},"required":["actions","blockers","status"],"additionalProperties":false}],"type":"object"},"WorkspaceMemberOffboardingExecutionResultDto":{"oneOf":[{"type":"object","properties":{"actions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["PORTFOLIO_MEMBERSHIPS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["portfolio"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["TEAM_MEMBERSHIPS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["team"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["TEAM_MANAGER_ASSIGNMENTS_CLEARED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["team"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["API_KEYS_DISABLED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["api_key"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["SLACK_LINKS_DISABLED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["slack_link"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["ACTIVE_SESSIONS_CLEARED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["session"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["COUNTERPARTIES_UNLINKED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["counterparty"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["INVITATIONS_CANCELED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["invitation"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["APPROVAL_POLICY_USERS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval_rule"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["WORKSPACE_MEMBERSHIPS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["workspace"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["WORKSPACE_USAGE_REFRESHED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["workspace"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false}],"type":"object"}},"status":{"type":"string","enum":["completed"]}},"required":["actions","status"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["already_removed"]}},"required":["status"],"additionalProperties":false}],"type":"object"},"WorkspaceMemberOffboardingConflictResponseDto":{"type":"object","properties":{"actions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["PORTFOLIO_MEMBERSHIPS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["portfolio"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["TEAM_MEMBERSHIPS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["team"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["TEAM_MANAGER_ASSIGNMENTS_CLEARED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["team"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["API_KEYS_DISABLED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["api_key"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["SLACK_LINKS_DISABLED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["slack_link"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["ACTIVE_SESSIONS_CLEARED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["session"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["COUNTERPARTIES_UNLINKED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["counterparty"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["INVITATIONS_CANCELED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["invitation"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["APPROVAL_POLICY_USERS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["approval_rule"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["WORKSPACE_MEMBERSHIPS_REMOVED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["workspace"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false},{"type":"object","properties":{"affectedCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"code":{"type":"string","enum":["WORKSPACE_USAGE_REFRESHED"]},"description":{"type":"string","minLength":1},"resources":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["workspace"]}},"required":["name","type"],"additionalProperties":false}}},"required":["affectedCount","code","description","resources"],"additionalProperties":false}],"type":"object"}},"blockers":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","enum":["LAST_WORKSPACE_OWNER"]},"description":{"type":"string","minLength":1},"resolutionUrl":{"type":"string"},"resource":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["workspace"]}},"required":["name","type"],"additionalProperties":false}},"required":["code","description","resolutionUrl","resource"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["SOLE_PORTFOLIO_OWNER"]},"description":{"type":"string","minLength":1},"resolutionUrl":{"type":"string"},"resource":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["portfolio"]}},"required":["name","type"],"additionalProperties":false}},"required":["code","description","resolutionUrl","resource"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["SPECIFIC_USER_APPROVAL_THRESHOLD"]},"description":{"type":"string","minLength":1},"resolutionUrl":{"type":"string"},"resource":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["portfolio"]}},"required":["name","type"],"additionalProperties":false}},"required":["code","description","resolutionUrl","resource"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["PERMISSION_HOLDER_APPROVAL_THRESHOLD"]},"description":{"type":"string","minLength":1},"resolutionUrl":{"type":"string"},"resource":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["portfolio"]}},"required":["name","type"],"additionalProperties":false}},"required":["code","description","resolutionUrl","resource"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["TEAM_MANAGER_APPROVAL_ROUTE"]},"description":{"type":"string","minLength":1},"resolutionUrl":{"type":"string"},"resource":{"type":"object","properties":{"name":{"type":"string","minLength":1},"type":{"type":"string","enum":["portfolio"]}},"required":["name","type"],"additionalProperties":false}},"required":["code","description","resolutionUrl","resource"],"additionalProperties":false}],"type":"object"}},"status":{"type":"string","enum":["blocked"]},"statusCode":{"type":"number","enum":[409]},"timestamp":{"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":"When the conflict was produced"},"path":{"type":"string","description":"Request path that produced the conflict"},"requestId":{"type":"string","description":"Request correlation ID"}},"required":["actions","blockers","status","statusCode","timestamp","path","requestId"],"additionalProperties":false},"CreatePortfolioRequestDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Portfolio name"},"slug":{"description":"Portfolio slug (auto-generated if not supplied)","type":"string","minLength":1},"currency":{"description":"Functional currency (default USD)","type":"string","pattern":"^[A-Z]{3}$"},"legalEntityType":{"description":"Legal entity classification for an explicit country profile","nullable":true,"type":"string","enum":["CORPORATION","INDIVIDUAL","TRUST","PARTNERSHIP",null]},"financialReportingFramework":{"description":"Financial reporting framework (default TAX_ONLY)","type":"string","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"]},"reportingTimezone":{"description":"Canonical IANA reporting timezone (default UTC)","type":"string"},"accountingConfiguration":{"description":"Accounting configuration (defaults applied if omitted)","type":"object","properties":{"gasFeeAccountingTreatment":{"type":"string","enum":["DISPOSAL_AND_COST_BASIS","EXPENSE_ONLY"]},"isPurchaseTaxable":{"type":"boolean"},"costBasisLotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"baseCurrency":{"type":"string"},"stablecoinTreatment":{"type":"string","enum":["BASE","ASSET"]},"costBasisPerWallet":{"type":"boolean"},"defiDepositTreatment":{"nullable":true,"type":"string","enum":["TAXABLE_EXCHANGE","NON_TAXABLE_RESERVATION",null]},"separateIncomeExpenseLines":{"type":"boolean"},"jurisdictionCode":{"type":"string"}},"additionalProperties":false}},"required":["name"]},"PortfolioDetailsResponseDto":{"type":"object","properties":{"slug":{"type":"string","description":"Portfolio slug"},"name":{"type":"string","description":"Portfolio name"},"createdAt":{"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":"Creation timestamp (ISO 8601)"},"updatedAt":{"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":"Last update timestamp (ISO 8601)"},"currency":{"type":"string","description":"Base currency"},"accountingConfiguration":{"type":"object","properties":{"gasFeeAccountingTreatment":{"type":"string","enum":["DISPOSAL_AND_COST_BASIS","EXPENSE_ONLY"]},"isPurchaseTaxable":{"type":"boolean"},"costBasisLotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"baseCurrency":{"type":"string"},"jurisdictionCode":{"type":"string"},"stablecoinTreatment":{"type":"string","enum":["BASE","ASSET"]},"costBasisPerWallet":{"type":"boolean"},"defiDepositTreatment":{"type":"string","enum":["TAXABLE_EXCHANGE","NON_TAXABLE_RESERVATION"]},"separateIncomeExpenseLines":{"type":"boolean"},"financialReportingFramework":{"default":"TAX_ONLY","type":"string","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"]}},"required":["gasFeeAccountingTreatment","isPurchaseTaxable","costBasisLotMethod","baseCurrency","jurisdictionCode","stablecoinTreatment","costBasisPerWallet","defiDepositTreatment","separateIncomeExpenseLines","financialReportingFramework"],"additionalProperties":false,"description":"Accounting configuration"},"legalEntityType":{"nullable":true,"description":"Legal entity type, or null when none is configured","type":"string","enum":["BUSINESS","CORPORATION","INDIVIDUAL","TRUST","PARTNERSHIP",null]},"reportingTimezone":{"type":"string","description":"Reporting timezone"},"hasPostedActivity":{"type":"boolean","description":"True when the portfolio has at least one POSTED or CLOSED transaction. Accounting-policy fields that would reinterpret existing entries cannot be changed once this is true, so callers use it to decide which settings to offer."}},"required":["slug","name","createdAt","updatedAt","currency","accountingConfiguration","legalEntityType","reportingTimezone","hasPostedActivity"],"additionalProperties":false},"MarkTokenSpamRequestDto":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID of the token"},"tokenAddress":{"type":"string","description":"Token contract address"},"isSpam":{"default":true,"description":"Spam flag to set (default true; false unmarks)","type":"boolean"},"reason":{"description":"Optional immutable root reason whose nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references","type":"string","minLength":1}},"required":["chainId","tokenAddress"]},"QueuedCommandResultDto":{"type":"object","properties":{"mode":{"type":"string","enum":["async"],"description":"The command was accepted asynchronously"},"jobId":{"type":"string","minLength":1,"description":"Tracking job ID for the queued command"},"status":{"type":"string","enum":["queued"],"description":"Queue admission status"}},"required":["mode","jobId","status"],"additionalProperties":false},"MarkTokensSpamRequestDto":{"type":"object","properties":{"tokens":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID of the token"},"tokenAddress":{"type":"string","description":"Token contract address"}},"required":["chainId","tokenAddress"],"additionalProperties":false},"description":"Tokens to update"},"isSpam":{"default":true,"description":"Spam flag to set for all tokens","type":"boolean"},"reason":{"description":"Optional immutable root reason whose nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references","type":"string","minLength":1}},"required":["tokens"],"additionalProperties":false},"PaginatedPortfoliosResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"Portfolio slug"},"name":{"type":"string","description":"Portfolio name"},"createdAt":{"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":"Creation timestamp (ISO 8601)"},"updatedAt":{"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":"Last update timestamp (ISO 8601)"}},"required":["slug","name","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Current page number"},"pageSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items per page"},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of items"},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of pages"}},"required":["page","pageSize","totalCount","totalPages"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"PortfolioAssetOverviewDto":{"type":"object","properties":{"tokensCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of concrete tokens"},"walletsCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of wallets"},"transferCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of transfers"},"costBasis":{"nullable":true,"description":"Sum of the visible asset rows' known cost basis; null when no visible asset has a known cost basis, for example when every one is withheld","type":"string"},"unrealizedGainLoss":{"nullable":true,"description":"Sum of the visible asset rows' known unrealized gain/loss; null when no visible asset has both a known value and a known cost basis","type":"string"}},"required":["tokensCount","walletsCount","transferCount","costBasis","unrealizedGainLoss"],"additionalProperties":false},"WalletUnrealizedGainsListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"wallet":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"walletAddress":{"type":"string","description":"Wallet address"}},"required":["chainId","walletAddress"],"additionalProperties":false},"value":{"nullable":true,"description":"Wallet market value in the portfolio base currency: liquid holdings and DeFi positions at each asset's one current unit price, spam hidden; null when no holding of the wallet can be valued","type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"unrealizedGainLoss":{"nullable":true,"description":"Wallet value less the cost basis of the lots the wallet holds; null when the portfolio pools cost basis across wallets, or when the wallet holds an asset whose cost basis the Assets page withholds, or when none of the wallet's holdings has both a known value and a cost basis","type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}},"required":["wallet","value","unrealizedGainLoss"],"additionalProperties":false,"description":"Wallet value and unrealized gain/loss row"}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"PortfolioAssetBalancesListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","description":"Asset ID"},"symbol":{"type":"string","description":"Asset symbol"},"name":{"type":"string","description":"Asset display name"},"quantity":{"type":"string","description":"Asset quantity"},"computedQuantity":{"type":"string","description":"Human-readable quantity computed from transaction history"},"snapshotQuantity":{"type":"string","description":"Human-readable latest snapshot quantity"},"isBalanceMatch":{"type":"boolean","description":"Whether computed and snapshot quantities match"},"tokenType":{"type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"],"description":"Representative token type"},"unitPrice":{"nullable":true,"description":"The one unit price in base currency for this asset. As of a date it is the latest stored close on that date or within the 7 days before it. Under a cost-basis fallback it is cost basis per unit, not a market price, and null when part of the cost basis is withheld","type":"string"},"pricedAt":{"nullable":true,"description":"Timestamp when the value was priced (ISO 8601)","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))$"},"lastChange":{"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":"Last balance change timestamp"},"value":{"nullable":true,"description":"Value in base currency; null when the asset has no market price and either no known total cost basis or a quantity that nets to zero","type":"string"},"valuation":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["PRICED"]},"source":{"type":"string","enum":["PORTFOLIO_CURRENCY","STABLECOIN_PEG","LIVE","LAST_CLOSE","HISTORICAL_CLOSE"],"description":"LIVE: fresh quote; LAST_CLOSE: newest daily close; HISTORICAL_CLOSE: as-of close; others: worth 1"}},"required":["status","source"],"additionalProperties":false},{"type":"object","properties":{"status":{"type":"string","enum":["UNAVAILABLE"]},"fallback":{"type":"string","enum":["COST_BASIS","NONE"],"description":"COST_BASIS: valued at cost basis; NONE: no value"},"reason":{"type":"string","description":"Why no market price is shown"}},"required":["status","fallback","reason"],"additionalProperties":false}],"description":"How the market value was obtained","type":"object"},"costBasis":{"nullable":true,"description":"Asset cost basis","type":"string"},"heldQuantity":{"nullable":true,"description":"Quantity of open lots behind costBasis; cost per unit = costBasis ÷ heldQuantity. Null exactly when costBasis is null","type":"string"},"unrealizedGainLoss":{"nullable":true,"description":"Asset unrealized gain/loss","type":"string"},"roi":{"nullable":true,"description":"Asset return on investment","type":"string"},"isSpam":{"type":"boolean","description":"Whether every token backing this asset row is spam"},"transferCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Asset operation count"},"tokens":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","description":"Asset ID"},"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Token contract address"},"type":{"type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"],"description":"Token type"},"name":{"type":"string","description":"Token display name"},"symbol":{"type":"string","description":"Token symbol"},"isSpam":{"type":"boolean","description":"Whether this concrete token is spam"},"stablecoinPeggedFiatCurrency":{"nullable":true,"description":"Stablecoin peg currency override, when configured","type":"string"},"chain":{"type":"object","properties":{"id":{"type":"string","description":"Chain ID"},"name":{"type":"string","description":"Chain display name"}},"required":["id","name"],"additionalProperties":false,"description":"Chain display metadata"}},"required":["assetId","chainId","address","type","name","symbol","isSpam","stablecoinPeggedFiatCurrency","chain"],"additionalProperties":false},"description":"Concrete token metadata backing this asset row"},"wallets":{"type":"array","items":{"type":"object","properties":{"walletName":{"type":"string","description":"Wallet display name"},"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"},"quantity":{"type":"string","description":"Asset quantity in this wallet"},"computedQuantity":{"type":"string","description":"Human-readable quantity computed from transaction history"},"snapshotQuantity":{"type":"string","description":"Human-readable latest snapshot quantity"},"isBalanceMatch":{"type":"boolean","description":"Whether computed and snapshot quantities match"},"tokenType":{"type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"],"description":"Representative token type"},"lastChange":{"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":"Last balance change timestamp"},"value":{"nullable":true,"description":"Quantity times the asset's one unit price. Without a price it is the wallet's share of the asset's cost basis, or under wallet-scoped basis the wallet's own cost basis even when the asset's unit price and total are null; null when neither applies","type":"string"},"costBasis":{"nullable":true,"description":"Wallet asset cost basis when the portfolio tracks wallet-scoped basis; null for universal pooled basis","type":"string"},"heldQuantity":{"nullable":true,"description":"Quantity of open lots behind costBasis; cost per unit = costBasis ÷ heldQuantity. Null exactly when costBasis is null","type":"string"},"unrealizedGainLoss":{"nullable":true,"description":"Wallet asset unrealized gain/loss","type":"string"},"roi":{"nullable":true,"description":"Wallet asset return on investment","type":"string"},"isPooledAllocation":{"type":"boolean","description":"Whether this row is under universal pooled basis, where wallet accounting fields are not exact attribution"},"isSpam":{"type":"boolean","description":"Whether every token backing this wallet asset row is spam"},"transferCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Wallet asset operation count"},"tokens":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string","description":"Asset ID"},"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Token contract address"},"type":{"type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"],"description":"Token type"},"name":{"type":"string","description":"Token display name"},"symbol":{"type":"string","description":"Token symbol"},"isSpam":{"type":"boolean","description":"Whether this concrete token is spam"},"stablecoinPeggedFiatCurrency":{"nullable":true,"description":"Stablecoin peg currency override, when configured","type":"string"},"chain":{"type":"object","properties":{"id":{"type":"string","description":"Chain ID"},"name":{"type":"string","description":"Chain display name"}},"required":["id","name"],"additionalProperties":false,"description":"Chain display metadata"}},"required":["assetId","chainId","address","type","name","symbol","isSpam","stablecoinPeggedFiatCurrency","chain"],"additionalProperties":false},"description":"Concrete token metadata backing this wallet asset row"}},"required":["walletName","chainId","address","quantity","computedQuantity","snapshotQuantity","isBalanceMatch","tokenType","lastChange","value","costBasis","heldQuantity","unrealizedGainLoss","roi","isPooledAllocation","isSpam","transferCount","tokens"],"additionalProperties":false},"description":"Wallet-level asset breakdown rows"},"defiExposure":{"description":"Optional DeFi exposure rows for this asset","type":"array","items":{"type":"object","properties":{"positionId":{"type":"string","description":"DeFi position ID"},"positionRef":{"description":"Stable DeFi position reference","type":"string"},"positionSelector":{"description":"Explicit selector for opening the DeFi position detail","type":"object","properties":{"walletChainId":{"type":"string","minLength":1,"description":"Owning wallet chain ID"},"walletAddress":{"type":"string","minLength":1,"description":"Owning wallet address"},"positionKey":{"type":"string","minLength":1,"description":"Protocol-defined stable logical position key"}},"required":["walletChainId","walletAddress","positionKey"],"additionalProperties":false},"protocol":{"type":"string","description":"Protocol display name"},"contract":{"type":"string","description":"Protocol contract or custody identifier"},"status":{"type":"string","description":"DeFi position status"},"quantity":{"type":"string","description":"Token quantity exposed to DeFi"},"value":{"nullable":true,"description":"Exposure value in base currency, as its wallet row values it. Without a market price it is the exposure's share of the asset's cost basis, or under wallet-scoped basis of its own wallet's cost basis; null when neither applies","type":"string"}},"required":["positionId","protocol","contract","status","quantity","value"],"additionalProperties":false}}},"required":["assetId","symbol","name","quantity","computedQuantity","snapshotQuantity","isBalanceMatch","tokenType","unitPrice","pricedAt","lastChange","value","valuation","costBasis","heldQuantity","unrealizedGainLoss","roi","isSpam","transferCount","tokens","wallets"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"WalletTokenBalancesListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"Wallet address"},"chainId":{"type":"string","description":"Chain ID"},"tokenAddress":{"type":"string","description":"Token contract address"},"assetId":{"type":"string","description":"Asset ID"},"symbol":{"type":"string","description":"Token symbol"},"name":{"type":"string","description":"Token display name"},"decimals":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Token decimal precision"},"isNative":{"type":"boolean","description":"Whether this is a native chain token"},"isSpam":{"type":"boolean","description":"Whether this token is spam"},"stablecoinPeggedFiatCurrency":{"description":"Effective stablecoin peg currency for this portfolio, or null when unpegged; omitted by older servers","nullable":true,"type":"string"},"quantity":{"type":"string","description":"Token quantity"},"unitPrice":{"nullable":true,"description":"Unit price in base currency","type":"string"},"pricedAt":{"nullable":true,"description":"Timestamp when the value was priced (ISO 8601)","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))$"},"value":{"nullable":true,"description":"Value in base currency, as its /assets wallet row values it; null when the holding cannot be valued","type":"string"},"defiExposure":{"description":"Optional DeFi exposure rows for this token","type":"array","items":{"type":"object","properties":{"positionId":{"type":"string","description":"DeFi position ID"},"positionRef":{"description":"Stable DeFi position reference","type":"string"},"positionSelector":{"description":"Explicit selector for opening the DeFi position detail","type":"object","properties":{"walletChainId":{"type":"string","minLength":1,"description":"Owning wallet chain ID"},"walletAddress":{"type":"string","minLength":1,"description":"Owning wallet address"},"positionKey":{"type":"string","minLength":1,"description":"Protocol-defined stable logical position key"}},"required":["walletChainId","walletAddress","positionKey"],"additionalProperties":false},"protocol":{"type":"string","description":"Protocol display name"},"contract":{"type":"string","description":"Protocol contract or custody identifier"},"status":{"type":"string","description":"DeFi position status"},"quantity":{"type":"string","description":"Token quantity exposed to DeFi"},"value":{"nullable":true,"description":"Exposure value in base currency, as its wallet row values it. Without a market price it is the exposure's share of the asset's cost basis, or under wallet-scoped basis of its own wallet's cost basis; null when neither applies","type":"string"}},"required":["positionId","protocol","contract","status","quantity","value"],"additionalProperties":false}}},"required":["address","chainId","tokenAddress","assetId","symbol","name","decimals","isNative","isSpam","quantity","unitPrice","pricedAt","value"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"WalletHoldingsOverviewDto":{"type":"object","properties":{"tokensCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of concrete tokens"},"walletsCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of wallets in scope"},"transferCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of transfers"},"accountingSummary":{"nullable":true,"description":"Page-scoped accounting summary; null when the portfolio pools cost basis across wallets, since a wallet then has no basis of its own","type":"object","properties":{"costBasis":{"nullable":true,"description":"Held cost basis of the page wallets' visible assets; 0 when they hold no open lots; null when the basis of any of those assets is withheld for any page wallet, since withheld basis is never shown or partially summed","type":"string"},"realizedGainLoss":{"type":"string","description":"Realized gain/loss of the page wallets' disposals of the page's assets"},"unrealizedGainLoss":{"nullable":true,"description":"Sum over the page wallets of each wallet's /wallets unrealized gain/loss; null when the basis of any page asset is withheld for any page wallet, or when none of the page's holdings has both a known value and a cost basis","type":"string"},"roi":{"nullable":true,"description":"(realizedGainLoss + unrealizedGainLoss) ÷ costBasis; null when unrealizedGainLoss or costBasis is null, or costBasis is not positive","type":"string"}},"required":["costBasis","realizedGainLoss","unrealizedGainLoss","roi"],"additionalProperties":false}},"required":["tokensCount","walletsCount","transferCount","accountingSummary"],"additionalProperties":false},"AddressTokenBalancesListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","description":"Wallet address"},"chainId":{"type":"string","description":"Chain ID"},"tokenAddress":{"type":"string","description":"Token contract address"},"assetId":{"type":"string","description":"Asset ID"},"symbol":{"type":"string","description":"Token symbol"},"name":{"type":"string","description":"Token display name"},"decimals":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Token decimal precision"},"isNative":{"type":"boolean","description":"Whether this is a native chain token"},"isSpam":{"type":"boolean","description":"Whether this token is spam"},"stablecoinPeggedFiatCurrency":{"description":"Effective stablecoin peg currency for this portfolio, or null when unpegged; omitted by older servers","nullable":true,"type":"string"},"quantity":{"type":"string","description":"Token quantity"},"unitPrice":{"nullable":true,"description":"Unit price in base currency","type":"string"},"pricedAt":{"nullable":true,"description":"Timestamp when the value was priced (ISO 8601)","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))$"},"value":{"nullable":true,"description":"Value in base currency, as its /assets wallet row values it; null when the holding cannot be valued","type":"string"},"defiExposure":{"description":"Optional DeFi exposure rows for this token","type":"array","items":{"type":"object","properties":{"positionId":{"type":"string","description":"DeFi position ID"},"positionRef":{"description":"Stable DeFi position reference","type":"string"},"positionSelector":{"description":"Explicit selector for opening the DeFi position detail","type":"object","properties":{"walletChainId":{"type":"string","minLength":1,"description":"Owning wallet chain ID"},"walletAddress":{"type":"string","minLength":1,"description":"Owning wallet address"},"positionKey":{"type":"string","minLength":1,"description":"Protocol-defined stable logical position key"}},"required":["walletChainId","walletAddress","positionKey"],"additionalProperties":false},"protocol":{"type":"string","description":"Protocol display name"},"contract":{"type":"string","description":"Protocol contract or custody identifier"},"status":{"type":"string","description":"DeFi position status"},"quantity":{"type":"string","description":"Token quantity exposed to DeFi"},"value":{"nullable":true,"description":"Exposure value in base currency, as its wallet row values it. Without a market price it is the exposure's share of the asset's cost basis, or under wallet-scoped basis of its own wallet's cost basis; null when neither applies","type":"string"}},"required":["positionId","protocol","contract","status","quantity","value"],"additionalProperties":false}}},"required":["address","chainId","tokenAddress","assetId","symbol","name","decimals","isNative","isSpam","quantity","unitPrice","pricedAt","value"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"AddressHoldingsOverviewDto":{"type":"object","properties":{"tokensCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of concrete tokens"},"walletsCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of wallets in scope"},"transferCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of transfers"},"accountingSummary":{"nullable":true,"description":"Page-scoped accounting summary; null when the portfolio pools cost basis across wallets, since a wallet then has no basis of its own","type":"object","properties":{"costBasis":{"nullable":true,"description":"Held cost basis of the page wallets' visible assets; 0 when they hold no open lots; null when the basis of any of those assets is withheld for any page wallet, since withheld basis is never shown or partially summed","type":"string"},"realizedGainLoss":{"type":"string","description":"Realized gain/loss of the page wallets' disposals of the page's assets"},"unrealizedGainLoss":{"nullable":true,"description":"Sum over the page wallets of each wallet's /wallets unrealized gain/loss; null when the basis of any page asset is withheld for any page wallet, or when none of the page's holdings has both a known value and a cost basis","type":"string"},"roi":{"nullable":true,"description":"(realizedGainLoss + unrealizedGainLoss) ÷ costBasis; null when unrealizedGainLoss or costBasis is null, or costBasis is not positive","type":"string"}},"required":["costBasis","realizedGainLoss","unrealizedGainLoss","roi"],"additionalProperties":false}},"required":["tokensCount","walletsCount","transferCount","accountingSummary"],"additionalProperties":false},"PortfolioValueHistoryRequestDto":{"type":"object","properties":{"startDate":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}],"description":"Inclusive UTC start timestamp"},"endDate":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}],"description":"Inclusive UTC end timestamp"},"includeSpam":{"description":"Whether spam tokens should be included","type":"boolean"}},"required":["startDate","endDate"],"additionalProperties":false},"PortfolioValueHistoryResponseDto":{"type":"object","properties":{"cachedThrough":{"nullable":true,"type":"string","format":"date","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])))$","description":"UTC day in YYYY-MM-DD format"},"refreshedAt":{"nullable":true,"description":"Refresh timestamp in ISO 8601 format","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))$"},"isStale":{"type":"boolean","description":"Whether a background refresh was started"},"refreshJobId":{"nullable":true,"description":"Refresh job ID","type":"string"},"refreshQueueName":{"nullable":true,"description":"Refresh job consumer name for status polling","type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date","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])))$","description":"UTC day in YYYY-MM-DD format"},"value":{"type":"string","description":"Portfolio value in base currency"},"assetCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of assets on this day"},"walletCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of wallets on this day"}},"required":["day","value","assetCount","walletCount"],"additionalProperties":false}}},"required":["cachedThrough","refreshedAt","isStale","refreshJobId","refreshQueueName","data"],"additionalProperties":false},"PortfolioAssetValueHistoryRequestDto":{"type":"object","properties":{"startDate":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}],"description":"Inclusive UTC start timestamp"},"endDate":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}],"description":"Inclusive UTC end timestamp"},"includeSpam":{"description":"Whether spam tokens should be included","type":"boolean"},"assetIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"Asset IDs"}},"required":["startDate","endDate","assetIds"],"additionalProperties":false},"PortfolioAssetValueHistoryResponseDto":{"type":"object","properties":{"cachedThrough":{"nullable":true,"type":"string","format":"date","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])))$","description":"UTC day in YYYY-MM-DD format"},"refreshedAt":{"nullable":true,"description":"Refresh timestamp in ISO 8601 format","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))$"},"isStale":{"type":"boolean","description":"Whether a background refresh was started"},"refreshJobId":{"nullable":true,"description":"Refresh job ID","type":"string"},"refreshQueueName":{"nullable":true,"description":"Refresh job consumer name for status polling","type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date","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])))$","description":"UTC day in YYYY-MM-DD format"},"assetId":{"type":"string","description":"Asset ID"},"value":{"type":"string","description":"Asset value in base currency"},"amount":{"type":"string","description":"Asset quantity"},"walletCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of wallets on this day"},"positionCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of positions on this day"}},"required":["day","assetId","value","amount","walletCount","positionCount"],"additionalProperties":false}}},"required":["cachedThrough","refreshedAt","isStale","refreshJobId","refreshQueueName","data"],"additionalProperties":false},"AddressValueHistoryRequestDto":{"type":"object","properties":{"startDate":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}],"description":"Inclusive UTC start timestamp"},"endDate":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}],"description":"Inclusive UTC end timestamp"},"includeSpam":{"description":"Whether spam tokens should be included","type":"boolean"},"chainId":{"description":"Optional chain filter","type":"string","minLength":1}},"required":["startDate","endDate"],"additionalProperties":false},"AddressValueHistoryResponseDto":{"type":"object","properties":{"cachedThrough":{"nullable":true,"type":"string","format":"date","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])))$","description":"UTC day in YYYY-MM-DD format"},"refreshedAt":{"nullable":true,"description":"Refresh timestamp in ISO 8601 format","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))$"},"isStale":{"type":"boolean","description":"Whether a background refresh was started"},"refreshJobId":{"nullable":true,"description":"Refresh job ID","type":"string"},"refreshQueueName":{"nullable":true,"description":"Refresh job consumer name for status polling","type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date","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])))$","description":"UTC day in YYYY-MM-DD format"},"value":{"type":"string","description":"Address value in base currency"},"assetCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of assets on this day"},"positionCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of positions on this day"}},"required":["day","value","assetCount","positionCount"],"additionalProperties":false}}},"required":["cachedThrough","refreshedAt","isStale","refreshJobId","refreshQueueName","data"],"additionalProperties":false},"WalletTokenValueHistoryRequestDto":{"type":"object","properties":{"startDate":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}],"description":"Inclusive UTC start timestamp"},"endDate":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}],"description":"Inclusive UTC end timestamp"},"includeSpam":{"description":"Whether spam tokens should be included","type":"boolean"},"tokens":{"minItems":1,"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","minLength":1,"description":"Chain ID"},"tokenAddress":{"type":"string","minLength":1,"description":"Token contract address"}},"required":["chainId","tokenAddress"],"additionalProperties":false},"description":"Visible token row scopes"}},"required":["startDate","endDate","tokens"],"additionalProperties":false},"WalletTokenValueHistoryResponseDto":{"type":"object","properties":{"cachedThrough":{"nullable":true,"type":"string","format":"date","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])))$","description":"UTC day in YYYY-MM-DD format"},"refreshedAt":{"nullable":true,"description":"Refresh timestamp in ISO 8601 format","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))$"},"isStale":{"type":"boolean","description":"Whether a background refresh was started"},"refreshJobId":{"nullable":true,"description":"Refresh job ID","type":"string"},"refreshQueueName":{"nullable":true,"description":"Refresh job consumer name for status polling","type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date","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])))$","description":"UTC day in YYYY-MM-DD format"},"rowId":{"type":"string","description":"Stable visible wallet token row identity"},"walletAddress":{"type":"string","description":"Wallet address"},"chainId":{"type":"string","description":"Chain ID"},"tokenAddress":{"type":"string","description":"Token contract address"},"assetId":{"type":"string","description":"Asset ID"},"value":{"type":"string","description":"Token value in base currency"},"amount":{"type":"string","description":"Token quantity"},"positionCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of positions on this day"}},"required":["day","rowId","walletAddress","chainId","tokenAddress","assetId","value","amount","positionCount"],"additionalProperties":false}}},"required":["cachedThrough","refreshedAt","isStale","refreshJobId","refreshQueueName","data"],"additionalProperties":false},"AddressTokenValueHistoryRequestDto":{"type":"object","properties":{"startDate":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}],"description":"Inclusive UTC start timestamp"},"endDate":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}],"description":"Inclusive UTC end timestamp"},"includeSpam":{"description":"Whether spam tokens should be included","type":"boolean"},"tokens":{"minItems":1,"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","minLength":1,"description":"Chain ID"},"tokenAddress":{"type":"string","minLength":1,"description":"Token contract address"}},"required":["chainId","tokenAddress"],"additionalProperties":false},"description":"Visible token row scopes"}},"required":["startDate","endDate","tokens"],"additionalProperties":false},"AddressTokenValueHistoryResponseDto":{"type":"object","properties":{"cachedThrough":{"nullable":true,"type":"string","format":"date","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])))$","description":"UTC day in YYYY-MM-DD format"},"refreshedAt":{"nullable":true,"description":"Refresh timestamp in ISO 8601 format","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))$"},"isStale":{"type":"boolean","description":"Whether a background refresh was started"},"refreshJobId":{"nullable":true,"description":"Refresh job ID","type":"string"},"refreshQueueName":{"nullable":true,"description":"Refresh job consumer name for status polling","type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date","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])))$","description":"UTC day in YYYY-MM-DD format"},"rowId":{"type":"string","description":"Stable visible address token row identity"},"walletAddress":{"type":"string","description":"Wallet address"},"chainId":{"type":"string","description":"Chain ID"},"tokenAddress":{"type":"string","description":"Token contract address"},"assetId":{"type":"string","description":"Asset ID"},"value":{"type":"string","description":"Token value in base currency"},"amount":{"type":"string","description":"Token quantity"},"positionCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of positions on this day"},"walletCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of wallets on this day"}},"required":["day","rowId","walletAddress","chainId","tokenAddress","assetId","value","amount","positionCount","walletCount"],"additionalProperties":false}}},"required":["cachedThrough","refreshedAt","isStale","refreshJobId","refreshQueueName","data"],"additionalProperties":false},"DefiPositionValueHistoryRequestDto":{"type":"object","properties":{"startDate":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}],"description":"Inclusive UTC start timestamp"},"endDate":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}],"description":"Inclusive UTC end timestamp"},"includeSpam":{"description":"Whether spam tokens should be included","type":"boolean"}},"required":["startDate","endDate"],"additionalProperties":false},"DefiPositionValueHistoryResponseDto":{"type":"object","properties":{"cachedThrough":{"nullable":true,"type":"string","format":"date","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])))$","description":"UTC day in YYYY-MM-DD format"},"refreshedAt":{"nullable":true,"description":"Refresh timestamp in ISO 8601 format","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))$"},"isStale":{"type":"boolean","description":"Whether a background refresh was started"},"refreshJobId":{"nullable":true,"description":"Refresh job ID","type":"string"},"refreshQueueName":{"nullable":true,"description":"Refresh job consumer name for status polling","type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string","format":"date","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])))$","description":"UTC day in YYYY-MM-DD format"},"value":{"type":"string","description":"Position value in base currency"},"hasPartialValuation":{"type":"boolean","description":"Whether this day has missing position valuation legs"},"valuedLegs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of valued position legs on this day"},"totalLegs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of valuation-relevant position legs on this day"}},"required":["day","value","hasPartialValuation","valuedLegs","totalLegs"],"additionalProperties":false}}},"required":["cachedThrough","refreshedAt","isStale","refreshJobId","refreshQueueName","data"],"additionalProperties":false},"BalanceReconciliationResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"},"isBalanceMatch":{"type":"boolean","description":"Whether computed and snapshot balances match (excluding spam tokens)"},"tokenCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of distinct tokens"},"lastTransactionTimestamp":{"nullable":true,"description":"Timestamp of the last transaction (ISO 8601)","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))$"}},"required":["chainId","address","isBalanceMatch","tokenCount","lastTransactionTimestamp"],"additionalProperties":false}},"allBalancesMatch":{"type":"boolean","description":"Whether all wallets have matching balances"}},"required":["data","allBalancesMatch"],"additionalProperties":false},"PortfolioTransactionResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Portfolio transaction ID"},"operationType":{"type":"string","description":"Accounting operation type"},"subType":{"nullable":true,"description":"Operation sub-type","type":"string"},"classification":{"type":"object","properties":{"state":{"type":"string","enum":["categorized","uncategorized","error"],"description":"Whether the transaction is categorized, uncategorized, or errored"},"reason":{"nullable":true,"description":"Root failure mode (unwrapped), e.g. FmvNotAvailable; null if none","type":"string"},"detail":{"nullable":true,"description":"Human-readable detail for the primary issue, if any","type":"string"},"suggestedAction":{"nullable":true,"description":"Suggested remediation, if any","type":"object","properties":{"tool":{"nullable":true,"description":"MCP tool to remediate with, or null if no single tool applies","type":"string"},"description":{"type":"string","description":"What to do to resolve it"}},"required":["tool","description"],"additionalProperties":false}},"required":["state","reason","detail","suggestedAction"],"additionalProperties":false,"description":"Triage summary: classification state, reason, and suggested action"},"systemNotes":{"nullable":true,"description":"System-generated notes","type":"string"},"errorMessage":{"nullable":true,"description":"Legacy error message text if processing failed","type":"string"},"errorDetails":{"description":"Structured error details if processing failed","nullable":true,"type":"array","items":{}},"timestamp":{"type":"string","description":"Transaction timestamp (ISO 8601)"},"memo":{"nullable":true,"description":"User memo","type":"string"},"status":{"type":"string","description":"Transaction status"},"tags":{"type":"array","items":{"type":"string"},"description":"Transaction tags"},"fileAttachments":{"type":"array","items":{},"description":"Attached files metadata"},"journalEntry":{"nullable":true,"description":"Journal entry with DR/CR lines and lineage","allOf":[{"$ref":"#/components/schemas/JournalEntryResponseDto"}]},"walletOperations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Transfer direction/type (e.g. IN, OUT)"},"txHash":{"type":"string","description":"On-chain transaction hash"},"chainId":{"type":"string","description":"Chain ID"},"txIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Transfer index within the transaction"},"walletTransactionId":{"type":"string","description":"Wallet transaction handle for this operation; pair with txIndex to reference the operation in merge_transactions / split_transactions"},"fromAddress":{"type":"string","description":"Sender address"},"fromAddressLabel":{"nullable":true,"description":"Sender address label","type":"string"},"toAddress":{"type":"string","description":"Recipient address"},"toAddressLabel":{"nullable":true,"description":"Recipient address label","type":"string"},"value":{"type":"string","description":"Human-readable transfer amount (decimal string)"},"valueQuote":{"nullable":true,"description":"Fiat quote value (decimal string)","type":"string"},"quoteCurrency":{"nullable":true,"description":"Fiat quote currency","type":"string"},"quoteSource":{"nullable":true,"description":"Fiat quote source","type":"string"},"quoteMeta":{"description":"Structured quote provenance, null when none is available, or temporarily omitted by an older server during a rolling deploy","nullable":true,"type":"object","properties":{"s":{"type":"string","enum":["SYNC_SOURCE","FMV_ENGINE","DERIVED_REPRESENTED","DERIVED_SIBLING","POLICY","MANUAL"]},"ts":{"type":"integer","minimum":1,"maximum":8210266876799}},"required":["s"],"additionalProperties":false},"assetId":{"nullable":true,"description":"Asset ID","type":"string"},"assetSymbol":{"nullable":true,"description":"Asset symbol","type":"string"},"tokenAddress":{"type":"string","description":"Token contract address"},"isSpam":{"type":"boolean","description":"Effective spam flag (portfolio prefs applied)"},"stablecoinPeggedFiatCurrency":{"nullable":true,"description":"Effective stablecoin peg, if any","type":"string"},"walletName":{"type":"string","description":"Owning wallet name"},"walletAddress":{"type":"string","description":"Owning wallet address"},"defiOperation":{"nullable":true,"description":"DeFi operation, if any","type":"string"},"defiPositionId":{"nullable":true,"description":"DeFi position ID, if any","type":"string"},"defiPositionRef":{"description":"Stable DeFi position reference, if any","nullable":true,"type":"string"}},"required":["type","txHash","chainId","txIndex","walletTransactionId","fromAddress","fromAddressLabel","toAddress","toAddressLabel","value","valueQuote","quoteCurrency","quoteSource","assetId","assetSymbol","tokenAddress","isSpam","stablecoinPeggedFiatCurrency","walletName","walletAddress","defiOperation","defiPositionId"],"additionalProperties":false},"description":"Wallet transfers that make up this transaction"},"walletSource":{"description":"Wallet-backed source metadata for row actions","nullable":true,"type":"object","properties":{"wallet":{"type":"object","properties":{"chainId":{"type":"string","description":"Public chain ID of the wallet"},"address":{"type":"string","description":"Public wallet address on the chain"}},"required":["chainId","address"],"additionalProperties":false,"description":"Public wallet identity without internal wallet IDs"},"walletType":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Wallet type"},"rawTransactionId":{"type":"string","description":"Wallet transaction ID"},"rawTransactionSource":{"type":"string","description":"Wallet transaction source"},"blockHeight":{"type":"string","description":"Wallet transaction block height as a decimal string"},"timestamp":{"type":"string","description":"Wallet transaction timestamp serialized as ISO 8601"}},"required":["wallet","walletType","rawTransactionId","rawTransactionSource","blockHeight","timestamp"],"additionalProperties":false},"intercompanyPair":{"description":"Intercompany pair metadata when this transaction is paired","nullable":true,"type":"object","properties":{"pairId":{"type":"string","description":"Intercompany move pair ID"},"side":{"type":"string","enum":["SEND","RECEIVE"],"description":"Whether this transaction is the sending or receiving side"},"treatment":{"nullable":true,"description":"Applied intercompany treatment","type":"string"},"counterpartPortfolioName":{"type":"string","description":"Counterpart portfolio display name"},"counterpartPortfolioSlug":{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Counterpart portfolio public slug"},"counterpartPortfolioTransactionId":{"type":"string","description":"Counterpart portfolio transaction ID"},"counterpartOperationType":{"type":"string","description":"Counterpart accounting operation type"},"counterpartSubType":{"nullable":true,"description":"Counterpart accounting operation subtype","type":"string"},"counterpartStatus":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"],"description":"Counterpart transaction status"},"lotLinkCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of linked intercompany cost-basis lots"}},"required":["pairId","side","treatment","counterpartPortfolioName","counterpartPortfolioSlug","counterpartPortfolioTransactionId","counterpartOperationType","counterpartSubType","counterpartStatus","lotLinkCount"],"additionalProperties":false},"portfolioTransactionContext":{"description":"Flattened transaction context, when stored","nullable":true,"type":"object","additionalProperties":{}}},"required":["id","operationType","subType","classification","systemNotes","errorMessage","timestamp","memo","status","tags","fileAttachments","journalEntry","walletOperations"],"additionalProperties":false},"JournalEntryResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Journal entry ID"},"timestamp":{"type":"string","description":"Entry timestamp (ISO 8601)"},"status":{"type":"string","description":"Journal entry status"},"memo":{"nullable":true,"description":"User memo","type":"string"},"systemNotes":{"nullable":true,"description":"System-generated notes","type":"string"},"isAdjustment":{"type":"boolean","description":"Whether this is an adjustment entry"},"portfolioTransactionId":{"nullable":true,"description":"Originating portfolio transaction ID, if any","type":"string"},"operationType":{"nullable":true,"description":"Operation type of the originating transaction","type":"string"},"subType":{"nullable":true,"description":"Operation sub-type of the originating transaction","type":"string"},"adjustmentJournalImportProvenance":{"description":"Adjustment-import provenance with immutable file and source-row facts and the uploader's current display name, or null for a non-imported journal","nullable":true,"type":"object","properties":{"importRef":{"type":"string","minLength":1,"maxLength":128,"pattern":"^adjustment-journal-import-[a-z0-9-]+$","x-pattern-flags":"iu"},"sourceFile":{"type":"object","properties":{"name":{"type":"string","minLength":1},"uploadedAt":{"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))$"},"uploader":{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false}},"required":["name","uploadedAt","uploader"],"additionalProperties":false},"sourceRows":{"minItems":1,"type":"array","items":{"type":"object","properties":{"appliedResolutions":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"values":{"type":"object","additionalProperties":{"type":"string","minLength":1}}},"required":["schemaVersion","values"],"additionalProperties":false},"entryId":{"type":"string","minLength":1},"journalLineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991},"locator":{"oneOf":[{"type":"object","properties":{"format":{"type":"string","enum":["csv"],"description":"Source file format."},"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based line number in the CSV file."}},"required":["format","lineNumber"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"string","enum":["xlsx"],"description":"Source file format."},"rowNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based row number within the sheet."},"sheetName":{"type":"string","minLength":1,"description":"Worksheet the row belongs to."}},"required":["format","rowNumber","sheetName"],"additionalProperties":false}],"type":"object"},"normalizedValues":{"anyOf":[{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"values":{"type":"object","additionalProperties":{"nullable":true,"type":"string"}}},"required":["schemaVersion","values"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[2]},"values":{"type":"object","additionalProperties":{"nullable":true,"type":"string"}}},"required":["schemaVersion","values"],"additionalProperties":false}]},"sourceRowHash":{"type":"string","minLength":1}},"required":["appliedResolutions","entryId","journalLineNumber","locator","normalizedValues","sourceRowHash"],"additionalProperties":false}}},"required":["importRef","sourceFile","sourceRows"],"additionalProperties":false},"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Line ordinal within the entry"},"entryType":{"type":"string","description":"DR (debit) or CR (credit)"},"accountName":{"nullable":true,"description":"Ledger account name","type":"string"},"accountNumber":{"nullable":true,"description":"Chart-of-accounts number","type":"string"},"accountType":{"description":"Ledger account type","nullable":true,"type":"string"},"accountSubType":{"description":"Ledger account sub-type","nullable":true,"type":"string"},"accountNormalBalanceType":{"description":"Ledger account normal balance side","nullable":true,"type":"string"},"fiatAmount":{"type":"string","description":"Fiat amount (decimal string)"},"assetId":{"nullable":true,"description":"Asset ID when the line is asset-denominated","type":"string"},"assetSymbol":{"nullable":true,"description":"Asset symbol","type":"string"},"assetAmount":{"nullable":true,"description":"Asset quantity (decimal string)","type":"string"},"memo":{"nullable":true,"description":"Line memo","type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string","description":"Responsibility-center type ID used by edit commands"},"responsibilityCenterId":{"type":"string","description":"Responsibility-center ID used by edit commands"},"value":{"type":"string","description":"Filter-options-compatible public value for this assignment"},"responsibilityCenterType":{"type":"object","properties":{"key":{"type":"string","description":"Stable type slug (e.g. primary, goal)"},"name":{"type":"string","description":"Responsibility-center type name"},"kind":{"type":"string","enum":["COST","REVENUE","PROFIT","INVESTMENT"],"description":"Managerial taxonomy of the type"}},"required":["key","name","kind"],"additionalProperties":false,"description":"The dimension this assignment classifies the line under"},"responsibilityCenterName":{"type":"string","description":"Assigned responsibility-center name"},"responsibilityCenterCode":{"nullable":true,"description":"Stable code of the center within its type, if any","type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Allocation in basis points (10000 = 100%)"}},"required":["responsibilityCenterTypeId","responsibilityCenterId","value","responsibilityCenterType","responsibilityCenterName","responsibilityCenterCode","percentageBps"],"additionalProperties":false},"description":"Typed responsibility-center assignments, one per dimension, ordered by type sort order"},"counterpartyName":{"nullable":true,"description":"Counterparty name","type":"string"},"lot":{"nullable":true,"description":"Cost-basis lot lineage when the line realizes gains/losses","type":"object","properties":{"id":{"type":"string","description":"Lot identifier (e.g. BTC_001)"},"entryId":{"type":"string","description":"Unique lot ledger entry ID"},"entryKind":{"type":"string","description":"Lot entry kind (ADD, DSP, CUT, MVE, RES, REL)"},"lotMethod":{"type":"string","description":"Lot accounting method (FIFO, LIFO, HIFO, ACB)"}},"required":["id","entryId","entryKind","lotMethod"],"additionalProperties":false},"transfer":{"nullable":true,"description":"Wallet transfer lineage when the line maps to an on-chain transfer","type":"object","properties":{"txIndex":{"nullable":true,"description":"Transfer index within the tx","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"chainId":{"nullable":true,"description":"Chain ID of the transfer","type":"string"},"txHash":{"nullable":true,"description":"On-chain transaction hash","type":"string"}},"required":["txIndex","chainId","txHash"],"additionalProperties":false}},"required":["lineNumber","entryType","accountName","accountNumber","fiatAmount","assetId","assetSymbol","assetAmount","memo","responsibilityCenterAssignments","counterpartyName","lot","transfer"],"additionalProperties":false},"description":"Debit/credit lines, ordered by line number"}},"required":["id","timestamp","status","memo","systemNotes","isAdjustment","portfolioTransactionId","operationType","subType","lines"],"additionalProperties":false},"PortfolioTransactionWithRawResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Portfolio transaction ID"},"operationType":{"type":"string","description":"Accounting operation type"},"subType":{"nullable":true,"description":"Operation sub-type","type":"string"},"classification":{"type":"object","properties":{"state":{"type":"string","enum":["categorized","uncategorized","error"],"description":"Whether the transaction is categorized, uncategorized, or errored"},"reason":{"nullable":true,"description":"Root failure mode (unwrapped), e.g. FmvNotAvailable; null if none","type":"string"},"detail":{"nullable":true,"description":"Human-readable detail for the primary issue, if any","type":"string"},"suggestedAction":{"nullable":true,"description":"Suggested remediation, if any","type":"object","properties":{"tool":{"nullable":true,"description":"MCP tool to remediate with, or null if no single tool applies","type":"string"},"description":{"type":"string","description":"What to do to resolve it"}},"required":["tool","description"],"additionalProperties":false}},"required":["state","reason","detail","suggestedAction"],"additionalProperties":false,"description":"Triage summary: classification state, reason, and suggested action"},"systemNotes":{"nullable":true,"description":"System-generated notes","type":"string"},"errorMessage":{"nullable":true,"description":"Legacy error message text if processing failed","type":"string"},"errorDetails":{"description":"Structured error details if processing failed","nullable":true,"type":"array","items":{}},"timestamp":{"type":"string","description":"Transaction timestamp (ISO 8601)"},"memo":{"nullable":true,"description":"User memo","type":"string"},"status":{"type":"string","description":"Transaction status"},"tags":{"type":"array","items":{"type":"string"},"description":"Transaction tags"},"fileAttachments":{"type":"array","items":{},"description":"Attached files metadata"},"journalEntry":{"nullable":true,"description":"Journal entry with DR/CR lines and lineage","allOf":[{"$ref":"#/components/schemas/JournalEntryResponseDto"}]},"walletOperations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Transfer direction/type (e.g. IN, OUT)"},"txHash":{"type":"string","description":"On-chain transaction hash"},"chainId":{"type":"string","description":"Chain ID"},"txIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Transfer index within the transaction"},"walletTransactionId":{"type":"string","description":"Wallet transaction handle for this operation; pair with txIndex to reference the operation in merge_transactions / split_transactions"},"fromAddress":{"type":"string","description":"Sender address"},"fromAddressLabel":{"nullable":true,"description":"Sender address label","type":"string"},"toAddress":{"type":"string","description":"Recipient address"},"toAddressLabel":{"nullable":true,"description":"Recipient address label","type":"string"},"value":{"type":"string","description":"Human-readable transfer amount (decimal string)"},"valueQuote":{"nullable":true,"description":"Fiat quote value (decimal string)","type":"string"},"quoteCurrency":{"nullable":true,"description":"Fiat quote currency","type":"string"},"quoteSource":{"nullable":true,"description":"Fiat quote source","type":"string"},"quoteMeta":{"description":"Structured quote provenance, null when none is available, or temporarily omitted by an older server during a rolling deploy","nullable":true,"type":"object","properties":{"s":{"type":"string","enum":["SYNC_SOURCE","FMV_ENGINE","DERIVED_REPRESENTED","DERIVED_SIBLING","POLICY","MANUAL"]},"ts":{"type":"integer","minimum":1,"maximum":8210266876799}},"required":["s"],"additionalProperties":false},"assetId":{"nullable":true,"description":"Asset ID","type":"string"},"assetSymbol":{"nullable":true,"description":"Asset symbol","type":"string"},"tokenAddress":{"type":"string","description":"Token contract address"},"isSpam":{"type":"boolean","description":"Effective spam flag (portfolio prefs applied)"},"stablecoinPeggedFiatCurrency":{"nullable":true,"description":"Effective stablecoin peg, if any","type":"string"},"walletName":{"type":"string","description":"Owning wallet name"},"walletAddress":{"type":"string","description":"Owning wallet address"},"defiOperation":{"nullable":true,"description":"DeFi operation, if any","type":"string"},"defiPositionId":{"nullable":true,"description":"DeFi position ID, if any","type":"string"},"defiPositionRef":{"description":"Stable DeFi position reference, if any","nullable":true,"type":"string"}},"required":["type","txHash","chainId","txIndex","walletTransactionId","fromAddress","fromAddressLabel","toAddress","toAddressLabel","value","valueQuote","quoteCurrency","quoteSource","assetId","assetSymbol","tokenAddress","isSpam","stablecoinPeggedFiatCurrency","walletName","walletAddress","defiOperation","defiPositionId"],"additionalProperties":false},"description":"Wallet transfers that make up this transaction"},"walletSource":{"description":"Wallet-backed source metadata for row actions","nullable":true,"type":"object","properties":{"wallet":{"type":"object","properties":{"chainId":{"type":"string","description":"Public chain ID of the wallet"},"address":{"type":"string","description":"Public wallet address on the chain"}},"required":["chainId","address"],"additionalProperties":false,"description":"Public wallet identity without internal wallet IDs"},"walletType":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Wallet type"},"rawTransactionId":{"type":"string","description":"Wallet transaction ID"},"rawTransactionSource":{"type":"string","description":"Wallet transaction source"},"blockHeight":{"type":"string","description":"Wallet transaction block height as a decimal string"},"timestamp":{"type":"string","description":"Wallet transaction timestamp serialized as ISO 8601"}},"required":["wallet","walletType","rawTransactionId","rawTransactionSource","blockHeight","timestamp"],"additionalProperties":false},"intercompanyPair":{"description":"Intercompany pair metadata when this transaction is paired","nullable":true,"type":"object","properties":{"pairId":{"type":"string","description":"Intercompany move pair ID"},"side":{"type":"string","enum":["SEND","RECEIVE"],"description":"Whether this transaction is the sending or receiving side"},"treatment":{"nullable":true,"description":"Applied intercompany treatment","type":"string"},"counterpartPortfolioName":{"type":"string","description":"Counterpart portfolio display name"},"counterpartPortfolioSlug":{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Counterpart portfolio public slug"},"counterpartPortfolioTransactionId":{"type":"string","description":"Counterpart portfolio transaction ID"},"counterpartOperationType":{"type":"string","description":"Counterpart accounting operation type"},"counterpartSubType":{"nullable":true,"description":"Counterpart accounting operation subtype","type":"string"},"counterpartStatus":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"],"description":"Counterpart transaction status"},"lotLinkCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of linked intercompany cost-basis lots"}},"required":["pairId","side","treatment","counterpartPortfolioName","counterpartPortfolioSlug","counterpartPortfolioTransactionId","counterpartOperationType","counterpartSubType","counterpartStatus","lotLinkCount"],"additionalProperties":false},"portfolioTransactionContext":{"description":"Flattened transaction context, when stored","nullable":true,"type":"object","additionalProperties":{}},"rawTransactions":{"type":"array","items":{"$ref":"#/components/schemas/RawTransactionCompleteDto"}}},"required":["id","operationType","subType","classification","systemNotes","errorMessage","timestamp","memo","status","tags","fileAttachments","journalEntry","walletOperations","rawTransactions"],"additionalProperties":false},"RawTransactionCompleteDto":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Operational current-row WalletTransaction UUID"},"wallet":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"},"name":{"nullable":true,"description":"Wallet display name","type":"string"},"type":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Wallet type"}},"required":["chainId","address","name","type"],"additionalProperties":false},"hash":{"type":"string"},"blockHeight":{"type":"string","pattern":"^\\d+$"},"timestamp":{"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))$"},"memo":{"nullable":true,"type":"string"},"processingState":{"type":"string","enum":["PROCESSED","PARTIAL","UNPROCESSED"]},"walletOperations":{"type":"array","items":{"type":"object","properties":{"txIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["IN","OUT","GAS","SELF"]},"from":{"type":"object","properties":{"address":{"type":"string"},"label":{"nullable":true,"type":"string"}},"required":["address","label"],"additionalProperties":false},"to":{"type":"object","properties":{"address":{"type":"string"},"label":{"nullable":true,"type":"string"}},"required":["address","label"],"additionalProperties":false},"token":{"type":"object","properties":{"chainId":{"type":"string"},"address":{"type":"string"},"assetId":{"type":"string"},"symbol":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["ERC20"],"description":"Standard fungible token with a freely transferable, free-floating balance. The default for the vast majority of tokens. Examples: USDC, UNI, LINK, and any plain ERC-20 (EVM) or fungible SPL (Solana) token that is not one of the more specific DeFi types below."},{"type":"string","enum":["NATIVE"],"description":"The chain's native gas asset, used to pay transaction fees and not represented by a token contract. Examples: ETH on Ethereum, SOL on Solana, MATIC on Polygon, TRX on Tron, NEAR on NEAR. The wrapped form (e.g. WETH, wSOL) is a separate ERC20/NATIVE token linked by representation metadata, not this value."},{"type":"string","enum":["FIAT"],"description":"Off-chain fiat currency balance rather than an on-chain token. Examples: a USD, EUR, or GBP cash balance held on a centralized exchange or bank account."},{"type":"string","enum":["NFT"],"description":"Non-fungible token. Stored as one Token row per (contract, tokenId) with address `${contractAddress}#${tokenId}`. Examples: a Uniswap v3 concentrated-liquidity position NFT, or an art/PFP collectible. An NFT may still be a DeFi position container (e.g. a Uniswap v3 LP NFT); the position itself is modeled separately."},{"type":"string","enum":["REBASE_LST"],"description":"Rebasing liquid-staking token: the holder BALANCE grows over time to distribute staking rewards while the token stays ~1:1 pegged to the staked asset (balance-growing mechanic, staking domain). Example: stETH (Lido), where balanceOf increases each day with no incoming transfer. Contrast VALUE_ACCRUING for the wrapped, non-rebasing form (e.g. wstETH) that keeps a fixed balance and accrues via an exchange rate."},{"type":"string","enum":["INTEREST_BEARING"],"description":"Interest-bearing lending receipt whose holder BALANCE grows continuously at ~1:1 with the supplied underlying (Aave-style scaled balance multiplied by a rising liquidity index; balance-growing mechanic, lending domain). Examples: Aave aTokens such as aUSDC and aWETH, where your aUSDC quantity increases as interest accrues and 1 aUSDC always redeems for ~1 USDC. Mechanically the same balance-growth shape as REBASE_LST but for a lending deposit rather than staking. Contrast VALUE_ACCRUING for Compound cTokens, which instead keep a fixed balance and appreciate via an exchange rate."},{"type":"string","enum":["VALUE_ACCRUING"],"description":"Value-accruing receipt or share: the holder BALANCE is fixed and each unit becomes redeemable for a rising amount of a single underlying via an on-chain exchange rate (value-accruing mechanic). Examples: ERC-4626 vault shares (Yearn v3, Morpho), Beefy `moo*` vault shares (the core `BeefyVaultV7` is NOT ERC-4626 — it exposes `want()` and `getPricePerFullShare()` where a 4626 vault would expose `asset()` and `convertToAssets()`), Compound cTokens, wrapped LSTs (wstETH, rETH, cbETH, sfrxETH), and Solana LSTs (mSOL, JitoSOL). The represented underlying is usually discoverable on-chain (e.g. ERC-4626 `asset()`), but the exchange RATE is a time-varying derived value and must not be stored as a fixed ratio. Contrast INTEREST_BEARING and REBASE_LST, where the balance grows instead."},{"type":"string","enum":["LP_SHARE"],"description":"Liquidity-pool share representing proportional ownership of a BASKET of two or more pooled underlyings, so it has no single represented underlying token. Examples: Uniswap v2 pair tokens, Curve LP tokens, Balancer BPT, PancakeSwap LP tokens, Raydium/Orca LP tokens. A single-underlying receipt is VALUE_ACCRUING; a multi-underlying pool token is LP_SHARE."},{"type":"string","enum":["DEBT"],"description":"Non-transferable borrow or liability marker. The balance equals the amount owed (principal plus accrued interest) and is booked on the liability side, never as an asset. Examples: Aave variable and stable debt tokens such as variableDebtUSDC. Transfers and approvals typically revert, so it is a position record exposed as a token rather than a tradeable token."},{"type":"string","enum":["REFLECT"],"description":"Reflection / redistribution token: holder balances change via a fee-redistribution rate shift rather than via transfers (reflect.finance forks). Example: SAFEMOON-style tokens that redistribute a transfer tax to all holders."},{"type":"string","enum":["VOTE_ESCROWED"],"description":"Vote-escrowed lock position, typically non-transferable, created by locking a governance token for a fixed duration to receive boosted rewards or voting power. Examples: veCRV (Curve), veBAL (Balancer)."}]},"decimals":{"type":"integer","minimum":0,"maximum":9007199254740991},"isSpam":{"type":"boolean"},"stablecoinPeggedFiatCurrency":{"nullable":true,"type":"string"},"representsTokenAddress":{"nullable":true,"type":"string"}},"required":["chainId","address","assetId","symbol","type","decimals","isSpam","stablecoinPeggedFiatCurrency","representsTokenAddress"],"additionalProperties":false},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Precise signed decimal value encoded as a string."},"quote":{"nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Precise signed decimal value encoded as a string."},"currency":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"meta":{"nullable":true,"type":"object","properties":{"s":{"type":"string","enum":["SYNC_SOURCE","FMV_ENGINE","DERIVED_REPRESENTED","DERIVED_SIBLING","POLICY","MANUAL"]},"ts":{"type":"integer","minimum":1,"maximum":8210266876799}},"required":["s"],"additionalProperties":false}},"required":["value","currency","source","meta"],"additionalProperties":false},"defi":{"nullable":true,"type":"object","properties":{"operation":{"nullable":true,"anyOf":[{"type":"string","enum":["PROTOCOL_DEPOSIT"],"description":"Deposit assets into protocol-managed custody without immediate disposal"},{"type":"string","enum":["PROTOCOL_WITHDRAW"],"description":"Withdraw assets from protocol-managed custody back to the wallet"},{"type":"string","enum":["VAULT_DEPOSIT"],"description":"Deposit into a tokenized vault: one underlying is pooled under a manager or strategy and the depositor receives a fungible share"},{"type":"string","enum":["VAULT_WITHDRAW"],"description":"Redemption from a tokenized vault: share burned, underlying returned"},{"type":"string","enum":["SWAP"],"description":"Token swap/exchange on DEX (e.g., ETH → USDC on Uniswap)"},{"type":"string","enum":["PROVIDE_LIQUIDITY"],"description":"Add tokens to liquidity pool (e.g., add ETH+USDC to Uniswap pool)"},{"type":"string","enum":["REMOVE_LIQUIDITY"],"description":"Remove tokens from liquidity pool (e.g., withdraw from Uniswap pool)"},{"type":"string","enum":["LEND"],"description":"Supply tokens to lending protocol (e.g., deposit USDC to Aave)"},{"type":"string","enum":["WITHDRAW_LEND"],"description":"Withdraw supplied tokens from lending protocol (e.g., withdraw USDC from Aave)"},{"type":"string","enum":["LEND_REDUCE"],"description":"Reduce supplied lending exposure without receiving underlying back to the wallet"},{"type":"string","enum":["BORROW"],"description":"Borrow tokens from lending protocol (e.g., borrow ETH from Aave)"},{"type":"string","enum":["REPAY"],"description":"Repay borrowed tokens to lending protocol"},{"type":"string","enum":["LOAN_LIQUIDATION"],"description":"Forced loan liquidation that reduces protocol debt and seizes collateral"},{"type":"string","enum":["STAKE"],"description":"Stake tokens for rewards (e.g., stake ETH for staking rewards)"},{"type":"string","enum":["UNSTAKE"],"description":"Unstake tokens from staking protocol"},{"type":"string","enum":["CLAIM_REWARDS"],"description":"Claim earned rewards from staking, LP fees, or other yield sources"}]},"tokenRole":{"nullable":true,"anyOf":[{"type":"string","enum":["UNDERLYING"],"description":"The base/principal asset moving into or out of a position: the asset supplied, withdrawn, borrowed, repaid, staked, or unstaked, and the actual asset paid when reducing a debt. This is the real asset, not a receipt or marker for it. Examples: the ETH leg of a stake, or the USDC leg paid to repay an Aave loan. Processors read the repaid/supplied asset id from this leg."},{"type":"string","enum":["COLLATERAL"],"description":"An asset posted or locked as collateral, or seized as collateral during a liquidation, as distinct from a plain principal deposit. Role is per-transfer, so the same token can be UNDERLYING in one transfer and COLLATERAL in another. Example: the collateral (often an aToken or its underlying) taken from a borrower in an Aave V3 liquidation."},{"type":"string","enum":["RECEIPT_TOKEN"],"description":"A token that represents a claim on a supplied or staked position (a receipt or share) rather than the underlying itself. Covers interest-bearing receipts and value-accruing shares regardless of mechanic. Examples: Aave aTokens (aUSDC), Compound cTokens, JustLend jTokens, ERC-4626 vault shares, liquid-staking receipts. Whether it rebases or accrues via an exchange rate is captured by the token TokenType, not by this role."},{"type":"string","enum":["LP_SHARE"],"description":"A liquidity-pool share representing proportional ownership of a basket of two or more pooled underlyings. Examples: Uniswap v2 pair tokens, Curve and Balancer LP tokens, a Uniswap v3 concentrated-liquidity position NFT."},{"type":"string","enum":["LIABILITY_TOKEN"],"description":"A borrow/debt marker representing an outstanding liability (principal plus accrued interest), typically non-transferable. Examples: Aave variable and stable debt tokens (variableDebtUSDC). It must be booked on the liability side and is structurally distinct from a RECEIPT_TOKEN (asset side), so the two never share one value. Lets processors identify the debt leg by role instead of matching `variableDebt`/`stableDebt` symbol prefixes."},{"type":"string","enum":["REWARD"],"description":"An incentive, yield, or fee-share token realized from a position separately from principal. Examples: claimed governance/incentive tokens, or accrued trading-fee rewards."},{"type":"string","enum":["OTHER"],"description":"A protocol-specific or not-yet-classified token leg that does not fit the roles above. Use sparingly; prefer adding a generic role once a pattern recurs across protocols."}]},"positionRef":{"nullable":true,"type":"string"}},"required":["operation","tokenRole","positionRef"],"additionalProperties":false},"portfolioTransactionId":{"nullable":true,"type":"string"}},"required":["txIndex","type","from","to","token","value","quote","defi","portfolioTransactionId"],"additionalProperties":false}}},"required":["id","wallet","hash","blockHeight","timestamp","memo","processingState","walletOperations"],"additionalProperties":false},"PortfolioTransactionWithRawDetailsResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Portfolio transaction ID"},"operationType":{"type":"string","description":"Accounting operation type"},"subType":{"nullable":true,"description":"Operation sub-type","type":"string"},"classification":{"type":"object","properties":{"state":{"type":"string","enum":["categorized","uncategorized","error"],"description":"Whether the transaction is categorized, uncategorized, or errored"},"reason":{"nullable":true,"description":"Root failure mode (unwrapped), e.g. FmvNotAvailable; null if none","type":"string"},"detail":{"nullable":true,"description":"Human-readable detail for the primary issue, if any","type":"string"},"suggestedAction":{"nullable":true,"description":"Suggested remediation, if any","type":"object","properties":{"tool":{"nullable":true,"description":"MCP tool to remediate with, or null if no single tool applies","type":"string"},"description":{"type":"string","description":"What to do to resolve it"}},"required":["tool","description"],"additionalProperties":false}},"required":["state","reason","detail","suggestedAction"],"additionalProperties":false,"description":"Triage summary: classification state, reason, and suggested action"},"systemNotes":{"nullable":true,"description":"System-generated notes","type":"string"},"errorMessage":{"nullable":true,"description":"Legacy error message text if processing failed","type":"string"},"errorDetails":{"description":"Structured error details if processing failed","nullable":true,"type":"array","items":{}},"timestamp":{"type":"string","description":"Transaction timestamp (ISO 8601)"},"memo":{"nullable":true,"description":"User memo","type":"string"},"status":{"type":"string","description":"Transaction status"},"tags":{"type":"array","items":{"type":"string"},"description":"Transaction tags"},"fileAttachments":{"type":"array","items":{},"description":"Attached files metadata"},"journalEntry":{"nullable":true,"description":"Journal entry with DR/CR lines and lineage","allOf":[{"$ref":"#/components/schemas/JournalEntryResponseDto"}]},"walletOperations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Transfer direction/type (e.g. IN, OUT)"},"txHash":{"type":"string","description":"On-chain transaction hash"},"chainId":{"type":"string","description":"Chain ID"},"txIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Transfer index within the transaction"},"walletTransactionId":{"type":"string","description":"Wallet transaction handle for this operation; pair with txIndex to reference the operation in merge_transactions / split_transactions"},"fromAddress":{"type":"string","description":"Sender address"},"fromAddressLabel":{"nullable":true,"description":"Sender address label","type":"string"},"toAddress":{"type":"string","description":"Recipient address"},"toAddressLabel":{"nullable":true,"description":"Recipient address label","type":"string"},"value":{"type":"string","description":"Human-readable transfer amount (decimal string)"},"valueQuote":{"nullable":true,"description":"Fiat quote value (decimal string)","type":"string"},"quoteCurrency":{"nullable":true,"description":"Fiat quote currency","type":"string"},"quoteSource":{"nullable":true,"description":"Fiat quote source","type":"string"},"quoteMeta":{"description":"Structured quote provenance, null when none is available, or temporarily omitted by an older server during a rolling deploy","nullable":true,"type":"object","properties":{"s":{"type":"string","enum":["SYNC_SOURCE","FMV_ENGINE","DERIVED_REPRESENTED","DERIVED_SIBLING","POLICY","MANUAL"]},"ts":{"type":"integer","minimum":1,"maximum":8210266876799}},"required":["s"],"additionalProperties":false},"assetId":{"nullable":true,"description":"Asset ID","type":"string"},"assetSymbol":{"nullable":true,"description":"Asset symbol","type":"string"},"tokenAddress":{"type":"string","description":"Token contract address"},"isSpam":{"type":"boolean","description":"Effective spam flag (portfolio prefs applied)"},"stablecoinPeggedFiatCurrency":{"nullable":true,"description":"Effective stablecoin peg, if any","type":"string"},"walletName":{"type":"string","description":"Owning wallet name"},"walletAddress":{"type":"string","description":"Owning wallet address"},"defiOperation":{"nullable":true,"description":"DeFi operation, if any","type":"string"},"defiPositionId":{"nullable":true,"description":"DeFi position ID, if any","type":"string"},"defiPositionRef":{"description":"Stable DeFi position reference, if any","nullable":true,"type":"string"}},"required":["type","txHash","chainId","txIndex","walletTransactionId","fromAddress","fromAddressLabel","toAddress","toAddressLabel","value","valueQuote","quoteCurrency","quoteSource","assetId","assetSymbol","tokenAddress","isSpam","stablecoinPeggedFiatCurrency","walletName","walletAddress","defiOperation","defiPositionId"],"additionalProperties":false},"description":"Wallet transfers that make up this transaction"},"walletSource":{"description":"Wallet-backed source metadata for row actions","nullable":true,"type":"object","properties":{"wallet":{"type":"object","properties":{"chainId":{"type":"string","description":"Public chain ID of the wallet"},"address":{"type":"string","description":"Public wallet address on the chain"}},"required":["chainId","address"],"additionalProperties":false,"description":"Public wallet identity without internal wallet IDs"},"walletType":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Wallet type"},"rawTransactionId":{"type":"string","description":"Wallet transaction ID"},"rawTransactionSource":{"type":"string","description":"Wallet transaction source"},"blockHeight":{"type":"string","description":"Wallet transaction block height as a decimal string"},"timestamp":{"type":"string","description":"Wallet transaction timestamp serialized as ISO 8601"}},"required":["wallet","walletType","rawTransactionId","rawTransactionSource","blockHeight","timestamp"],"additionalProperties":false},"intercompanyPair":{"description":"Intercompany pair metadata when this transaction is paired","nullable":true,"type":"object","properties":{"pairId":{"type":"string","description":"Intercompany move pair ID"},"side":{"type":"string","enum":["SEND","RECEIVE"],"description":"Whether this transaction is the sending or receiving side"},"treatment":{"nullable":true,"description":"Applied intercompany treatment","type":"string"},"counterpartPortfolioName":{"type":"string","description":"Counterpart portfolio display name"},"counterpartPortfolioSlug":{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Counterpart portfolio public slug"},"counterpartPortfolioTransactionId":{"type":"string","description":"Counterpart portfolio transaction ID"},"counterpartOperationType":{"type":"string","description":"Counterpart accounting operation type"},"counterpartSubType":{"nullable":true,"description":"Counterpart accounting operation subtype","type":"string"},"counterpartStatus":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"],"description":"Counterpart transaction status"},"lotLinkCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of linked intercompany cost-basis lots"}},"required":["pairId","side","treatment","counterpartPortfolioName","counterpartPortfolioSlug","counterpartPortfolioTransactionId","counterpartOperationType","counterpartSubType","counterpartStatus","lotLinkCount"],"additionalProperties":false},"portfolioTransactionContext":{"description":"Flattened transaction context, when stored","nullable":true,"type":"object","additionalProperties":{}},"rawTransactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Operational current-row WalletTransaction UUID"},"wallet":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"},"name":{"nullable":true,"description":"Wallet display name","type":"string"},"type":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Wallet type"}},"required":["chainId","address","name","type"],"additionalProperties":false},"hash":{"type":"string"},"blockHeight":{"type":"string","pattern":"^\\d+$"},"timestamp":{"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))$"},"memo":{"nullable":true,"type":"string"},"processingState":{"type":"string","enum":["PROCESSED","PARTIAL","UNPROCESSED"]},"walletOperations":{"type":"array","items":{"type":"object","properties":{"txIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["IN","OUT","GAS","SELF"]},"from":{"type":"object","properties":{"address":{"type":"string"},"label":{"nullable":true,"type":"string"}},"required":["address","label"],"additionalProperties":false},"to":{"type":"object","properties":{"address":{"type":"string"},"label":{"nullable":true,"type":"string"}},"required":["address","label"],"additionalProperties":false},"token":{"type":"object","properties":{"chainId":{"type":"string"},"address":{"type":"string"},"assetId":{"type":"string"},"symbol":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["ERC20"],"description":"Standard fungible token with a freely transferable, free-floating balance. The default for the vast majority of tokens. Examples: USDC, UNI, LINK, and any plain ERC-20 (EVM) or fungible SPL (Solana) token that is not one of the more specific DeFi types below."},{"type":"string","enum":["NATIVE"],"description":"The chain's native gas asset, used to pay transaction fees and not represented by a token contract. Examples: ETH on Ethereum, SOL on Solana, MATIC on Polygon, TRX on Tron, NEAR on NEAR. The wrapped form (e.g. WETH, wSOL) is a separate ERC20/NATIVE token linked by representation metadata, not this value."},{"type":"string","enum":["FIAT"],"description":"Off-chain fiat currency balance rather than an on-chain token. Examples: a USD, EUR, or GBP cash balance held on a centralized exchange or bank account."},{"type":"string","enum":["NFT"],"description":"Non-fungible token. Stored as one Token row per (contract, tokenId) with address `${contractAddress}#${tokenId}`. Examples: a Uniswap v3 concentrated-liquidity position NFT, or an art/PFP collectible. An NFT may still be a DeFi position container (e.g. a Uniswap v3 LP NFT); the position itself is modeled separately."},{"type":"string","enum":["REBASE_LST"],"description":"Rebasing liquid-staking token: the holder BALANCE grows over time to distribute staking rewards while the token stays ~1:1 pegged to the staked asset (balance-growing mechanic, staking domain). Example: stETH (Lido), where balanceOf increases each day with no incoming transfer. Contrast VALUE_ACCRUING for the wrapped, non-rebasing form (e.g. wstETH) that keeps a fixed balance and accrues via an exchange rate."},{"type":"string","enum":["INTEREST_BEARING"],"description":"Interest-bearing lending receipt whose holder BALANCE grows continuously at ~1:1 with the supplied underlying (Aave-style scaled balance multiplied by a rising liquidity index; balance-growing mechanic, lending domain). Examples: Aave aTokens such as aUSDC and aWETH, where your aUSDC quantity increases as interest accrues and 1 aUSDC always redeems for ~1 USDC. Mechanically the same balance-growth shape as REBASE_LST but for a lending deposit rather than staking. Contrast VALUE_ACCRUING for Compound cTokens, which instead keep a fixed balance and appreciate via an exchange rate."},{"type":"string","enum":["VALUE_ACCRUING"],"description":"Value-accruing receipt or share: the holder BALANCE is fixed and each unit becomes redeemable for a rising amount of a single underlying via an on-chain exchange rate (value-accruing mechanic). Examples: ERC-4626 vault shares (Yearn v3, Morpho), Beefy `moo*` vault shares (the core `BeefyVaultV7` is NOT ERC-4626 — it exposes `want()` and `getPricePerFullShare()` where a 4626 vault would expose `asset()` and `convertToAssets()`), Compound cTokens, wrapped LSTs (wstETH, rETH, cbETH, sfrxETH), and Solana LSTs (mSOL, JitoSOL). The represented underlying is usually discoverable on-chain (e.g. ERC-4626 `asset()`), but the exchange RATE is a time-varying derived value and must not be stored as a fixed ratio. Contrast INTEREST_BEARING and REBASE_LST, where the balance grows instead."},{"type":"string","enum":["LP_SHARE"],"description":"Liquidity-pool share representing proportional ownership of a BASKET of two or more pooled underlyings, so it has no single represented underlying token. Examples: Uniswap v2 pair tokens, Curve LP tokens, Balancer BPT, PancakeSwap LP tokens, Raydium/Orca LP tokens. A single-underlying receipt is VALUE_ACCRUING; a multi-underlying pool token is LP_SHARE."},{"type":"string","enum":["DEBT"],"description":"Non-transferable borrow or liability marker. The balance equals the amount owed (principal plus accrued interest) and is booked on the liability side, never as an asset. Examples: Aave variable and stable debt tokens such as variableDebtUSDC. Transfers and approvals typically revert, so it is a position record exposed as a token rather than a tradeable token."},{"type":"string","enum":["REFLECT"],"description":"Reflection / redistribution token: holder balances change via a fee-redistribution rate shift rather than via transfers (reflect.finance forks). Example: SAFEMOON-style tokens that redistribute a transfer tax to all holders."},{"type":"string","enum":["VOTE_ESCROWED"],"description":"Vote-escrowed lock position, typically non-transferable, created by locking a governance token for a fixed duration to receive boosted rewards or voting power. Examples: veCRV (Curve), veBAL (Balancer)."}]},"decimals":{"type":"integer","minimum":0,"maximum":9007199254740991},"isSpam":{"type":"boolean"},"stablecoinPeggedFiatCurrency":{"nullable":true,"type":"string"},"representsTokenAddress":{"nullable":true,"type":"string"}},"required":["chainId","address","assetId","symbol","type","decimals","isSpam","stablecoinPeggedFiatCurrency","representsTokenAddress"],"additionalProperties":false},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Precise signed decimal value encoded as a string."},"quote":{"nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Precise signed decimal value encoded as a string."},"currency":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"meta":{"nullable":true,"type":"object","properties":{"s":{"type":"string","enum":["SYNC_SOURCE","FMV_ENGINE","DERIVED_REPRESENTED","DERIVED_SIBLING","POLICY","MANUAL"]},"ts":{"type":"integer","minimum":1,"maximum":8210266876799}},"required":["s"],"additionalProperties":false}},"required":["value","currency","source","meta"],"additionalProperties":false},"defi":{"nullable":true,"type":"object","properties":{"operation":{"nullable":true,"anyOf":[{"type":"string","enum":["PROTOCOL_DEPOSIT"],"description":"Deposit assets into protocol-managed custody without immediate disposal"},{"type":"string","enum":["PROTOCOL_WITHDRAW"],"description":"Withdraw assets from protocol-managed custody back to the wallet"},{"type":"string","enum":["VAULT_DEPOSIT"],"description":"Deposit into a tokenized vault: one underlying is pooled under a manager or strategy and the depositor receives a fungible share"},{"type":"string","enum":["VAULT_WITHDRAW"],"description":"Redemption from a tokenized vault: share burned, underlying returned"},{"type":"string","enum":["SWAP"],"description":"Token swap/exchange on DEX (e.g., ETH → USDC on Uniswap)"},{"type":"string","enum":["PROVIDE_LIQUIDITY"],"description":"Add tokens to liquidity pool (e.g., add ETH+USDC to Uniswap pool)"},{"type":"string","enum":["REMOVE_LIQUIDITY"],"description":"Remove tokens from liquidity pool (e.g., withdraw from Uniswap pool)"},{"type":"string","enum":["LEND"],"description":"Supply tokens to lending protocol (e.g., deposit USDC to Aave)"},{"type":"string","enum":["WITHDRAW_LEND"],"description":"Withdraw supplied tokens from lending protocol (e.g., withdraw USDC from Aave)"},{"type":"string","enum":["LEND_REDUCE"],"description":"Reduce supplied lending exposure without receiving underlying back to the wallet"},{"type":"string","enum":["BORROW"],"description":"Borrow tokens from lending protocol (e.g., borrow ETH from Aave)"},{"type":"string","enum":["REPAY"],"description":"Repay borrowed tokens to lending protocol"},{"type":"string","enum":["LOAN_LIQUIDATION"],"description":"Forced loan liquidation that reduces protocol debt and seizes collateral"},{"type":"string","enum":["STAKE"],"description":"Stake tokens for rewards (e.g., stake ETH for staking rewards)"},{"type":"string","enum":["UNSTAKE"],"description":"Unstake tokens from staking protocol"},{"type":"string","enum":["CLAIM_REWARDS"],"description":"Claim earned rewards from staking, LP fees, or other yield sources"}]},"tokenRole":{"nullable":true,"anyOf":[{"type":"string","enum":["UNDERLYING"],"description":"The base/principal asset moving into or out of a position: the asset supplied, withdrawn, borrowed, repaid, staked, or unstaked, and the actual asset paid when reducing a debt. This is the real asset, not a receipt or marker for it. Examples: the ETH leg of a stake, or the USDC leg paid to repay an Aave loan. Processors read the repaid/supplied asset id from this leg."},{"type":"string","enum":["COLLATERAL"],"description":"An asset posted or locked as collateral, or seized as collateral during a liquidation, as distinct from a plain principal deposit. Role is per-transfer, so the same token can be UNDERLYING in one transfer and COLLATERAL in another. Example: the collateral (often an aToken or its underlying) taken from a borrower in an Aave V3 liquidation."},{"type":"string","enum":["RECEIPT_TOKEN"],"description":"A token that represents a claim on a supplied or staked position (a receipt or share) rather than the underlying itself. Covers interest-bearing receipts and value-accruing shares regardless of mechanic. Examples: Aave aTokens (aUSDC), Compound cTokens, JustLend jTokens, ERC-4626 vault shares, liquid-staking receipts. Whether it rebases or accrues via an exchange rate is captured by the token TokenType, not by this role."},{"type":"string","enum":["LP_SHARE"],"description":"A liquidity-pool share representing proportional ownership of a basket of two or more pooled underlyings. Examples: Uniswap v2 pair tokens, Curve and Balancer LP tokens, a Uniswap v3 concentrated-liquidity position NFT."},{"type":"string","enum":["LIABILITY_TOKEN"],"description":"A borrow/debt marker representing an outstanding liability (principal plus accrued interest), typically non-transferable. Examples: Aave variable and stable debt tokens (variableDebtUSDC). It must be booked on the liability side and is structurally distinct from a RECEIPT_TOKEN (asset side), so the two never share one value. Lets processors identify the debt leg by role instead of matching `variableDebt`/`stableDebt` symbol prefixes."},{"type":"string","enum":["REWARD"],"description":"An incentive, yield, or fee-share token realized from a position separately from principal. Examples: claimed governance/incentive tokens, or accrued trading-fee rewards."},{"type":"string","enum":["OTHER"],"description":"A protocol-specific or not-yet-classified token leg that does not fit the roles above. Use sparingly; prefer adding a generic role once a pattern recurs across protocols."}]},"positionRef":{"nullable":true,"type":"string"}},"required":["operation","tokenRole","positionRef"],"additionalProperties":false},"portfolioTransactionId":{"nullable":true,"type":"string"}},"required":["txIndex","type","from","to","token","value","quote","defi","portfolioTransactionId"],"additionalProperties":false}},"details":{"$ref":"#/components/schemas/PortfolioTransactionWithRawDetailsResponseDto__schema0"}},"required":["id","wallet","hash","blockHeight","timestamp","memo","processingState","walletOperations","details"],"additionalProperties":false}}},"required":["id","operationType","subType","classification","systemNotes","errorMessage","timestamp","memo","status","tags","fileAttachments","journalEntry","walletOperations","rawTransactions"],"additionalProperties":false},"PortfolioTransactionWithRawDetailsResponseDto__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/PortfolioTransactionWithRawDetailsResponseDto__schema0"}]}},{"type":"object","additionalProperties":{"allOf":[{"$ref":"#/components/schemas/PortfolioTransactionWithRawDetailsResponseDto__schema0"}]}}]},"DefiPositionListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"positionRef":{"type":"string","description":"Stable public DeFi position reference"},"positionKey":{"type":"string","description":"Protocol-defined stable logical position key"},"positionType":{"type":"string","enum":["LP","STAKE","LEND","BORROW","NATIVE_STAKE","PROTOCOL","VAULT"],"description":"DeFi position type"},"status":{"type":"string","enum":["ACTIVE","CLOSED","PARTIAL"],"description":"DeFi position status"},"openedAt":{"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":"Position opened timestamp"},"closedAt":{"nullable":true,"description":"Position closed timestamp, if closed","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))$"},"tokenAddresses":{"type":"array","items":{"type":"string"},"description":"Token addresses involved in the position"},"custodyAddresses":{"type":"array","items":{"type":"string"},"description":"Custody addresses involved in the position"},"protocol":{"type":"object","properties":{"name":{"type":"string","description":"Protocol display name"},"slug":{"type":"string","description":"Protocol slug"},"type":{"type":"string","enum":["DEX","LENDING","LIQUIDITY_POOL","STAKING","YIELD_FARMING","NATIVE_STAKING","OTHER"],"description":"DeFi protocol type"},"description":{"nullable":true,"description":"Protocol description","type":"string"}},"required":["name","slug","type","description"],"additionalProperties":false,"description":"Protocol metadata"},"contract":{"type":"object","properties":{"address":{"type":"string","description":"Protocol contract address"},"chainId":{"type":"string","description":"Contract chain ID"},"chain":{"type":"object","properties":{"id":{"type":"string","description":"Chain ID"},"name":{"type":"string","description":"Chain display name"}},"required":["id","name"],"additionalProperties":false,"description":"Contract chain display metadata"},"type":{"type":"string","enum":["MAIN","POOL","TOKEN","STAKING","REWARDS","OTHER"],"description":"DeFi contract type"},"rewardMode":{"nullable":true,"description":"Reward distribution mode","type":"string"},"custodyShift":{"type":"boolean","description":"Whether this contract shifts custody"}},"required":["address","chainId","chain","type","rewardMode","custodyShift"],"additionalProperties":false,"description":"Protocol contract metadata"},"wallet":{"type":"object","properties":{"name":{"type":"string","description":"Wallet display name"},"chainId":{"type":"string","description":"Wallet chain ID"},"chain":{"type":"object","properties":{"id":{"type":"string","description":"Chain ID"},"name":{"type":"string","description":"Chain display name"}},"required":["id","name"],"additionalProperties":false,"description":"Wallet chain display metadata"},"address":{"type":"string","description":"Wallet address"}},"required":["name","chainId","chain","address"],"additionalProperties":false,"description":"Public wallet metadata"},"transferSummaries":{"type":"array","items":{"type":"object","properties":{"tokenAddress":{"type":"string","description":"Token contract address"},"totalStaked":{"type":"string","description":"Raw total amount sent into the position"},"totalReceived":{"type":"string","description":"Raw total amount received from the position"},"lastUpdated":{"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":"Last transfer timestamp"}},"required":["tokenAddress","totalStaked","totalReceived","lastUpdated"],"additionalProperties":false},"description":"Aggregated transfer totals for this position"}},"required":["positionRef","positionKey","positionType","status","openedAt","closedAt","tokenAddresses","custodyAddresses","protocol","contract","wallet","transferSummaries"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"DefiPositionResponseDto":{"type":"object","properties":{"positionRef":{"type":"string","description":"Stable public DeFi position reference"},"positionKey":{"type":"string","description":"Protocol-defined stable logical position key"},"positionType":{"type":"string","enum":["LP","STAKE","LEND","BORROW","NATIVE_STAKE","PROTOCOL","VAULT"],"description":"DeFi position type"},"status":{"type":"string","enum":["ACTIVE","CLOSED","PARTIAL"],"description":"DeFi position status"},"openedAt":{"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":"Position opened timestamp"},"closedAt":{"nullable":true,"description":"Position closed timestamp, if closed","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))$"},"tokenAddresses":{"type":"array","items":{"type":"string"},"description":"Token addresses involved in the position"},"custodyAddresses":{"type":"array","items":{"type":"string"},"description":"Custody addresses involved in the position"},"protocol":{"type":"object","properties":{"name":{"type":"string","description":"Protocol display name"},"slug":{"type":"string","description":"Protocol slug"},"type":{"type":"string","enum":["DEX","LENDING","LIQUIDITY_POOL","STAKING","YIELD_FARMING","NATIVE_STAKING","OTHER"],"description":"DeFi protocol type"},"description":{"nullable":true,"description":"Protocol description","type":"string"}},"required":["name","slug","type","description"],"additionalProperties":false,"description":"Protocol metadata"},"contract":{"type":"object","properties":{"address":{"type":"string","description":"Protocol contract address"},"chainId":{"type":"string","description":"Contract chain ID"},"chain":{"type":"object","properties":{"id":{"type":"string","description":"Chain ID"},"name":{"type":"string","description":"Chain display name"}},"required":["id","name"],"additionalProperties":false,"description":"Contract chain display metadata"},"type":{"type":"string","enum":["MAIN","POOL","TOKEN","STAKING","REWARDS","OTHER"],"description":"DeFi contract type"},"rewardMode":{"nullable":true,"description":"Reward distribution mode","type":"string"},"custodyShift":{"type":"boolean","description":"Whether this contract shifts custody"}},"required":["address","chainId","chain","type","rewardMode","custodyShift"],"additionalProperties":false,"description":"Protocol contract metadata"},"wallet":{"type":"object","properties":{"name":{"type":"string","description":"Wallet display name"},"chainId":{"type":"string","description":"Wallet chain ID"},"chain":{"type":"object","properties":{"id":{"type":"string","description":"Chain ID"},"name":{"type":"string","description":"Chain display name"}},"required":["id","name"],"additionalProperties":false,"description":"Wallet chain display metadata"},"address":{"type":"string","description":"Wallet address"}},"required":["name","chainId","chain","address"],"additionalProperties":false,"description":"Public wallet metadata"},"tokenSnapshots":{"type":"array","items":{"type":"object","properties":{"tokenAddress":{"type":"string","description":"Token contract address"},"role":{"type":"string","enum":["UNDERLYING","COLLATERAL","RECEIPT_TOKEN","LP_SHARE","LIABILITY_TOKEN","REWARD","OTHER"],"description":"Token role in the DeFi position"},"rawBalance":{"type":"string","description":"Raw token amount in token decimals"},"quantity":{"nullable":true,"description":"Human-readable token amount when decimals are known","type":"string"},"valueQuote":{"nullable":true,"description":"Fair market value in quote currency","type":"string"},"quoteCurrency":{"nullable":true,"description":"Quote currency","type":"string"},"quoteSource":{"nullable":true,"description":"Quote source","type":"string"},"aprRate":{"nullable":true,"description":"Annual percentage rate","type":"string"},"timestamp":{"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":"Snapshot timestamp"},"token":{"nullable":true,"description":"Token metadata when available","type":"object","properties":{"assetId":{"nullable":true,"description":"Asset ID, if the token is asset-backed","type":"string"},"name":{"type":"string","description":"Token display name"},"symbol":{"type":"string","description":"Token symbol"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Token decimals"}},"required":["assetId","name","symbol","decimals"],"additionalProperties":false}},"required":["tokenAddress","role","rawBalance","quantity","valueQuote","quoteCurrency","quoteSource","aprRate","timestamp","token"],"additionalProperties":false},"description":"Token snapshot history rows for this position"},"transferSummaries":{"type":"array","items":{"type":"object","properties":{"tokenAddress":{"type":"string","description":"Token contract address"},"totalStaked":{"type":"string","description":"Raw total amount sent into the position"},"totalReceived":{"type":"string","description":"Raw total amount received from the position"},"lastUpdated":{"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":"Last transfer timestamp"}},"required":["tokenAddress","totalStaked","totalReceived","lastUpdated"],"additionalProperties":false},"description":"Aggregated transfer totals for this position"}},"required":["positionRef","positionKey","positionType","status","openedAt","closedAt","tokenAddresses","custodyAddresses","protocol","contract","wallet","tokenSnapshots","transferSummaries"],"additionalProperties":false},"CostBasisLotStatsResponseDto":{"type":"object","properties":{"minTimestamp":{"nullable":true,"description":"Oldest lot ledger timestamp in the portfolio, if any","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))$"},"maxTimestamp":{"nullable":true,"description":"Newest lot ledger timestamp in the portfolio, if any","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))$"}},"required":["minTimestamp","maxTimestamp"],"additionalProperties":false},"PaginatedCostBasisLotsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Lot identifier (e.g. btc_1)"},"entryId":{"type":"string","description":"Unique lot ledger entry ID"},"timestamp":{"type":"string","description":"Entry event time (ISO 8601)"},"acquisitionTimestamp":{"type":"string","description":"FIFO/LIFO acquisition (lineage) date for holding-period and tax classification (ISO 8601). Equals timestamp for ADD; for a moved lot it is the original acquisition date."},"entryKind":{"type":"string","enum":["ADD","DSP","CUT","MVE","RES","REL"],"description":"Lot entry kind (ADD, DSP, CUT, MVE, RES, REL)"},"lotMethod":{"type":"string","description":"Lot accounting method (FIFO, LIFO, HIFO, ACB)"},"diff":{"type":"string","description":"Signed quantity change (decimal string)"},"price":{"nullable":true,"description":"Unit price in portfolio currency (decimal string)","type":"string"},"value":{"type":"string","description":"Entry value in portfolio currency (decimal string)"},"positionId":{"nullable":true,"description":"Internal DeFi position ID, if applicable","type":"string"},"assetId":{"type":"string","description":"Asset ID"},"assetSymbol":{"nullable":true,"description":"Asset symbol","type":"string"},"assetName":{"nullable":true,"description":"Asset name","type":"string"},"assetIsSpam":{"type":"boolean","description":"Effective spam flag after portfolio token preferences override token defaults. Assets without tokens are not spam."},"walletName":{"nullable":true,"description":"Wallet name when this lot is associated with a wallet.","type":"string"},"walletChainId":{"nullable":true,"description":"Wallet chain ID","type":"string"},"walletAddress":{"nullable":true,"description":"Wallet address (canonical (chainId, address) identifier)","type":"string"},"portfolioTransactionId":{"type":"string","description":"Originating portfolio transaction ID"},"operationType":{"nullable":true,"description":"Operation type of the originating transaction","type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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",null]},"txHash":{"nullable":true,"description":"On-chain transaction hash from the transfer linked to this lot journal line, when present.","type":"string","minLength":1},"walletTransactionTransfers":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","description":"Transfer chain ID"},"txHash":{"type":"string","minLength":1,"description":"Transfer transaction hash"}},"required":["chainId","txHash"],"additionalProperties":false},"description":"Wallet transfers linked to the originating transaction."}},"required":["id","entryId","timestamp","acquisitionTimestamp","entryKind","lotMethod","diff","price","value","positionId","assetId","assetSymbol","assetName","assetIsSpam","walletName","walletChainId","walletAddress","portfolioTransactionId","operationType","txHash","walletTransactionTransfers"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Current page number"},"pageSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items per page"},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of items"},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of pages"}},"required":["page","pageSize","totalCount","totalPages"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"CostBasisLotHistoryRequestDto":{"type":"object","properties":{"page":{"default":1,"description":"Page number","type":"integer","minimum":1,"maximum":9007199254740991},"pageSize":{"default":50,"description":"Items per page (max 100)","type":"integer","minimum":1,"maximum":100},"assetId":{"type":"string","minLength":1,"description":"Asset ID that owns the requested lot IDs"},"lotIds":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"string","minLength":1},"description":"Contributing cost-basis lot IDs to include"},"asOfTimestamp":{"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":"Required inclusive timestamp boundary."},"sort":{"description":"Single sort field. Prefix with - for descending. Supported fields: timestamp, diff, value, price.","type":"string"}},"required":["assetId","lotIds","asOfTimestamp"],"additionalProperties":false},"PortfolioTransactionListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PortfolioTransactionResponseDto"}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"PortfolioTransactionListWithRawResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PortfolioTransactionWithRawResponseDto"}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"PortfolioTransactionListWithRawDetailsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Portfolio transaction ID"},"operationType":{"type":"string","description":"Accounting operation type"},"subType":{"nullable":true,"description":"Operation sub-type","type":"string"},"classification":{"type":"object","properties":{"state":{"type":"string","enum":["categorized","uncategorized","error"],"description":"Whether the transaction is categorized, uncategorized, or errored"},"reason":{"nullable":true,"description":"Root failure mode (unwrapped), e.g. FmvNotAvailable; null if none","type":"string"},"detail":{"nullable":true,"description":"Human-readable detail for the primary issue, if any","type":"string"},"suggestedAction":{"nullable":true,"description":"Suggested remediation, if any","type":"object","properties":{"tool":{"nullable":true,"description":"MCP tool to remediate with, or null if no single tool applies","type":"string"},"description":{"type":"string","description":"What to do to resolve it"}},"required":["tool","description"],"additionalProperties":false}},"required":["state","reason","detail","suggestedAction"],"additionalProperties":false,"description":"Triage summary: classification state, reason, and suggested action"},"systemNotes":{"nullable":true,"description":"System-generated notes","type":"string"},"errorMessage":{"nullable":true,"description":"Legacy error message text if processing failed","type":"string"},"errorDetails":{"description":"Structured error details if processing failed","nullable":true,"type":"array","items":{}},"timestamp":{"type":"string","description":"Transaction timestamp (ISO 8601)"},"memo":{"nullable":true,"description":"User memo","type":"string"},"status":{"type":"string","description":"Transaction status"},"tags":{"type":"array","items":{"type":"string"},"description":"Transaction tags"},"fileAttachments":{"type":"array","items":{},"description":"Attached files metadata"},"journalEntry":{"nullable":true,"description":"Journal entry with DR/CR lines and lineage","allOf":[{"$ref":"#/components/schemas/JournalEntryResponseDto"}]},"walletOperations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Transfer direction/type (e.g. IN, OUT)"},"txHash":{"type":"string","description":"On-chain transaction hash"},"chainId":{"type":"string","description":"Chain ID"},"txIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Transfer index within the transaction"},"walletTransactionId":{"type":"string","description":"Wallet transaction handle for this operation; pair with txIndex to reference the operation in merge_transactions / split_transactions"},"fromAddress":{"type":"string","description":"Sender address"},"fromAddressLabel":{"nullable":true,"description":"Sender address label","type":"string"},"toAddress":{"type":"string","description":"Recipient address"},"toAddressLabel":{"nullable":true,"description":"Recipient address label","type":"string"},"value":{"type":"string","description":"Human-readable transfer amount (decimal string)"},"valueQuote":{"nullable":true,"description":"Fiat quote value (decimal string)","type":"string"},"quoteCurrency":{"nullable":true,"description":"Fiat quote currency","type":"string"},"quoteSource":{"nullable":true,"description":"Fiat quote source","type":"string"},"quoteMeta":{"description":"Structured quote provenance, null when none is available, or temporarily omitted by an older server during a rolling deploy","nullable":true,"type":"object","properties":{"s":{"type":"string","enum":["SYNC_SOURCE","FMV_ENGINE","DERIVED_REPRESENTED","DERIVED_SIBLING","POLICY","MANUAL"]},"ts":{"type":"integer","minimum":1,"maximum":8210266876799}},"required":["s"],"additionalProperties":false},"assetId":{"nullable":true,"description":"Asset ID","type":"string"},"assetSymbol":{"nullable":true,"description":"Asset symbol","type":"string"},"tokenAddress":{"type":"string","description":"Token contract address"},"isSpam":{"type":"boolean","description":"Effective spam flag (portfolio prefs applied)"},"stablecoinPeggedFiatCurrency":{"nullable":true,"description":"Effective stablecoin peg, if any","type":"string"},"walletName":{"type":"string","description":"Owning wallet name"},"walletAddress":{"type":"string","description":"Owning wallet address"},"defiOperation":{"nullable":true,"description":"DeFi operation, if any","type":"string"},"defiPositionId":{"nullable":true,"description":"DeFi position ID, if any","type":"string"},"defiPositionRef":{"description":"Stable DeFi position reference, if any","nullable":true,"type":"string"}},"required":["type","txHash","chainId","txIndex","walletTransactionId","fromAddress","fromAddressLabel","toAddress","toAddressLabel","value","valueQuote","quoteCurrency","quoteSource","assetId","assetSymbol","tokenAddress","isSpam","stablecoinPeggedFiatCurrency","walletName","walletAddress","defiOperation","defiPositionId"],"additionalProperties":false},"description":"Wallet transfers that make up this transaction"},"walletSource":{"description":"Wallet-backed source metadata for row actions","nullable":true,"type":"object","properties":{"wallet":{"type":"object","properties":{"chainId":{"type":"string","description":"Public chain ID of the wallet"},"address":{"type":"string","description":"Public wallet address on the chain"}},"required":["chainId","address"],"additionalProperties":false,"description":"Public wallet identity without internal wallet IDs"},"walletType":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Wallet type"},"rawTransactionId":{"type":"string","description":"Wallet transaction ID"},"rawTransactionSource":{"type":"string","description":"Wallet transaction source"},"blockHeight":{"type":"string","description":"Wallet transaction block height as a decimal string"},"timestamp":{"type":"string","description":"Wallet transaction timestamp serialized as ISO 8601"}},"required":["wallet","walletType","rawTransactionId","rawTransactionSource","blockHeight","timestamp"],"additionalProperties":false},"intercompanyPair":{"description":"Intercompany pair metadata when this transaction is paired","nullable":true,"type":"object","properties":{"pairId":{"type":"string","description":"Intercompany move pair ID"},"side":{"type":"string","enum":["SEND","RECEIVE"],"description":"Whether this transaction is the sending or receiving side"},"treatment":{"nullable":true,"description":"Applied intercompany treatment","type":"string"},"counterpartPortfolioName":{"type":"string","description":"Counterpart portfolio display name"},"counterpartPortfolioSlug":{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Counterpart portfolio public slug"},"counterpartPortfolioTransactionId":{"type":"string","description":"Counterpart portfolio transaction ID"},"counterpartOperationType":{"type":"string","description":"Counterpart accounting operation type"},"counterpartSubType":{"nullable":true,"description":"Counterpart accounting operation subtype","type":"string"},"counterpartStatus":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"],"description":"Counterpart transaction status"},"lotLinkCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of linked intercompany cost-basis lots"}},"required":["pairId","side","treatment","counterpartPortfolioName","counterpartPortfolioSlug","counterpartPortfolioTransactionId","counterpartOperationType","counterpartSubType","counterpartStatus","lotLinkCount"],"additionalProperties":false},"portfolioTransactionContext":{"description":"Flattened transaction context, when stored","nullable":true,"type":"object","additionalProperties":{}},"rawTransactions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Operational current-row WalletTransaction UUID"},"wallet":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"},"name":{"nullable":true,"description":"Wallet display name","type":"string"},"type":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Wallet type"}},"required":["chainId","address","name","type"],"additionalProperties":false},"hash":{"type":"string"},"blockHeight":{"type":"string","pattern":"^\\d+$"},"timestamp":{"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))$"},"memo":{"nullable":true,"type":"string"},"processingState":{"type":"string","enum":["PROCESSED","PARTIAL","UNPROCESSED"]},"walletOperations":{"type":"array","items":{"type":"object","properties":{"txIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["IN","OUT","GAS","SELF"]},"from":{"type":"object","properties":{"address":{"type":"string"},"label":{"nullable":true,"type":"string"}},"required":["address","label"],"additionalProperties":false},"to":{"type":"object","properties":{"address":{"type":"string"},"label":{"nullable":true,"type":"string"}},"required":["address","label"],"additionalProperties":false},"token":{"type":"object","properties":{"chainId":{"type":"string"},"address":{"type":"string"},"assetId":{"type":"string"},"symbol":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["ERC20"],"description":"Standard fungible token with a freely transferable, free-floating balance. The default for the vast majority of tokens. Examples: USDC, UNI, LINK, and any plain ERC-20 (EVM) or fungible SPL (Solana) token that is not one of the more specific DeFi types below."},{"type":"string","enum":["NATIVE"],"description":"The chain's native gas asset, used to pay transaction fees and not represented by a token contract. Examples: ETH on Ethereum, SOL on Solana, MATIC on Polygon, TRX on Tron, NEAR on NEAR. The wrapped form (e.g. WETH, wSOL) is a separate ERC20/NATIVE token linked by representation metadata, not this value."},{"type":"string","enum":["FIAT"],"description":"Off-chain fiat currency balance rather than an on-chain token. Examples: a USD, EUR, or GBP cash balance held on a centralized exchange or bank account."},{"type":"string","enum":["NFT"],"description":"Non-fungible token. Stored as one Token row per (contract, tokenId) with address `${contractAddress}#${tokenId}`. Examples: a Uniswap v3 concentrated-liquidity position NFT, or an art/PFP collectible. An NFT may still be a DeFi position container (e.g. a Uniswap v3 LP NFT); the position itself is modeled separately."},{"type":"string","enum":["REBASE_LST"],"description":"Rebasing liquid-staking token: the holder BALANCE grows over time to distribute staking rewards while the token stays ~1:1 pegged to the staked asset (balance-growing mechanic, staking domain). Example: stETH (Lido), where balanceOf increases each day with no incoming transfer. Contrast VALUE_ACCRUING for the wrapped, non-rebasing form (e.g. wstETH) that keeps a fixed balance and accrues via an exchange rate."},{"type":"string","enum":["INTEREST_BEARING"],"description":"Interest-bearing lending receipt whose holder BALANCE grows continuously at ~1:1 with the supplied underlying (Aave-style scaled balance multiplied by a rising liquidity index; balance-growing mechanic, lending domain). Examples: Aave aTokens such as aUSDC and aWETH, where your aUSDC quantity increases as interest accrues and 1 aUSDC always redeems for ~1 USDC. Mechanically the same balance-growth shape as REBASE_LST but for a lending deposit rather than staking. Contrast VALUE_ACCRUING for Compound cTokens, which instead keep a fixed balance and appreciate via an exchange rate."},{"type":"string","enum":["VALUE_ACCRUING"],"description":"Value-accruing receipt or share: the holder BALANCE is fixed and each unit becomes redeemable for a rising amount of a single underlying via an on-chain exchange rate (value-accruing mechanic). Examples: ERC-4626 vault shares (Yearn v3, Morpho), Beefy `moo*` vault shares (the core `BeefyVaultV7` is NOT ERC-4626 — it exposes `want()` and `getPricePerFullShare()` where a 4626 vault would expose `asset()` and `convertToAssets()`), Compound cTokens, wrapped LSTs (wstETH, rETH, cbETH, sfrxETH), and Solana LSTs (mSOL, JitoSOL). The represented underlying is usually discoverable on-chain (e.g. ERC-4626 `asset()`), but the exchange RATE is a time-varying derived value and must not be stored as a fixed ratio. Contrast INTEREST_BEARING and REBASE_LST, where the balance grows instead."},{"type":"string","enum":["LP_SHARE"],"description":"Liquidity-pool share representing proportional ownership of a BASKET of two or more pooled underlyings, so it has no single represented underlying token. Examples: Uniswap v2 pair tokens, Curve LP tokens, Balancer BPT, PancakeSwap LP tokens, Raydium/Orca LP tokens. A single-underlying receipt is VALUE_ACCRUING; a multi-underlying pool token is LP_SHARE."},{"type":"string","enum":["DEBT"],"description":"Non-transferable borrow or liability marker. The balance equals the amount owed (principal plus accrued interest) and is booked on the liability side, never as an asset. Examples: Aave variable and stable debt tokens such as variableDebtUSDC. Transfers and approvals typically revert, so it is a position record exposed as a token rather than a tradeable token."},{"type":"string","enum":["REFLECT"],"description":"Reflection / redistribution token: holder balances change via a fee-redistribution rate shift rather than via transfers (reflect.finance forks). Example: SAFEMOON-style tokens that redistribute a transfer tax to all holders."},{"type":"string","enum":["VOTE_ESCROWED"],"description":"Vote-escrowed lock position, typically non-transferable, created by locking a governance token for a fixed duration to receive boosted rewards or voting power. Examples: veCRV (Curve), veBAL (Balancer)."}]},"decimals":{"type":"integer","minimum":0,"maximum":9007199254740991},"isSpam":{"type":"boolean"},"stablecoinPeggedFiatCurrency":{"nullable":true,"type":"string"},"representsTokenAddress":{"nullable":true,"type":"string"}},"required":["chainId","address","assetId","symbol","type","decimals","isSpam","stablecoinPeggedFiatCurrency","representsTokenAddress"],"additionalProperties":false},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Precise signed decimal value encoded as a string."},"quote":{"nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Precise signed decimal value encoded as a string."},"currency":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"meta":{"nullable":true,"type":"object","properties":{"s":{"type":"string","enum":["SYNC_SOURCE","FMV_ENGINE","DERIVED_REPRESENTED","DERIVED_SIBLING","POLICY","MANUAL"]},"ts":{"type":"integer","minimum":1,"maximum":8210266876799}},"required":["s"],"additionalProperties":false}},"required":["value","currency","source","meta"],"additionalProperties":false},"defi":{"nullable":true,"type":"object","properties":{"operation":{"nullable":true,"anyOf":[{"type":"string","enum":["PROTOCOL_DEPOSIT"],"description":"Deposit assets into protocol-managed custody without immediate disposal"},{"type":"string","enum":["PROTOCOL_WITHDRAW"],"description":"Withdraw assets from protocol-managed custody back to the wallet"},{"type":"string","enum":["VAULT_DEPOSIT"],"description":"Deposit into a tokenized vault: one underlying is pooled under a manager or strategy and the depositor receives a fungible share"},{"type":"string","enum":["VAULT_WITHDRAW"],"description":"Redemption from a tokenized vault: share burned, underlying returned"},{"type":"string","enum":["SWAP"],"description":"Token swap/exchange on DEX (e.g., ETH → USDC on Uniswap)"},{"type":"string","enum":["PROVIDE_LIQUIDITY"],"description":"Add tokens to liquidity pool (e.g., add ETH+USDC to Uniswap pool)"},{"type":"string","enum":["REMOVE_LIQUIDITY"],"description":"Remove tokens from liquidity pool (e.g., withdraw from Uniswap pool)"},{"type":"string","enum":["LEND"],"description":"Supply tokens to lending protocol (e.g., deposit USDC to Aave)"},{"type":"string","enum":["WITHDRAW_LEND"],"description":"Withdraw supplied tokens from lending protocol (e.g., withdraw USDC from Aave)"},{"type":"string","enum":["LEND_REDUCE"],"description":"Reduce supplied lending exposure without receiving underlying back to the wallet"},{"type":"string","enum":["BORROW"],"description":"Borrow tokens from lending protocol (e.g., borrow ETH from Aave)"},{"type":"string","enum":["REPAY"],"description":"Repay borrowed tokens to lending protocol"},{"type":"string","enum":["LOAN_LIQUIDATION"],"description":"Forced loan liquidation that reduces protocol debt and seizes collateral"},{"type":"string","enum":["STAKE"],"description":"Stake tokens for rewards (e.g., stake ETH for staking rewards)"},{"type":"string","enum":["UNSTAKE"],"description":"Unstake tokens from staking protocol"},{"type":"string","enum":["CLAIM_REWARDS"],"description":"Claim earned rewards from staking, LP fees, or other yield sources"}]},"tokenRole":{"nullable":true,"anyOf":[{"type":"string","enum":["UNDERLYING"],"description":"The base/principal asset moving into or out of a position: the asset supplied, withdrawn, borrowed, repaid, staked, or unstaked, and the actual asset paid when reducing a debt. This is the real asset, not a receipt or marker for it. Examples: the ETH leg of a stake, or the USDC leg paid to repay an Aave loan. Processors read the repaid/supplied asset id from this leg."},{"type":"string","enum":["COLLATERAL"],"description":"An asset posted or locked as collateral, or seized as collateral during a liquidation, as distinct from a plain principal deposit. Role is per-transfer, so the same token can be UNDERLYING in one transfer and COLLATERAL in another. Example: the collateral (often an aToken or its underlying) taken from a borrower in an Aave V3 liquidation."},{"type":"string","enum":["RECEIPT_TOKEN"],"description":"A token that represents a claim on a supplied or staked position (a receipt or share) rather than the underlying itself. Covers interest-bearing receipts and value-accruing shares regardless of mechanic. Examples: Aave aTokens (aUSDC), Compound cTokens, JustLend jTokens, ERC-4626 vault shares, liquid-staking receipts. Whether it rebases or accrues via an exchange rate is captured by the token TokenType, not by this role."},{"type":"string","enum":["LP_SHARE"],"description":"A liquidity-pool share representing proportional ownership of a basket of two or more pooled underlyings. Examples: Uniswap v2 pair tokens, Curve and Balancer LP tokens, a Uniswap v3 concentrated-liquidity position NFT."},{"type":"string","enum":["LIABILITY_TOKEN"],"description":"A borrow/debt marker representing an outstanding liability (principal plus accrued interest), typically non-transferable. Examples: Aave variable and stable debt tokens (variableDebtUSDC). It must be booked on the liability side and is structurally distinct from a RECEIPT_TOKEN (asset side), so the two never share one value. Lets processors identify the debt leg by role instead of matching `variableDebt`/`stableDebt` symbol prefixes."},{"type":"string","enum":["REWARD"],"description":"An incentive, yield, or fee-share token realized from a position separately from principal. Examples: claimed governance/incentive tokens, or accrued trading-fee rewards."},{"type":"string","enum":["OTHER"],"description":"A protocol-specific or not-yet-classified token leg that does not fit the roles above. Use sparingly; prefer adding a generic role once a pattern recurs across protocols."}]},"positionRef":{"nullable":true,"type":"string"}},"required":["operation","tokenRole","positionRef"],"additionalProperties":false},"portfolioTransactionId":{"nullable":true,"type":"string"}},"required":["txIndex","type","from","to","token","value","quote","defi","portfolioTransactionId"],"additionalProperties":false}},"details":{"$ref":"#/components/schemas/PortfolioTransactionListWithRawDetailsResponseDto__schema0"}},"required":["id","wallet","hash","blockHeight","timestamp","memo","processingState","walletOperations","details"],"additionalProperties":false}}},"required":["id","operationType","subType","classification","systemNotes","errorMessage","timestamp","memo","status","tags","fileAttachments","journalEntry","walletOperations","rawTransactions"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"PortfolioTransactionListWithRawDetailsResponseDto__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/PortfolioTransactionListWithRawDetailsResponseDto__schema0"}]}},{"type":"object","additionalProperties":{"allOf":[{"$ref":"#/components/schemas/PortfolioTransactionListWithRawDetailsResponseDto__schema0"}]}}]},"PortfolioReportExportRequestDto":{"type":"object","properties":{"payload":{"oneOf":[{"type":"object","properties":{"locale":{"type":"string","minLength":1},"type":{"type":"string","enum":["transactions"]},"format":{"type":"string","enum":["xlsx"]},"filters":{"type":"object","properties":{"assetIds":{"type":"array","items":{"type":"string"}},"chains":{"type":"array","items":{"type":"string"}},"wallets":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","minLength":1},"walletAddress":{"type":"string","minLength":1}},"required":["chainId","walletAddress"],"additionalProperties":false}},"dates":{"type":"array","items":{"type":"string"}},"txHashes":{"type":"array","items":{"type":"string"}},"interactedWith":{"type":"array","items":{"type":"string"}},"addressBookLabels":{"type":"array","items":{"type":"string"}},"includeSpamTokens":{"type":"boolean"}},"additionalProperties":false}},"required":["locale","type","format","filters"],"additionalProperties":false},{"type":"object","properties":{"locale":{"type":"string","minLength":1},"type":{"type":"string","enum":["journal-entries"]},"format":{"type":"string","enum":["xlsx"]},"filters":{"type":"object","properties":{},"additionalProperties":{}},"sorting":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"desc":{"type":"boolean"}},"required":["id","desc"]}}},"required":["locale","type","format","filters","sorting"],"additionalProperties":false},{"type":"object","properties":{"locale":{"type":"string","minLength":1},"type":{"type":"string","enum":["gains-losses"]},"format":{"anyOf":[{"type":"string","enum":["xlsx"]},{"type":"string","enum":["pdf"]}]},"filters":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"assetIds":{"type":"array","items":{"type":"string"}}},"required":["assetIds"]}},"required":["locale","type","format","filters"],"additionalProperties":false},{"type":"object","properties":{"locale":{"type":"string","minLength":1},"type":{"type":"string","enum":["cost-basis-ledger"]},"format":{"type":"string","enum":["xlsx"]},"filters":{"type":"object","properties":{},"additionalProperties":{}},"sorting":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"desc":{"type":"boolean"}},"required":["id","desc"]}}},"required":["locale","type","format","filters","sorting"],"additionalProperties":false},{"type":"object","properties":{"locale":{"type":"string","minLength":1},"type":{"type":"string","enum":["income-expense"]},"format":{"anyOf":[{"type":"string","enum":["xlsx"]},{"type":"string","enum":["pdf"]}]},"filters":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"accountTypes":{"type":"array","items":{"type":"string","enum":["INCOME","EXPENSE"]}},"accountSubTypes":{"type":"array","items":{"type":"string"}},"assetIds":{"type":"array","items":{"type":"string"}},"costCenterIds":{"type":"array","items":{"type":"string"}},"counterpartyIds":{"type":"array","items":{"type":"string"}},"responsibilityCenterFilters":{"type":"array","items":{"type":"object","properties":{"typeKey":{"type":"string","minLength":1},"centerIds":{"type":"array","items":{"type":"string"}}},"required":["typeKey","centerIds"]}}}}},"required":["locale","type","format","filters"],"additionalProperties":false},{"type":"object","properties":{"locale":{"type":"string","minLength":1},"type":{"type":"string","enum":["profit-and-loss"]},"format":{"anyOf":[{"type":"string","enum":["xlsx"]},{"type":"string","enum":["pdf"]}]},"filters":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"assetIds":{"type":"array","items":{"type":"string"}},"costCenterIds":{"type":"array","items":{"type":"string"}},"counterpartyIds":{"type":"array","items":{"type":"string"}},"responsibilityCenterFilters":{"type":"array","items":{"type":"object","properties":{"typeKey":{"type":"string","minLength":1},"centerIds":{"type":"array","items":{"type":"string"}}},"required":["typeKey","centerIds"]}}}}},"required":["locale","type","format","filters"],"additionalProperties":false},{"type":"object","properties":{"locale":{"type":"string","minLength":1},"type":{"type":"string","enum":["statement"]},"format":{"type":"string","enum":["pdf"]},"filters":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"assetIds":{"type":"array","items":{"type":"string"}},"assetShowSpam":{"type":"boolean"}}},"wallet":{"type":"object","properties":{"chainId":{"type":"string","minLength":1},"walletAddress":{"type":"string","minLength":1}},"required":["chainId","walletAddress"],"additionalProperties":false}},"required":["locale","type","format","filters"],"additionalProperties":false},{"type":"object","properties":{"locale":{"type":"string","minLength":1},"type":{"type":"string","enum":["balance-sheet"]},"format":{"anyOf":[{"type":"string","enum":["xlsx"]},{"type":"string","enum":["pdf"]}]},"filters":{"type":"object","properties":{"asOfDate":{"type":"string"},"valuationMethod":{"type":"string","enum":["cost","market","both"]},"grouping":{"type":"string","enum":["summary","grouped","detailed"]},"locationFilter":{"type":"string","enum":["all","blockchain","exchange"]},"assetIds":{"type":"array","items":{"type":"string"}},"showZeroBalances":{"type":"boolean"}},"required":["asOfDate","valuationMethod","grouping"],"additionalProperties":false}},"required":["locale","type","format","filters"],"additionalProperties":false},{"type":"object","properties":{"locale":{"type":"string","minLength":1},"type":{"type":"string","enum":["trial-balance"]},"format":{"anyOf":[{"type":"string","enum":["xlsx"]},{"type":"string","enum":["pdf"]}]},"filters":{"type":"object","properties":{"asOfDate":{"type":"string"},"includeZeroBalances":{"type":"boolean"},"reportType":{"type":"string","enum":["unadjusted","adjusted"]}},"required":["asOfDate","reportType"]}},"required":["locale","type","format","filters"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["payment-requests"]},"locale":{"type":"string","minLength":1},"format":{"type":"string","enum":["xlsx"]},"filters":{"type":"object","properties":{},"additionalProperties":{}}},"required":["type","locale","format","filters"],"additionalProperties":false},{"type":"object","properties":{"locale":{"type":"string","minLength":1},"type":{"type":"string","enum":["portfolio-conversion-workbook-template"]},"format":{"type":"string","enum":["xlsx"]},"filters":{"type":"object","properties":{"cutoffExclusiveTimestamp":{"type":"string"},"assetScope":{"type":"string","enum":["all","selected"]},"assetIds":{"type":"array","items":{"type":"string"}},"includeReferenceLists":{"type":"boolean"}},"required":["cutoffExclusiveTimestamp","assetScope"]}},"required":["locale","type","format","filters"],"additionalProperties":false},{"type":"object","properties":{"locale":{"type":"string","minLength":1},"type":{"type":"string","enum":["daily-summary"]},"format":{"anyOf":[{"type":"string","enum":["json"]},{"type":"string","enum":["xlsx"]}]},"filters":{"type":"object","properties":{"assetIds":{"type":"array","items":{"type":"string"}},"chains":{"type":"array","items":{"type":"string"}},"wallets":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","minLength":1},"walletAddress":{"type":"string","minLength":1}},"required":["chainId","walletAddress"],"additionalProperties":false}},"dates":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"required":["locale","type","format","filters"],"additionalProperties":false}],"type":"object"},"format":{"type":"string","enum":["xlsx","pdf","json"],"description":"Export format"},"totalsOnly":{"description":"When true, only calculate totals without generating binary export","type":"boolean"}},"required":["payload","format"]},"ReportJobResponseDto":{"type":"object","properties":{"jobId":{"type":"string","description":"Job ID for tracking progress"}},"required":["jobId"],"additionalProperties":false},"ReportJobStatusResponseDto":{"type":"object","properties":{"jobId":{"type":"string","description":"Job ID"},"status":{"type":"string","enum":["pending","processing","completed","failed"],"description":"Job status"},"progressPercent":{"type":"number","minimum":0,"maximum":100,"description":"Progress percentage"},"result":{"description":"Result when completed","anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["totals"],"description":"Result type indicator"},"totals":{"oneOf":[{"type":"object","properties":{"reportType":{"type":"string","enum":["profit-and-loss"]},"totalRevenue":{"type":"string"},"ordinaryIncome":{"type":"string"},"capitalGains":{"type":"string"},"totalExpensesAndLosses":{"type":"string"},"ordinaryExpense":{"type":"string"},"capitalLosses":{"type":"string"},"netIncome":{"type":"string"},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reportType","totalRevenue","ordinaryIncome","capitalGains","totalExpensesAndLosses","ordinaryExpense","capitalLosses","netIncome","transactionCount"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["consolidated-profit-and-loss"]},"totalRevenue":{"type":"string"},"ordinaryIncome":{"type":"string"},"capitalGains":{"type":"string"},"totalExpensesAndLosses":{"type":"string"},"ordinaryExpense":{"type":"string"},"capitalLosses":{"type":"string"},"netIncome":{"type":"string"},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reportType","totalRevenue","ordinaryIncome","capitalGains","totalExpensesAndLosses","ordinaryExpense","capitalLosses","netIncome","transactionCount"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["balance-sheet"]},"totalAssets":{"type":"string"},"totalLiabilities":{"type":"string"},"totalEquity":{"type":"string"},"netWorth":{"type":"string"}},"required":["reportType","totalAssets","totalLiabilities","totalEquity","netWorth"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["consolidated-balance-sheet"]},"totalAssets":{"type":"string"},"totalLiabilities":{"type":"string"},"totalEquity":{"type":"string"},"netWorth":{"type":"string"}},"required":["reportType","totalAssets","totalLiabilities","totalEquity","netWorth"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["income-expense"]},"totalIncome":{"type":"string"},"totalExpense":{"type":"string"},"netIncome":{"type":"string"},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reportType","totalIncome","totalExpense","netIncome","transactionCount"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["gains-losses"]},"totalProceeds":{"type":"string"},"totalCostBasis":{"type":"string"},"totalGainOrLoss":{"type":"string"},"percentGainOrLoss":{"nullable":true,"description":"totalGainOrLoss ÷ totalCostBasis × 100; null when the total cost basis is zero or negative, since a return percentage requires a positive basis","type":"string"},"tradeCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reportType","totalProceeds","totalCostBasis","totalGainOrLoss","percentGainOrLoss","tradeCount"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["trial-balance"]},"totalDebits":{"type":"string"},"totalCredits":{"type":"string"},"difference":{"type":"string"},"isBalanced":{"type":"boolean"},"accountCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"subTotals":{"type":"object","additionalProperties":{"type":"object","properties":{"debit":{"type":"string"},"credit":{"type":"string"}},"required":["debit","credit"],"additionalProperties":false}}},"required":["reportType","totalDebits","totalCredits","difference","isBalanced","accountCount","subTotals"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["daily-summary"]}},"required":["reportType"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["statement"]}},"required":["reportType"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["transactions"]}},"required":["reportType"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["journal-entries"]}},"required":["reportType"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["cost-basis-ledger"]}},"required":["reportType"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["payment-requests"]}},"required":["reportType"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["portfolio-conversion-workbook-template"]}},"required":["reportType"],"additionalProperties":false}],"description":"Report totals/summary data","type":"object"}},"required":["type","totals"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["full"],"description":"Result type indicator"},"totals":{"oneOf":[{"type":"object","properties":{"reportType":{"type":"string","enum":["profit-and-loss"]},"totalRevenue":{"type":"string"},"ordinaryIncome":{"type":"string"},"capitalGains":{"type":"string"},"totalExpensesAndLosses":{"type":"string"},"ordinaryExpense":{"type":"string"},"capitalLosses":{"type":"string"},"netIncome":{"type":"string"},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reportType","totalRevenue","ordinaryIncome","capitalGains","totalExpensesAndLosses","ordinaryExpense","capitalLosses","netIncome","transactionCount"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["consolidated-profit-and-loss"]},"totalRevenue":{"type":"string"},"ordinaryIncome":{"type":"string"},"capitalGains":{"type":"string"},"totalExpensesAndLosses":{"type":"string"},"ordinaryExpense":{"type":"string"},"capitalLosses":{"type":"string"},"netIncome":{"type":"string"},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reportType","totalRevenue","ordinaryIncome","capitalGains","totalExpensesAndLosses","ordinaryExpense","capitalLosses","netIncome","transactionCount"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["balance-sheet"]},"totalAssets":{"type":"string"},"totalLiabilities":{"type":"string"},"totalEquity":{"type":"string"},"netWorth":{"type":"string"}},"required":["reportType","totalAssets","totalLiabilities","totalEquity","netWorth"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["consolidated-balance-sheet"]},"totalAssets":{"type":"string"},"totalLiabilities":{"type":"string"},"totalEquity":{"type":"string"},"netWorth":{"type":"string"}},"required":["reportType","totalAssets","totalLiabilities","totalEquity","netWorth"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["income-expense"]},"totalIncome":{"type":"string"},"totalExpense":{"type":"string"},"netIncome":{"type":"string"},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reportType","totalIncome","totalExpense","netIncome","transactionCount"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["gains-losses"]},"totalProceeds":{"type":"string"},"totalCostBasis":{"type":"string"},"totalGainOrLoss":{"type":"string"},"percentGainOrLoss":{"nullable":true,"description":"totalGainOrLoss ÷ totalCostBasis × 100; null when the total cost basis is zero or negative, since a return percentage requires a positive basis","type":"string"},"tradeCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reportType","totalProceeds","totalCostBasis","totalGainOrLoss","percentGainOrLoss","tradeCount"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["trial-balance"]},"totalDebits":{"type":"string"},"totalCredits":{"type":"string"},"difference":{"type":"string"},"isBalanced":{"type":"boolean"},"accountCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"subTotals":{"type":"object","additionalProperties":{"type":"object","properties":{"debit":{"type":"string"},"credit":{"type":"string"}},"required":["debit","credit"],"additionalProperties":false}}},"required":["reportType","totalDebits","totalCredits","difference","isBalanced","accountCount","subTotals"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["daily-summary"]}},"required":["reportType"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["statement"]}},"required":["reportType"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["transactions"]}},"required":["reportType"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["journal-entries"]}},"required":["reportType"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["cost-basis-ledger"]}},"required":["reportType"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["payment-requests"]}},"required":["reportType"],"additionalProperties":false},{"type":"object","properties":{"reportType":{"type":"string","enum":["portfolio-conversion-workbook-template"]}},"required":["reportType"],"additionalProperties":false}],"description":"Report totals/summary data","type":"object"},"downloadUrl":{"description":"Short-lived URL to download this file. Present only when the caller is the same user who requested the report; absent for other viewers, unsupported formats, or non-completed jobs. Expires after 15 minutes.","type":"string","format":"uri"}},"required":["type","totals"],"additionalProperties":false},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"rows":{"$ref":"#/components/schemas/TransactionsJsonReportDto"},"totals":{"type":"object","properties":{"reportType":{"type":"string","enum":["transactions"]}},"required":["reportType"],"additionalProperties":false},"totalsOnly":{"type":"boolean"}},"required":["type","rows","totals"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"rows":{"$ref":"#/components/schemas/JournalEntriesJsonReportDto"},"totals":{"type":"object","properties":{"reportType":{"type":"string","enum":["journal-entries"]}},"required":["reportType"],"additionalProperties":false},"totalsOnly":{"type":"boolean"}},"required":["type","rows","totals"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"rows":{"$ref":"#/components/schemas/GainsLossesJsonReportDto"},"totals":{"type":"object","properties":{"reportType":{"type":"string","enum":["gains-losses"]},"totalProceeds":{"type":"string"},"totalCostBasis":{"type":"string"},"totalGainOrLoss":{"type":"string"},"percentGainOrLoss":{"nullable":true,"description":"totalGainOrLoss ÷ totalCostBasis × 100; null when the total cost basis is zero or negative, since a return percentage requires a positive basis","type":"string"},"tradeCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reportType","totalProceeds","totalCostBasis","totalGainOrLoss","percentGainOrLoss","tradeCount"],"additionalProperties":false},"totalsOnly":{"type":"boolean"}},"required":["type","rows","totals"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"rows":{"$ref":"#/components/schemas/CostBasisLedgerJsonReportDto"},"totals":{"type":"object","properties":{"reportType":{"type":"string","enum":["cost-basis-ledger"]}},"required":["reportType"],"additionalProperties":false},"totalsOnly":{"type":"boolean"}},"required":["type","rows","totals"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"rows":{"$ref":"#/components/schemas/IncomeExpenseJsonReportDto"},"totals":{"type":"object","properties":{"reportType":{"type":"string","enum":["income-expense"]},"totalIncome":{"type":"string"},"totalExpense":{"type":"string"},"netIncome":{"type":"string"},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reportType","totalIncome","totalExpense","netIncome","transactionCount"],"additionalProperties":false},"totalsOnly":{"type":"boolean"}},"required":["type","rows","totals"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"rows":{"$ref":"#/components/schemas/ProfitAndLossJsonReportDto"},"totals":{"type":"object","properties":{"reportType":{"type":"string","enum":["profit-and-loss"]},"totalRevenue":{"type":"string"},"ordinaryIncome":{"type":"string"},"capitalGains":{"type":"string"},"totalExpensesAndLosses":{"type":"string"},"ordinaryExpense":{"type":"string"},"capitalLosses":{"type":"string"},"netIncome":{"type":"string"},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reportType","totalRevenue","ordinaryIncome","capitalGains","totalExpensesAndLosses","ordinaryExpense","capitalLosses","netIncome","transactionCount"],"additionalProperties":false},"totalsOnly":{"type":"boolean"}},"required":["type","rows","totals"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"rows":{"$ref":"#/components/schemas/StatementJsonReportDto"},"totals":{"type":"object","properties":{"reportType":{"type":"string","enum":["statement"]}},"required":["reportType"],"additionalProperties":false},"totalsOnly":{"type":"boolean"}},"required":["type","rows","totals"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"rows":{"$ref":"#/components/schemas/BalanceSheetJsonReportDto"},"totals":{"type":"object","properties":{"reportType":{"type":"string","enum":["balance-sheet"]},"totalAssets":{"type":"string"},"totalLiabilities":{"type":"string"},"totalEquity":{"type":"string"},"netWorth":{"type":"string"}},"required":["reportType","totalAssets","totalLiabilities","totalEquity","netWorth"],"additionalProperties":false},"totalsOnly":{"type":"boolean"}},"required":["type","rows","totals"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"rows":{"$ref":"#/components/schemas/TrialBalanceJsonReportDto"},"totals":{"type":"object","properties":{"reportType":{"type":"string","enum":["trial-balance"]},"totalDebits":{"type":"string"},"totalCredits":{"type":"string"},"difference":{"type":"string"},"isBalanced":{"type":"boolean"},"accountCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"subTotals":{"type":"object","additionalProperties":{"type":"object","properties":{"debit":{"type":"string"},"credit":{"type":"string"}},"required":["debit","credit"],"additionalProperties":false}}},"required":["reportType","totalDebits","totalCredits","difference","isBalanced","accountCount","subTotals"],"additionalProperties":false},"totalsOnly":{"type":"boolean"}},"required":["type","rows","totals"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"rows":{"$ref":"#/components/schemas/PaymentRequestsJsonReportDto"},"totals":{"type":"object","properties":{"reportType":{"type":"string","enum":["payment-requests"]}},"required":["reportType"],"additionalProperties":false},"totalsOnly":{"type":"boolean"}},"required":["type","rows","totals"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"rows":{"$ref":"#/components/schemas/DailySummaryJsonReportDto"},"totals":{"type":"object","properties":{"reportType":{"type":"string","enum":["daily-summary"]}},"required":["reportType"],"additionalProperties":false},"totalsOnly":{"type":"boolean"}},"required":["type","rows","totals"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"rows":{"$ref":"#/components/schemas/ConsolidatedProfitAndLossJsonReportDto"},"totals":{"type":"object","properties":{"reportType":{"type":"string","enum":["consolidated-profit-and-loss"]},"totalRevenue":{"type":"string"},"ordinaryIncome":{"type":"string"},"capitalGains":{"type":"string"},"totalExpensesAndLosses":{"type":"string"},"ordinaryExpense":{"type":"string"},"capitalLosses":{"type":"string"},"netIncome":{"type":"string"},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reportType","totalRevenue","ordinaryIncome","capitalGains","totalExpensesAndLosses","ordinaryExpense","capitalLosses","netIncome","transactionCount"],"additionalProperties":false},"totalsOnly":{"type":"boolean"}},"required":["type","rows","totals"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json"]},"rows":{"$ref":"#/components/schemas/ConsolidatedBalanceSheetJsonReportDto"},"totals":{"type":"object","properties":{"reportType":{"type":"string","enum":["consolidated-balance-sheet"]},"totalAssets":{"type":"string"},"totalLiabilities":{"type":"string"},"totalEquity":{"type":"string"},"netWorth":{"type":"string"}},"required":["reportType","totalAssets","totalLiabilities","totalEquity","netWorth"],"additionalProperties":false},"totalsOnly":{"type":"boolean"}},"required":["type","rows","totals"],"additionalProperties":false}]}]},"error":{"description":"Error details if failed","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Error code (e.g., VALIDATION_ERROR)"},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details","type":"object","additionalProperties":{}},"requestId":{"type":"string","description":"Unique request identifier"}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"createdAt":{"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":"Job creation timestamp"},"completedAt":{"description":"Completion timestamp","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))$"}},"required":["jobId","status","progressPercent","createdAt"],"additionalProperties":false},"TransactionsJsonReportDto":{"type":"object","properties":{"transactions":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string"},"walletName":{"type":"string"},"timestamp":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"transferType":{"type":"string","enum":["IN","OUT","GAS","SELF"]},"walletAddress":{"type":"string"},"from":{"type":"string"},"fromLabel":{"type":"string"},"fromCounterpartyName":{"type":"string"},"fromCounterpartyExternalId":{"type":"string"},"to":{"type":"string"},"toLabel":{"type":"string"},"toCounterpartyName":{"type":"string"},"toCounterpartyExternalId":{"type":"string"},"symbol":{"type":"string"},"amount":{"type":"number"},"balance":{"type":"number"},"tokenAddress":{"type":"string"},"assetId":{"type":"string"},"transactionHash":{"type":"string"},"memo":{"type":"string"},"tags":{"type":"string"},"marketValue":{"nullable":true,"type":"number"},"costBasis":{"nullable":true,"type":"number"},"portfolioTransactionId":{"nullable":true,"type":"string"},"operationType":{"nullable":true,"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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",null]},"subType":{"nullable":true,"type":"string"},"account":{"type":"string"},"responsibilityCenterCells":{"type":"object","additionalProperties":{"type":"string"}},"attachedFileLinks":{"type":"string"}},"required":["chainId","walletName","timestamp","transferType","walletAddress","from","fromLabel","fromCounterpartyName","fromCounterpartyExternalId","to","toLabel","toCounterpartyName","toCounterpartyExternalId","symbol","amount","balance","tokenAddress","assetId","transactionHash","memo","tags","marketValue","costBasis","portfolioTransactionId","operationType","subType","account","responsibilityCenterCells","attachedFileLinks"],"additionalProperties":false}},"fiatCurrencies":{"type":"array","items":{"type":"string"}},"responsibilityCenterColumns":{"type":"array","items":{"type":"object","properties":{"header":{"type":"string"},"key":{"type":"string"}},"required":["header","key"],"additionalProperties":false}}},"required":["transactions","fiatCurrencies","responsibilityCenterColumns"],"additionalProperties":false},"JournalEntriesJsonReportDto":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"memo":{"nullable":true,"type":"string"},"systemNotes":{"nullable":true,"type":"string"},"isAdjustment":{"type":"boolean"},"status":{"type":"string"},"portfolioTransactionId":{"nullable":true,"type":"string"},"createdAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"accountId":{"type":"string"},"originalAccountId":{"nullable":true,"type":"string"},"entryType":{"type":"string","enum":["DR","CR"]},"fiatAmount":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"lotEntryId":{"nullable":true,"type":"string"},"assetId":{"nullable":true,"type":"string"},"assetAmount":{"nullable":true,"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"memo":{"nullable":true,"type":"string"},"counterpartyId":{"nullable":true,"type":"string"},"walletTransactionId":{"nullable":true,"type":"string"},"txIndex":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"periodCloseId":{"nullable":true,"type":"string"},"attribution":{"type":"object","properties":{"c":{"nullable":true,"type":"object","properties":{"s":{"type":"string"},"r":{"nullable":true,"type":"string"},"v":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["s"],"additionalProperties":false},"a":{"nullable":true,"type":"object","properties":{"s":{"type":"string"},"r":{"nullable":true,"type":"string"},"v":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["s"],"additionalProperties":false},"m":{"nullable":true,"type":"object","properties":{"s":{"type":"string"},"r":{"nullable":true,"type":"string"},"v":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["s"],"additionalProperties":false},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string"},"r":{"nullable":true,"type":"string"},"v":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false},"createdAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"updatedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"account":{"type":"object","properties":{"name":{"type":"string"},"accountNumber":{"type":"string"},"fiatCurrency":{"type":"object","properties":{"id":{"type":"string"},"symbol":{"type":"string"}},"required":["id","symbol"],"additionalProperties":false}},"required":["name","accountNumber","fiatCurrency"],"additionalProperties":false},"asset":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"symbol":{"type":"string"}},"required":["id","symbol"],"additionalProperties":false},"costBasisLot":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"}},"required":["id","entryId"],"additionalProperties":false}},"required":["lineNumber","accountId","originalAccountId","entryType","fiatAmount","lotEntryId","assetId","assetAmount","memo","counterpartyId","walletTransactionId","txIndex","periodCloseId","attribution","createdAt","updatedAt","account","asset","costBasisLot"],"additionalProperties":false}},"portfolioTransaction":{"nullable":true,"type":"object","properties":{"id":{"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"subType":{"nullable":true,"type":"string"}},"required":["id","operationType","subType"],"additionalProperties":false},"portfolio":{"type":"object","properties":{"slug":{"type":"string"}},"required":["slug"],"additionalProperties":false}},"required":["id","timestamp","memo","systemNotes","isAdjustment","status","portfolioTransactionId","createdAt","updatedAt","lines","portfolioTransaction","portfolio"],"additionalProperties":false}},"GainsLossesJsonReportDto":{"type":"object","properties":{"portfolio":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"reportingTimezone":{"type":"string"},"accountingConfiguration":{"type":"object","properties":{"gasFeeAccountingTreatment":{"type":"string","enum":["DISPOSAL_AND_COST_BASIS","EXPENSE_ONLY"]},"isPurchaseTaxable":{"type":"boolean"},"costBasisLotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"baseCurrency":{"type":"string"},"jurisdictionCode":{"type":"string"},"stablecoinTreatment":{"type":"string","enum":["BASE","ASSET"]},"costBasisPerWallet":{"type":"boolean"},"defiDepositTreatment":{"type":"string","enum":["TAXABLE_EXCHANGE","NON_TAXABLE_RESERVATION"]},"separateIncomeExpenseLines":{"type":"boolean"},"financialReportingFramework":{"nullable":true,"type":"string","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",null]}},"required":["gasFeeAccountingTreatment","isPurchaseTaxable","costBasisLotMethod","baseCurrency","jurisdictionCode","stablecoinTreatment","costBasisPerWallet","defiDepositTreatment","separateIncomeExpenseLines"],"additionalProperties":false},"fiscalPeriodStart":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["slug","name","currency","reportingTimezone","accountingConfiguration","fiscalPeriodStart"],"additionalProperties":false},"startDate":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"endDate":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reports":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string"},"disposalDate":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"acquisitionDate":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"disposalAmount":{"type":"number"},"costBasis":{"type":"number"},"proceeds":{"type":"number"},"gainOrLoss":{"type":"number"}},"required":["symbol","disposalDate","acquisitionDate","disposalAmount","costBasis","proceeds","gainOrLoss"],"additionalProperties":false}},"summary":{"type":"object","properties":{"totalGainsLosses":{"type":"number"},"totalTrades":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string"}},"required":["totalGainsLosses","totalTrades","currency"],"additionalProperties":false},"treatmentNote":{"nullable":true,"type":"string"}},"required":["portfolio","reports","summary","treatmentNote"],"additionalProperties":false},"CostBasisLedgerJsonReportDto":{"type":"array","items":{"type":"object","properties":{"assetId":{"type":"string"},"id":{"type":"string"},"entryId":{"type":"string"},"timestamp":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"acquisitionTimestamp":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"diff":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"price":{"nullable":true,"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"value":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"lotMethod":{"type":"string"},"entryKind":{"type":"string","enum":["ADD","DSP","CUT","RES","REL","MVE"]},"positionId":{"nullable":true,"type":"string"},"portfolioTransactionId":{"type":"string"},"periodCloseId":{"nullable":true,"type":"string"},"asset":{"type":"object","properties":{"id":{"type":"string"},"symbol":{"type":"string"}},"required":["id","symbol"],"additionalProperties":false},"wallet":{"type":"object","properties":{"chainId":{"type":"string"},"address":{"type":"string"},"name":{"type":"string"},"chain":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["chainId","address","name","chain"],"additionalProperties":false},"portfolioTransaction":{"type":"object","properties":{"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"subType":{"nullable":true,"type":"string"}},"required":["operationType","subType"],"additionalProperties":false},"portfolio":{"type":"object","properties":{"slug":{"type":"string"},"currency":{"type":"string"}},"required":["slug","currency"],"additionalProperties":false}},"required":["assetId","id","entryId","timestamp","acquisitionTimestamp","diff","price","value","lotMethod","entryKind","positionId","portfolioTransactionId","periodCloseId","asset","wallet","portfolioTransaction","portfolio"],"additionalProperties":false}},"IncomeExpenseJsonReportDto":{"type":"object","properties":{"portfolio":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"reportingTimezone":{"type":"string"},"accountingConfiguration":{"type":"object","properties":{"gasFeeAccountingTreatment":{"type":"string","enum":["DISPOSAL_AND_COST_BASIS","EXPENSE_ONLY"]},"isPurchaseTaxable":{"type":"boolean"},"costBasisLotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"baseCurrency":{"type":"string"},"jurisdictionCode":{"type":"string"},"stablecoinTreatment":{"type":"string","enum":["BASE","ASSET"]},"costBasisPerWallet":{"type":"boolean"},"defiDepositTreatment":{"type":"string","enum":["TAXABLE_EXCHANGE","NON_TAXABLE_RESERVATION"]},"separateIncomeExpenseLines":{"type":"boolean"},"financialReportingFramework":{"nullable":true,"type":"string","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",null]}},"required":["gasFeeAccountingTreatment","isPurchaseTaxable","costBasisLotMethod","baseCurrency","jurisdictionCode","stablecoinTreatment","costBasisPerWallet","defiDepositTreatment","separateIncomeExpenseLines"],"additionalProperties":false},"fiscalPeriodStart":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["slug","name","currency","reportingTimezone","accountingConfiguration","fiscalPeriodStart"],"additionalProperties":false},"startDate":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"endDate":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reports":{"type":"array","items":{"type":"object","properties":{"date":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"accountType":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]},"accountSubType":{"type":"string"},"accountName":{"type":"string"},"fromCounterpartyName":{"type":"string"},"fromCounterpartyExternalId":{"type":"string"},"toCounterpartyName":{"type":"string"},"toCounterpartyExternalId":{"type":"string"},"operationType":{"anyOf":[{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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","enum":["N/A"]}]},"assetAmount":{"nullable":true,"type":"number"},"amount":{"type":"number"},"memo":{"nullable":true,"type":"string"},"responsibilityCenterCells":{"type":"object","additionalProperties":{"type":"string"}}},"required":["date","accountType","accountSubType","accountName","fromCounterpartyName","fromCounterpartyExternalId","toCounterpartyName","toCounterpartyExternalId","operationType","assetAmount","amount","memo","responsibilityCenterCells"],"additionalProperties":false}},"responsibilityCenterColumns":{"type":"array","items":{"type":"object","properties":{"header":{"type":"string"},"key":{"type":"string"}},"required":["header","key"],"additionalProperties":false}},"summary":{"type":"object","properties":{"totalIncome":{"type":"number"},"totalExpense":{"type":"number"},"netIncome":{"type":"number"},"incomeBySubType":{"type":"object","additionalProperties":{"type":"number"}},"expenseBySubType":{"type":"object","additionalProperties":{"type":"number"}},"currency":{"type":"string"}},"required":["totalIncome","totalExpense","netIncome","incomeBySubType","expenseBySubType","currency"],"additionalProperties":false}},"required":["portfolio","reports","responsibilityCenterColumns","summary"],"additionalProperties":false},"ProfitAndLossJsonReportDto":{"type":"object","properties":{"reportType":{"type":"string","enum":["profit-and-loss"]},"portfolio":{"type":"object","properties":{"name":{"type":"string"},"currency":{"type":"string"},"timezone":{"type":"string"}},"required":["name","currency","timezone"],"additionalProperties":false},"period":{"type":"object","properties":{"from":{"nullable":true,"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"to":{"nullable":true,"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["from","to"],"additionalProperties":false},"totals":{"type":"object","properties":{"totalRevenue":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"totalExpensesAndLosses":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"netIncome":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["totalRevenue","totalExpensesAndLosses","netIncome","transactionCount"],"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["REVENUE","EXPENSES"]},"total":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"items":{"type":"array","items":{"$ref":"#/components/schemas/ProfitAndLossStatementNodeDto"}}},"required":["type","total","items"],"additionalProperties":false}}},"required":["reportType","portfolio","period","totals"],"additionalProperties":false},"ProfitAndLossStatementNodeDto":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"accountNumber":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"children":{"type":"array","items":{"$ref":"#/components/schemas/ProfitAndLossStatementNodeDto"}}},"required":["id","label","accountNumber","amount"],"additionalProperties":false},"StatementJsonReportDto":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["single"]},"data":{"type":"object","properties":{"portfolioName":{"type":"string"},"locale":{"type":"string"},"timezone":{"type":"string"},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},"walletInfo":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string"},"chain":{"type":"string"}},"required":["name","address","chain"],"additionalProperties":false},"coin":{"type":"string"},"summary":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"value":{"type":"number"},"currency":{"type":"string"},"type":{"type":"string","enum":["fiat","crypto","number"]}},"required":["text","value","currency","type"],"additionalProperties":false}},"dailyTransactions":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"net":{"type":"number"},"symbol":{"type":"string"},"countIn":{"type":"integer","minimum":0,"maximum":9007199254740991},"amountIn":{"type":"number"},"countOut":{"type":"integer","minimum":0,"maximum":9007199254740991},"amountOut":{"type":"number"},"amountCost":{"type":"number"},"balance":{"type":"number"}},"required":["date","net","symbol","countIn","amountIn","countOut","amountOut","amountCost","balance"],"additionalProperties":false}},"transactionDetails":{"type":"array","items":{"type":"object","properties":{"time":{"type":"string"},"description":{"type":"string"},"amount":{"type":"number"},"fee":{"type":"number"},"usdAmount":{"type":"number"},"balance":{"type":"number"}},"required":["time","description","amount","balance"],"additionalProperties":false}}},"required":["portfolioName","locale","timezone","dateRange","walletInfo","coin","summary","dailyTransactions","transactionDetails"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["multi"]},"data":{"type":"object","properties":{"portfolioName":{"type":"string"},"locale":{"type":"string"},"timezone":{"type":"string"},"dateRange":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"additionalProperties":false},"walletInfo":{"type":"object","properties":{"name":{"type":"string"},"address":{"type":"string"},"chain":{"type":"string"}},"required":["name","address","chain"],"additionalProperties":false},"currency":{"type":"string"},"coins":{"type":"array","items":{"type":"object","properties":{"coin":{"type":"string"},"summary":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"value":{"type":"number"},"currency":{"type":"string"},"type":{"type":"string","enum":["fiat","crypto","number"]}},"required":["text","value","currency","type"],"additionalProperties":false}},"dailyTransactions":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"net":{"type":"number"},"symbol":{"type":"string"},"countIn":{"type":"integer","minimum":0,"maximum":9007199254740991},"amountIn":{"type":"number"},"countOut":{"type":"integer","minimum":0,"maximum":9007199254740991},"amountOut":{"type":"number"},"amountCost":{"type":"number"},"balance":{"type":"number"}},"required":["date","net","symbol","countIn","amountIn","countOut","amountOut","amountCost","balance"],"additionalProperties":false}}},"required":["coin","summary","dailyTransactions"],"additionalProperties":false}}},"required":["portfolioName","locale","timezone","dateRange","walletInfo","currency","coins"],"additionalProperties":false}},"required":["type","data"],"additionalProperties":false}],"type":"object"},"BalanceSheetJsonReportDto":{"type":"object","properties":{"reportType":{"type":"string","enum":["balance-sheet"]},"portfolio":{"type":"object","properties":{"name":{"type":"string"},"currency":{"type":"string"},"timezone":{"type":"string"}},"required":["name","currency","timezone"],"additionalProperties":false},"asOfDate":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"generatedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"valuationMethod":{"type":"string","enum":["cost","market","both"]},"grouping":{"type":"string","enum":["summary","grouped","detailed"]},"totals":{"type":"object","properties":{"assets":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"liabilities":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"equity":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"}},"required":["assets","liabilities","equity"],"additionalProperties":false},"identity":{"type":"object","properties":{"assets":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"liabilitiesAndEquity":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"difference":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"holds":{"type":"boolean"}},"required":["assets","liabilitiesAndEquity","difference","holds"],"additionalProperties":false},"sections":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["ASSETS","LIABILITIES","EQUITY"]},"totalCost":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"totalMarket":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"totalUnrealized":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"items":{"type":"array","items":{"$ref":"#/components/schemas/BalanceSheetStatementLineDto"}}},"required":["type","totalCost","totalMarket","totalUnrealized","items"],"additionalProperties":false}}},"required":["reportType","portfolio","asOfDate","generatedAt","valuationMethod","grouping","totals","identity"],"additionalProperties":false},"BalanceSheetStatementLineDto":{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"},"accountNumber":{"type":"string"},"costBasis":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"marketValue":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"unrealizedGL":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"quantity":{"type":"string"},"wallet":{"type":"string"},"location":{"type":"string"},"level":{"type":"integer","minimum":0,"maximum":9007199254740991},"children":{"type":"array","items":{"$ref":"#/components/schemas/BalanceSheetStatementLineDto"}},"isSubtotal":{"type":"boolean"},"isBold":{"type":"boolean"}},"required":["id","label","costBasis","level"],"additionalProperties":false},"TrialBalanceJsonReportDto":{"type":"object","properties":{"portfolio":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"currency":{"type":"string"},"reportingTimezone":{"type":"string"},"accountingConfiguration":{"type":"object","properties":{"gasFeeAccountingTreatment":{"type":"string","enum":["DISPOSAL_AND_COST_BASIS","EXPENSE_ONLY"]},"isPurchaseTaxable":{"type":"boolean"},"costBasisLotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"baseCurrency":{"type":"string"},"jurisdictionCode":{"type":"string"},"stablecoinTreatment":{"type":"string","enum":["BASE","ASSET"]},"costBasisPerWallet":{"type":"boolean"},"defiDepositTreatment":{"type":"string","enum":["TAXABLE_EXCHANGE","NON_TAXABLE_RESERVATION"]},"separateIncomeExpenseLines":{"type":"boolean"},"financialReportingFramework":{"nullable":true,"type":"string","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",null]}},"required":["gasFeeAccountingTreatment","isPurchaseTaxable","costBasisLotMethod","baseCurrency","jurisdictionCode","stablecoinTreatment","costBasisPerWallet","defiDepositTreatment","separateIncomeExpenseLines"],"additionalProperties":false},"fiscalPeriodStart":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["slug","name","currency","reportingTimezone","accountingConfiguration","fiscalPeriodStart"],"additionalProperties":false},"asOfDate":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"reportType":{"type":"string","enum":["unadjusted","adjusted"]},"rows":{"type":"array","items":{"type":"object","properties":{"accountNumber":{"type":"string"},"accountName":{"type":"string"},"accountType":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]},"accountSubType":{"type":"string"},"debit":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"credit":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"}},"required":["accountNumber","accountName","accountType","accountSubType","debit","credit"],"additionalProperties":false}},"subtotals":{"type":"array","items":{"type":"object","properties":{"accountType":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]},"debit":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"credit":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"accountCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["accountType","debit","credit","accountCount"],"additionalProperties":false}},"totalDebits":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"totalCredits":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"difference":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"isBalanced":{"type":"boolean"}},"required":["portfolio","asOfDate","reportType","rows","subtotals","totalDebits","totalCredits","difference","isBalanced"],"additionalProperties":false},"PaymentRequestsJsonReportDto":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"requestNumber":{"type":"string"},"status":{"type":"string"},"requestedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"submittedAt":{"nullable":true,"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"convertedAt":{"nullable":true,"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"paymentType":{"type":"string","enum":["CRYPTO","FIAT"]},"amount":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"tokenSymbol":{"type":"string"},"tokenAddress":{"type":"string"},"chain":{"type":"string"},"counterparty":{"type":"string"},"counterpartyExternalId":{"type":"string"},"recipientAddress":{"type":"string"},"paymentMethodType":{"type":"string"},"bankName":{"type":"string"},"accountLast4":{"type":"string"},"ledgerAccount":{"type":"string"},"responsibilityCenterCells":{"type":"object","additionalProperties":{"type":"string"}},"requestorEmail":{"type":"string"},"convertedBy":{"type":"string"},"description":{"type":"string"},"fileAttachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"}},"required":["id","fileName"],"additionalProperties":false}}},"required":["id","requestNumber","status","requestedAt","submittedAt","convertedAt","paymentType","amount","tokenSymbol","tokenAddress","chain","counterparty","counterpartyExternalId","recipientAddress","paymentMethodType","bankName","accountLast4","ledgerAccount","responsibilityCenterCells","requestorEmail","convertedBy","description","fileAttachments"],"additionalProperties":false}},"responsibilityCenterColumns":{"type":"array","items":{"type":"object","properties":{"header":{"type":"string"},"key":{"type":"string"}},"required":["header","key"],"additionalProperties":false}}},"required":["rows","responsibilityCenterColumns"],"additionalProperties":false},"DailySummaryJsonReportDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"wallet":{"type":"object","properties":{"chainId":{"type":"string"},"address":{"type":"string"},"name":{"type":"string"}},"required":["chainId","address","name"],"additionalProperties":false},"token":{"type":"object","properties":{"chainId":{"type":"string"},"address":{"type":"string"},"symbol":{"type":"string"}},"required":["chainId","address","symbol"],"additionalProperties":false},"date":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"amountIn":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"amountOut":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"amountCost":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"balance":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"}},"required":["wallet","token","date","amountIn","amountOut","amountCost","balance"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"ConsolidatedProfitAndLossJsonReportDto":{"type":"object","properties":{"scope":{"type":"object","properties":{"scopeName":{"type":"string"},"reportingCurrency":{"type":"string"},"includedEntities":{"type":"array","items":{"type":"object","properties":{"entityLabel":{"type":"string"},"portfolioName":{"type":"string"},"portfolioCurrency":{"type":"string"},"entityRole":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"}},"required":["entityLabel","portfolioName","portfolioCurrency","entityRole","notes"],"additionalProperties":false}},"excludedEntities":{"type":"array","items":{"type":"object","properties":{"entityLabel":{"type":"string"},"portfolioName":{"type":"string"},"portfolioCurrency":{"type":"string"},"entityRole":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"}},"required":["entityLabel","portfolioName","portfolioCurrency","entityRole","notes"],"additionalProperties":false}}},"required":["scopeName","reportingCurrency","includedEntities","excludedEntities"],"additionalProperties":false},"statement":{"type":"object","properties":{"entityColumns":{"type":"array","items":{"type":"object","properties":{"portfolioSlug":{"type":"string"},"entityLabel":{"type":"string"},"portfolioCurrency":{"type":"string"}},"required":["portfolioSlug","entityLabel","portfolioCurrency"],"additionalProperties":false}},"rows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"rowKind":{"type":"string","enum":["group-header","account","subtotal","section-total","grand-total"]},"section":{"type":"string"},"label":{"type":"string"},"accountNumber":{"type":"string"},"level":{"type":"integer","minimum":0,"maximum":9007199254740991},"entityAmounts":{"type":"object","additionalProperties":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"}},"standaloneGroupTotal":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"eliminationAmount":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"groupTotal":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"}},"required":["key","rowKind","section","label","level","entityAmounts","standaloneGroupTotal","eliminationAmount","groupTotal"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["account-hierarchy-conflict","account-label-conflict","elimination-row-missing","intercompany-elimination-incomplete","intercompany-transfer","mixed-currency"]},"severity":{"type":"string","enum":["blocking","warning"]},"message":{"type":"string"},"entityLabels":{"type":"array","items":{"type":"string"}}},"required":["type","severity","message","entityLabels"],"additionalProperties":false}}},"required":["entityColumns","rows","warnings"],"additionalProperties":false},"eliminationSchedule":{"type":"array","items":{"type":"object","properties":{"pairId":{"type":"string"},"treatment":{"type":"string","enum":["OPERATING_FUNDING","CARRYOVER_BASIS_TRANSFER"]},"kind":{"type":"string","enum":["carryover-investment-capital","operating-funding-deferred-gain-realized","operating-funding-group-basis","operating-funding-income-expense","operating-funding-internal-gain-loss"]},"statementType":{"type":"string","enum":["balance-sheet","profit-and-loss"]},"sourcePortfolioSlug":{"type":"string"},"destinationPortfolioSlug":{"type":"string"},"rowKey":{"type":"string"},"accountNumber":{"type":"string"},"accountName":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"explanation":{"type":"string"}},"required":["pairId","treatment","kind","statementType","sourcePortfolioSlug","destinationPortfolioSlug","rowKey","accountName","amount","explanation"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["account-hierarchy-conflict","account-label-conflict","elimination-row-missing","intercompany-elimination-incomplete","intercompany-transfer","mixed-currency"]},"severity":{"type":"string","enum":["blocking","warning"]},"message":{"type":"string"},"entityLabels":{"type":"array","items":{"type":"string"}}},"required":["type","severity","message","entityLabels"],"additionalProperties":false}},"summary":{"type":"object","properties":{"totalRevenue":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"ordinaryIncome":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"capitalGains":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"totalExpensesAndLosses":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"ordinaryExpense":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"capitalLosses":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"netIncome":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["totalRevenue","ordinaryIncome","capitalGains","totalExpensesAndLosses","ordinaryExpense","capitalLosses","netIncome","transactionCount"],"additionalProperties":false}},"required":["scope","statement","eliminationSchedule","warnings","summary"],"additionalProperties":false},"ConsolidatedBalanceSheetJsonReportDto":{"type":"object","properties":{"scope":{"type":"object","properties":{"scopeName":{"type":"string"},"reportingCurrency":{"type":"string"},"includedEntities":{"type":"array","items":{"type":"object","properties":{"entityLabel":{"type":"string"},"portfolioName":{"type":"string"},"portfolioCurrency":{"type":"string"},"entityRole":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"}},"required":["entityLabel","portfolioName","portfolioCurrency","entityRole","notes"],"additionalProperties":false}},"excludedEntities":{"type":"array","items":{"type":"object","properties":{"entityLabel":{"type":"string"},"portfolioName":{"type":"string"},"portfolioCurrency":{"type":"string"},"entityRole":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"}},"required":["entityLabel","portfolioName","portfolioCurrency","entityRole","notes"],"additionalProperties":false}}},"required":["scopeName","reportingCurrency","includedEntities","excludedEntities"],"additionalProperties":false},"statement":{"type":"object","properties":{"entityColumns":{"type":"array","items":{"type":"object","properties":{"portfolioSlug":{"type":"string"},"entityLabel":{"type":"string"},"portfolioCurrency":{"type":"string"}},"required":["portfolioSlug","entityLabel","portfolioCurrency"],"additionalProperties":false}},"rows":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"rowKind":{"type":"string","enum":["group-header","account","subtotal","section-total","grand-total"]},"section":{"type":"string"},"label":{"type":"string"},"accountNumber":{"type":"string"},"level":{"type":"integer","minimum":0,"maximum":9007199254740991},"entityAmounts":{"type":"object","additionalProperties":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"}},"standaloneGroupTotal":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"eliminationAmount":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"groupTotal":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"}},"required":["key","rowKind","section","label","level","entityAmounts","standaloneGroupTotal","eliminationAmount","groupTotal"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["account-hierarchy-conflict","account-label-conflict","elimination-row-missing","intercompany-elimination-incomplete","intercompany-transfer","mixed-currency"]},"severity":{"type":"string","enum":["blocking","warning"]},"message":{"type":"string"},"entityLabels":{"type":"array","items":{"type":"string"}}},"required":["type","severity","message","entityLabels"],"additionalProperties":false}}},"required":["entityColumns","rows","warnings"],"additionalProperties":false},"eliminationSchedule":{"type":"array","items":{"type":"object","properties":{"pairId":{"type":"string"},"treatment":{"type":"string","enum":["OPERATING_FUNDING","CARRYOVER_BASIS_TRANSFER"]},"kind":{"type":"string","enum":["carryover-investment-capital","operating-funding-deferred-gain-realized","operating-funding-group-basis","operating-funding-income-expense","operating-funding-internal-gain-loss"]},"statementType":{"type":"string","enum":["balance-sheet","profit-and-loss"]},"sourcePortfolioSlug":{"type":"string"},"destinationPortfolioSlug":{"type":"string"},"rowKey":{"type":"string"},"accountNumber":{"type":"string"},"accountName":{"type":"string"},"amount":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"explanation":{"type":"string"}},"required":["pairId","treatment","kind","statementType","sourcePortfolioSlug","destinationPortfolioSlug","rowKey","accountName","amount","explanation"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["account-hierarchy-conflict","account-label-conflict","elimination-row-missing","intercompany-elimination-incomplete","intercompany-transfer","mixed-currency"]},"severity":{"type":"string","enum":["blocking","warning"]},"message":{"type":"string"},"entityLabels":{"type":"array","items":{"type":"string"}}},"required":["type","severity","message","entityLabels"],"additionalProperties":false}},"summary":{"type":"object","properties":{"totalAssets":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"totalLiabilities":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"totalEquity":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"},"netWorth":{"type":"string","pattern":"^-?\\d+(?:\\.\\d+)?$"}},"required":["totalAssets","totalLiabilities","totalEquity","netWorth"],"additionalProperties":false}},"required":["scope","statement","eliminationSchedule","warnings","summary"],"additionalProperties":false},"PreviewTransactionClassificationRequestDto":{"type":"object","properties":{"operations":{"minItems":1,"type":"array","items":{"type":"object","properties":{"portfolioTransactionId":{"type":"string","minLength":1,"description":"Accounting transaction the movement currently belongs to."},"walletTransactionId":{"type":"string","minLength":1,"description":"Source transaction the wallet movement belongs to, from a walletOperation in a read tool result."},"txIndex":{"type":"integer","minimum":0,"maximum":2147483647,"description":"Position of the movement within that source transaction, from the same walletOperation."}},"required":["portfolioTransactionId","walletTransactionId","txIndex"],"additionalProperties":false}}},"required":["operations"],"additionalProperties":false,"description":"Selected wallet operations for a read-only native classification preview that may return zero or more proposals"},"PreviewTransactionClassificationResponseDto":{"type":"object","properties":{"transactions":{"type":"array","items":{"type":"object","properties":{"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"],"description":"Classified accounting operation type"},"subType":{"nullable":true,"type":"string"},"systemNotes":{"nullable":true,"type":"string"},"timestamp":{"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":"Proposed transaction timestamp (ISO 8601)"},"operations":{"minItems":1,"type":"array","items":{"type":"object","properties":{"portfolioTransactionId":{"type":"string","minLength":1,"description":"Accounting transaction the movement currently belongs to."},"walletTransactionId":{"type":"string","minLength":1,"description":"Source transaction the wallet movement belongs to, from a walletOperation in a read tool result."},"txIndex":{"type":"integer","minimum":0,"maximum":2147483647,"description":"Position of the movement within that source transaction, from the same walletOperation."}},"required":["portfolioTransactionId","walletTransactionId","txIndex"],"additionalProperties":false}}},"required":["operationType","subType","systemNotes","timestamp","operations"],"additionalProperties":false},"description":"Zero or more proposed transactions in classifier order"}},"required":["transactions"],"additionalProperties":false,"description":"Read-only classification preview containing zero or more proposed transactions in classifier order"},"IntercompanyMovePairPreviewRequestDto":{"type":"object","properties":{"txId":{"type":"string","minLength":1},"currentSide":{"type":"string","enum":["SEND","RECEIVE"]},"counterpartPortfolioId":{"type":"integer","minimum":1,"maximum":9007199254740991},"counterpartPortfolioTransactionId":{"type":"string","minLength":1},"treatment":{"type":"string","enum":["OPERATING_FUNDING","CARRYOVER_BASIS_TRANSFER"]}},"required":["txId","currentSide","counterpartPortfolioId","counterpartPortfolioTransactionId","treatment"],"additionalProperties":false},"IntercompanyMovePairPreviewResponseDto":{"type":"object","properties":{"result":{"type":"object","properties":{"pairId":{"type":"string"},"treatment":{"type":"string","enum":["OPERATING_FUNDING","CARRYOVER_BASIS_TRANSFER"]},"source":{"type":"object","properties":{"portfolioId":{"type":"integer","minimum":1,"maximum":9007199254740991},"portfolioTransactionId":{"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"journalLineCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lotLedgerEntryCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["portfolioId","portfolioTransactionId","operationType","status","journalLineCount","lotLedgerEntryCount"],"additionalProperties":false},"destination":{"type":"object","properties":{"portfolioId":{"type":"integer","minimum":1,"maximum":9007199254740991},"portfolioTransactionId":{"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"journalLineCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"lotLedgerEntryCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["portfolioId","portfolioTransactionId","operationType","status","journalLineCount","lotLedgerEntryCount"],"additionalProperties":false},"lotLinkCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"warnings":{"type":"array","items":{"type":"string"}},"blockers":{"type":"array","items":{"type":"string"}}},"required":["pairId","treatment","source","destination","lotLinkCount","warnings","blockers"],"additionalProperties":false}},"required":["result"],"additionalProperties":false},"IntercompanyBulkPairPreviewRequestDto":{"type":"object","properties":{"limit":{"default":25,"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false},"IntercompanyBulkPairPreviewResponseDto":{"type":"object","properties":{"result":{"type":"object","properties":{"pairs":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string","minLength":1},"currentSide":{"type":"string","enum":["SEND","RECEIVE"]},"counterpartPortfolioSlug":{"type":"string","pattern":"^[a-z0-9-]+$","description":"Workspace-scoped counterpart portfolio slug"},"counterpartPortfolioTransactionId":{"type":"string","minLength":1},"treatment":{"type":"string","enum":["CARRYOVER_BASIS_TRANSFER"]},"evidence":{"type":"string","enum":["SAME_TX_HASH","ASSET_AMOUNT_TIME"]},"source":{"type":"object","properties":{"portfolioSlug":{"type":"string","pattern":"^[a-z0-9-]+$","description":"Workspace-scoped portfolio slug"},"portfolioName":{"type":"string","minLength":1},"portfolioTransactionId":{"type":"string","minLength":1},"timestamp":{"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))$"},"assetSummary":{"type":"string","minLength":1},"amount":{"type":"string","minLength":1},"currentOperationType":{"type":"string","enum":["EXPENSE"]},"proposedOperationType":{"type":"string","enum":["INTERCOMPANY_SEND"]}},"required":["portfolioSlug","portfolioName","portfolioTransactionId","timestamp","assetSummary","amount","currentOperationType","proposedOperationType"],"additionalProperties":false},"destination":{"type":"object","properties":{"portfolioSlug":{"type":"string","pattern":"^[a-z0-9-]+$","description":"Workspace-scoped portfolio slug"},"portfolioName":{"type":"string","minLength":1},"portfolioTransactionId":{"type":"string","minLength":1},"timestamp":{"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))$"},"assetSummary":{"type":"string","minLength":1},"amount":{"type":"string","minLength":1},"currentOperationType":{"type":"string","enum":["INCOME"]},"proposedOperationType":{"type":"string","enum":["INTERCOMPANY_RECEIVE"]}},"required":["portfolioSlug","portfolioName","portfolioTransactionId","timestamp","assetSummary","amount","currentOperationType","proposedOperationType"],"additionalProperties":false}},"required":["txId","currentSide","counterpartPortfolioSlug","counterpartPortfolioTransactionId","treatment","evidence","source","destination"],"additionalProperties":false}},"discovery":{"type":"object","properties":{"scannedRows":{"type":"integer","minimum":0,"maximum":9007199254740991},"maxScannedRows":{"type":"integer","minimum":1,"maximum":9007199254740991},"scanCompleted":{"type":"boolean"}},"required":["scannedRows","maxScannedRows","scanCompleted"],"additionalProperties":false}},"required":["pairs","discovery"],"additionalProperties":false}},"required":["result"],"additionalProperties":false},"AdjustmentJournalImportPreviewRequestDto":{"type":"object","properties":{"contentBase64":{"type":"string","minLength":1,"description":"CSV or XLSX source file content as base64-encoded bytes (max 5 MiB)."},"fileName":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^/\\\\]+\\.(?:csv|xlsx)$","description":"Original CSV or XLSX source filename."}},"required":["contentBase64","fileName"],"additionalProperties":false},"AdjustmentJournalImportPreviewResponseDto":{"type":"object","properties":{"baseCurrency":{"type":"string","minLength":1},"candidates":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"accountNumber":{"type":"string","minLength":1},"kind":{"type":"string","enum":["account"]},"name":{"type":"string","minLength":1}},"required":["accountNumber","kind","name"],"additionalProperties":false},{"type":"object","properties":{"externalId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["counterparty"]},"name":{"type":"string","minLength":1}},"required":["kind","name"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["responsibilityCenter"]},"name":{"type":"string","minLength":1},"typeKey":{"type":"string","minLength":1},"typeName":{"type":"string","minLength":1}},"required":["kind","name","typeKey","typeName"],"additionalProperties":false}],"type":"object"}},"entries":{"type":"array","items":{"type":"object","properties":{"effectiveAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"effectiveDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"entryId":{"type":"string","minLength":1},"lines":{"minItems":2,"type":"array","items":{"oneOf":[{"type":"object","properties":{"accountNumber":{"type":"string","minLength":1},"amount":{"type":"string","pattern":"^(?:[1-9]\\d*|[1-9]\\d*\\.\\d*[1-9]|0\\.\\d*[1-9])$"},"counterparty":{"oneOf":[{"type":"object","properties":{"externalId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["external-id"]},"name":{"type":"string","minLength":1}},"required":["externalId","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["name"]},"name":{"type":"string","minLength":1}},"required":["kind","name"],"additionalProperties":false}],"type":"object"},"effectiveAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"effectiveDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"entryId":{"type":"string","minLength":1},"locator":{"oneOf":[{"type":"object","properties":{"format":{"type":"string","enum":["csv"],"description":"Source file format."},"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based line number in the CSV file."}},"required":["format","lineNumber"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"string","enum":["xlsx"],"description":"Source file format."},"rowNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based row number within the sheet."},"sheetName":{"type":"string","minLength":1,"description":"Worksheet the row belongs to."}},"required":["format","rowNumber","sheetName"],"additionalProperties":false}],"type":"object"},"memo":{"type":"string","minLength":1},"responsibilityCenters":{"type":"array","items":{"type":"object","properties":{"dimensionKey":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["dimensionKey","value"],"additionalProperties":false}},"schemaVersion":{"type":"number","enum":[2]},"sourceRowHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"direction":{"type":"string","enum":["DEBIT"]}},"required":["accountNumber","amount","effectiveAt","effectiveDate","entryId","locator","responsibilityCenters","schemaVersion","sourceRowHash","direction"],"additionalProperties":false},{"type":"object","properties":{"accountNumber":{"type":"string","minLength":1},"amount":{"type":"string","pattern":"^(?:[1-9]\\d*|[1-9]\\d*\\.\\d*[1-9]|0\\.\\d*[1-9])$"},"counterparty":{"oneOf":[{"type":"object","properties":{"externalId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["external-id"]},"name":{"type":"string","minLength":1}},"required":["externalId","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["name"]},"name":{"type":"string","minLength":1}},"required":["kind","name"],"additionalProperties":false}],"type":"object"},"effectiveAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"effectiveDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"entryId":{"type":"string","minLength":1},"locator":{"oneOf":[{"type":"object","properties":{"format":{"type":"string","enum":["csv"],"description":"Source file format."},"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based line number in the CSV file."}},"required":["format","lineNumber"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"string","enum":["xlsx"],"description":"Source file format."},"rowNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based row number within the sheet."},"sheetName":{"type":"string","minLength":1,"description":"Worksheet the row belongs to."}},"required":["format","rowNumber","sheetName"],"additionalProperties":false}],"type":"object"},"memo":{"type":"string","minLength":1},"responsibilityCenters":{"type":"array","items":{"type":"object","properties":{"dimensionKey":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["dimensionKey","value"],"additionalProperties":false}},"schemaVersion":{"type":"number","enum":[2]},"sourceRowHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"direction":{"type":"string","enum":["CREDIT"]}},"required":["accountNumber","amount","effectiveAt","effectiveDate","entryId","locator","responsibilityCenters","schemaVersion","sourceRowHash","direction"],"additionalProperties":false}],"type":"object"}},"memo":{"type":"string","minLength":1}},"required":["effectiveAt","effectiveDate","entryId","lines"],"additionalProperties":false}},"errors":{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"object","properties":{"code":{"type":"string","enum":["ADJUSTMENT_JOURNAL_SOURCE_LAYOUT_INVALID","ADJUSTMENT_JOURNAL_SOURCE_UNREADABLE"]}},"required":["code"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","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"]},"column":{"type":"string","minLength":1},"entryId":{"type":"string","minLength":1},"locator":{"$ref":"#/components/schemas/AjLocator"}},"required":["code","locator"],"additionalProperties":false}]},{"type":"object","properties":{"accountNumber":{"type":"string","minLength":1},"code":{"type":"string","enum":["ADJUSTMENT_JOURNAL_ACCOUNT_NOT_FOUND_OR_INELIGIBLE","ADJUSTMENT_JOURNAL_ACCOUNT_AMBIGUOUS","ADJUSTMENT_JOURNAL_ACCOUNT_BASE_CURRENCY_REQUIRED"]},"kind":{"type":"string","enum":["account"]},"locator":{"$ref":"#/components/schemas/AjLocator"}},"required":["accountNumber","code","kind","locator"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["ADJUSTMENT_JOURNAL_COUNTERPARTY_NOT_FOUND_OR_INELIGIBLE","ADJUSTMENT_JOURNAL_COUNTERPARTY_AMBIGUOUS"]},"kind":{"type":"string","enum":["counterparty"]},"locator":{"$ref":"#/components/schemas/AjLocator"},"reference":{"oneOf":[{"type":"object","properties":{"externalId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["external-id"]},"name":{"type":"string","minLength":1}},"required":["externalId","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["name"]},"name":{"type":"string","minLength":1}},"required":["kind","name"],"additionalProperties":false}],"type":"object"}},"required":["code","kind","locator","reference"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["ADJUSTMENT_JOURNAL_RESPONSIBILITY_CENTER_NOT_FOUND_OR_INELIGIBLE","ADJUSTMENT_JOURNAL_RESPONSIBILITY_CENTER_AMBIGUOUS"]},"kind":{"type":"string","enum":["responsibilityCenter"]},"locator":{"$ref":"#/components/schemas/AjLocator"},"name":{"type":"string","minLength":1},"typeKey":{"type":"string","minLength":1}},"required":["code","kind","locator","name","typeKey"],"additionalProperties":false}]}},"normalizedRows":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"accountNumber":{"type":"string","minLength":1},"amount":{"type":"string","pattern":"^(?:[1-9]\\d*|[1-9]\\d*\\.\\d*[1-9]|0\\.\\d*[1-9])$"},"counterparty":{"oneOf":[{"type":"object","properties":{"externalId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["external-id"]},"name":{"type":"string","minLength":1}},"required":["externalId","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["name"]},"name":{"type":"string","minLength":1}},"required":["kind","name"],"additionalProperties":false}],"type":"object"},"effectiveAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"effectiveDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"entryId":{"type":"string","minLength":1},"locator":{"oneOf":[{"type":"object","properties":{"format":{"type":"string","enum":["csv"],"description":"Source file format."},"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based line number in the CSV file."}},"required":["format","lineNumber"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"string","enum":["xlsx"],"description":"Source file format."},"rowNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based row number within the sheet."},"sheetName":{"type":"string","minLength":1,"description":"Worksheet the row belongs to."}},"required":["format","rowNumber","sheetName"],"additionalProperties":false}],"type":"object"},"memo":{"type":"string","minLength":1},"responsibilityCenters":{"type":"array","items":{"type":"object","properties":{"dimensionKey":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["dimensionKey","value"],"additionalProperties":false}},"schemaVersion":{"type":"number","enum":[2]},"sourceRowHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"direction":{"type":"string","enum":["DEBIT"]}},"required":["accountNumber","amount","effectiveAt","effectiveDate","entryId","locator","responsibilityCenters","schemaVersion","sourceRowHash","direction"],"additionalProperties":false},{"type":"object","properties":{"accountNumber":{"type":"string","minLength":1},"amount":{"type":"string","pattern":"^(?:[1-9]\\d*|[1-9]\\d*\\.\\d*[1-9]|0\\.\\d*[1-9])$"},"counterparty":{"oneOf":[{"type":"object","properties":{"externalId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["external-id"]},"name":{"type":"string","minLength":1}},"required":["externalId","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["name"]},"name":{"type":"string","minLength":1}},"required":["kind","name"],"additionalProperties":false}],"type":"object"},"effectiveAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"},"effectiveDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"entryId":{"type":"string","minLength":1},"locator":{"oneOf":[{"type":"object","properties":{"format":{"type":"string","enum":["csv"],"description":"Source file format."},"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based line number in the CSV file."}},"required":["format","lineNumber"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"string","enum":["xlsx"],"description":"Source file format."},"rowNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based row number within the sheet."},"sheetName":{"type":"string","minLength":1,"description":"Worksheet the row belongs to."}},"required":["format","rowNumber","sheetName"],"additionalProperties":false}],"type":"object"},"memo":{"type":"string","minLength":1},"responsibilityCenters":{"type":"array","items":{"type":"object","properties":{"dimensionKey":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["dimensionKey","value"],"additionalProperties":false}},"schemaVersion":{"type":"number","enum":[2]},"sourceRowHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"direction":{"type":"string","enum":["CREDIT"]}},"required":["accountNumber","amount","effectiveAt","effectiveDate","entryId","locator","responsibilityCenters","schemaVersion","sourceRowHash","direction"],"additionalProperties":false}],"type":"object"}},"previewHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"referenceSnapshot":{"type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"accountNumber":{"type":"string","minLength":1}},"required":["accountNumber"],"additionalProperties":false}},"counterparties":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"externalId":{"type":"string","minLength":1},"kind":{"type":"string","enum":["external-id"]},"name":{"type":"string","minLength":1}},"required":["externalId","kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["name"]},"name":{"type":"string","minLength":1}},"required":["kind","name"],"additionalProperties":false}],"type":"object"}},"responsibilityCenters":{"type":"array","items":{"type":"object","properties":{"dimensionKey":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["dimensionKey","name"],"additionalProperties":false}}},"required":["accounts","counterparties","responsibilityCenters"],"additionalProperties":false},"totals":{"type":"object","properties":{"entryCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"rowCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalCredit":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Precise signed decimal value encoded as a string."},"totalDebit":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Precise signed decimal value encoded as a string."}},"required":["entryCount","rowCount","totalCredit","totalDebit"],"additionalProperties":false}},"required":["baseCurrency","candidates","entries","errors","normalizedRows","previewHash","referenceSnapshot","totals"],"additionalProperties":false},"AjLocator":{"oneOf":[{"type":"object","properties":{"format":{"type":"string","enum":["csv"],"description":"Source file format."},"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based line number in the CSV file."}},"required":["format","lineNumber"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"string","enum":["xlsx"],"description":"Source file format."},"rowNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based row number within the sheet."},"sheetName":{"type":"string","minLength":1,"description":"Worksheet the row belongs to."}},"required":["format","rowNumber","sheetName"],"additionalProperties":false}],"type":"object"},"AdjustmentJournalImportCreateRequestDto":{"type":"object","properties":{"contentBase64":{"type":"string","minLength":1,"description":"CSV or XLSX source file content as base64-encoded bytes (max 5 MiB)."},"fileName":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^/\\\\]+\\.(?:csv|xlsx)$","description":"Original CSV or XLSX source filename."},"previewHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"resolutions":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"accountNumber":{"type":"string","minLength":1,"description":"Ledger account to use for that row, from list_journal_line_assignment_options (type: ledger_account)."},"kind":{"type":"string","enum":["account"],"description":"Kind of reference this row fixes."},"locator":{"oneOf":[{"type":"object","properties":{"format":{"type":"string","enum":["csv"],"description":"Source file format."},"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based line number in the CSV file."}},"required":["format","lineNumber"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"string","enum":["xlsx"],"description":"Source file format."},"rowNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based row number within the sheet."},"sheetName":{"type":"string","minLength":1,"description":"Worksheet the row belongs to."}},"required":["format","rowNumber","sheetName"],"additionalProperties":false}],"type":"object"}},"required":["accountNumber","kind","locator"],"additionalProperties":false},{"type":"object","properties":{"externalId":{"type":"string","minLength":1,"description":"Counterparty's external identifier, as recorded on the counterparty."},"kind":{"type":"string","enum":["counterparty"],"description":"Kind of reference this row fixes."},"locator":{"oneOf":[{"type":"object","properties":{"format":{"type":"string","enum":["csv"],"description":"Source file format."},"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based line number in the CSV file."}},"required":["format","lineNumber"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"string","enum":["xlsx"],"description":"Source file format."},"rowNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based row number within the sheet."},"sheetName":{"type":"string","minLength":1,"description":"Worksheet the row belongs to."}},"required":["format","rowNumber","sheetName"],"additionalProperties":false}],"type":"object"}},"required":["externalId","kind","locator"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["counterparty"],"description":"Kind of reference this row fixes."},"locator":{"oneOf":[{"type":"object","properties":{"format":{"type":"string","enum":["csv"],"description":"Source file format."},"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based line number in the CSV file."}},"required":["format","lineNumber"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"string","enum":["xlsx"],"description":"Source file format."},"rowNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based row number within the sheet."},"sheetName":{"type":"string","minLength":1,"description":"Worksheet the row belongs to."}},"required":["format","rowNumber","sheetName"],"additionalProperties":false}],"type":"object"},"name":{"type":"string","minLength":1,"description":"Counterparty name to use for that row, from list_journal_line_assignment_options (type: counterparty)."}},"required":["kind","locator","name"],"additionalProperties":false},{"type":"object","properties":{"centerName":{"type":"string","minLength":1,"description":"Responsibility center to use for that row, from list_journal_line_assignment_options (type: responsibility_center)."},"kind":{"type":"string","enum":["responsibilityCenter"],"description":"Kind of reference this row fixes."},"locator":{"oneOf":[{"type":"object","properties":{"format":{"type":"string","enum":["csv"],"description":"Source file format."},"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based line number in the CSV file."}},"required":["format","lineNumber"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"string","enum":["xlsx"],"description":"Source file format."},"rowNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based row number within the sheet."},"sheetName":{"type":"string","minLength":1,"description":"Worksheet the row belongs to."}},"required":["format","rowNumber","sheetName"],"additionalProperties":false}],"type":"object"},"typeKey":{"type":"string","minLength":1,"description":"Responsibility center type the name belongs to, such as costCenter."}},"required":["centerName","kind","locator","typeKey"],"additionalProperties":false}]}}},"required":["contentBase64","fileName","previewHash","resolutions"],"additionalProperties":false},"AdjustmentJournalImportCreateResponseDto":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"portfolioTransactionId":{"type":"string","minLength":1}},"required":["entryId","portfolioTransactionId"],"additionalProperties":false}},"importRef":{"type":"string","minLength":1,"maxLength":128,"pattern":"^adjustment-journal-import-[a-z0-9-]+$","x-pattern-flags":"iu"}},"required":["entries","importRef"],"additionalProperties":false},"AdjustmentJournalImportHistoryListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"createdAt":{"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))$"},"entryCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"importRef":{"type":"string","minLength":1,"maxLength":128,"pattern":"^adjustment-journal-import-[a-z0-9-]+$","x-pattern-flags":"iu"},"sourceFileName":{"type":"string","minLength":1},"sourceRowCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"uploader":{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false}},"required":["createdAt","entryCount","importRef","sourceFileName","sourceRowCount","uploader"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"AdjustmentJournalImportProvenanceBatchRequestDto":{"type":"object","properties":{"portfolioTransactionIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1}}},"required":["portfolioTransactionIds"],"additionalProperties":false},"AdjustmentJournalImportProvenanceBatchResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"portfolioTransactionId":{"type":"string","minLength":1},"provenance":{"type":"object","properties":{"importRef":{"type":"string","minLength":1,"maxLength":128,"pattern":"^adjustment-journal-import-[a-z0-9-]+$","x-pattern-flags":"iu"},"sourceFile":{"type":"object","properties":{"name":{"type":"string","minLength":1},"uploadedAt":{"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))$"},"uploader":{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false}},"required":["name","uploadedAt","uploader"],"additionalProperties":false},"sourceRows":{"minItems":1,"type":"array","items":{"type":"object","properties":{"appliedResolutions":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"values":{"type":"object","additionalProperties":{"type":"string","minLength":1}}},"required":["schemaVersion","values"],"additionalProperties":false},"entryId":{"type":"string","minLength":1},"journalLineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991},"locator":{"oneOf":[{"type":"object","properties":{"format":{"type":"string","enum":["csv"],"description":"Source file format."},"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based line number in the CSV file."}},"required":["format","lineNumber"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"string","enum":["xlsx"],"description":"Source file format."},"rowNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based row number within the sheet."},"sheetName":{"type":"string","minLength":1,"description":"Worksheet the row belongs to."}},"required":["format","rowNumber","sheetName"],"additionalProperties":false}],"type":"object"},"normalizedValues":{"anyOf":[{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"values":{"type":"object","additionalProperties":{"nullable":true,"type":"string"}}},"required":["schemaVersion","values"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[2]},"values":{"type":"object","additionalProperties":{"nullable":true,"type":"string"}}},"required":["schemaVersion","values"],"additionalProperties":false}]},"sourceRowHash":{"type":"string","minLength":1}},"required":["appliedResolutions","entryId","journalLineNumber","locator","normalizedValues","sourceRowHash"],"additionalProperties":false}}},"required":["importRef","sourceFile","sourceRows"],"additionalProperties":false}},"required":["portfolioTransactionId","provenance"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false},"AdjustmentJournalImportDetailDto":{"type":"object","properties":{"createdAt":{"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))$"},"entryCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"importRef":{"type":"string","minLength":1,"maxLength":128,"pattern":"^adjustment-journal-import-[a-z0-9-]+$","x-pattern-flags":"iu"},"sourceFileName":{"type":"string","minLength":1},"sourceRowCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"uploader":{"type":"object","properties":{"name":{"type":"string","minLength":1}},"required":["name"],"additionalProperties":false},"baseCurrency":{"type":"string","enum":["USD","EUR","AED","AUD","BRL","GBP","CAD","SGD","CHF","INR","IDR","JPY","KRW","MXN","PHP","THB","CNY","HKD","NZD"]},"entries":{"type":"array","items":{"type":"object","properties":{"entryId":{"type":"string","minLength":1},"portfolioTransactionId":{"type":"string","minLength":1},"state":{"oneOf":[{"type":"object","properties":{"effectiveAt":{"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))$"},"journalStatus":{"nullable":true,"type":"string","enum":["POSTED","DRAFT","CLOSED",null]},"kind":{"type":"string","enum":["current"]},"memo":{"nullable":true,"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]}},"required":["effectiveAt","journalStatus","kind","memo","operationType","status"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["deleted"]}},"required":["kind"],"additionalProperties":false}],"type":"object"}},"required":["entryId","portfolioTransactionId","state"],"additionalProperties":false}}},"required":["createdAt","entryCount","importRef","sourceFileName","sourceRowCount","uploader","baseCurrency","entries"],"additionalProperties":false},"AdjustmentJournalImportRowsListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"appliedResolutions":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"values":{"type":"object","additionalProperties":{"type":"string","minLength":1}}},"required":["schemaVersion","values"],"additionalProperties":false},"entryId":{"type":"string","minLength":1},"journalLineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991},"locator":{"oneOf":[{"type":"object","properties":{"format":{"type":"string","enum":["csv"],"description":"Source file format."},"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based line number in the CSV file."}},"required":["format","lineNumber"],"additionalProperties":false},{"type":"object","properties":{"format":{"type":"string","enum":["xlsx"],"description":"Source file format."},"rowNumber":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"1-based row number within the sheet."},"sheetName":{"type":"string","minLength":1,"description":"Worksheet the row belongs to."}},"required":["format","rowNumber","sheetName"],"additionalProperties":false}],"type":"object"},"normalizedValues":{"anyOf":[{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"values":{"type":"object","additionalProperties":{"nullable":true,"type":"string"}}},"required":["schemaVersion","values"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[2]},"values":{"type":"object","additionalProperties":{"nullable":true,"type":"string"}}},"required":["schemaVersion","values"],"additionalProperties":false}]},"sourceRowHash":{"type":"string","minLength":1},"resultingPortfolioTransactionId":{"type":"string","minLength":1},"transactionState":{"oneOf":[{"type":"object","properties":{"effectiveAt":{"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))$"},"journalStatus":{"nullable":true,"type":"string","enum":["POSTED","DRAFT","CLOSED",null]},"kind":{"type":"string","enum":["current"]},"memo":{"nullable":true,"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]}},"required":["effectiveAt","journalStatus","kind","memo","operationType","status"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["deleted"]}},"required":["kind"],"additionalProperties":false}],"type":"object"}},"required":["appliedResolutions","entryId","journalLineNumber","locator","normalizedValues","sourceRowHash","resultingPortfolioTransactionId","transactionState"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"PreviewAccountingRulesRequestDto":{"type":"object","properties":{"detail":{"type":"string","enum":["compact","transactions"]},"mutation":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["current"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["create"]},"name":{"type":"string","minLength":1,"description":"Human-readable rule name, shown in the rules list."},"enabled":{"default":true,"description":"Whether the rule evaluates. A disabled rule is kept but never fires.","type":"boolean"},"conditions":{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"all":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fromAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fromAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["direction"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","notEquals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["IN","OUT","GAS"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["asset"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["assetClass"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["stablecoin"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"boolean","description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["chain"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["operationType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountSubType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["between"],"description":"Comparison operator."},"value":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}]},"minItems":2,"maxItems":2,"description":"Inclusive [low, high] decimal-string range."}},"required":["field","operator","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"field":{"type":"string","enum":["entryType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["DR","CR"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["lt"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["gte"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["between"],"description":"Within the inclusive [start, end] range."},"value":{"type":"array","items":{"anyOf":[{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]},"minItems":2,"maxItems":2,"description":"Inclusive [start, end] timestamps, earliest first; each has three fractional digits and a known offset or Z, never -00:00."}},"required":["field","operator","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"field":{"type":"string","enum":["wallet"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","minLength":1,"description":"Chain ID"},"address":{"type":"string","minLength":1,"description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"field":{"type":"string","enum":["accountNumber"],"description":"Which part of the transaction this condition tests."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."},"description":"The value the field is compared against."}},"required":["operator","field","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["counterparty"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"description":"Counterparty name, from list_journal_line_assignment_options (type: counterparty)."},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false}],"type":"object"},"description":"Conditions that must all match for the rule to fire. At least one is required."}},"required":["formatVersion","all"],"additionalProperties":false},"action":{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"actions":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["SET_COUNTERPARTY"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"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)."}},"required":["type","target","counterpartyName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_LEDGER_ACCOUNT"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"accountNumber":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."}},"required":["type","target","accountNumber"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_RESPONSIBILITY_CENTERS"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"responsibilityCenterAssignments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."},"responsibilityCenterName":{"type":"string","minLength":1,"description":"Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center)."}},"required":["responsibilityCenterTypeKey","responsibilityCenterName"],"additionalProperties":false}}},"required":["type","target","responsibilityCenterAssignments"],"additionalProperties":false}],"type":"object"},"description":"What the rule changes when it matches. At most one action of each type."}},"required":["formatVersion","actions"],"additionalProperties":false}},"required":["type","name","conditions","action"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["update"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"enabled":{"type":"boolean"},"name":{"type":"string","minLength":1,"description":"Human-readable rule name, shown in the rules list."},"conditions":{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"all":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fromAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fromAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["direction"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","notEquals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["IN","OUT","GAS"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["asset"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["assetClass"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["stablecoin"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"boolean","description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["chain"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["operationType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountSubType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["between"],"description":"Comparison operator."},"value":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}]},"minItems":2,"maxItems":2,"description":"Inclusive [low, high] decimal-string range."}},"required":["field","operator","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"field":{"type":"string","enum":["entryType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["DR","CR"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["lt"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["gte"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["between"],"description":"Within the inclusive [start, end] range."},"value":{"type":"array","items":{"anyOf":[{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]},"minItems":2,"maxItems":2,"description":"Inclusive [start, end] timestamps, earliest first; each has three fractional digits and a known offset or Z, never -00:00."}},"required":["field","operator","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"field":{"type":"string","enum":["wallet"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","minLength":1,"description":"Chain ID"},"address":{"type":"string","minLength":1,"description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"field":{"type":"string","enum":["accountNumber"],"description":"Which part of the transaction this condition tests."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."},"description":"The value the field is compared against."}},"required":["operator","field","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["counterparty"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"description":"Counterparty name, from list_journal_line_assignment_options (type: counterparty)."},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false}],"type":"object"},"description":"Conditions that must all match for the rule to fire. At least one is required."}},"required":["formatVersion","all"],"additionalProperties":false},"action":{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"actions":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["SET_COUNTERPARTY"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"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)."}},"required":["type","target","counterpartyName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_LEDGER_ACCOUNT"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"accountNumber":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."}},"required":["type","target","accountNumber"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_RESPONSIBILITY_CENTERS"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"responsibilityCenterAssignments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."},"responsibilityCenterName":{"type":"string","minLength":1,"description":"Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center)."}},"required":["responsibilityCenterTypeKey","responsibilityCenterName"],"additionalProperties":false}}},"required":["type","target","responsibilityCenterAssignments"],"additionalProperties":false}],"type":"object"},"description":"What the rule changes when it matches. At most one action of each type."}},"required":["formatVersion","actions"],"additionalProperties":false}},"required":["type","ruleId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["set_enabled"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"enabled":{"type":"boolean"}},"required":["type","ruleId","enabled"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reorder"]},"orderedRuleIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"description":"Every rule handle in the portfolio, in the order they should evaluate. Rules apply in order, so earlier rules win."}},"required":["type","orderedRuleIds"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["delete"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."}},"required":["type","ruleId"],"additionalProperties":false}],"type":"object"},"maxAffected":{"default":50,"type":"integer","minimum":1,"maximum":100},"budgetMs":{"type":"integer","minimum":1,"maximum":60000},"maxScanned":{"type":"integer","minimum":1,"maximum":10000000}},"required":["detail","mutation"],"additionalProperties":false},"AugmentedZodDto":{"oneOf":[{"type":"object","properties":{"detail":{"type":"string","enum":["compact"]},"scannedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"affectedCount":{"type":"integer","minimum":0,"maximum":100},"firstAffectedAt":{"nullable":true,"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))$"},"lastAffectedAt":{"nullable":true,"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))$"},"truncatedBy":{"nullable":true,"type":"string","enum":["affected","budget","details","scanned",null]},"changes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"portfolioTransactionId":{"type":"string","minLength":1},"timestamp":{"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))$"},"ruleEvaluationFailures":{"description":"Rules skipped while evaluating this transaction. Earlier v1 responses may omit this field; consumers normalize an omission to an empty array.","type":"array","items":{"type":"object","properties":{"rule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"rejection":{"nullable":true,"type":"object","properties":{"code":{"type":"string","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"]},"message":{"type":"string","minLength":1}},"required":["code","message"],"additionalProperties":false}},"required":["rule","rejection"],"additionalProperties":false}},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991},"assignmentChanged":{"description":"Whether the preview changed an account, counterparty, or responsibility-center assignment on this journal line. Earlier v1 responses may omit this field; consumers normalize an omission to true.","type":"boolean"},"account":{"nullable":true,"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."},"to":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."},"byRule":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"lockedBy":{"nullable":true,"type":"string","enum":["MANUAL","MANUAL_CLEARED","PAYMENT_LINK","SYSTEM_RULE",null]}},"required":["from","to","byRule","lockedBy"],"additionalProperties":false},"counterparty":{"nullable":true,"type":"object","properties":{"from":{"nullable":true,"type":"string","minLength":1,"description":"Counterparty name, from list_journal_line_assignment_options (type: counterparty)."},"to":{"nullable":true,"type":"string","minLength":1,"description":"Counterparty name, from list_journal_line_assignment_options (type: counterparty)."},"byRule":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"lockedBy":{"nullable":true,"type":"string","enum":["MANUAL","MANUAL_CLEARED","PAYMENT_LINK","SYSTEM_RULE",null]}},"required":["from","to","byRule","lockedBy"],"additionalProperties":false},"responsibilityCenters":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."},"from":{"nullable":true,"type":"object","properties":{"responsibilityCenterName":{"type":"string","minLength":1,"description":"Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center)."},"percentageBps":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["responsibilityCenterName","percentageBps"],"additionalProperties":false},"to":{"nullable":true,"type":"object","properties":{"responsibilityCenterName":{"type":"string","minLength":1,"description":"Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center)."},"percentageBps":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["responsibilityCenterName","percentageBps"],"additionalProperties":false},"byRule":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"lockedBy":{"nullable":true,"type":"string","enum":["MANUAL","MANUAL_CLEARED","PAYMENT_LINK","SYSTEM_RULE",null]}},"required":["responsibilityCenterTypeKey","from","to","byRule","lockedBy"],"additionalProperties":false}},"matchedButLost":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["account","counterparty"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["responsibilityCenter"]},"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."}},"required":["kind","responsibilityCenterTypeKey"],"additionalProperties":false}],"type":"object"}},"required":["kind","ruleId","version","output"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["account","counterparty"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["responsibilityCenter"]},"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."}},"required":["kind","responsibilityCenterTypeKey"],"additionalProperties":false}],"type":"object"}},"required":["kind","label","version","output"],"additionalProperties":false}],"type":"object"}}},"required":["lineNumber","account","counterparty","responsibilityCenters","matchedButLost"],"additionalProperties":false}}},"required":["portfolioTransactionId","timestamp","lines"],"additionalProperties":false}},"skippedRuleEvidence":{"description":"Transactions where rules were skipped without changing any assignment. This additive collection keeps v1 changes limited to affected transactions.","maxItems":2000,"type":"array","items":{"type":"object","properties":{"portfolioTransactionId":{"type":"string","minLength":1},"timestamp":{"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))$"},"ruleEvaluationFailures":{"description":"Rules skipped while evaluating this transaction. Earlier v1 responses may omit this field; consumers normalize an omission to an empty array.","type":"array","items":{"type":"object","properties":{"rule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"rejection":{"nullable":true,"type":"object","properties":{"code":{"type":"string","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"]},"message":{"type":"string","minLength":1}},"required":["code","message"],"additionalProperties":false}},"required":["rule","rejection"],"additionalProperties":false}},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991},"assignmentChanged":{"description":"Whether the preview changed an account, counterparty, or responsibility-center assignment on this journal line. Earlier v1 responses may omit this field; consumers normalize an omission to true.","type":"boolean"},"account":{"nullable":true,"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."},"to":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."},"byRule":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"lockedBy":{"nullable":true,"type":"string","enum":["MANUAL","MANUAL_CLEARED","PAYMENT_LINK","SYSTEM_RULE",null]}},"required":["from","to","byRule","lockedBy"],"additionalProperties":false},"counterparty":{"nullable":true,"type":"object","properties":{"from":{"nullable":true,"type":"string","minLength":1,"description":"Counterparty name, from list_journal_line_assignment_options (type: counterparty)."},"to":{"nullable":true,"type":"string","minLength":1,"description":"Counterparty name, from list_journal_line_assignment_options (type: counterparty)."},"byRule":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"lockedBy":{"nullable":true,"type":"string","enum":["MANUAL","MANUAL_CLEARED","PAYMENT_LINK","SYSTEM_RULE",null]}},"required":["from","to","byRule","lockedBy"],"additionalProperties":false},"responsibilityCenters":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."},"from":{"nullable":true,"type":"object","properties":{"responsibilityCenterName":{"type":"string","minLength":1,"description":"Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center)."},"percentageBps":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["responsibilityCenterName","percentageBps"],"additionalProperties":false},"to":{"nullable":true,"type":"object","properties":{"responsibilityCenterName":{"type":"string","minLength":1,"description":"Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center)."},"percentageBps":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["responsibilityCenterName","percentageBps"],"additionalProperties":false},"byRule":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"lockedBy":{"nullable":true,"type":"string","enum":["MANUAL","MANUAL_CLEARED","PAYMENT_LINK","SYSTEM_RULE",null]}},"required":["responsibilityCenterTypeKey","from","to","byRule","lockedBy"],"additionalProperties":false}},"matchedButLost":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["account","counterparty"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["responsibilityCenter"]},"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."}},"required":["kind","responsibilityCenterTypeKey"],"additionalProperties":false}],"type":"object"}},"required":["kind","ruleId","version","output"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["account","counterparty"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["responsibilityCenter"]},"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."}},"required":["kind","responsibilityCenterTypeKey"],"additionalProperties":false}],"type":"object"}},"required":["kind","label","version","output"],"additionalProperties":false}],"type":"object"}}},"required":["lineNumber","account","counterparty","responsibilityCenters","matchedButLost"],"additionalProperties":false}}},"required":["portfolioTransactionId","timestamp","lines"],"additionalProperties":false}}},"required":["detail","scannedCount","candidateCount","affectedCount","firstAffectedAt","lastAffectedAt","truncatedBy","changes"],"additionalProperties":false},{"type":"object","properties":{"detail":{"type":"string","enum":["transactions"]},"scannedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"candidateCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"affectedCount":{"type":"integer","minimum":0,"maximum":100},"firstAffectedAt":{"nullable":true,"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))$"},"lastAffectedAt":{"nullable":true,"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))$"},"truncatedBy":{"nullable":true,"type":"string","enum":["affected","budget","details","scanned",null]},"changes":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"portfolioTransactionId":{"type":"string","minLength":1},"timestamp":{"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))$"},"ruleEvaluationFailures":{"description":"Rules skipped while evaluating this transaction. Earlier v1 responses may omit this field; consumers normalize an omission to an empty array.","type":"array","items":{"type":"object","properties":{"rule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"rejection":{"nullable":true,"type":"object","properties":{"code":{"type":"string","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"]},"message":{"type":"string","minLength":1}},"required":["code","message"],"additionalProperties":false}},"required":["rule","rejection"],"additionalProperties":false}},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991},"assignmentChanged":{"description":"Whether the preview changed an account, counterparty, or responsibility-center assignment on this journal line. Earlier v1 responses may omit this field; consumers normalize an omission to true.","type":"boolean"},"account":{"nullable":true,"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."},"to":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."},"byRule":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"lockedBy":{"nullable":true,"type":"string","enum":["MANUAL","MANUAL_CLEARED","PAYMENT_LINK","SYSTEM_RULE",null]}},"required":["from","to","byRule","lockedBy"],"additionalProperties":false},"counterparty":{"nullable":true,"type":"object","properties":{"from":{"nullable":true,"type":"string","minLength":1,"description":"Counterparty name, from list_journal_line_assignment_options (type: counterparty)."},"to":{"nullable":true,"type":"string","minLength":1,"description":"Counterparty name, from list_journal_line_assignment_options (type: counterparty)."},"byRule":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"lockedBy":{"nullable":true,"type":"string","enum":["MANUAL","MANUAL_CLEARED","PAYMENT_LINK","SYSTEM_RULE",null]}},"required":["from","to","byRule","lockedBy"],"additionalProperties":false},"responsibilityCenters":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."},"from":{"nullable":true,"type":"object","properties":{"responsibilityCenterName":{"type":"string","minLength":1,"description":"Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center)."},"percentageBps":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["responsibilityCenterName","percentageBps"],"additionalProperties":false},"to":{"nullable":true,"type":"object","properties":{"responsibilityCenterName":{"type":"string","minLength":1,"description":"Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center)."},"percentageBps":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["responsibilityCenterName","percentageBps"],"additionalProperties":false},"byRule":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"lockedBy":{"nullable":true,"type":"string","enum":["MANUAL","MANUAL_CLEARED","PAYMENT_LINK","SYSTEM_RULE",null]}},"required":["responsibilityCenterTypeKey","from","to","byRule","lockedBy"],"additionalProperties":false}},"matchedButLost":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["account","counterparty"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["responsibilityCenter"]},"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."}},"required":["kind","responsibilityCenterTypeKey"],"additionalProperties":false}],"type":"object"}},"required":["kind","ruleId","version","output"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["account","counterparty"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["responsibilityCenter"]},"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."}},"required":["kind","responsibilityCenterTypeKey"],"additionalProperties":false}],"type":"object"}},"required":["kind","label","version","output"],"additionalProperties":false}],"type":"object"}}},"required":["lineNumber","account","counterparty","responsibilityCenters","matchedButLost"],"additionalProperties":false}}},"required":["portfolioTransactionId","timestamp","lines"],"additionalProperties":false}},"skippedRuleEvidence":{"description":"Transactions where rules were skipped without changing any assignment. This additive collection keeps v1 changes limited to affected transactions.","maxItems":2000,"type":"array","items":{"type":"object","properties":{"portfolioTransactionId":{"type":"string","minLength":1},"timestamp":{"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))$"},"ruleEvaluationFailures":{"description":"Rules skipped while evaluating this transaction. Earlier v1 responses may omit this field; consumers normalize an omission to an empty array.","type":"array","items":{"type":"object","properties":{"rule":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"rejection":{"nullable":true,"type":"object","properties":{"code":{"type":"string","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"]},"message":{"type":"string","minLength":1}},"required":["code","message"],"additionalProperties":false}},"required":["rule","rejection"],"additionalProperties":false}},"lines":{"minItems":1,"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991},"assignmentChanged":{"description":"Whether the preview changed an account, counterparty, or responsibility-center assignment on this journal line. Earlier v1 responses may omit this field; consumers normalize an omission to true.","type":"boolean"},"account":{"nullable":true,"type":"object","properties":{"from":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."},"to":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."},"byRule":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"lockedBy":{"nullable":true,"type":"string","enum":["MANUAL","MANUAL_CLEARED","PAYMENT_LINK","SYSTEM_RULE",null]}},"required":["from","to","byRule","lockedBy"],"additionalProperties":false},"counterparty":{"nullable":true,"type":"object","properties":{"from":{"nullable":true,"type":"string","minLength":1,"description":"Counterparty name, from list_journal_line_assignment_options (type: counterparty)."},"to":{"nullable":true,"type":"string","minLength":1,"description":"Counterparty name, from list_journal_line_assignment_options (type: counterparty)."},"byRule":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"lockedBy":{"nullable":true,"type":"string","enum":["MANUAL","MANUAL_CLEARED","PAYMENT_LINK","SYSTEM_RULE",null]}},"required":["from","to","byRule","lockedBy"],"additionalProperties":false},"responsibilityCenters":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."},"from":{"nullable":true,"type":"object","properties":{"responsibilityCenterName":{"type":"string","minLength":1,"description":"Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center)."},"percentageBps":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["responsibilityCenterName","percentageBps"],"additionalProperties":false},"to":{"nullable":true,"type":"object","properties":{"responsibilityCenterName":{"type":"string","minLength":1,"description":"Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center)."},"percentageBps":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["responsibilityCenterName","percentageBps"],"additionalProperties":false},"byRule":{"nullable":true,"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["kind","ruleId","version"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]}},"required":["kind","label","version"],"additionalProperties":false}],"type":"object"},"lockedBy":{"nullable":true,"type":"string","enum":["MANUAL","MANUAL_CLEARED","PAYMENT_LINK","SYSTEM_RULE",null]}},"required":["responsibilityCenterTypeKey","from","to","byRule","lockedBy"],"additionalProperties":false}},"matchedButLost":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["saved"]},"ruleId":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["account","counterparty"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["responsibilityCenter"]},"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."}},"required":["kind","responsibilityCenterTypeKey"],"additionalProperties":false}],"type":"object"}},"required":["kind","ruleId","version","output"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["draft"]},"label":{"type":"string","enum":["draft"]},"version":{"type":"number","enum":[1]},"output":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["account","counterparty"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["responsibilityCenter"]},"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."}},"required":["kind","responsibilityCenterTypeKey"],"additionalProperties":false}],"type":"object"}},"required":["kind","label","version","output"],"additionalProperties":false}],"type":"object"}}},"required":["lineNumber","account","counterparty","responsibilityCenters","matchedButLost"],"additionalProperties":false}}},"required":["portfolioTransactionId","timestamp","lines"],"additionalProperties":false}},"transactionViews":{"maxItems":100,"type":"array","items":{"$ref":"#/components/schemas/PortfolioTransactionResponseDto"}},"skippedRuleEvidenceTransactionViews":{"description":"Hydrated transactions aligned one-for-one with skippedRuleEvidence.","maxItems":2000,"type":"array","items":{"$ref":"#/components/schemas/PortfolioTransactionResponseDto"}}},"required":["detail","scannedCount","candidateCount","affectedCount","firstAffectedAt","lastAffectedAt","truncatedBy","changes","transactionViews"],"additionalProperties":false}],"type":"object"},"ReorderAccountingRulesRequestDto":{"type":"object","properties":{"orderedRuleIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"description":"Saved rule handle, from list_accounting_rules."},"description":"Every rule handle in the portfolio, in the order they should evaluate. Rules apply in order, so earlier rules win."}},"required":["orderedRuleIds"],"additionalProperties":false},"CommandResultDto":{"type":"object","properties":{"mode":{"type":"string","enum":["sync","async"],"description":"Whether the command ran sync or async"},"result":{"description":"The command result, present for synchronous commands","oneOf":[{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{}},"required":["success"],"additionalProperties":false},{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"name":{"type":"string","description":"The class name of the error"},"message":{"type":"string","description":"The error message"},"body":{"anyOf":[{"type":"object","properties":{"usageType":{"type":"string"},"currentUsage":{"type":"number"},"limit":{"type":"number"}},"required":["usageType","currentUsage","limit"],"additionalProperties":false},{}],"description":"The error body, usually fields needed to reconstruct the specific error fields"}},"required":["name","message","body"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false}],"type":"object"},"jobId":{"description":"Tracking job id, present for asynchronous commands","type":"string"},"status":{"description":"Queue status, present for asynchronous commands","type":"string","enum":["queued"]}},"required":["mode"],"additionalProperties":false},"CreateAccountingRuleRequestDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Human-readable rule name, shown in the rules list."},"enabled":{"default":true,"description":"Whether the rule evaluates. A disabled rule is kept but never fires.","type":"boolean"},"conditions":{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"all":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fromAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fromAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["direction"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","notEquals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["IN","OUT","GAS"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["asset"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["assetClass"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["stablecoin"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"boolean","description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["chain"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["operationType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountSubType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["between"],"description":"Comparison operator."},"value":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}]},"minItems":2,"maxItems":2,"description":"Inclusive [low, high] decimal-string range."}},"required":["field","operator","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"field":{"type":"string","enum":["entryType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["DR","CR"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["lt"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["gte"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["between"],"description":"Within the inclusive [start, end] range."},"value":{"type":"array","items":{"anyOf":[{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]},"minItems":2,"maxItems":2,"description":"Inclusive [start, end] timestamps, earliest first; each has three fractional digits and a known offset or Z, never -00:00."}},"required":["field","operator","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"field":{"type":"string","enum":["wallet"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","minLength":1,"description":"Chain ID"},"address":{"type":"string","minLength":1,"description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"field":{"type":"string","enum":["accountNumber"],"description":"Which part of the transaction this condition tests."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."},"description":"The value the field is compared against."}},"required":["operator","field","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["counterparty"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"description":"Counterparty name, from list_journal_line_assignment_options (type: counterparty)."},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false}],"type":"object"},"description":"Conditions that must all match for the rule to fire. At least one is required."}},"required":["formatVersion","all"],"additionalProperties":false},"action":{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"actions":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["SET_COUNTERPARTY"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"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)."}},"required":["type","target","counterpartyName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_LEDGER_ACCOUNT"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"accountNumber":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."}},"required":["type","target","accountNumber"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_RESPONSIBILITY_CENTERS"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"responsibilityCenterAssignments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."},"responsibilityCenterName":{"type":"string","minLength":1,"description":"Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center)."}},"required":["responsibilityCenterTypeKey","responsibilityCenterName"],"additionalProperties":false}}},"required":["type","target","responsibilityCenterAssignments"],"additionalProperties":false}],"type":"object"},"description":"What the rule changes when it matches. At most one action of each type."}},"required":["formatVersion","actions"],"additionalProperties":false}},"required":["name","conditions","action"],"additionalProperties":false},"AccountingRulesListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"enabled":{"type":"boolean"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"conditions":{"nullable":true,"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"all":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fromAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fromAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["direction"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","notEquals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["IN","OUT","GAS"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["asset"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["assetClass"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["stablecoin"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"boolean","description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["chain"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["operationType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountSubType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["between"],"description":"Comparison operator."},"value":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}]},"minItems":2,"maxItems":2,"description":"Inclusive [low, high] decimal-string range."}},"required":["field","operator","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"field":{"type":"string","enum":["entryType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["DR","CR"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["lt"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["gte"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["between"],"description":"Within the inclusive [start, end] range."},"value":{"type":"array","items":{"anyOf":[{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]},"minItems":2,"maxItems":2,"description":"Inclusive [start, end] timestamps, earliest first; each has three fractional digits and a known offset or Z, never -00:00."}},"required":["field","operator","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"field":{"type":"string","enum":["wallet"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","minLength":1,"description":"Chain ID"},"address":{"type":"string","minLength":1,"description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"field":{"type":"string","enum":["accountNumber"],"description":"Which part of the transaction this condition tests."},"value":{"type":"array","items":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."},"description":"The value the field is compared against."}},"required":["operator","field","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["counterparty"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"type":"array","items":{"type":"string","minLength":1,"description":"Counterparty name, from list_journal_line_assignment_options (type: counterparty)."},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false}],"type":"object"},"description":"Conditions that must all match for the rule to fire. At least one is required."}},"required":["formatVersion","all"],"additionalProperties":false},"action":{"nullable":true,"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"actions":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["SET_COUNTERPARTY"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"counterpartyName":{"nullable":true,"type":"string","minLength":1,"description":"Counterparty name, from list_journal_line_assignment_options (type: counterparty)."}},"required":["type","target","counterpartyName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_LEDGER_ACCOUNT"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"accountNumber":{"nullable":true,"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."}},"required":["type","target","accountNumber"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_RESPONSIBILITY_CENTERS"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"responsibilityCenterAssignments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeKey":{"nullable":true,"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."},"responsibilityCenterName":{"nullable":true,"type":"string","minLength":1,"description":"Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center)."}},"required":["responsibilityCenterTypeKey","responsibilityCenterName"],"additionalProperties":false}}},"required":["type","target","responsibilityCenterAssignments"],"additionalProperties":false}],"type":"object"},"description":"What the rule changes when it matches. At most one action of each type."}},"required":["formatVersion","actions"],"additionalProperties":false},"hasInvalidDefinition":{"type":"boolean"},"hasUnresolvedReferences":{"type":"boolean"},"createdAt":{"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))$"},"updatedAt":{"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))$"}},"required":["id","name","enabled","version","conditions","action","hasInvalidDefinition","hasUnresolvedReferences","createdAt","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"SetAccountingRuleEnabledRequestDto":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether the rule evaluates. A disabled rule is kept but never fires."}},"required":["enabled"],"additionalProperties":false},"UpdateAccountingRuleRequestDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Human-readable rule name, shown in the rules list."},"conditions":{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"all":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fromAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fromAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["direction"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","notEquals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["IN","OUT","GAS"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["asset"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["assetClass"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["stablecoin"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"boolean","description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["chain"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["operationType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountSubType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["between"],"description":"Comparison operator."},"value":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}]},"minItems":2,"maxItems":2,"description":"Inclusive [low, high] decimal-string range."}},"required":["field","operator","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"field":{"type":"string","enum":["entryType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["DR","CR"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["lt"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["gte"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["between"],"description":"Within the inclusive [start, end] range."},"value":{"type":"array","items":{"anyOf":[{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]},"minItems":2,"maxItems":2,"description":"Inclusive [start, end] timestamps, earliest first; each has three fractional digits and a known offset or Z, never -00:00."}},"required":["field","operator","value"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"field":{"type":"string","enum":["wallet"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","minLength":1,"description":"Chain ID"},"address":{"type":"string","minLength":1,"description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"field":{"type":"string","enum":["accountNumber"],"description":"Which part of the transaction this condition tests."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."},"description":"The value the field is compared against."}},"required":["operator","field","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["counterparty"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1,"description":"Counterparty name, from list_journal_line_assignment_options (type: counterparty)."},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false}],"type":"object"},"description":"Conditions that must all match for the rule to fire. At least one is required."}},"required":["formatVersion","all"],"additionalProperties":false},"action":{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"actions":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["SET_COUNTERPARTY"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"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)."}},"required":["type","target","counterpartyName"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_LEDGER_ACCOUNT"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"accountNumber":{"type":"string","minLength":1,"maxLength":8,"description":"Chart-of-accounts number, from list_journal_line_assignment_options (type: ledger_account)."}},"required":["type","target","accountNumber"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_RESPONSIBILITY_CENTERS"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"responsibilityCenterAssignments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."},"responsibilityCenterName":{"type":"string","minLength":1,"description":"Responsibility center name, from list_journal_line_assignment_options (type: responsibility_center)."}},"required":["responsibilityCenterTypeKey","responsibilityCenterName"],"additionalProperties":false}}},"required":["type","target","responsibilityCenterAssignments"],"additionalProperties":false}],"type":"object"},"description":"What the rule changes when it matches. At most one action of each type."}},"required":["formatVersion","actions"],"additionalProperties":false}},"additionalProperties":false},"AccountsListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"accountNumber":{"type":"string","description":"Ledger account number."},"name":{"type":"string","description":"Ledger account name."},"paymentLabel":{"nullable":true,"type":"string","description":"Optional label shown in payment account selection."},"accountType":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"],"description":"Top-level account type."},"subType":{"type":"string","description":"Persisted account subtype."},"normalBalanceType":{"type":"string","enum":["DR","CR"],"description":"Debit or credit normal-balance side."},"isActive":{"type":"boolean","description":"Whether the account is currently marked active."},"origin":{"type":"string","enum":["SYSTEM_MANAGED","SYSTEM_DEFAULT","USER_MANAGED"],"description":"Which code path created this account: engine-managed, engine fallback, or user-created. A user-created value may also mean the one-time backfill migration could not disambiguate an older row."},"createdBy":{"nullable":true,"description":"Creator of a user-created account, when known. Null for system-generated accounts and for accounts created before creator tracking existed.","type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false},"hierarchy":{"type":"object","properties":{"parentAccountNumber":{"nullable":true,"type":"string","description":"Parent ledger account number, or null for a root account."},"depth":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Hierarchy depth."},"hasChildren":{"type":"boolean","description":"Whether the account has direct child accounts."},"isFilterContext":{"type":"boolean","description":"Whether the row is included only as ancestor context for a direct filter match."}},"required":["parentAccountNumber","depth","hasChildren","isFilterContext"],"additionalProperties":false},"asset":{"nullable":true,"type":"object","properties":{"assetId":{"type":"string","description":"Public asset identifier."},"symbol":{"type":"string","description":"Asset symbol."}},"required":["assetId","symbol"],"additionalProperties":false},"currency":{"type":"object","properties":{"assetId":{"type":"string","description":"Public currency asset identifier."},"symbol":{"type":"string","description":"Currency symbol."}},"required":["assetId","symbol"],"additionalProperties":false},"wallet":{"nullable":true,"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"},"name":{"type":"string","description":"Wallet display name."}},"required":["chainId","address","name"],"additionalProperties":false},"balance":{"type":"object","properties":{"currentBalance":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Draft-inclusive operational balance in the account currency across all journal statuses, with the normal-balance side positive."}},"required":["currentBalance"],"additionalProperties":false}},"required":["accountNumber","name","paymentLabel","accountType","subType","normalBalanceType","isActive","origin","createdBy","hierarchy","asset","currency","wallet"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"CreateAccountRequestDto":{"type":"object","properties":{"accountNumber":{"type":"string","minLength":1,"maxLength":8,"description":"Portfolio-unique ledger account number."},"name":{"type":"string","minLength":1,"description":"Ledger account name."},"accountType":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"],"description":"Top-level account type."},"currencyAssetId":{"type":"string","minLength":1,"description":"Currency asset identifier for the account."},"subType":{"description":"Account subtype. Derived from the account type when omitted.","type":"string","minLength":1},"normalBalanceType":{"description":"Normal-balance side. Derived from the account type when omitted.","type":"string","enum":["DR","CR"]},"parentAccountNumber":{"nullable":true,"type":"string","minLength":1,"maxLength":8,"description":"Parent ledger account number. Omit or send null for a root account."},"paymentLabel":{"nullable":true,"type":"string","minLength":1,"description":"Optional label shown in payment account selection."},"isActive":{"default":true,"description":"Whether the account starts active. Defaults to true.","type":"boolean"}},"required":["accountNumber","name","accountType","currencyAssetId"],"additionalProperties":false},"AccountResponseDto":{"type":"object","properties":{"accountNumber":{"type":"string","description":"Ledger account number."},"name":{"type":"string","description":"Ledger account name."},"paymentLabel":{"nullable":true,"type":"string","description":"Optional label shown in payment account selection."},"accountType":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"],"description":"Top-level account type."},"subType":{"type":"string","description":"Persisted account subtype."},"normalBalanceType":{"type":"string","enum":["DR","CR"],"description":"Debit or credit normal-balance side."},"isActive":{"type":"boolean","description":"Whether the account is currently marked active."},"origin":{"type":"string","enum":["SYSTEM_MANAGED","SYSTEM_DEFAULT","USER_MANAGED"],"description":"Which code path created this account: engine-managed, engine fallback, or user-created. A user-created value may also mean the one-time backfill migration could not disambiguate an older row."},"createdBy":{"nullable":true,"description":"Creator of a user-created account, when known. Null for system-generated accounts and for accounts created before creator tracking existed.","type":"object","properties":{"userId":{"type":"string"}},"required":["userId"],"additionalProperties":false},"hierarchy":{"type":"object","properties":{"parentAccountNumber":{"nullable":true,"type":"string","description":"Parent ledger account number, or null for a root account."},"depth":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Hierarchy depth."},"hasChildren":{"type":"boolean","description":"Whether the account has direct child accounts."},"isFilterContext":{"type":"boolean","description":"Whether the row is included only as ancestor context for a direct filter match."}},"required":["parentAccountNumber","depth","hasChildren","isFilterContext"],"additionalProperties":false},"asset":{"nullable":true,"type":"object","properties":{"assetId":{"type":"string","description":"Public asset identifier."},"symbol":{"type":"string","description":"Asset symbol."}},"required":["assetId","symbol"],"additionalProperties":false},"currency":{"type":"object","properties":{"assetId":{"type":"string","description":"Public currency asset identifier."},"symbol":{"type":"string","description":"Currency symbol."}},"required":["assetId","symbol"],"additionalProperties":false},"wallet":{"nullable":true,"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"},"name":{"type":"string","description":"Wallet display name."}},"required":["chainId","address","name"],"additionalProperties":false},"balance":{"type":"object","properties":{"currentBalance":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Draft-inclusive operational balance in the account currency across all journal statuses, with the normal-balance side positive."}},"required":["currentBalance"],"additionalProperties":false}},"required":["accountNumber","name","paymentLabel","accountType","subType","normalBalanceType","isActive","origin","createdBy","hierarchy","asset","currency","wallet"],"additionalProperties":false},"StateConflictResponseDto":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["CONFLICT"]},"message":{"type":"string","description":"Human-readable error message"},"details":{"description":"Additional error details","type":"object","additionalProperties":{}},"requestId":{"type":"string","description":"Unique request identifier"}},"required":["code","message","requestId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"UpdateAccountRequestDto":{"type":"object","properties":{"accountNumber":{"description":"New portfolio-unique ledger account number.","type":"string","minLength":1,"maxLength":8},"name":{"description":"New ledger account name.","type":"string","minLength":1},"isActive":{"description":"New active state.","type":"boolean"},"parentAccountNumber":{"nullable":true,"type":"string","minLength":1,"maxLength":8,"description":"New parent account number, or null to detach from any parent."},"paymentLabel":{"nullable":true,"type":"string","minLength":1,"description":"New payment label, or null to clear it."}},"additionalProperties":false},"BulkArchiveLedgerAccountsConflictResponseDto":{"type":"object","properties":{"code":{"type":"string","enum":["LEDGER_ACCOUNT_ARCHIVE_BLOCKED"]},"details":{"type":"object","properties":{"blockers":{"minItems":1,"type":"array","items":{"type":"object","properties":{"identifier":{"type":"string","description":"Public-safe display name of the blocking resource"},"resourceType":{"type":"string","enum":["ACCOUNTING_RULE","PAYMENT_REQUEST","PAYMENT_TRANSACTION","FIAT_PAYMENT_SETTINGS"],"description":"Blocking resource category"},"subject":{"description":"Targeted resource this blocker belongs to","type":"string"}},"required":["identifier","resourceType"],"additionalProperties":false}}},"required":["blockers"],"additionalProperties":false},"message":{"type":"string","enum":["One or more ledger accounts are still used by future posting workflows"]},"path":{"type":"string","description":"Request path that produced the conflict"},"statusCode":{"type":"number","enum":[409]},"timestamp":{"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":"When the conflict was produced"}},"required":["code","details","message","path","statusCode","timestamp"],"additionalProperties":false},"AccountingRuleAuditTrailResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"aggregateId":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"event":{"anyOf":[{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["ACCOUNTING_RULE_CREATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"name":{"type":"string","minLength":1},"enabled":{"default":true,"type":"boolean"},"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"conditions":{"oneOf":[{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"all":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fromAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fromAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["direction"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","notEquals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["IN","OUT","GAS"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["wallet"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"x-audit-wallet-reference":{"array":true},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["asset"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["assetClass"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["stablecoin"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"boolean","description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["chain"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["operationType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountSubType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountId"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["counterparty"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["between"],"description":"Comparison operator."},"value":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}]},"minItems":2,"maxItems":2,"description":"Inclusive [low, high] decimal-string range."}},"required":["field","operator","value"],"additionalProperties":false}]},{"type":"object","properties":{"field":{"type":"string","enum":["entryType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["DR","CR"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["lt"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}],"description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["gte"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}],"description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["between"],"description":"Within the inclusive [start, end] range."},"value":{"type":"array","items":{"anyOf":[{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]}]},"minItems":2,"maxItems":2,"description":"Inclusive [start, end] timestamps, earliest first; each has three fractional digits and a known offset or Z, never -00:00."}},"required":["field","operator","value"],"additionalProperties":false}]}]}}},"required":["formatVersion","all"],"additionalProperties":false}]},"action":{"oneOf":[{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"actions":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["SET_COUNTERPARTY"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"counterpartyId":{"type":"string","minLength":1}},"required":["type","target","counterpartyId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_LEDGER_ACCOUNT"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"ledgerAccountId":{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]}},"required":["type","target","ledgerAccountId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_RESPONSIBILITY_CENTERS"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"responsibilityCenterAssignments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string","minLength":1},"responsibilityCenterId":{"type":"string","minLength":1},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":false}}},"required":["type","target","responsibilityCenterAssignments"],"additionalProperties":false}]}}},"required":["formatVersion","actions"],"additionalProperties":false}]},"createdById":{"type":"string"}},"required":["portfolioSlug","name","enabled","priority","conditions","action","createdById"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["ACCOUNTING_RULE_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"name":{"type":"string","minLength":1},"conditions":{"oneOf":[{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"all":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fromAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fromAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["direction"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","notEquals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["IN","OUT","GAS"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["wallet"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"x-audit-wallet-reference":{"array":true},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["asset"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["assetClass"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["stablecoin"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"boolean","description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["chain"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["operationType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountSubType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountId"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["counterparty"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["between"],"description":"Comparison operator."},"value":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}]},"minItems":2,"maxItems":2,"description":"Inclusive [low, high] decimal-string range."}},"required":["field","operator","value"],"additionalProperties":false}]},{"type":"object","properties":{"field":{"type":"string","enum":["entryType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["DR","CR"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["lt"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}],"description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["gte"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}],"description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["between"],"description":"Within the inclusive [start, end] range."},"value":{"type":"array","items":{"anyOf":[{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]}]},"minItems":2,"maxItems":2,"description":"Inclusive [start, end] timestamps, earliest first; each has three fractional digits and a known offset or Z, never -00:00."}},"required":["field","operator","value"],"additionalProperties":false}]}]}}},"required":["formatVersion","all"],"additionalProperties":false}]},"action":{"oneOf":[{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"actions":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["SET_COUNTERPARTY"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"counterpartyId":{"type":"string","minLength":1}},"required":["type","target","counterpartyId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_LEDGER_ACCOUNT"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"ledgerAccountId":{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]}},"required":["type","target","ledgerAccountId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_RESPONSIBILITY_CENTERS"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"responsibilityCenterAssignments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string","minLength":1},"responsibilityCenterId":{"type":"string","minLength":1},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":false}}},"required":["type","target","responsibilityCenterAssignments"],"additionalProperties":false}]}}},"required":["formatVersion","actions"],"additionalProperties":false}]},"updatedById":{"type":"string"}},"required":["updatedById"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["ACCOUNTING_RULE_TOGGLED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"enabled":{"type":"boolean"},"updatedById":{"type":"string"}},"required":["enabled","updatedById"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["ACCOUNTING_RULE_REORDERED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"priority":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updatedById":{"type":"string"}},"required":["priority","updatedById"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["ACCOUNTING_RULE_DELETED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"deletedById":{"type":"string"}},"required":["deletedById"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false}]},"before":{"nullable":true,"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"number"},"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"priority":{"type":"number"},"conditions":{"oneOf":[{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"all":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fromAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fromAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["direction"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","notEquals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["IN","OUT","GAS"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["wallet"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"x-audit-wallet-reference":{"array":true},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["asset"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["assetClass"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["stablecoin"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"boolean","description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["chain"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["operationType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountSubType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountId"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["counterparty"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["between"],"description":"Comparison operator."},"value":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}]},"minItems":2,"maxItems":2,"description":"Inclusive [low, high] decimal-string range."}},"required":["field","operator","value"],"additionalProperties":false}]},{"type":"object","properties":{"field":{"type":"string","enum":["entryType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["DR","CR"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["lt"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}],"description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["gte"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}],"description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["between"],"description":"Within the inclusive [start, end] range."},"value":{"type":"array","items":{"anyOf":[{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]}]},"minItems":2,"maxItems":2,"description":"Inclusive [start, end] timestamps, earliest first; each has three fractional digits and a known offset or Z, never -00:00."}},"required":["field","operator","value"],"additionalProperties":false}]}]}}},"required":["formatVersion","all"],"additionalProperties":false}]},"action":{"oneOf":[{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"actions":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["SET_COUNTERPARTY"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"counterpartyId":{"type":"string","minLength":1}},"required":["type","target","counterpartyId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_LEDGER_ACCOUNT"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"ledgerAccountId":{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]}},"required":["type","target","ledgerAccountId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_RESPONSIBILITY_CENTERS"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"responsibilityCenterAssignments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string","minLength":1},"responsibilityCenterId":{"type":"string","minLength":1},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":false}}},"required":["type","target","responsibilityCenterAssignments"],"additionalProperties":false}]}}},"required":["formatVersion","actions"],"additionalProperties":false}]},"isDeleted":{"type":"boolean"},"createdById":{"type":"string"},"updatedById":{"type":"string"},"deletedById":{"type":"string"},"deletedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["aggregateId","version","portfolioSlug","name","enabled","priority","conditions","action","isDeleted"],"additionalProperties":{}},"after":{"nullable":true,"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"number"},"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"name":{"type":"string"},"enabled":{"type":"boolean"},"priority":{"type":"number"},"conditions":{"oneOf":[{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"all":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fromAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddressLabel"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains","notEquals","notContains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fromAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["toAddress"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","contains"],"description":"How the field is compared with value."},"value":{"type":"string","minLength":1,"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["direction"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals","notEquals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["IN","OUT","GAS"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["wallet"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"x-audit-wallet-reference":{"array":true},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["asset"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["assetClass"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ERC20","FIAT","NATIVE","REBASE_LST","INTEREST_BEARING","VALUE_ACCRUING","LP_SHARE","DEBT","REFLECT","VOTE_ESCROWED","NFT"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["stablecoin"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"boolean","description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["chain"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["operationType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountSubType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","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"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountId"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["counterparty"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","minLength":1},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lt"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["gte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["lte"],"description":"Comparison operator."},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Decimal fiat amount to compare against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["fiatValue"],"description":"Condition field."},"operator":{"type":"string","enum":["between"],"description":"Comparison operator."},"value":{"type":"array","items":{"anyOf":[{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$"}]},"minItems":2,"maxItems":2,"description":"Inclusive [low, high] decimal-string range."}},"required":["field","operator","value"],"additionalProperties":false}]},{"type":"object","properties":{"field":{"type":"string","enum":["entryType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["equals"],"description":"How the field is compared with value."},"value":{"type":"string","enum":["DR","CR"],"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["accountType"],"description":"Which part of the transaction this condition tests."},"operator":{"type":"string","enum":["in","notIn"],"description":"How the field is compared with value."},"value":{"minItems":1,"type":"array","items":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]},"description":"The value the field is compared against."}},"required":["field","operator","value"],"additionalProperties":false},{"oneOf":[{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["lt"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}],"description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["gte"],"description":"Before (lt) or on or after (gte) the cutoff."},"value":{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}],"description":"Exact timestamp with three fractional digits and a known offset or Z; -00:00 is invalid."}},"required":["field","operator","value"],"additionalProperties":false},{"type":"object","properties":{"field":{"type":"string","enum":["transactionDate"],"description":"Owning transaction timestamp."},"operator":{"type":"string","enum":["between"],"description":"Within the inclusive [start, end] range."},"value":{"type":"array","items":{"anyOf":[{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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{3}(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}]}]},"minItems":2,"maxItems":2,"description":"Inclusive [start, end] timestamps, earliest first; each has three fractional digits and a known offset or Z, never -00:00."}},"required":["field","operator","value"],"additionalProperties":false}]}]}}},"required":["formatVersion","all"],"additionalProperties":false}]},"action":{"oneOf":[{"type":"object","properties":{"formatVersion":{"type":"number","enum":[1],"description":"Structure version of this envelope. Always 1."},"actions":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["SET_COUNTERPARTY"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"counterpartyId":{"type":"string","minLength":1}},"required":["type","target","counterpartyId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_LEDGER_ACCOUNT"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"ledgerAccountId":{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]}},"required":["type","target","ledgerAccountId"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["SET_RESPONSIBILITY_CENTERS"],"description":"Which change this action makes."},"target":{"type":"string","enum":["LINE"],"description":"What the change applies to: a journal line or the transaction."},"responsibilityCenterAssignments":{"minItems":1,"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string","minLength":1},"responsibilityCenterId":{"type":"string","minLength":1},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":false}}},"required":["type","target","responsibilityCenterAssignments"],"additionalProperties":false}]}}},"required":["formatVersion","actions"],"additionalProperties":false}]},"isDeleted":{"type":"boolean"},"createdById":{"type":"string"},"updatedById":{"type":"string"},"deletedById":{"type":"string"},"deletedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["aggregateId","version","portfolioSlug","name","enabled","priority","conditions","action","isDeleted"],"additionalProperties":{}}},"required":["event","before","after"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"string"}},"error":{"type":"string"},"pagination":{"type":"object","properties":{"requestedLimit":{"type":"number"},"hasMore":{"type":"boolean"},"minVersion":{"type":"number"},"maxVersion":{"type":"number"}},"required":["hasMore"],"additionalProperties":false}},"required":["success","aggregateId","events","warnings"],"additionalProperties":false},"PaymentRequestAuditTrailResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"aggregateId":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"event":{"anyOf":[{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_CREATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"requestNumber":{"type":"string"},"toAddress":{"type":"string"},"counterpartyId":{"type":"string"},"token":{"type":"object","properties":{"tokenAddress":{"type":"string"},"chainId":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":24},"assetId":{"type":"string"}},"required":["tokenAddress","chainId","decimals","assetId"],"additionalProperties":{}},"amount":{"type":"string","pattern":"^[1-9][0-9]*$(?![\\s\\S])"},"ledgerAccountId":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"description":{"type":"string"},"fileAttachments":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"fileSize":{"type":"integer","minimum":1,"maximum":10485760},"mimeType":{"type":"string"},"uploadedByUserId":{"type":"string"},"uploadedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","fileName","fileSize","mimeType","uploadedByUserId","uploadedAt"],"additionalProperties":{}}},"requestedByUserId":{"type":"string"},"requestedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"paymentMethodId":{"type":"string"},"fiatAmount":{"type":"string"},"fiatCurrency":{"type":"string"},"payoutCurrency":{"type":"string"}},"required":["portfolioSlug","requestNumber","toAddress","token","amount","description","fileAttachments","requestedByUserId","requestedAt"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"toAddress":{"type":"string"},"counterpartyId":{"type":"string"},"token":{"type":"object","properties":{"tokenAddress":{"type":"string"},"chainId":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":24},"assetId":{"type":"string"}},"required":["tokenAddress","chainId","decimals","assetId"],"additionalProperties":{}},"amount":{"type":"string","pattern":"^[1-9][0-9]*$(?![\\s\\S])"},"ledgerAccountId":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"description":{"type":"string"},"paymentMethodId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"fiatAmount":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"fiatCurrency":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"payoutCurrency":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_SUBMITTED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"submittedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"assignedApproverIds":{"type":"array","items":{"type":"string"}},"approvalGroups":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string"},"groupName":{"type":"string"},"approverUserIds":{"type":"array","items":{"type":"string"}},"requiredCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"approvals":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"action":{"type":"string","enum":["APPROVED","REJECTED","RETURNED"]},"comment":{"type":"string"},"actionAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["userId","action","actionAt"],"additionalProperties":{}}}},"required":["groupId","groupName","approverUserIds","requiredCount","approvals"],"additionalProperties":{}}}},"required":["submittedAt"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_APPROVED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"userId":{"type":"string"},"notes":{"type":"string"},"timestamp":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["userId","timestamp"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_REJECTED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"userId":{"type":"string"},"notes":{"type":"string"},"timestamp":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["userId","timestamp"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_RETURNED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"userId":{"type":"string"},"notes":{"type":"string"},"timestamp":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["userId","timestamp"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_CANCELLED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"reason":{"type":"string"},"cancelledAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["cancelledAt"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_CONVERTED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"paymentTransactionId":{"type":"string"},"convertedByUserId":{"type":"string"},"convertedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"purposeOfPayment":{"type":"string","enum":["payment_for_goods","payment_for_business_services","payment_for_salary_or_benefits","capital_investment_or_item","other"]},"sourceOfFunds":{"type":"string","enum":["business_income","business_profit","other"]}},"required":["convertedByUserId","convertedAt"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_MOVED_FROM_CONVERTED_TO_APPROVED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_MOVED_TO_DUPLICATE_PAYMENT_TRANSACTION"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"previousPaymentTransactionId":{"type":"string"},"newPaymentTransactionId":{"type":"string"}},"required":["previousPaymentTransactionId","newPaymentTransactionId"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_MOVED_TO_RESTARTED_PAYMENT_TRANSACTION"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"previousPaymentTransactionId":{"type":"string"},"newPaymentTransactionId":{"type":"string"}},"required":["previousPaymentTransactionId","newPaymentTransactionId"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_DELETED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"reason":{"type":"string"},"deletedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["deletedAt"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_FILE_ATTACHED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"fileSize":{"type":"integer","minimum":1,"maximum":10485760},"mimeType":{"type":"string"},"uploadedByUserId":{"type":"string"},"uploadedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","fileName","fileSize","mimeType","uploadedByUserId","uploadedAt"],"additionalProperties":{}}},"required":["file"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_FILE_REMOVED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"fileId":{"type":"string"}},"required":["fileId"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_APPROVERS_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"addApproverIds":{"type":"array","items":{"type":"string"}},"removeApproverIds":{"type":"array","items":{"type":"string"}}},"required":["addApproverIds","removeApproverIds"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_REAP_METADATA_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"purposeOfPayment":{"type":"string","enum":["payment_for_goods","payment_for_business_services","payment_for_salary_or_benefits","capital_investment_or_item","other"]},"sourceOfFunds":{"type":"string","enum":["business_income","business_profit","other"]}},"required":["purposeOfPayment","sourceOfFunds"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_REAP_ATTEMPT_CREATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"reapPaymentId":{"type":"string"},"reapReceivingPartyId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"status":{"type":"string","enum":["draft","quote_expired","awaiting_approval","awaiting_funds","under_review","requires_action","payout_completed","cancellation_requested","cancelled","failed"]},"statusDetails":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"senderAmount":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"senderCurrency":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"receivingAmount":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"receivingCurrency":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"fxInfo":{"anyOf":[{"type":"object","properties":{"clientRate":{"type":"number"},"baseSenderAmount":{"type":"number"}},"required":["clientRate","baseSenderAmount"],"additionalProperties":{}},{"type":"string","nullable":true,"enum":[null]}]},"feeInfo":{"anyOf":[{"type":"object","properties":{"variableFee":{"type":"number"},"fixedFee":{"type":"number"},"specialFee":{"type":"number"},"totalFee":{"type":"number"}},"required":["variableFee","fixedFee","specialFee","totalFee"],"additionalProperties":{}},{"type":"string","nullable":true,"enum":[null]}]},"quoteValidTo":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["reapPaymentId","status"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_REAP_QUOTE_ACCEPTED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"reapPaymentId":{"type":"string"},"status":{"type":"string","enum":["draft","quote_expired","awaiting_approval","awaiting_funds","under_review","requires_action","payout_completed","cancellation_requested","cancelled","failed"]},"statusDetails":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"quoteAcceptedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"fundingDeadline":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","nullable":true,"enum":[null]}]},"senderAmount":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"fxInfo":{"anyOf":[{"type":"object","properties":{"clientRate":{"type":"number"},"baseSenderAmount":{"type":"number"}},"required":["clientRate","baseSenderAmount"],"additionalProperties":{}},{"type":"string","nullable":true,"enum":[null]}]},"feeInfo":{"anyOf":[{"type":"object","properties":{"variableFee":{"type":"number"},"fixedFee":{"type":"number"},"specialFee":{"type":"number"},"totalFee":{"type":"number"}},"required":["variableFee","fixedFee","specialFee","totalFee"],"additionalProperties":{}},{"type":"string","nullable":true,"enum":[null]}]}},"required":["reapPaymentId","status","quoteAcceptedAt"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_REAP_STATUS_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"reapPaymentId":{"type":"string"},"previousStatus":{"type":"string","enum":["draft","quote_expired","awaiting_approval","awaiting_funds","under_review","requires_action","payout_completed","cancellation_requested","cancelled","failed"]},"nextStatus":{"type":"string","enum":["draft","quote_expired","awaiting_approval","awaiting_funds","under_review","requires_action","payout_completed","cancellation_requested","cancelled","failed"]},"statusDetails":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"fundingDeadline":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","nullable":true,"enum":[null]}]},"fundingDeadlineProvided":{"type":"boolean"},"senderAmount":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"senderCurrency":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"receivingAmount":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"receivingCurrency":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"fxInfo":{"anyOf":[{"type":"object","properties":{"clientRate":{"type":"number"},"baseSenderAmount":{"type":"number"}},"required":["clientRate","baseSenderAmount"],"additionalProperties":{}},{"type":"string","nullable":true,"enum":[null]}]},"feeInfo":{"anyOf":[{"type":"object","properties":{"variableFee":{"type":"number"},"fixedFee":{"type":"number"},"specialFee":{"type":"number"},"totalFee":{"type":"number"}},"required":["variableFee","fixedFee","specialFee","totalFee"],"additionalProperties":{}},{"type":"string","nullable":true,"enum":[null]}]},"rawProviderPayload":{}},"required":["reapPaymentId","nextStatus"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_REAP_TRACKING_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"reapPaymentId":{"type":"string"},"trackingInfo":{},"rawProviderPayload":{}},"required":["reapPaymentId","trackingInfo"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_REAP_BALANCE_MOVEMENT_RECORDED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"reapPaymentId":{"type":"string"},"balanceMovement":{},"rawProviderPayload":{}},"required":["reapPaymentId","balanceMovement"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_REAP_ATTEMPT_LINKED_TO_PAYMENT_TRANSACTION"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"reapPaymentId":{"type":"string"},"paymentTransactionId":{"type":"string"},"principalPaymentTransactionLineNumber":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"processingFeePaymentTransactionLineNumber":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},"required":["reapPaymentId","paymentTransactionId"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_REAP_DOCUMENT_DELIVERY_REQUESTED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"reapPaymentId":{"type":"string","minLength":1}},"required":["reapPaymentId"],"additionalProperties":false},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_REQUEST_REAP_DOCUMENT_DELIVERY_RETRY_REQUESTED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"expectedAttemptCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"reapPaymentId":{"type":"string","minLength":1},"requestedByUserId":{"type":"string","minLength":1},"requestedAt":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]}},"required":["expectedAttemptCount","reapPaymentId","requestedByUserId","requestedAt"],"additionalProperties":false},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false}]},"before":{"nullable":true,"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"number"},"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"requestNumber":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","APPROVED","REJECTED","RETURNED","CONVERTED","CANCELLED"]},"toAddress":{"type":"string"},"counterpartyId":{"type":"string"},"token":{"type":"object","properties":{"tokenAddress":{"type":"string"},"chainId":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":24},"assetId":{"type":"string"}},"required":["tokenAddress","chainId","decimals","assetId"],"additionalProperties":{}},"amount":{"type":"string"},"paymentMethodId":{"type":"string"},"fiatAmount":{"type":"string"},"fiatCurrency":{"type":"string"},"payoutCurrency":{"type":"string"},"purposeOfPayment":{"type":"string"},"sourceOfFunds":{"type":"string"},"ledgerAccountId":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"description":{"type":"string"},"fileAttachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"fileSize":{"type":"integer","minimum":1,"maximum":10485760},"mimeType":{"type":"string"},"uploadedByUserId":{"type":"string"},"uploadedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","fileName","fileSize","mimeType","uploadedByUserId","uploadedAt"],"additionalProperties":{}}},"requestedByUserId":{"type":"string"},"requestedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"submittedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"approvalGroups":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string"},"groupName":{"type":"string"},"approverUserIds":{"type":"array","items":{"type":"string"}},"requiredCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"approvals":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"action":{"type":"string","enum":["APPROVED","REJECTED","RETURNED"]},"comment":{"type":"string"},"actionAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["userId","action","actionAt"],"additionalProperties":{}}}},"required":["groupId","groupName","approverUserIds","requiredCount","approvals"],"additionalProperties":{}}},"convertedByUserId":{"type":"string"},"convertedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"currentPaymentTransactionId":{"type":"string"},"isDeleted":{"type":"boolean"}},"required":["aggregateId","version","portfolioSlug","requestNumber","status","toAddress","token","amount","description","fileAttachments","requestedByUserId","requestedAt","approvalGroups","isDeleted"],"additionalProperties":{}},"after":{"nullable":true,"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"number"},"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"requestNumber":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SUBMITTED","APPROVED","REJECTED","RETURNED","CONVERTED","CANCELLED"]},"toAddress":{"type":"string"},"counterpartyId":{"type":"string"},"token":{"type":"object","properties":{"tokenAddress":{"type":"string"},"chainId":{"type":"string"},"decimals":{"type":"integer","minimum":0,"maximum":24},"assetId":{"type":"string"}},"required":["tokenAddress","chainId","decimals","assetId"],"additionalProperties":{}},"amount":{"type":"string"},"paymentMethodId":{"type":"string"},"fiatAmount":{"type":"string"},"fiatCurrency":{"type":"string"},"payoutCurrency":{"type":"string"},"purposeOfPayment":{"type":"string"},"sourceOfFunds":{"type":"string"},"ledgerAccountId":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"description":{"type":"string"},"fileAttachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"fileSize":{"type":"integer","minimum":1,"maximum":10485760},"mimeType":{"type":"string"},"uploadedByUserId":{"type":"string"},"uploadedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","fileName","fileSize","mimeType","uploadedByUserId","uploadedAt"],"additionalProperties":{}}},"requestedByUserId":{"type":"string"},"requestedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"submittedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"approvalGroups":{"type":"array","items":{"type":"object","properties":{"groupId":{"type":"string"},"groupName":{"type":"string"},"approverUserIds":{"type":"array","items":{"type":"string"}},"requiredCount":{"type":"integer","minimum":1,"maximum":9007199254740991},"approvals":{"type":"array","items":{"type":"object","properties":{"userId":{"type":"string"},"action":{"type":"string","enum":["APPROVED","REJECTED","RETURNED"]},"comment":{"type":"string"},"actionAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["userId","action","actionAt"],"additionalProperties":{}}}},"required":["groupId","groupName","approverUserIds","requiredCount","approvals"],"additionalProperties":{}}},"convertedByUserId":{"type":"string"},"convertedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"currentPaymentTransactionId":{"type":"string"},"isDeleted":{"type":"boolean"}},"required":["aggregateId","version","portfolioSlug","requestNumber","status","toAddress","token","amount","description","fileAttachments","requestedByUserId","requestedAt","approvalGroups","isDeleted"],"additionalProperties":{}}},"required":["event","before","after"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"string"}},"error":{"type":"string"},"pagination":{"type":"object","properties":{"requestedLimit":{"type":"number"},"hasMore":{"type":"boolean"},"minVersion":{"type":"number"},"maxVersion":{"type":"number"}},"required":["hasMore"],"additionalProperties":false}},"required":["success","aggregateId","events","warnings"],"additionalProperties":false},"PaymentTransactionAuditTrailResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"aggregateId":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"event":{"anyOf":[{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_CREATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"fromWallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"description":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"createdByUserId":{"type":"string"},"createdAt":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"toAddress":{"type":"string"},"tokenAddress":{"type":"string"},"chainId":{"type":"string"},"amount":{"type":"string","pattern":"^[1-9][0-9]*$(?![\\s\\S])"},"ledgerAccountId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"paymentRequestId":{"type":"string"}},"required":["lineNumber","toAddress","tokenAddress","chainId","amount","ledgerAccountId"],"additionalProperties":{}}},"tags":{"type":"array","items":{"type":"string"}}},"required":["portfolioSlug","fromWallet","createdByUserId","lines"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"description":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"tags":{"type":"array","items":{"type":"string"}},"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"toAddress":{"type":"string"},"tokenAddress":{"type":"string"},"chainId":{"type":"string"},"amount":{"type":"string","pattern":"^[1-9][0-9]*$(?![\\s\\S])"},"ledgerAccountId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"paymentRequestId":{"type":"string"}},"required":["lineNumber","toAddress","tokenAddress","chainId","amount","ledgerAccountId"],"additionalProperties":{}}},"fromWallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]}},"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_PROPOSED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"safeTxHash":{"type":"string"},"safeNonce":{"type":"number"},"senderAddress":{"type":"string"},"safeGasMetadata":{"type":"object","properties":{"safeTxGas":{"type":"string"},"baseGas":{"type":"string"},"gasPrice":{"type":"string"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"}},"required":["safeTxGas","baseGas","gasPrice","gasToken","refundReceiver"],"additionalProperties":{}},"safeOperation":{"type":"number"},"importedSafePayload":{"type":"object","properties":{"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"value":{"type":"string"},"data":{"type":"string"},"operation":{"type":"number"},"safeTxGas":{"type":"string"},"baseGas":{"type":"string"},"gasPrice":{"type":"string"},"gasToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"refundReceiver":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"nonce":{"type":"number"}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":{}}},"required":["safeTxHash","safeNonce","senderAddress"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_SIGNATURE_ADDED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"signerAddress":{"type":"string"},"signature":{"type":"string"}},"required":["signerAddress","signature"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_SAFE_SYNCED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"createdAt":{"type":"string"},"safeNonce":{"type":"number"},"safeOperation":{"type":"number"},"safeGasMetadata":{"type":"object","properties":{"safeTxGas":{"type":"string"},"baseGas":{"type":"string"},"gasPrice":{"type":"string"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"}},"required":["safeTxGas","baseGas","gasPrice","gasToken","refundReceiver"],"additionalProperties":{}},"importedSafePayload":{"type":"object","properties":{"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"value":{"type":"string"},"data":{"type":"string"},"operation":{"type":"number"},"safeTxGas":{"type":"string"},"baseGas":{"type":"string"},"gasPrice":{"type":"string"},"gasToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"refundReceiver":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"nonce":{"type":"number"}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":{}},"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"toAddress":{"type":"string"},"tokenAddress":{"type":"string"},"chainId":{"type":"string"},"amount":{"type":"string","pattern":"^[1-9][0-9]*$(?![\\s\\S])"},"ledgerAccountId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"paymentRequestId":{"type":"string"}},"required":["lineNumber","toAddress","tokenAddress","chainId","amount","ledgerAccountId"],"additionalProperties":{}}}},"required":["safeNonce","safeOperation","safeGasMetadata","importedSafePayload","lines"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_REJECTION_ADDED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"signerAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"reason":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"source":{"type":"string","enum":["USER","SAFE_SYNC"]}},"required":["signerAddress","source"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_REJECTED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"reason":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"source":{"type":"string","enum":["USER","SAFE_SYNC"]}},"required":["source"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_EXECUTED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"blockchainTxHash":{"type":"string"}},"required":["blockchainTxHash"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_FAILED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"reason":{"type":"string"},"blockchainTxHash":{"type":"string"}},"required":["reason"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_DELETED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_WALLET_LINKED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"walletTransactionId":{"type":"string"}},"required":["walletTransactionId"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_PORTFOLIO_LINKED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"portfolioTransactionId":{"type":"string"}},"required":["portfolioTransactionId"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_FILE_ATTACHED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"fileSize":{"type":"integer","minimum":1,"maximum":10485760},"mimeType":{"type":"string"},"uploadedByUserId":{"type":"string"},"uploadedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","fileName","fileSize","mimeType","uploadedByUserId","uploadedAt"],"additionalProperties":{}}},"required":["file"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_FILE_REMOVED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"fileId":{"type":"string"}},"required":["fileId"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_DUPLICATED_WITH_REQUEST_MOVE"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"newPaymentTransactionId":{"type":"string"},"movedPaymentRequestIds":{"type":"array","items":{"type":"string"}},"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"toAddress":{"type":"string"},"tokenAddress":{"type":"string"},"chainId":{"type":"string"},"amount":{"type":"string","pattern":"^[1-9][0-9]*$(?![\\s\\S])"},"ledgerAccountId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"paymentRequestId":{"type":"string"}},"required":["lineNumber","toAddress","tokenAddress","chainId","amount","ledgerAccountId"],"additionalProperties":{}}}},"required":["newPaymentTransactionId","movedPaymentRequestIds","lines"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PAYMENT_TRANSACTION_RESTART_REQUESTS_MOVED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"newPaymentTransactionId":{"type":"string"},"movedPaymentRequestIds":{"type":"array","items":{"type":"string"}},"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"toAddress":{"type":"string"},"tokenAddress":{"type":"string"},"chainId":{"type":"string"},"amount":{"type":"string","pattern":"^[1-9][0-9]*$(?![\\s\\S])"},"ledgerAccountId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"paymentRequestId":{"type":"string"}},"required":["lineNumber","toAddress","tokenAddress","chainId","amount","ledgerAccountId"],"additionalProperties":{}}}},"required":["newPaymentTransactionId","movedPaymentRequestIds","lines"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false}]},"before":{"nullable":true,"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"number"},"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"fromWallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"description":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PENDING_SIGNATURE","PENDING_EXECUTION","EXECUTED","FAILED","REJECTED"]},"safeTxHash":{"type":"string"},"safeNonce":{"type":"number"},"safeOperation":{"type":"number"},"safeGasMetadata":{"type":"object","properties":{"safeTxGas":{"type":"string"},"baseGas":{"type":"string"},"gasPrice":{"type":"string"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"}},"required":["safeTxGas","baseGas","gasPrice","gasToken","refundReceiver"],"additionalProperties":{}},"importedSafePayload":{"type":"object","properties":{"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"value":{"type":"string"},"data":{"type":"string"},"operation":{"type":"number"},"safeTxGas":{"type":"string"},"baseGas":{"type":"string"},"gasPrice":{"type":"string"},"gasToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"refundReceiver":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"nonce":{"type":"number"}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":{}},"walletTransactionId":{"type":"string"},"portfolioTransactionId":{"type":"string"},"signatures":{"type":"array","items":{"type":"object","properties":{"signerAddress":{"type":"string"},"signature":{"type":"string"}},"required":["signerAddress","signature"],"additionalProperties":{}}},"rejections":{"type":"array","items":{"type":"object","properties":{"signerAddress":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"source":{"type":"string","enum":["USER","SAFE_SYNC"]},"rejectedAt":{"type":"string"}},"required":["signerAddress","source","rejectedAt"],"additionalProperties":{}}},"tags":{"type":"array","items":{"type":"string"}},"blockchainTxHash":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"toAddress":{"type":"string"},"tokenAddress":{"type":"string"},"chainId":{"type":"string"},"amount":{"type":"string","pattern":"^[1-9][0-9]*$(?![\\s\\S])"},"ledgerAccountId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"paymentRequestId":{"type":"string"}},"required":["lineNumber","toAddress","tokenAddress","chainId","amount","ledgerAccountId"],"additionalProperties":{}}},"fileAttachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"fileSize":{"type":"integer","minimum":1,"maximum":10485760},"mimeType":{"type":"string"},"uploadedByUserId":{"type":"string"},"uploadedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","fileName","fileSize","mimeType","uploadedByUserId","uploadedAt"],"additionalProperties":{}}},"isDeleted":{"type":"boolean"}},"required":["aggregateId","version","portfolioSlug","fromWallet","status","signatures","rejections","tags","lines","fileAttachments","isDeleted"],"additionalProperties":{}},"after":{"nullable":true,"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"number"},"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"fromWallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"description":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"createdAt":{"type":"string"},"createdByUserId":{"type":"string"},"status":{"type":"string","enum":["DRAFT","PENDING_SIGNATURE","PENDING_EXECUTION","EXECUTED","FAILED","REJECTED"]},"safeTxHash":{"type":"string"},"safeNonce":{"type":"number"},"safeOperation":{"type":"number"},"safeGasMetadata":{"type":"object","properties":{"safeTxGas":{"type":"string"},"baseGas":{"type":"string"},"gasPrice":{"type":"string"},"gasToken":{"type":"string"},"refundReceiver":{"type":"string"}},"required":["safeTxGas","baseGas","gasPrice","gasToken","refundReceiver"],"additionalProperties":{}},"importedSafePayload":{"type":"object","properties":{"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"value":{"type":"string"},"data":{"type":"string"},"operation":{"type":"number"},"safeTxGas":{"type":"string"},"baseGas":{"type":"string"},"gasPrice":{"type":"string"},"gasToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"refundReceiver":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"nonce":{"type":"number"}},"required":["to","value","data","operation","safeTxGas","baseGas","gasPrice","gasToken","refundReceiver","nonce"],"additionalProperties":{}},"walletTransactionId":{"type":"string"},"portfolioTransactionId":{"type":"string"},"signatures":{"type":"array","items":{"type":"object","properties":{"signerAddress":{"type":"string"},"signature":{"type":"string"}},"required":["signerAddress","signature"],"additionalProperties":{}}},"rejections":{"type":"array","items":{"type":"object","properties":{"signerAddress":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"source":{"type":"string","enum":["USER","SAFE_SYNC"]},"rejectedAt":{"type":"string"}},"required":["signerAddress","source","rejectedAt"],"additionalProperties":{}}},"tags":{"type":"array","items":{"type":"string"}},"blockchainTxHash":{"type":"string"},"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"toAddress":{"type":"string"},"tokenAddress":{"type":"string"},"chainId":{"type":"string"},"amount":{"type":"string","pattern":"^[1-9][0-9]*$(?![\\s\\S])"},"ledgerAccountId":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"paymentRequestId":{"type":"string"}},"required":["lineNumber","toAddress","tokenAddress","chainId","amount","ledgerAccountId"],"additionalProperties":{}}},"fileAttachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"fileSize":{"type":"integer","minimum":1,"maximum":10485760},"mimeType":{"type":"string"},"uploadedByUserId":{"type":"string"},"uploadedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","fileName","fileSize","mimeType","uploadedByUserId","uploadedAt"],"additionalProperties":{}}},"isDeleted":{"type":"boolean"}},"required":["aggregateId","version","portfolioSlug","fromWallet","status","signatures","rejections","tags","lines","fileAttachments","isDeleted"],"additionalProperties":{}}},"required":["event","before","after"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"string"}},"error":{"type":"string"},"pagination":{"type":"object","properties":{"requestedLimit":{"type":"number"},"hasMore":{"type":"boolean"},"minVersion":{"type":"number"},"maxVersion":{"type":"number"}},"required":["hasMore"],"additionalProperties":false}},"required":["success","aggregateId","events","warnings"],"additionalProperties":false},"PortfolioTransactionAuditTrailResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"aggregateId":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"event":{"anyOf":[{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_CREATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"transaction":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"subType":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"journalEntry":{"type":"object","properties":{"header":{"type":"object","properties":{"date":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"isAdjustment":{"type":"boolean"}},"required":["date"],"additionalProperties":{}},"entries":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"entryType":{"type":"string","enum":["DR","CR"]},"accountId":{"type":"string"},"originalAccountId":{"type":"string"},"fiatAmount":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"memo":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"type":"string"},"attribution":{"type":"object","properties":{"m":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"c":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"a":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false},"asset":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"lotLedgerEntryId":{"type":"object","properties":{"lotId":{"type":"string"},"entryId":{"type":"string"}},"required":["lotId","entryId"],"additionalProperties":{}},"walletOperation":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"required":["lineNumber","entryType","accountId","fiatAmount"],"additionalProperties":{}}}},"required":["header","entries"],"additionalProperties":{}},"walletOperations":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"lotLedger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"acquisitionTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"diff":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"price":{"type":"string","description":"A finite decimal value."},"value":{"type":"string","description":"A finite decimal value."},"lotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"entryKind":{"type":"string","enum":["ADD","DSP","CUT","RES","REL","MVE"]},"entitlementRef":{"type":"string"},"positionId":{"type":"string","description":"Canonical DefiPosition.id for reservation or marker-lot lineage. Omitted for ordinary cost-basis rows."}},"required":["id","entryId","timestamp","acquisitionTimestamp","diff","value","lotMethod","wallet","entryKind"],"additionalProperties":{}}},"errorMessage":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{}},{"type":"object","properties":{},"additionalProperties":{}}]},"severity":{"type":"string","enum":["ERROR","WARNING"]},"context":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{}}]},"cause":{}},"required":["name","message","body"],"additionalProperties":{}}},{"type":"string"}]}},"required":["id","status","timestamp","operationType","subType","walletOperations","lotLedger"],"additionalProperties":{}},"reason":{"type":"string"},"triggeringTransactionId":{"type":"string"}},"required":["transaction"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_CREATED_WITH_RAW"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"transaction":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"subType":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"journalEntry":{"type":"object","properties":{"header":{"type":"object","properties":{"date":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"isAdjustment":{"type":"boolean"}},"required":["date"],"additionalProperties":{}},"entries":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"entryType":{"type":"string","enum":["DR","CR"]},"accountId":{"type":"string"},"originalAccountId":{"type":"string"},"fiatAmount":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"memo":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"type":"string"},"attribution":{"type":"object","properties":{"m":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"c":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"a":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false},"asset":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"lotLedgerEntryId":{"type":"object","properties":{"lotId":{"type":"string"},"entryId":{"type":"string"}},"required":["lotId","entryId"],"additionalProperties":{}},"walletOperation":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"required":["lineNumber","entryType","accountId","fiatAmount"],"additionalProperties":{}}}},"required":["header","entries"],"additionalProperties":{}},"walletOperations":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"lotLedger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"acquisitionTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"diff":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"price":{"type":"string","description":"A finite decimal value."},"value":{"type":"string","description":"A finite decimal value."},"lotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"entryKind":{"type":"string","enum":["ADD","DSP","CUT","RES","REL","MVE"]},"entitlementRef":{"type":"string"},"positionId":{"type":"string","description":"Canonical DefiPosition.id for reservation or marker-lot lineage. Omitted for ordinary cost-basis rows."}},"required":["id","entryId","timestamp","acquisitionTimestamp","diff","value","lotMethod","wallet","entryKind"],"additionalProperties":{}}},"errorMessage":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{}},{"type":"object","properties":{},"additionalProperties":{}}]},"severity":{"type":"string","enum":["ERROR","WARNING"]},"context":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{}}]},"cause":{}},"required":["name","message","body"],"additionalProperties":{}}},{"type":"string"}]}},"required":["id","status","timestamp","operationType","subType","walletOperations","lotLedger"],"additionalProperties":{}},"rawTransactionRows":{"type":"array","items":{"type":"object","properties":{"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"walletTransactionId":{"type":"string"},"transaction":{"type":"object","properties":{"address":{"type":"string"},"blockHeight":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"source":{"type":"string","enum":["portfolio_conversion"]},"chainId":{"type":"string"},"hash":{"type":"string"},"details":{"type":"object","properties":{"portfolioConversion":{"type":"object","properties":{"version":{"type":"number","enum":[1]},"conversionTransactionId":{"type":"string"},"cutoffExclusiveTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"previewHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"workbookFileId":{"type":"string"},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"walletAddress":{"type":"string"},"chainId":{"type":"string"},"tokenAddress":{"type":"string"},"assetId":{"type":"string"},"tokenSnapshotKey":{"type":"string"},"currentBalance":{"type":"string","description":"A finite decimal value."},"targetStartingBalance":{"type":"string","description":"A finite decimal value."},"deltaBalance":{"type":"string","description":"A finite decimal value."},"signedRawTokenUnits":{"type":"string","description":"A finite decimal value."},"currentFiatValue":{"anyOf":[{"type":"string","description":"A finite decimal value."},{"type":"string","nullable":true,"enum":[null]}]},"targetFiatValue":{"type":"string","description":"A finite decimal value."},"deltaFiatValue":{"type":"string","description":"A finite decimal value."},"quoteCurrency":{"type":"string"},"quoteSource":{"type":"string"}},"required":["version","conversionTransactionId","cutoffExclusiveTimestamp","previewHash","workbookFileId","wallet","walletAddress","chainId","tokenAddress","assetId","tokenSnapshotKey","currentBalance","targetStartingBalance","deltaBalance","signedRawTokenUnits","currentFiatValue","targetFiatValue","deltaFiatValue","quoteCurrency","quoteSource"],"additionalProperties":false}},"required":["portfolioConversion"],"additionalProperties":false},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]}},"required":["address","blockHeight","source","chainId","hash","details","timestamp"],"additionalProperties":false},"items":{"minItems":1,"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string"},"txHash":{"type":"string"},"txIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"fromAddress":{"type":"string"},"fromAddressLabel":{"type":"string"},"toAddress":{"type":"string"},"toAddressLabel":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"tokenAddress":{"type":"string"},"type":{"type":"string","enum":["IN","OUT","GAS","SELF"]},"valueQuote":{"type":"string","description":"A finite decimal value."},"quoteCurrency":{"type":"string"},"quoteSource":{"type":"string"}},"required":["chainId","txHash","txIndex","fromAddress","toAddress","value","tokenAddress","type"],"additionalProperties":false}}},"required":["wallet","walletTransactionId","transaction","items"],"additionalProperties":false}},"conversionScope":{"type":"object","properties":{"kind":{"type":"string","enum":["portfolio_conversion"]},"cutoffExclusiveTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"previewHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"tokenSnapshotKeys":{"type":"array","items":{"type":"string"}},"costBasisSnapshotKeys":{"type":"array","items":{"type":"string"}},"ledgerAccountSnapshotKeys":{"type":"array","items":{"type":"string"}},"workbookFileId":{"type":"string"},"balancingAccountId":{"type":"string"},"acceptedWarningHash":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{64}$"},{"type":"string","nullable":true,"enum":[null]}]},"acceptedWarningCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kind","cutoffExclusiveTimestamp","previewHash","tokenSnapshotKeys","costBasisSnapshotKeys","ledgerAccountSnapshotKeys","workbookFileId","balancingAccountId"],"additionalProperties":false}},"required":["transaction","rawTransactionRows","conversionScope"],"additionalProperties":false},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_STATUS_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"newStatus":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"previousStatus":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"reason":{"type":"string"},"lockOnPosted":{"type":"boolean"},"periodCloseId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["newStatus","previousStatus"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_OPERATION_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"processedTransaction":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"subType":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"journalEntry":{"type":"object","properties":{"header":{"type":"object","properties":{"date":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"isAdjustment":{"type":"boolean"}},"required":["date"],"additionalProperties":{}},"entries":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"entryType":{"type":"string","enum":["DR","CR"]},"accountId":{"type":"string"},"originalAccountId":{"type":"string"},"fiatAmount":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"memo":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"type":"string"},"attribution":{"type":"object","properties":{"m":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"c":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"a":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false},"asset":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"lotLedgerEntryId":{"type":"object","properties":{"lotId":{"type":"string"},"entryId":{"type":"string"}},"required":["lotId","entryId"],"additionalProperties":{}},"walletOperation":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"required":["lineNumber","entryType","accountId","fiatAmount"],"additionalProperties":{}}}},"required":["header","entries"],"additionalProperties":{}},"walletOperations":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"lotLedger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"acquisitionTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"diff":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"price":{"type":"string","description":"A finite decimal value."},"value":{"type":"string","description":"A finite decimal value."},"lotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"entryKind":{"type":"string","enum":["ADD","DSP","CUT","RES","REL","MVE"]},"entitlementRef":{"type":"string"},"positionId":{"type":"string","description":"Canonical DefiPosition.id for reservation or marker-lot lineage. Omitted for ordinary cost-basis rows."}},"required":["id","entryId","timestamp","acquisitionTimestamp","diff","value","lotMethod","wallet","entryKind"],"additionalProperties":{}}},"errorMessage":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{}},{"type":"object","properties":{},"additionalProperties":{}}]},"severity":{"type":"string","enum":["ERROR","WARNING"]},"context":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{}}]},"cause":{}},"required":["name","message","body"],"additionalProperties":{}}},{"type":"string"}]}},"required":["id","status","timestamp","operationType","subType","walletOperations","lotLedger"],"additionalProperties":{}},"previousOperationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"previousSubType":{"type":"string"},"reason":{"type":"string"},"triggeringTransactionId":{"type":"string"}},"required":["processedTransaction","previousOperationType"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_MEMO_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"memo":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["memo"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_RECOMPUTED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"triggeringTransactionId":{"type":"string"},"processedTransaction":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"subType":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"journalEntry":{"type":"object","properties":{"header":{"type":"object","properties":{"date":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"isAdjustment":{"type":"boolean"}},"required":["date"],"additionalProperties":{}},"entries":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"entryType":{"type":"string","enum":["DR","CR"]},"accountId":{"type":"string"},"originalAccountId":{"type":"string"},"fiatAmount":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"memo":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"type":"string"},"attribution":{"type":"object","properties":{"m":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"c":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"a":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false},"asset":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"lotLedgerEntryId":{"type":"object","properties":{"lotId":{"type":"string"},"entryId":{"type":"string"}},"required":["lotId","entryId"],"additionalProperties":{}},"walletOperation":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"required":["lineNumber","entryType","accountId","fiatAmount"],"additionalProperties":{}}}},"required":["header","entries"],"additionalProperties":{}},"walletOperations":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"lotLedger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"acquisitionTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"diff":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"price":{"type":"string","description":"A finite decimal value."},"value":{"type":"string","description":"A finite decimal value."},"lotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"entryKind":{"type":"string","enum":["ADD","DSP","CUT","RES","REL","MVE"]},"entitlementRef":{"type":"string"},"positionId":{"type":"string","description":"Canonical DefiPosition.id for reservation or marker-lot lineage. Omitted for ordinary cost-basis rows."}},"required":["id","entryId","timestamp","acquisitionTimestamp","diff","value","lotMethod","wallet","entryKind"],"additionalProperties":{}}},"errorMessage":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{}},{"type":"object","properties":{},"additionalProperties":{}}]},"severity":{"type":"string","enum":["ERROR","WARNING"]},"context":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{}}]},"cause":{}},"required":["name","message","body"],"additionalProperties":{}}},{"type":"string"}]}},"required":["id","status","timestamp","operationType","subType","walletOperations","lotLedger"],"additionalProperties":{}},"reason":{"type":"string"},"accountEditEvidenceConsumed":{"type":"boolean","enum":[true]}},"required":["triggeringTransactionId","processedTransaction","reason"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_OPERATIONS_RECEIVED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"receivedOperations":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"},"portfolioTransactionId":{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]}},"required":["txId","txIdx","portfolioTransactionId"],"additionalProperties":{}}},"processedTransaction":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"subType":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"journalEntry":{"type":"object","properties":{"header":{"type":"object","properties":{"date":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"isAdjustment":{"type":"boolean"}},"required":["date"],"additionalProperties":{}},"entries":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"entryType":{"type":"string","enum":["DR","CR"]},"accountId":{"type":"string"},"originalAccountId":{"type":"string"},"fiatAmount":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"memo":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"type":"string"},"attribution":{"type":"object","properties":{"m":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"c":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"a":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false},"asset":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"lotLedgerEntryId":{"type":"object","properties":{"lotId":{"type":"string"},"entryId":{"type":"string"}},"required":["lotId","entryId"],"additionalProperties":{}},"walletOperation":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"required":["lineNumber","entryType","accountId","fiatAmount"],"additionalProperties":{}}}},"required":["header","entries"],"additionalProperties":{}},"walletOperations":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"lotLedger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"acquisitionTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"diff":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"price":{"type":"string","description":"A finite decimal value."},"value":{"type":"string","description":"A finite decimal value."},"lotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"entryKind":{"type":"string","enum":["ADD","DSP","CUT","RES","REL","MVE"]},"entitlementRef":{"type":"string"},"positionId":{"type":"string","description":"Canonical DefiPosition.id for reservation or marker-lot lineage. Omitted for ordinary cost-basis rows."}},"required":["id","entryId","timestamp","acquisitionTimestamp","diff","value","lotMethod","wallet","entryKind"],"additionalProperties":{}}},"errorMessage":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{}},{"type":"object","properties":{},"additionalProperties":{}}]},"severity":{"type":"string","enum":["ERROR","WARNING"]},"context":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{}}]},"cause":{}},"required":["name","message","body"],"additionalProperties":{}}},{"type":"string"}]}},"required":["id","status","timestamp","operationType","subType","walletOperations","lotLedger"],"additionalProperties":{}},"reason":{"type":"string"},"triggeringTransactionId":{"type":"string"},"accountEditEvidenceConsumed":{"type":"boolean","enum":[true]}},"required":["receivedOperations","processedTransaction"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_OPERATIONS_MOVED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"movedOperations":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"},"targetTransactionId":{"type":"string"}},"required":["txId","txIdx","targetTransactionId"],"additionalProperties":{}}},"processedTransaction":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"subType":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"journalEntry":{"type":"object","properties":{"header":{"type":"object","properties":{"date":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"isAdjustment":{"type":"boolean"}},"required":["date"],"additionalProperties":{}},"entries":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"entryType":{"type":"string","enum":["DR","CR"]},"accountId":{"type":"string"},"originalAccountId":{"type":"string"},"fiatAmount":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"memo":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"type":"string"},"attribution":{"type":"object","properties":{"m":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"c":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"a":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false},"asset":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"lotLedgerEntryId":{"type":"object","properties":{"lotId":{"type":"string"},"entryId":{"type":"string"}},"required":["lotId","entryId"],"additionalProperties":{}},"walletOperation":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"required":["lineNumber","entryType","accountId","fiatAmount"],"additionalProperties":{}}}},"required":["header","entries"],"additionalProperties":{}},"walletOperations":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"lotLedger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"acquisitionTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"diff":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"price":{"type":"string","description":"A finite decimal value."},"value":{"type":"string","description":"A finite decimal value."},"lotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"entryKind":{"type":"string","enum":["ADD","DSP","CUT","RES","REL","MVE"]},"entitlementRef":{"type":"string"},"positionId":{"type":"string","description":"Canonical DefiPosition.id for reservation or marker-lot lineage. Omitted for ordinary cost-basis rows."}},"required":["id","entryId","timestamp","acquisitionTimestamp","diff","value","lotMethod","wallet","entryKind"],"additionalProperties":{}}},"errorMessage":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{}},{"type":"object","properties":{},"additionalProperties":{}}]},"severity":{"type":"string","enum":["ERROR","WARNING"]},"context":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{}}]},"cause":{}},"required":["name","message","body"],"additionalProperties":{}}},{"type":"string"}]}},"required":["id","status","timestamp","operationType","subType","walletOperations","lotLedger"],"additionalProperties":{}},"reason":{"type":"string"},"triggeringTransactionId":{"type":"string"},"accountEditEvidenceConsumed":{"type":"boolean","enum":[true]}},"required":["movedOperations"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_OPERATIONS_REMOVED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"removedOperations":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"},"portfolioTransactionId":{"type":"string"}},"required":["txId","txIdx","portfolioTransactionId"],"additionalProperties":{}}},"reason":{"type":"string"}},"required":["removedOperations"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_FMV_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"assetId":{"type":"string"},"newValueQuote":{"type":"string"},"newQuoteSource":{"type":"string"},"newQuoteCurrency":{"type":"string"},"quoteMeta":{"type":"object","properties":{"s":{"type":"string","enum":["SYNC_SOURCE","FMV_ENGINE","DERIVED_REPRESENTED","DERIVED_SIBLING","POLICY","MANUAL"]},"ts":{"type":"integer","minimum":1,"maximum":8210266876799}},"required":["s"],"additionalProperties":{}},"processedTransaction":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"subType":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"journalEntry":{"type":"object","properties":{"header":{"type":"object","properties":{"date":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"isAdjustment":{"type":"boolean"}},"required":["date"],"additionalProperties":{}},"entries":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"entryType":{"type":"string","enum":["DR","CR"]},"accountId":{"type":"string"},"originalAccountId":{"type":"string"},"fiatAmount":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"memo":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"type":"string"},"attribution":{"type":"object","properties":{"m":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"c":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"a":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false},"asset":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"lotLedgerEntryId":{"type":"object","properties":{"lotId":{"type":"string"},"entryId":{"type":"string"}},"required":["lotId","entryId"],"additionalProperties":{}},"walletOperation":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"required":["lineNumber","entryType","accountId","fiatAmount"],"additionalProperties":{}}}},"required":["header","entries"],"additionalProperties":{}},"walletOperations":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"lotLedger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"acquisitionTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"diff":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"price":{"type":"string","description":"A finite decimal value."},"value":{"type":"string","description":"A finite decimal value."},"lotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"entryKind":{"type":"string","enum":["ADD","DSP","CUT","RES","REL","MVE"]},"entitlementRef":{"type":"string"},"positionId":{"type":"string","description":"Canonical DefiPosition.id for reservation or marker-lot lineage. Omitted for ordinary cost-basis rows."}},"required":["id","entryId","timestamp","acquisitionTimestamp","diff","value","lotMethod","wallet","entryKind"],"additionalProperties":{}}},"errorMessage":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{}},{"type":"object","properties":{},"additionalProperties":{}}]},"severity":{"type":"string","enum":["ERROR","WARNING"]},"context":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{}}]},"cause":{}},"required":["name","message","body"],"additionalProperties":{}}},{"type":"string"}]}},"required":["id","status","timestamp","operationType","subType","walletOperations","lotLedger"],"additionalProperties":{}},"reason":{"type":"string"},"triggeringTransactionId":{"type":"string"}},"required":["assetId","newValueQuote","processedTransaction"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_FMV_REFRESHED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"processedTransaction":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"subType":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"journalEntry":{"type":"object","properties":{"header":{"type":"object","properties":{"date":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"isAdjustment":{"type":"boolean"}},"required":["date"],"additionalProperties":{}},"entries":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"entryType":{"type":"string","enum":["DR","CR"]},"accountId":{"type":"string"},"originalAccountId":{"type":"string"},"fiatAmount":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"memo":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"type":"string"},"attribution":{"type":"object","properties":{"m":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"c":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"a":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false},"asset":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"lotLedgerEntryId":{"type":"object","properties":{"lotId":{"type":"string"},"entryId":{"type":"string"}},"required":["lotId","entryId"],"additionalProperties":{}},"walletOperation":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"required":["lineNumber","entryType","accountId","fiatAmount"],"additionalProperties":{}}}},"required":["header","entries"],"additionalProperties":{}},"walletOperations":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"lotLedger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"acquisitionTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"diff":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"price":{"type":"string","description":"A finite decimal value."},"value":{"type":"string","description":"A finite decimal value."},"lotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"entryKind":{"type":"string","enum":["ADD","DSP","CUT","RES","REL","MVE"]},"entitlementRef":{"type":"string"},"positionId":{"type":"string","description":"Canonical DefiPosition.id for reservation or marker-lot lineage. Omitted for ordinary cost-basis rows."}},"required":["id","entryId","timestamp","acquisitionTimestamp","diff","value","lotMethod","wallet","entryKind"],"additionalProperties":{}}},"errorMessage":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{}},{"type":"object","properties":{},"additionalProperties":{}}]},"severity":{"type":"string","enum":["ERROR","WARNING"]},"context":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{}}]},"cause":{}},"required":["name","message","body"],"additionalProperties":{}}},{"type":"string"}]}},"required":["id","status","timestamp","operationType","subType","walletOperations","lotLedger"],"additionalProperties":{}},"transfers":{"minItems":1,"type":"array","items":{"type":"object","properties":{"walletTransactionId":{"type":"string","minLength":1},"txIndex":{"type":"integer","minimum":0,"maximum":65535},"quote":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["unquoted"]},"details":{"not":{},"x-json-never":true}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["quoted"]},"details":{"type":"object","properties":{"valueQuote":{"type":"string","description":"A finite decimal value."},"quoteCurrencyAssetId":{"type":"string","minLength":1},"quoteSource":{"type":"string"},"quoteMeta":{"type":"object","properties":{"s":{"type":"string","enum":["SYNC_SOURCE","FMV_ENGINE","DERIVED_REPRESENTED","DERIVED_SIBLING","POLICY","MANUAL"]},"ts":{"type":"integer","minimum":1,"maximum":8210266876799}},"required":["s"],"additionalProperties":false}},"required":["valueQuote","quoteCurrencyAssetId"],"additionalProperties":false}},"required":["kind","details"],"additionalProperties":false}]}},"required":["walletTransactionId","txIndex","quote"],"additionalProperties":false}},"reason":{"type":"string","enum":["User refreshed market value"]},"triggeringTransactionId":{"type":"string","minLength":1}},"required":["processedTransaction","transfers","reason","triggeringTransactionId"],"additionalProperties":false},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_INTERCOMPANY_PAIR_APPLIED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"pairId":{"type":"string"},"counterpartPortfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"counterpartPortfolioTransactionId":{"type":"string"},"side":{"type":"string","enum":["SEND","RECEIVE"]},"treatment":{"type":"string","enum":["OPERATING_FUNDING","CARRYOVER_BASIS_TRANSFER"]},"processedTransaction":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"subType":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"journalEntry":{"type":"object","properties":{"header":{"type":"object","properties":{"date":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"isAdjustment":{"type":"boolean"}},"required":["date"],"additionalProperties":{}},"entries":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"entryType":{"type":"string","enum":["DR","CR"]},"accountId":{"type":"string"},"originalAccountId":{"type":"string"},"fiatAmount":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"memo":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"type":"string"},"attribution":{"type":"object","properties":{"m":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"c":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"a":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false},"asset":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"lotLedgerEntryId":{"type":"object","properties":{"lotId":{"type":"string"},"entryId":{"type":"string"}},"required":["lotId","entryId"],"additionalProperties":{}},"walletOperation":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"required":["lineNumber","entryType","accountId","fiatAmount"],"additionalProperties":{}}}},"required":["header","entries"],"additionalProperties":{}},"walletOperations":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"lotLedger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"acquisitionTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"diff":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"price":{"type":"string","description":"A finite decimal value."},"value":{"type":"string","description":"A finite decimal value."},"lotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"entryKind":{"type":"string","enum":["ADD","DSP","CUT","RES","REL","MVE"]},"entitlementRef":{"type":"string"},"positionId":{"type":"string","description":"Canonical DefiPosition.id for reservation or marker-lot lineage. Omitted for ordinary cost-basis rows."}},"required":["id","entryId","timestamp","acquisitionTimestamp","diff","value","lotMethod","wallet","entryKind"],"additionalProperties":{}}},"errorMessage":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{}},{"type":"object","properties":{},"additionalProperties":{}}]},"severity":{"type":"string","enum":["ERROR","WARNING"]},"context":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{}}]},"cause":{}},"required":["name","message","body"],"additionalProperties":{}}},{"type":"string"}]}},"required":["id","status","timestamp","operationType","subType","walletOperations","lotLedger"],"additionalProperties":{}},"lotLinks":{"type":"array","items":{"type":"object","properties":{"sourceLotEntryId":{"type":"string"},"destinationLotEntryId":{"type":"string"}},"required":["sourceLotEntryId","destinationLotEntryId"],"additionalProperties":false}},"reason":{"type":"string"},"triggeringTransactionId":{"type":"string"}},"required":["pairId","counterpartPortfolioSlug","counterpartPortfolioTransactionId","side","treatment","processedTransaction"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_INTERCOMPANY_PAIR_REMOVED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"pairId":{"type":"string"},"counterpartPortfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"counterpartPortfolioTransactionId":{"type":"string"},"durablePairFactsSnapshot":{"type":"object","properties":{"sourcePortfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"destinationPortfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"sourcePortfolioTransactionId":{"type":"string"},"destinationPortfolioTransactionId":{"type":"string"},"lotLinks":{"type":"array","items":{"type":"object","properties":{"sourceLotEntryId":{"type":"string"},"destinationLotEntryId":{"type":"string"}},"required":["sourceLotEntryId","destinationLotEntryId"],"additionalProperties":false}}},"required":["sourcePortfolioSlug","destinationPortfolioSlug","sourcePortfolioTransactionId","destinationPortfolioTransactionId"],"additionalProperties":false},"processedTransaction":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"subType":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"journalEntry":{"type":"object","properties":{"header":{"type":"object","properties":{"date":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"isAdjustment":{"type":"boolean"}},"required":["date"],"additionalProperties":{}},"entries":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"entryType":{"type":"string","enum":["DR","CR"]},"accountId":{"type":"string"},"originalAccountId":{"type":"string"},"fiatAmount":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"memo":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"type":"string"},"attribution":{"type":"object","properties":{"m":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"c":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"a":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false},"asset":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"lotLedgerEntryId":{"type":"object","properties":{"lotId":{"type":"string"},"entryId":{"type":"string"}},"required":["lotId","entryId"],"additionalProperties":{}},"walletOperation":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"required":["lineNumber","entryType","accountId","fiatAmount"],"additionalProperties":{}}}},"required":["header","entries"],"additionalProperties":{}},"walletOperations":{"type":"array","items":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}}},"lotLedger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"acquisitionTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"diff":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"price":{"type":"string","description":"A finite decimal value."},"value":{"type":"string","description":"A finite decimal value."},"lotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"entryKind":{"type":"string","enum":["ADD","DSP","CUT","RES","REL","MVE"]},"entitlementRef":{"type":"string"},"positionId":{"type":"string","description":"Canonical DefiPosition.id for reservation or marker-lot lineage. Omitted for ordinary cost-basis rows."}},"required":["id","entryId","timestamp","acquisitionTimestamp","diff","value","lotMethod","wallet","entryKind"],"additionalProperties":{}}},"errorMessage":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{}},{"type":"object","properties":{},"additionalProperties":{}}]},"severity":{"type":"string","enum":["ERROR","WARNING"]},"context":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{}}]},"cause":{}},"required":["name","message","body"],"additionalProperties":{}}},{"type":"string"}]}},"required":["id","status","timestamp","operationType","subType","walletOperations","lotLedger"],"additionalProperties":{}},"reason":{"type":"string"}},"required":["pairId","counterpartPortfolioSlug","counterpartPortfolioTransactionId","durablePairFactsSnapshot","processedTransaction"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_RULES_APPLIED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"integer","minimum":0,"maximum":9007199254740991},"account":{"type":"object","properties":{"from":{"type":"object","properties":{"accountId":{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]},"originalAccountId":{"anyOf":[{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]},{"type":"string","nullable":true,"enum":[null]}]},"attribution":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]}},"required":["accountId","originalAccountId","attribution"],"additionalProperties":false},"to":{"type":"object","properties":{"accountId":{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]},"originalAccountId":{"anyOf":[{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]},{"type":"string","nullable":true,"enum":[null]}]},"attribution":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]}},"required":["accountId","originalAccountId","attribution"],"additionalProperties":false}},"required":["from","to"],"additionalProperties":false},"counterparty":{"type":"object","properties":{"from":{"type":"object","properties":{"counterpartyId":{"anyOf":[{"type":"string","minLength":1},{"type":"string","nullable":true,"enum":[null]}]},"attribution":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]}},"required":["counterpartyId","attribution"],"additionalProperties":false},"to":{"type":"object","properties":{"counterpartyId":{"anyOf":[{"type":"string","minLength":1},{"type":"string","nullable":true,"enum":[null]}]},"attribution":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]}},"required":["counterpartyId","attribution"],"additionalProperties":false}},"required":["from","to"],"additionalProperties":false},"responsibilityCenters":{"minItems":1,"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string","minLength":1},"from":{"type":"object","properties":{"responsibilityCenterId":{"anyOf":[{"type":"string","minLength":1},{"type":"string","nullable":true,"enum":[null]}]},"attribution":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]}},"required":["responsibilityCenterId","attribution"],"additionalProperties":false},"to":{"type":"object","properties":{"responsibilityCenterId":{"anyOf":[{"type":"string","minLength":1},{"type":"string","nullable":true,"enum":[null]}]},"attribution":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]}},"required":["responsibilityCenterId","attribution"],"additionalProperties":false}},"required":["responsibilityCenterTypeId","from","to"],"additionalProperties":false}}},"required":["lineNumber"],"additionalProperties":false}},"errorMessage":{"type":"object","properties":{"from":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{}},{"type":"object","properties":{},"additionalProperties":{}}]},"severity":{"type":"string","enum":["ERROR","WARNING"]},"context":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{}}]},"cause":{}},"required":["name","message","body"],"additionalProperties":{}}},{"type":"string","nullable":true,"enum":[null]}]},"to":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{}},{"type":"object","properties":{},"additionalProperties":{}}]},"severity":{"type":"string","enum":["ERROR","WARNING"]},"context":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{}}]},"cause":{}},"required":["name","message","body"],"additionalProperties":{}}},{"type":"string","nullable":true,"enum":[null]}]}},"required":["from","to"],"additionalProperties":false}},"required":["lines"],"additionalProperties":false},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_JOURNAL_ENTRY_LINE_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"lineNumber":{"type":"number"},"accountId":{"type":"string"},"originalAccountId":{"type":"string"},"counterpartyId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"memo":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"attribution":{"type":"object","properties":{"m":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"c":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"a":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false},"attributionClears":{"type":"object","properties":{"c":{"type":"boolean","enum":[true]}},"additionalProperties":{}}},"required":["lineNumber"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_JOURNAL_ENTRY_LINE_CATEGORIES_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"journalEntryId":{"type":"string"},"lineNumber":{"type":"number"},"categories":{"type":"array","items":{"type":"string"}}},"required":["journalEntryId","lineNumber","categories"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_JOURNAL_ENTRY_LINE_COST_CENTER_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"journalEntryId":{"type":"string"},"lineNumber":{"type":"number"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"attribution":{"type":"object","properties":{"m":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"c":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"a":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false}},"required":["journalEntryId","lineNumber"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_TAGS_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}}},"required":["tags"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_FILE_ATTACHED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"file":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"fileSize":{"type":"integer","minimum":1,"maximum":10485760},"mimeType":{"type":"string"},"uploadedByUserId":{"type":"string"},"uploadedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","fileName","fileSize","mimeType","uploadedByUserId","uploadedAt"],"additionalProperties":{}}},"required":["file"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_FILE_REMOVED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"fileId":{"type":"string"}},"required":["fileId"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_PAYMENT_LINKED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"paymentTransactionId":{"type":"string"},"memo":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"tags":{"type":"array","items":{"type":"string"}},"fileAttachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"fileSize":{"type":"integer","minimum":1,"maximum":10485760},"mimeType":{"type":"string"},"uploadedByUserId":{"type":"string"},"uploadedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","fileName","fileSize","mimeType","uploadedByUserId","uploadedAt"],"additionalProperties":{}}},"reconcilesResponsibilityCenterAssignments":{"type":"boolean","enum":[true]},"journalEntryLineUpdates":{"type":"array","items":{"type":"object","properties":{"journalEntryId":{"type":"string"},"lineNumber":{"type":"number"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"memo":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"accountId":{"type":"string"},"originalAccountId":{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]},"attribution":{"anyOf":[{"type":"object","properties":{"m":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"c":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"a":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]}},"required":["journalEntryId","lineNumber","counterpartyId","memo","accountId"],"additionalProperties":{}}},"paymentLineTransferUpdates":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"walletTransactionId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"txIndex":{"anyOf":[{"type":"number"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["lineNumber","walletTransactionId","txIndex"],"additionalProperties":{}}}},"required":["paymentTransactionId","memo","tags","fileAttachments","journalEntryLineUpdates","paymentLineTransferUpdates"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_DELETED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"reason":{"type":"string"},"triggeringTransactionId":{"type":"string"},"deletedTransactionCascadeTrigger":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"portfolioTransactionId":{"type":"string","minLength":1},"sourceTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"affectedAssetIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"earliestAdjustedSourceDisposalsByAsset":{"propertyNames":{"type":"string","minLength":1},"type":"object","properties":{},"additionalProperties":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]}}},"required":["portfolioSlug","portfolioTransactionId","sourceTimestamp","affectedAssetIds","earliestAdjustedSourceDisposalsByAsset"],"additionalProperties":{}}},"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_SYNC_DISCREPANCY_DETECTED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"discoveredAt":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"summary":{"type":"string"},"diff":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{}}]},"reason":{"type":"string"},"triggeringTransactionId":{"type":"string"}},"required":["discoveredAt","summary"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["PORTFOLIO_TRANSACTION_BOOKED_AS_PRIOR_PERIOD_ADJUSTMENT"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"txId":{"type":"string"},"intendedTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"adjustsPeriodCloseId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"bookingTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]}},"required":["txId","intendedTimestamp","adjustsPeriodCloseId","bookingTimestamp"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"},"source":{"type":"string","enum":["USER","SYSTEM","PROJECTION","SAGA","EXTERNAL"]}},"required":["portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false}]},"before":{"nullable":true,"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"number"},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"subType":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"journalEntry":{"anyOf":[{"type":"object","properties":{"header":{"type":"object","properties":{"date":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"isAdjustment":{"type":"boolean"}},"required":["date"],"additionalProperties":{}},"entries":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"entryType":{"type":"string","enum":["DR","CR"]},"accountId":{"type":"string"},"fiatAmount":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"memo":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"type":"string"},"attribution":{"type":"object","properties":{"m":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"c":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"a":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false},"asset":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"lotLedgerEntryId":{"type":"object","properties":{"lotId":{"type":"string"},"entryId":{"type":"string"}},"required":["lotId","entryId"],"additionalProperties":{}},"walletOperation":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}},"displacedAccount":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["RESOLVED"]},"accountId":{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]}},"required":["kind","accountId"],"additionalProperties":{}},{"type":"object","properties":{"kind":{"type":"string","enum":["UNRESOLVED"]},"reference":{"type":"string"}},"required":["kind","reference"],"additionalProperties":{}}]}},"required":["lineNumber","entryType","accountId","fiatAmount"],"additionalProperties":{}}}},"required":["header","entries"],"additionalProperties":{}},{"type":"string","nullable":true,"enum":[null]}]},"walletOperations":{"type":"array","items":{"type":"object","properties":{"walletTransactionId":{"type":"string"},"txIndex":{"type":"number"}},"required":["walletTransactionId","txIndex"],"additionalProperties":{}}},"lotLedger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"acquisitionTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"diff":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"price":{"type":"string","description":"A finite decimal value."},"value":{"type":"string","description":"A finite decimal value."},"lotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"entryKind":{"type":"string","enum":["ADD","DSP","CUT","RES","REL","MVE"]},"entitlementRef":{"type":"string"},"positionId":{"type":"string","description":"Canonical DefiPosition.id for reservation or marker-lot lineage. Omitted for ordinary cost-basis rows."}},"required":["id","entryId","timestamp","acquisitionTimestamp","diff","value","lotMethod","wallet","entryKind"],"additionalProperties":{}}},"errorMessage":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{}},{"type":"object","properties":{},"additionalProperties":{}}]},"severity":{"type":"string","enum":["ERROR","WARNING"]},"context":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{}}]},"cause":{}},"required":["name","message","body"],"additionalProperties":{}}},"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"memo":{"type":"string"},"isDeleted":{"type":"boolean"},"deletedTransactionCascade":{"type":"object","properties":{"trigger":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"portfolioTransactionId":{"type":"string","minLength":1},"sourceTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"affectedAssetIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"earliestAdjustedSourceDisposalsByAsset":{"propertyNames":{"type":"string","minLength":1},"type":"object","properties":{},"additionalProperties":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]}}},"required":["portfolioSlug","portfolioTransactionId","sourceTimestamp","affectedAssetIds","earliestAdjustedSourceDisposalsByAsset"],"additionalProperties":{}},"reason":{"type":"string"}},"required":["trigger","reason"],"additionalProperties":{}},"tags":{"type":"array","items":{"type":"string"}},"accountEditLineNumbers":{"type":"array","items":{"type":"number"}},"ruleAuditDivergences":{"type":"array","items":{"type":"object","properties":{"version":{"type":"number"},"lineNumber":{"type":"number"},"dimension":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["account"]}},"required":["kind"],"additionalProperties":{}},{"type":"object","properties":{"kind":{"type":"string","enum":["counterparty"]}},"required":["kind"],"additionalProperties":{}},{"type":"object","properties":{"kind":{"type":"string","enum":["responsibilityCenter"]},"responsibilityCenterTypeId":{"type":"string"}},"required":["kind","responsibilityCenterTypeId"],"additionalProperties":{}}]},"displaced":{"type":"object","properties":{"aggregate":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"audited":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["aggregate","audited"],"additionalProperties":{}}},"required":["version","lineNumber","dimension","displaced"],"additionalProperties":{}}},"priorPeriodAdjustmentBooking":{"type":"object","properties":{"txId":{"type":"string"},"intendedTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"adjustsPeriodCloseId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"bookingTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]}},"required":["txId","intendedTimestamp","adjustsPeriodCloseId","bookingTimestamp"],"additionalProperties":{}},"fileAttachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"fileSize":{"type":"integer","minimum":1,"maximum":10485760},"mimeType":{"type":"string"},"uploadedByUserId":{"type":"string"},"uploadedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","fileName","fileSize","mimeType","uploadedByUserId","uploadedAt"],"additionalProperties":{}}},"lockOnPosted":{"type":"boolean"}},"required":["aggregateId","version","status","timestamp","operationType","subType","journalEntry","walletOperations","lotLedger","portfolioSlug","isDeleted","fileAttachments","lockOnPosted"],"additionalProperties":{}},"after":{"nullable":true,"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"number"},"status":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"operationType":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"]},"subType":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"journalEntry":{"anyOf":[{"type":"object","properties":{"header":{"type":"object","properties":{"date":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"systemNotes":{"type":"string"},"isAdjustment":{"type":"boolean"}},"required":["date"],"additionalProperties":{}},"entries":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"number"},"entryType":{"type":"string","enum":["DR","CR"]},"accountId":{"type":"string"},"fiatAmount":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"memo":{"type":"string"},"responsibilityCenterAssignments":{"type":"array","items":{"type":"object","properties":{"responsibilityCenterTypeId":{"type":"string"},"responsibilityCenterId":{"type":"string"},"percentageBps":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["responsibilityCenterTypeId","responsibilityCenterId","percentageBps"],"additionalProperties":{}}},"counterpartyId":{"type":"string"},"attribution":{"type":"object","properties":{"m":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"c":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"a":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"rc":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"s":{"type":"string","enum":["PAYMENT_LINK","USER_RULE","SYSTEM_RULE","MANUAL","MANUAL_CLEARED"]},"r":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"v":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["t","s"],"additionalProperties":false}}},"required":["rc"],"additionalProperties":false},"asset":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"lotLedgerEntryId":{"type":"object","properties":{"lotId":{"type":"string"},"entryId":{"type":"string"}},"required":["lotId","entryId"],"additionalProperties":{}},"walletOperation":{"type":"object","properties":{"txId":{"type":"string"},"txIdx":{"type":"number"}},"required":["txId","txIdx"],"additionalProperties":{}},"displacedAccount":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["RESOLVED"]},"accountId":{"type":"string","allOf":[{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}]}},"required":["kind","accountId"],"additionalProperties":{}},{"type":"object","properties":{"kind":{"type":"string","enum":["UNRESOLVED"]},"reference":{"type":"string"}},"required":["kind","reference"],"additionalProperties":{}}]}},"required":["lineNumber","entryType","accountId","fiatAmount"],"additionalProperties":{}}}},"required":["header","entries"],"additionalProperties":{}},{"type":"string","nullable":true,"enum":[null]}]},"walletOperations":{"type":"array","items":{"type":"object","properties":{"walletTransactionId":{"type":"string"},"txIndex":{"type":"number"}},"required":["walletTransactionId","txIndex"],"additionalProperties":{}}},"lotLedger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"entryId":{"type":"string"},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"acquisitionTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"diff":{"type":"object","properties":{"asset":{"type":"string"},"value":{"type":"string","description":"A finite decimal value."},"isFiat":{"type":"boolean"}},"required":["asset","value","isFiat"],"additionalProperties":{}},"price":{"type":"string","description":"A finite decimal value."},"value":{"type":"string","description":"A finite decimal value."},"lotMethod":{"type":"string","enum":["FIFO","LIFO","HIFO","ACB"]},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"entryKind":{"type":"string","enum":["ADD","DSP","CUT","RES","REL","MVE"]},"entitlementRef":{"type":"string"},"positionId":{"type":"string","description":"Canonical DefiPosition.id for reservation or marker-lot lineage. Omitted for ordinary cost-basis rows."}},"required":["id","entryId","timestamp","acquisitionTimestamp","diff","value","lotMethod","wallet","entryKind"],"additionalProperties":{}}},"errorMessage":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"body":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{}},{"type":"object","properties":{},"additionalProperties":{}}]},"severity":{"type":"string","enum":["ERROR","WARNING"]},"context":{"anyOf":[{"type":"object","properties":{},"additionalProperties":{}},{"type":"array","items":{}}]},"cause":{}},"required":["name","message","body"],"additionalProperties":{}}},"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"memo":{"type":"string"},"isDeleted":{"type":"boolean"},"deletedTransactionCascade":{"type":"object","properties":{"trigger":{"type":"object","properties":{"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"portfolioTransactionId":{"type":"string","minLength":1},"sourceTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"affectedAssetIds":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"earliestAdjustedSourceDisposalsByAsset":{"propertyNames":{"type":"string","minLength":1},"type":"object","properties":{},"additionalProperties":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]}}},"required":["portfolioSlug","portfolioTransactionId","sourceTimestamp","affectedAssetIds","earliestAdjustedSourceDisposalsByAsset"],"additionalProperties":{}},"reason":{"type":"string"}},"required":["trigger","reason"],"additionalProperties":{}},"tags":{"type":"array","items":{"type":"string"}},"accountEditLineNumbers":{"type":"array","items":{"type":"number"}},"ruleAuditDivergences":{"type":"array","items":{"type":"object","properties":{"version":{"type":"number"},"lineNumber":{"type":"number"},"dimension":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["account"]}},"required":["kind"],"additionalProperties":{}},{"type":"object","properties":{"kind":{"type":"string","enum":["counterparty"]}},"required":["kind"],"additionalProperties":{}},{"type":"object","properties":{"kind":{"type":"string","enum":["responsibilityCenter"]},"responsibilityCenterTypeId":{"type":"string"}},"required":["kind","responsibilityCenterTypeId"],"additionalProperties":{}}]},"displaced":{"type":"object","properties":{"aggregate":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"audited":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["aggregate","audited"],"additionalProperties":{}}},"required":["version","lineNumber","dimension","displaced"],"additionalProperties":{}}},"priorPeriodAdjustmentBooking":{"type":"object","properties":{"txId":{"type":"string"},"intendedTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"adjustsPeriodCloseId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"bookingTimestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]}},"required":["txId","intendedTimestamp","adjustsPeriodCloseId","bookingTimestamp"],"additionalProperties":{}},"fileAttachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"fileName":{"type":"string"},"fileSize":{"type":"integer","minimum":1,"maximum":10485760},"mimeType":{"type":"string"},"uploadedByUserId":{"type":"string"},"uploadedAt":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},"required":["id","fileName","fileSize","mimeType","uploadedByUserId","uploadedAt"],"additionalProperties":{}}},"lockOnPosted":{"type":"boolean"}},"required":["aggregateId","version","status","timestamp","operationType","subType","journalEntry","walletOperations","lotLedger","portfolioSlug","isDeleted","fileAttachments","lockOnPosted"],"additionalProperties":{}}},"required":["event","before","after"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"string"}},"error":{"type":"string"},"pagination":{"type":"object","properties":{"requestedLimit":{"type":"number"},"hasMore":{"type":"boolean"},"minVersion":{"type":"number"},"maxVersion":{"type":"number"}},"required":["hasMore"],"additionalProperties":false}},"required":["success","aggregateId","events","warnings"],"additionalProperties":false},"WalletTransactionAuditTrailResponseDto":{"type":"object","properties":{"success":{"type":"boolean"},"aggregateId":{"type":"string"},"events":{"type":"array","items":{"type":"object","properties":{"event":{"anyOf":[{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["TRANSACTION_CREATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"transaction":{"type":"object","properties":{"id":{"type":"string"},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"address":{"type":"string"},"hash":{"type":"string"},"chainId":{"type":"string"},"blockHeight":{"type":"string","pattern":"^-?[0-9]+n$"},"timestamp":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"memo":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"explorers":{"$ref":"#/components/schemas/PersistedJsonValue"},"source":{"type":"string"},"details":{"$ref":"#/components/schemas/PersistedJsonValue"},"createdAt":{"anyOf":[{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","allOf":[{"type":"string","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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"string","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))$"}]}]},"transfers":{"type":"array","items":{"type":"object","properties":{"walletTransactionId":{"type":"string"},"chainId":{"type":"string"},"txHash":{"type":"string"},"txIndex":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"fromAddress":{"type":"string"},"fromAddressLabel":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"toAddress":{"type":"string"},"toAddressLabel":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"value":{"type":"string","description":"A finite decimal value."},"valueQuote":{"anyOf":[{"type":"string","description":"A finite decimal value."},{"type":"string","nullable":true,"enum":[null]}]},"quoteCurrency":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"quoteSource":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"quoteMeta":{"anyOf":[{"type":"object","properties":{"s":{"type":"string","enum":["SYNC_SOURCE","FMV_ENGINE","DERIVED_REPRESENTED","DERIVED_SIBLING","POLICY","MANUAL"]},"ts":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"string","nullable":true,"enum":[null]}]}},"required":["s"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"tokenAddress":{"type":"string"},"type":{"type":"string","enum":["IN","OUT","GAS","SELF"]},"portfolioTransactionId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"defiOperation":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"defiPositionId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"defiTokenRole":{"anyOf":[{"type":"string","enum":["UNDERLYING","COLLATERAL","RECEIPT_TOKEN","LP_SHARE","LIABILITY_TOKEN","REWARD","OTHER"]},{"type":"string","nullable":true,"enum":[null]}]},"periodCloseId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]}},"required":["walletTransactionId","chainId","txHash","txIndex","fromAddress","fromAddressLabel","toAddress","toAddressLabel","value","valueQuote","quoteCurrency","quoteSource","quoteMeta","tokenAddress","type","portfolioTransactionId","defiOperation","defiPositionId","defiTokenRole","periodCloseId","portfolioSlug"],"additionalProperties":false}}},"required":["id","wallet","portfolioSlug","address","hash","chainId","blockHeight","timestamp","memo","explorers","source","details","createdAt","transfers"],"additionalProperties":false}},"required":["transaction"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"source":{"type":"string","enum":["SYSTEM"]},"createdAt":{"type":"string"},"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"userId":{"type":"string"}},"required":["source","createdAt","portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["QUOTE_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"transferIndex":{"type":"number"},"newValueQuote":{"type":"string"},"newQuoteSource":{"type":"string"},"newQuoteCurrency":{"type":"string"},"reason":{"type":"string"}},"required":["transferIndex","newValueQuote","newQuoteSource","newQuoteCurrency"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"userId":{"type":"string"},"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"clientInfo":{"propertyNames":{"type":"string"},"type":"object","properties":{},"additionalProperties":{}}},"required":["userId","portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false},{"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"type":{"type":"string","enum":["MEMO_UPDATED"]},"timestamp":{"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))$"},"payload":{"type":"object","properties":{"newMemo":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["newMemo"],"additionalProperties":{}},"metadata":{"type":"object","properties":{"userId":{"type":"string"},"portfolioSlug":{"anyOf":[{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public URL slug."},{"type":"string","nullable":true,"enum":[null]}]},"clientInfo":{"propertyNames":{"type":"string"},"type":"object","properties":{},"additionalProperties":{}}},"required":["userId","portfolioSlug"],"additionalProperties":{}},"userId":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string"},"name":{"nullable":true,"type":"string"},"image":{"nullable":true,"type":"string"},"status":{"type":"string","enum":["current","former"]}},"required":["id","name","image","status"],"additionalProperties":false}},"required":["aggregateId","version","type","timestamp","payload","metadata"],"additionalProperties":false}]},"before":{"nullable":true,"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"number"},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"address":{"type":"string"},"chainId":{"type":"string"},"hash":{"type":"string"},"blockHeight":{"type":"string","pattern":"^-?[0-9]+n$"},"timestamp":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"explorers":{"type":"array","items":{}},"source":{"type":"string"},"details":{},"memo":{"type":"string"},"transfers":{"type":"array","items":{"type":"object","properties":{"txIndex":{"type":"number"},"valueQuote":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"quoteSource":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"quoteCurrency":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"chainId":{"type":"string"},"txHash":{"type":"string"},"fromAddress":{"type":"string"},"fromAddressLabel":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"toAddress":{"type":"string"},"toAddressLabel":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"tokenAddress":{"type":"string"},"value":{"type":"string"},"type":{"type":"string"},"portfolioTransactionId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["txIndex","valueQuote","quoteSource","quoteCurrency","chainId","txHash","fromAddress","fromAddressLabel","toAddress","toAddressLabel","tokenAddress","value","type","portfolioTransactionId"],"additionalProperties":{}}}},"required":["aggregateId","version","wallet","address","chainId","hash","blockHeight","timestamp","explorers","source","details","transfers"],"additionalProperties":{}},"after":{"nullable":true,"type":"object","properties":{"aggregateId":{"type":"string"},"version":{"type":"number"},"wallet":{"anyOf":[{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"}},"required":["chainId","address"],"additionalProperties":false},{"type":"string","nullable":true,"enum":[null]}]},"address":{"type":"string"},"chainId":{"type":"string"},"hash":{"type":"string"},"blockHeight":{"type":"string","pattern":"^-?[0-9]+n$"},"timestamp":{"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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"explorers":{"type":"array","items":{}},"source":{"type":"string"},"details":{},"memo":{"type":"string"},"transfers":{"type":"array","items":{"type":"object","properties":{"txIndex":{"type":"number"},"valueQuote":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"quoteSource":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"quoteCurrency":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"chainId":{"type":"string"},"txHash":{"type":"string"},"fromAddress":{"type":"string"},"fromAddressLabel":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"toAddress":{"type":"string"},"toAddressLabel":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"tokenAddress":{"type":"string"},"value":{"type":"string"},"type":{"type":"string"},"portfolioTransactionId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["txIndex","valueQuote","quoteSource","quoteCurrency","chainId","txHash","fromAddress","fromAddressLabel","toAddress","toAddressLabel","tokenAddress","value","type","portfolioTransactionId"],"additionalProperties":{}}}},"required":["aggregateId","version","wallet","address","chainId","hash","blockHeight","timestamp","explorers","source","details","transfers"],"additionalProperties":{}}},"required":["event","before","after"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"string"}},"error":{"type":"string"},"pagination":{"type":"object","properties":{"requestedLimit":{"type":"number"},"hasMore":{"type":"boolean"},"minVersion":{"type":"number"},"maxVersion":{"type":"number"}},"required":["hasMore"],"additionalProperties":false}},"required":["success","aggregateId","events","warnings"],"additionalProperties":false},"PersistedJsonValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/PersistedJsonValue"}]}},{"propertyNames":{"type":"string"},"type":"object","properties":{},"additionalProperties":{"allOf":[{"$ref":"#/components/schemas/PersistedJsonValue"}]}}]},"PeriodClosePreviewRequestDto":{"type":"object","properties":{"closeThroughDate":{"type":"string","format":"date","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])))$"}},"required":["closeThroughDate"],"additionalProperties":false},"PeriodClosePreviewResponseDto":{"type":"object","properties":{"result":{"type":"object","properties":{"closeThroughDate":{"type":"string","format":"date","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])))$"},"bounds":{"type":"object","properties":{"reportingTimezone":{"type":"string","minLength":1},"periodStartExclusive":{"nullable":true,"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))$"},"periodEndInclusive":{"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))$"},"nextMidnightBoundary":{"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))$"},"maxCloseThroughDate":{"type":"string","format":"date","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])))$"},"functionalCurrency":{"type":"string","minLength":1}},"required":["reportingTimezone","periodStartExclusive","periodEndInclusive","nextMidnightBoundary","maxCloseThroughDate","functionalCurrency"],"additionalProperties":false},"financialReportingFramework":{"type":"string","enum":["TAX_ONLY","US_GAAP_ASC350_60","IFRS_IAS2_LCNRV","IFRS_IAS2_BROKER_TRADER_FVLCTS"]},"frameworkStrategy":{"type":"string","enum":["TAX_ONLY","ASC_350_60_FAIR_VALUE","IAS2_LOWER_OF_COST_AND_NRV","IAS2_BROKER_TRADER_FVLCTS"]},"frameworkCapability":{"type":"string","enum":["EXECUTABLE","ACTIVATION_DISABLED","UNSUPPORTED"]},"isFiscalYearEnd":{"type":"boolean"},"issues":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["FISCAL_YEAR_BOUNDARY_CROSSED","FRAMEWORK_ACTIVATION_DISABLED","ERROR_TX_AT_OR_BEFORE_PERIOD_END","WALLETS_NOT_SYNCED_THROUGH_PERIOD_END","STALE_CLOSE_EVIDENCE","MATERIAL_UNPRICED_IN_SCOPE_HOLDING","NEGATIVE_IN_SCOPE_HOLDING","UNAVAILABLE_POSTING_ACCOUNT","INVALID_POSTING_ACCOUNT","MISSING_YEAR_END_LEGAL_ENTITY","LEGACY_YEAR_END_LEGAL_ENTITY","TRUST_YEAR_END_LEGAL_ENTITY","UNSUPPORTED_YEAR_END_LEGAL_ENTITY","PERIOD_CLOSE_PLAN_TOO_LARGE","UNCATEGORIZED_TRANSACTIONS","PENDING_ADJUSTMENTS","RECONCILIATION_DIFFERENCE"]},"severity":{"type":"string","enum":["BLOCKER","WARNING"]},"message":{"type":"string","minLength":1},"subject":{"type":"string","enum":["PERIOD","FRAMEWORK","TRANSACTION","WALLET","EVIDENCE","ACCOUNT","LEGAL_ENTITY","LEDGER","ADJUSTMENT","RECONCILIATION"]},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"detailItems":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"label":{"nullable":true,"type":"string","minLength":1}},"required":["id","label"],"additionalProperties":false}},"detailItemsTruncated":{"type":"boolean"}},"required":["code","severity","message","subject","count","detailItems","detailItemsTruncated"],"additionalProperties":false}},"canClose":{"type":"boolean"},"plan":{"nullable":true,"type":"object","properties":{"functionalCurrency":{"type":"string","pattern":"^[A-Z]{3}$"},"frameworkMeasurement":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","enum":["NO_OP"]}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["POSTED"]},"journals":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"object","properties":{"lines":{"minItems":2,"maxItems":10000,"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"integer","minimum":1,"maximum":2147483647},"account":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PERSISTED"]},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind","accountId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["STABLE"]},"stableLookupKey":{"type":"object","properties":{"accountType":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]},"accountSubType":{"type":"string","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"]},"walletId":{"nullable":true,"type":"integer","minimum":1,"maximum":2147483647},"assetId":{"nullable":true,"type":"string","minLength":1},"currency":{"type":"string","minLength":1}},"required":["accountType","accountSubType","walletId","assetId","currency"],"additionalProperties":false},"disposition":{"oneOf":[{"type":"object","properties":{"disposition":{"type":"string","enum":["REUSE"]},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["disposition","accountId"],"additionalProperties":false},{"type":"object","properties":{"disposition":{"type":"string","enum":["CREATE"]},"creationName":{"type":"string","minLength":1}},"required":["disposition","creationName"],"additionalProperties":false}],"type":"object"}},"required":["kind","stableLookupKey","disposition"],"additionalProperties":false}],"type":"object"},"entryType":{"type":"string","enum":["DR","CR"]},"fiatAmount":{"type":"string"}},"required":["lineNumber","account","entryType","fiatAmount"],"additionalProperties":false}},"totalDebits":{"type":"string"},"totalCredits":{"type":"string"},"subType":{"type":"string","enum":["fair_value_reversal","fair_value_mark"]}},"required":["lines","totalDebits","totalCredits","subType"],"additionalProperties":false}}},"required":["action","journals"],"additionalProperties":false}],"type":"object"},"yearEndAction":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","enum":["NOT_APPLICABLE"]}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["NO_OP"]}},"required":["action"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","enum":["POSTED"]},"accountDisposition":{"nullable":true,"type":"object","properties":{"kind":{"type":"string","enum":["STABLE"]},"stableLookupKey":{"type":"object","properties":{"accountType":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]},"accountSubType":{"type":"string","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"]},"walletId":{"nullable":true,"type":"integer","minimum":1,"maximum":2147483647},"assetId":{"nullable":true,"type":"string","minLength":1},"currency":{"type":"string","minLength":1}},"required":["accountType","accountSubType","walletId","assetId","currency"],"additionalProperties":false},"disposition":{"oneOf":[{"type":"object","properties":{"disposition":{"type":"string","enum":["REUSE"]},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["disposition","accountId"],"additionalProperties":false},{"type":"object","properties":{"disposition":{"type":"string","enum":["CREATE"]},"creationName":{"type":"string","minLength":1}},"required":["disposition","creationName"],"additionalProperties":false}],"type":"object"}},"required":["kind","stableLookupKey","disposition"],"additionalProperties":false},"journal":{"type":"object","properties":{"lines":{"minItems":2,"maxItems":10000,"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"integer","minimum":1,"maximum":2147483647},"account":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["PERSISTED"]},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["kind","accountId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["STABLE"]},"stableLookupKey":{"type":"object","properties":{"accountType":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]},"accountSubType":{"type":"string","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"]},"walletId":{"nullable":true,"type":"integer","minimum":1,"maximum":2147483647},"assetId":{"nullable":true,"type":"string","minLength":1},"currency":{"type":"string","minLength":1}},"required":["accountType","accountSubType","walletId","assetId","currency"],"additionalProperties":false},"disposition":{"oneOf":[{"type":"object","properties":{"disposition":{"type":"string","enum":["REUSE"]},"accountId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["disposition","accountId"],"additionalProperties":false},{"type":"object","properties":{"disposition":{"type":"string","enum":["CREATE"]},"creationName":{"type":"string","minLength":1}},"required":["disposition","creationName"],"additionalProperties":false}],"type":"object"}},"required":["kind","stableLookupKey","disposition"],"additionalProperties":false}],"type":"object"},"entryType":{"type":"string","enum":["DR","CR"]},"fiatAmount":{"type":"string"}},"required":["lineNumber","account","entryType","fiatAmount"],"additionalProperties":false}},"totalDebits":{"type":"string"},"totalCredits":{"type":"string"},"subType":{"type":"string","enum":["YEAR_END_EARNINGS_TRANSFER"]}},"required":["lines","totalDebits","totalCredits","subType"],"additionalProperties":false}},"required":["action","accountDisposition","journal"],"additionalProperties":false}],"type":"object"},"counts":{"type":"object","properties":{"sourceTransactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"frameworkMeasurementTransactionCount":{"type":"integer","minimum":0,"maximum":2},"yearEndTransactionCount":{"type":"integer","minimum":0,"maximum":1}},"required":["sourceTransactionCount","frameworkMeasurementTransactionCount","yearEndTransactionCount"],"additionalProperties":false},"snapshotHash":{"type":"string","pattern":"^[a-f0-9]{64}$"},"planHash":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["functionalCurrency","frameworkMeasurement","yearEndAction","counts","snapshotHash","planHash"],"additionalProperties":false},"accumulatedEarningsAccount":{"nullable":true,"oneOf":[{"type":"object","properties":{"disposition":{"type":"string","enum":["REUSE"]},"name":{"type":"string","minLength":1},"accountNumber":{"type":"string","minLength":1}},"required":["disposition","name","accountNumber"],"additionalProperties":false},{"type":"object","properties":{"disposition":{"type":"string","enum":["CREATE"]},"creationName":{"type":"string","minLength":1}},"required":["disposition","creationName"],"additionalProperties":false}],"type":"object"}},"required":["closeThroughDate","bounds","financialReportingFramework","frameworkStrategy","frameworkCapability","isFiscalYearEnd","issues","canClose","plan","accumulatedEarningsAccount"],"additionalProperties":false}},"required":["result"],"additionalProperties":false},"CommandRequestDto":{"type":"object","properties":{"payload":{"description":"Command-specific payload","type":"object","additionalProperties":{}},"mode":{"description":"Execution mode; defaults to the command's preferred mode","type":"string","enum":["sync","async"]}}},"CreateManualJournalEntryResultDto":{"type":"object","properties":{"mode":{"type":"string","enum":["sync","async"],"description":"Whether the command ran sync or async"},"result":{"description":"The command result, present for synchronous commands","oneOf":[{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"portfolioTransactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Identity of the ADJUSTMENT transaction created to hold the submitted journal entry. Its create event and journal are written in the same transaction as the command, so the transaction exists once the command succeeds rather than after a later runner pass."}},"required":["portfolioTransactionId"],"additionalProperties":false}},"required":["success","data"],"additionalProperties":false},{"type":"object","properties":{"success":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"name":{"type":"string","description":"The class name of the error"},"message":{"type":"string","description":"The error message"},"body":{"anyOf":[{"type":"object","properties":{"usageType":{"type":"string"},"currentUsage":{"type":"number"},"limit":{"type":"number"}},"required":["usageType","currentUsage","limit"],"additionalProperties":false},{}],"description":"The error body, usually fields needed to reconstruct the specific error fields"}},"required":["name","message","body"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false}],"type":"object"},"jobId":{"description":"Tracking job id, present for asynchronous commands","type":"string"},"status":{"description":"Queue status, present for asynchronous commands","type":"string","enum":["queued"]}},"required":["mode"],"additionalProperties":false},"BulkArchiveLedgerAccountsRequestDto":{"type":"object","properties":{"accountNumbers":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1},"description":"Ledger account numbers to update"},"isActive":{"default":false,"description":"Active state to set for all accounts. Defaults to false.","type":"boolean"}},"required":["accountNumbers"],"additionalProperties":false},"BulkArchiveLedgerAccountsResponseDto":{"type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"accountNumber":{"type":"string","description":"Ledger account number"},"isActive":{"type":"boolean","description":"Active state now in effect"}},"required":["accountNumber","isActive"],"additionalProperties":false},"description":"Processed accounts in first-seen request order"}},"required":["accounts"],"additionalProperties":false},"AddWalletsRequestDto":{"type":"object","properties":{"wallets":{"minItems":1,"maxItems":50,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"default":"blockchain","type":"string","enum":["blockchain"]},"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."},"address":{"type":"string","minLength":1,"description":"Wallet address"},"name":{"description":"Optional wallet name","type":"string","maxLength":100},"credentials":{"description":"Credentials for Prividium-backed blockchain wallets. Use a Prividium-specific integration id, not 'evm' or an ordinary public chain integration id.","type":"object","properties":{"apiKey":{"description":"API key or RPC URL","nullable":true,"type":"string","minLength":1},"secret":{"description":"API secret or explorer URL","nullable":true,"type":"string","minLength":1},"uid":{"description":"Optional exchange uid","nullable":true,"type":"string","minLength":1},"login":{"description":"Optional exchange login","nullable":true,"type":"string","minLength":1},"password":{"description":"Optional exchange password","nullable":true,"type":"string","minLength":1},"privateKey":{"description":"Integration authentication private key. Never provide a wallet signing or spending key.","nullable":true,"type":"string","minLength":1},"walletAddress":{"description":"Optional credential wallet address","nullable":true,"type":"string","minLength":1},"accountId":{"description":"Optional exchange subaccount identifier","nullable":true,"type":"string","minLength":1},"token":{"description":"OAuth or bearer token. API-key callers may provide this when creating or updating a wallet only from an authorization flow they control.","nullable":true,"type":"string","minLength":1},"refreshToken":{"description":"OAuth refresh token. API-key callers may provide this when creating or updating a wallet only from an authorization flow they control.","nullable":true,"type":"string","minLength":1},"tokenExpiresAt":{"description":"OAuth token expiry timestamp. API-key callers may provide this when creating or updating a wallet only from an authorization flow they control.","nullable":true,"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))$"}}}},"required":["integrationId","address"]},{"type":"object","properties":{"type":{"type":"string","enum":["exchange"]},"exchangeId":{"type":"string","minLength":1,"description":"Exchange identifier"},"credentials":{"type":"object","properties":{"apiKey":{"description":"API key or RPC URL","nullable":true,"type":"string","minLength":1},"secret":{"description":"API secret or explorer URL","nullable":true,"type":"string","minLength":1},"uid":{"description":"Optional exchange uid","nullable":true,"type":"string","minLength":1},"login":{"description":"Optional exchange login","nullable":true,"type":"string","minLength":1},"password":{"description":"Optional exchange password","nullable":true,"type":"string","minLength":1},"privateKey":{"description":"Integration authentication private key. Never provide a wallet signing or spending key.","nullable":true,"type":"string","minLength":1},"walletAddress":{"description":"Optional credential wallet address","nullable":true,"type":"string","minLength":1},"accountId":{"description":"Optional exchange subaccount identifier","nullable":true,"type":"string","minLength":1},"token":{"description":"OAuth or bearer token. API-key callers may provide this when creating or updating a wallet only from an authorization flow they control.","nullable":true,"type":"string","minLength":1},"refreshToken":{"description":"OAuth refresh token. API-key callers may provide this when creating or updating a wallet only from an authorization flow they control.","nullable":true,"type":"string","minLength":1},"tokenExpiresAt":{"description":"OAuth token expiry timestamp. API-key callers may provide this when creating or updating a wallet only from an authorization flow they control.","nullable":true,"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":"Exchange API credentials"},"name":{"description":"Optional wallet name","type":"string","maxLength":100}},"required":["type","exchangeId","credentials"]}]}}},"required":["wallets"]},"AddWalletsResponseDto":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"chainId":{"description":"Chain ID (absent for skipped items with no chain)","type":"string"},"address":{"type":"string","description":"Wallet address. Exchange wallets return an opaque stable address slug that can be used as walletAddress in sync selectors."},"status":{"type":"string","enum":["created","skipped"],"description":"Per-wallet outcome"},"reason":{"description":"Reason when skipped","type":"string"}},"required":["address","status"],"additionalProperties":false}},"syncQueued":{"type":"boolean"}},"required":["results","syncQueued"],"additionalProperties":false},"PaginatedWalletsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WalletDetailsResponseDto"}},"pagination":{"type":"object","properties":{"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Current page number"},"pageSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Items per page"},"totalCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of items"},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total number of pages"}},"required":["page","pageSize","totalCount","totalPages"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"WalletDetailsResponseDto":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"},"name":{"nullable":true,"description":"Wallet name","type":"string"},"createdAt":{"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":"Creation timestamp (ISO 8601)"},"lastSyncAt":{"description":"When the wallet last finished a sync (ISO 8601)","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))$"},"syncMessages":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","enum":["EXCHANGE_RECONNECT_REQUIRED"]},"message":{"type":"string","minLength":1},"severity":{"default":"ERROR","type":"string","enum":["ERROR","WARN"]},"details":{"type":"object","properties":{"provider":{"type":"string","minLength":1},"reconnectRequired":{"type":"boolean","enum":[true]},"errorType":{"type":"string","enum":["ExternalServiceAuthenticationError"]}},"required":["provider","reconnectRequired","errorType"],"additionalProperties":false}},"required":["code","message","severity","details"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["SYNC_PROCESSING_FAILED"]},"message":{"type":"string","minLength":1},"severity":{"default":"ERROR","type":"string","enum":["ERROR","WARN"]},"details":{"type":"object","properties":{"retryable":{"type":"boolean","enum":[true]},"errorType":{"type":"string","enum":["SyncProcessingError"]}},"required":["retryable","errorType"],"additionalProperties":false}},"required":["code","message","severity","details"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["SYNC_WARNING"]},"message":{"type":"string","minLength":1},"severity":{"default":"ERROR","type":"string","enum":["ERROR","WARN"]},"details":{"type":"object","properties":{"errorType":{"type":"string","enum":["SyncWarning"]}},"required":["errorType"],"additionalProperties":false}},"required":["code","message","severity","details"],"additionalProperties":false}],"type":"object"},"description":"Safe structured messages from the last finished sync"},"syncStatus":{"type":"string","enum":["pending","syncing","synced","failed"],"description":"Current sync status"},"transactionCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of transactions"}},"required":["chainId","address","name","createdAt","syncMessages","syncStatus","transactionCount"],"additionalProperties":false},"CreateBankAccountRequestDto":{"type":"object","properties":{"currency":{"description":"ISO 4217 currency code (e.g. USD, EUR, CAD); normalised to uppercase","type":"string","pattern":"^[A-Za-z]{3}$"},"displayName":{"type":"string","minLength":1,"maxLength":255,"description":"Human-readable account name"},"institutionName":{"description":"Name of the financial institution","type":"string","minLength":1,"maxLength":255},"mask":{"description":"Masked account number (e.g. last 4 digits)","type":"string","minLength":1,"maxLength":64}},"required":["currency","displayName"],"additionalProperties":false},"CreateBankAccountResponseDto":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID — always \"banking\" for bank wallets"},"walletAddress":{"type":"string","description":"Generated BANK wallet address"},"bankAccountId":{"type":"string","description":"Internal bank account identifier"},"currency":{"type":"string","description":"ISO 4217 currency code (uppercased)"}},"required":["chainId","walletAddress","bankAccountId","currency"],"additionalProperties":false},"BankStatementImportRequestDto":{"type":"object","properties":{"fileName":{"type":"string","minLength":1,"maxLength":255,"description":"Original file name including extension (e.g. statement.csv)"},"contentBase64":{"type":"string","minLength":1,"description":"Statement file content as base64-encoded bytes (max 5 MB)"}},"required":["fileName","contentBase64"],"additionalProperties":false},"BankStatementImportResponseDto":{"type":"object","properties":{"jobId":{"type":"string","description":"BullMQ job ID for the enqueued import"}},"required":["jobId"],"additionalProperties":false},"StartTransactionImportRequestDto":{"type":"object","properties":{"contentBase64":{"type":"string","minLength":1,"description":"Tabular source file content as base64-encoded bytes (max 5 MB)"},"fileName":{"type":"string","minLength":1,"maxLength":255},"integrationId":{"type":"string","minLength":1},"target":{"oneOf":[{"type":"object","properties":{"declaredAddress":{"type":"string","minLength":1},"declaredName":{"type":"string","minLength":1,"maxLength":255},"kind":{"type":"string","enum":["new"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["existing"]},"wallet":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"walletAddress":{"type":"string","description":"Wallet address"}},"required":["chainId","walletAddress"],"additionalProperties":false}},"required":["kind","wallet"],"additionalProperties":false}],"type":"object"}},"required":["contentBase64","fileName","integrationId","target"],"additionalProperties":false},"StartTransactionImportResponseDto":{"type":"object","properties":{"importRef":{"type":"string","pattern":"^transaction-import-[0-9a-f]{32}$","description":"Public transaction import reference"},"jobId":{"type":"string","minLength":1},"status":{"type":"string","enum":["UPLOADED","ANALYZING","PREVIEW_READY","FINALIZING","COMMITTED","FAILED","DELETED"]}},"required":["importRef","jobId","status"],"additionalProperties":false},"TransactionImportHistoryListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"auditPresentmentAvailable":{"type":"boolean","description":"Whether a retained audit presentment can be exported"},"chainId":{"type":"string","minLength":1,"description":"Wallet chain ID declared for import"},"commitResult":{"nullable":true,"description":"Durable actual finalize result, or null when unavailable","type":"object","properties":{"committedAt":{"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))$"},"importedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"skippedCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["committedAt","importedCount","skippedCount"],"additionalProperties":false},"counts":{"type":"object","properties":{"excluded":{"type":"integer","minimum":0,"maximum":9007199254740991},"flagged":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasUnresolved":{"type":"integer","minimum":0,"maximum":9007199254740991},"inLedger":{"type":"integer","minimum":0,"maximum":9007199254740991},"pending":{"type":"integer","minimum":0,"maximum":9007199254740991},"resolved":{"type":"integer","minimum":0,"maximum":9007199254740991},"sourceRows":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalRecords":{"type":"integer","minimum":0,"maximum":9007199254740991},"warnings":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["excluded","flagged","hasUnresolved","inLedger","pending","resolved","sourceRows","totalRecords","warnings"],"additionalProperties":false,"description":"Planned preview record counts captured during analysis"},"createdAt":{"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":"Import creation timestamp"},"declaredName":{"nullable":true,"description":"User-provided wallet name, or null when none was provided","type":"string"},"importRef":{"type":"string","pattern":"^transaction-import-[0-9a-f]{32}$","description":"Public transaction import reference"},"sourceFileAvailable":{"type":"boolean","description":"Whether the original uploaded source file can be downloaded"},"sourceFileName":{"nullable":true,"description":"Original uploaded file name for display, or null when unavailable","type":"string","minLength":1},"status":{"type":"string","enum":["UPLOADED","ANALYZING","PREVIEW_READY","FINALIZING","COMMITTED","FAILED","DELETED"],"description":"Current transaction import lifecycle status"},"undoRetryAvailable":{"type":"boolean","description":"Whether the import can enqueue or retry Undo from history"},"updatedAt":{"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":"Last import update timestamp"},"walletAddress":{"type":"string","minLength":1,"description":"Wallet address declared for import"}},"required":["auditPresentmentAvailable","chainId","commitResult","counts","createdAt","declaredName","importRef","sourceFileAvailable","sourceFileName","status","undoRetryAvailable","updatedAt","walletAddress"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"TransactionImportSummaryDto":{"type":"object","properties":{"auditPresentmentAvailable":{"type":"boolean"},"chainId":{"type":"string","minLength":1},"commitResult":{"nullable":true,"type":"object","properties":{"committedAt":{"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))$"},"importedCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"skippedCount":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["committedAt","importedCount","skippedCount"],"additionalProperties":false},"counts":{"type":"object","properties":{"excluded":{"type":"integer","minimum":0,"maximum":9007199254740991},"flagged":{"type":"integer","minimum":0,"maximum":9007199254740991},"hasUnresolved":{"type":"integer","minimum":0,"maximum":9007199254740991},"inLedger":{"type":"integer","minimum":0,"maximum":9007199254740991},"pending":{"type":"integer","minimum":0,"maximum":9007199254740991},"resolved":{"type":"integer","minimum":0,"maximum":9007199254740991},"sourceRows":{"type":"integer","minimum":0,"maximum":9007199254740991},"totalRecords":{"type":"integer","minimum":0,"maximum":9007199254740991},"warnings":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["excluded","flagged","hasUnresolved","inLedger","pending","resolved","sourceRows","totalRecords","warnings"],"additionalProperties":false},"createdAt":{"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))$"},"declaredAddress":{"type":"string","minLength":1},"declaredName":{"nullable":true,"type":"string"},"failure":{"nullable":true,"anyOf":[{"oneOf":[{"type":"object","properties":{"category":{"type":"string","enum":["PARSING"]},"code":{"type":"string","enum":["TRANSACTION_IMPORT_SOURCE_AMOUNT_INVALID"]},"location":{"type":"object","properties":{"column":{"type":"string","minLength":1,"maxLength":255},"line":{"type":"integer","minimum":1,"maximum":1000000000},"sheet":{"type":"string","minLength":1,"maxLength":255}},"additionalProperties":false},"message":{"type":"string","enum":["An amount in the file is invalid. Use a non-zero fixed-point number with the supported precision."]}},"required":["category","code","message"],"additionalProperties":false},{"type":"object","properties":{"category":{"type":"string","enum":["PARSING"]},"code":{"type":"string","enum":["TRANSACTION_IMPORT_SOURCE_CURRENCY_INVALID"]},"location":{"type":"object","properties":{"column":{"type":"string","minLength":1,"maxLength":255},"line":{"type":"integer","minimum":1,"maximum":1000000000},"sheet":{"type":"string","minLength":1,"maxLength":255}},"additionalProperties":false},"message":{"type":"string","enum":["A currency in the file is not supported for that transaction type. Check the indicated row and column."]}},"required":["category","code","message"],"additionalProperties":false},{"type":"object","properties":{"category":{"type":"string","enum":["PARSING"]},"code":{"type":"string","enum":["TRANSACTION_IMPORT_SOURCE_DUPLICATE"]},"location":{"type":"object","properties":{"column":{"type":"string","minLength":1,"maxLength":255},"line":{"type":"integer","minimum":1,"maximum":1000000000},"sheet":{"type":"string","minLength":1,"maxLength":255}},"additionalProperties":false},"message":{"type":"string","enum":["The file contains a duplicate row or transaction. Remove the duplicate at the indicated row and retry."]}},"required":["category","code","message"],"additionalProperties":false},{"type":"object","properties":{"category":{"type":"string","enum":["PARSING"]},"code":{"type":"string","enum":["TRANSACTION_IMPORT_SOURCE_LAYOUT_INVALID"]},"location":{"type":"object","properties":{"column":{"type":"string","minLength":1,"maxLength":255},"line":{"type":"integer","minimum":1,"maximum":1000000000},"sheet":{"type":"string","minLength":1,"maxLength":255}},"additionalProperties":false},"message":{"type":"string","enum":["The file columns or worksheet layout do not match this integration. Export a fresh file from the provider and retry."]}},"required":["category","code","message"],"additionalProperties":false},{"type":"object","properties":{"category":{"type":"string","enum":["PARSING"]},"code":{"type":"string","enum":["TRANSACTION_IMPORT_SOURCE_TIMESTAMP_INVALID"]},"location":{"type":"object","properties":{"column":{"type":"string","minLength":1,"maxLength":255},"line":{"type":"integer","minimum":1,"maximum":1000000000},"sheet":{"type":"string","minLength":1,"maxLength":255}},"additionalProperties":false},"message":{"type":"string","enum":["A date or timestamp in the file is invalid. Check the indicated row and column."]}},"required":["category","code","message"],"additionalProperties":false},{"type":"object","properties":{"category":{"type":"string","enum":["PARSING"]},"code":{"type":"string","enum":["TRANSACTION_IMPORT_SOURCE_TYPE_UNSUPPORTED"]},"location":{"type":"object","properties":{"column":{"type":"string","minLength":1,"maxLength":255},"line":{"type":"integer","minimum":1,"maximum":1000000000},"sheet":{"type":"string","minLength":1,"maxLength":255}},"additionalProperties":false},"message":{"type":"string","enum":["A transaction type in the file is not supported. Check the indicated row and column."]}},"required":["category","code","message"],"additionalProperties":false},{"type":"object","properties":{"category":{"type":"string","enum":["PARSING"]},"code":{"type":"string","enum":["TRANSACTION_IMPORT_SOURCE_UNREADABLE"]},"location":{"type":"object","properties":{"column":{"type":"string","minLength":1,"maxLength":255},"line":{"type":"integer","minimum":1,"maximum":1000000000},"sheet":{"type":"string","minLength":1,"maxLength":255}},"additionalProperties":false},"message":{"type":"string","enum":["We could not read this file. Export it again as CSV or XLSX and retry."]}},"required":["category","code","message"],"additionalProperties":false},{"type":"object","properties":{"category":{"type":"string","enum":["PARSING"]},"code":{"type":"string","enum":["TRANSACTION_IMPORT_SOURCE_VALUE_INVALID"]},"location":{"type":"object","properties":{"column":{"type":"string","minLength":1,"maxLength":255},"line":{"type":"integer","minimum":1,"maximum":1000000000},"sheet":{"type":"string","minLength":1,"maxLength":255}},"additionalProperties":false},"message":{"type":"string","enum":["A value in the file is invalid. Check the indicated row and column."]}},"required":["category","code","message"],"additionalProperties":false}],"type":"object"},{"type":"object","properties":{"category":{"type":"string","enum":["SYSTEM"]},"code":{"type":"string","enum":["TRANSACTION_IMPORT_ANALYSIS_FAILED"]},"message":{"type":"string","enum":["We could not process this import. Try again or contact support if the problem continues."]}},"required":["category","code","message"],"additionalProperties":false}]},"importRef":{"type":"string","pattern":"^transaction-import-[0-9a-f]{32}$","description":"Public transaction import reference"},"status":{"type":"string","enum":["UPLOADED","ANALYZING","PREVIEW_READY","FINALIZING","COMMITTED","FAILED","DELETED"]},"unresolvedGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["TOKEN","DECIMALS","TIMEZONE"]},"message":{"type":"string","minLength":1},"rowsAffected":{"type":"integer","minimum":0,"maximum":9007199254740991},"suggestedDecimals":{"type":"integer","minimum":0,"maximum":255},"symbol":{"type":"string","minLength":1},"tokenAddress":{"type":"string","minLength":1}},"required":["id","kind","message"],"additionalProperties":false}},"updatedAt":{"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))$"},"warnings":{"type":"array","items":{"type":"object","properties":{"acknowledged":{"default":false,"type":"boolean"},"id":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"rowsAffected":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["acknowledged","id","kind","message"],"additionalProperties":false}}},"required":["auditPresentmentAvailable","chainId","commitResult","counts","createdAt","declaredAddress","importRef","status","unresolvedGroups","updatedAt","warnings"],"additionalProperties":false},"TransactionImportRecordsListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"core":{"description":"Preview transaction core derived from a TransactionRow","type":"object","properties":{"blockHeight":{"type":"integer","minimum":0,"maximum":9007199254740991},"defiOperation":{"anyOf":[{"type":"string","enum":["PROTOCOL_DEPOSIT"],"description":"Deposit assets into protocol-managed custody without immediate disposal"},{"type":"string","enum":["PROTOCOL_WITHDRAW"],"description":"Withdraw assets from protocol-managed custody back to the wallet"},{"type":"string","enum":["VAULT_DEPOSIT"],"description":"Deposit into a tokenized vault: one underlying is pooled under a manager or strategy and the depositor receives a fungible share"},{"type":"string","enum":["VAULT_WITHDRAW"],"description":"Redemption from a tokenized vault: share burned, underlying returned"},{"type":"string","enum":["SWAP"],"description":"Token swap/exchange on DEX (e.g., ETH → USDC on Uniswap)"},{"type":"string","enum":["PROVIDE_LIQUIDITY"],"description":"Add tokens to liquidity pool (e.g., add ETH+USDC to Uniswap pool)"},{"type":"string","enum":["REMOVE_LIQUIDITY"],"description":"Remove tokens from liquidity pool (e.g., withdraw from Uniswap pool)"},{"type":"string","enum":["LEND"],"description":"Supply tokens to lending protocol (e.g., deposit USDC to Aave)"},{"type":"string","enum":["WITHDRAW_LEND"],"description":"Withdraw supplied tokens from lending protocol (e.g., withdraw USDC from Aave)"},{"type":"string","enum":["LEND_REDUCE"],"description":"Reduce supplied lending exposure without receiving underlying back to the wallet"},{"type":"string","enum":["BORROW"],"description":"Borrow tokens from lending protocol (e.g., borrow ETH from Aave)"},{"type":"string","enum":["REPAY"],"description":"Repay borrowed tokens to lending protocol"},{"type":"string","enum":["LOAN_LIQUIDATION"],"description":"Forced loan liquidation that reduces protocol debt and seizes collateral"},{"type":"string","enum":["STAKE"],"description":"Stake tokens for rewards (e.g., stake ETH for staking rewards)"},{"type":"string","enum":["UNSTAKE"],"description":"Unstake tokens from staking protocol"},{"type":"string","enum":["CLAIM_REWARDS"],"description":"Claim earned rewards from staking, LP fees, or other yield sources"}]},"details":{"type":"object","properties":{"operationTypeHint":{"type":"string","enum":["refund"]}},"required":["operationTypeHint"],"additionalProperties":false},"memo":{"type":"string"},"transfers":{"minItems":1,"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","minLength":1},"defiOperation":{"anyOf":[{"type":"string","enum":["PROTOCOL_DEPOSIT"],"description":"Deposit assets into protocol-managed custody without immediate disposal"},{"type":"string","enum":["PROTOCOL_WITHDRAW"],"description":"Withdraw assets from protocol-managed custody back to the wallet"},{"type":"string","enum":["VAULT_DEPOSIT"],"description":"Deposit into a tokenized vault: one underlying is pooled under a manager or strategy and the depositor receives a fungible share"},{"type":"string","enum":["VAULT_WITHDRAW"],"description":"Redemption from a tokenized vault: share burned, underlying returned"},{"type":"string","enum":["SWAP"],"description":"Token swap/exchange on DEX (e.g., ETH → USDC on Uniswap)"},{"type":"string","enum":["PROVIDE_LIQUIDITY"],"description":"Add tokens to liquidity pool (e.g., add ETH+USDC to Uniswap pool)"},{"type":"string","enum":["REMOVE_LIQUIDITY"],"description":"Remove tokens from liquidity pool (e.g., withdraw from Uniswap pool)"},{"type":"string","enum":["LEND"],"description":"Supply tokens to lending protocol (e.g., deposit USDC to Aave)"},{"type":"string","enum":["WITHDRAW_LEND"],"description":"Withdraw supplied tokens from lending protocol (e.g., withdraw USDC from Aave)"},{"type":"string","enum":["LEND_REDUCE"],"description":"Reduce supplied lending exposure without receiving underlying back to the wallet"},{"type":"string","enum":["BORROW"],"description":"Borrow tokens from lending protocol (e.g., borrow ETH from Aave)"},{"type":"string","enum":["REPAY"],"description":"Repay borrowed tokens to lending protocol"},{"type":"string","enum":["LOAN_LIQUIDATION"],"description":"Forced loan liquidation that reduces protocol debt and seizes collateral"},{"type":"string","enum":["STAKE"],"description":"Stake tokens for rewards (e.g., stake ETH for staking rewards)"},{"type":"string","enum":["UNSTAKE"],"description":"Unstake tokens from staking protocol"},{"type":"string","enum":["CLAIM_REWARDS"],"description":"Claim earned rewards from staking, LP fees, or other yield sources"}]},"defiPositionKey":{"type":"string"},"defiTokenRole":{"anyOf":[{"type":"string","enum":["UNDERLYING"],"description":"The base/principal asset moving into or out of a position: the asset supplied, withdrawn, borrowed, repaid, staked, or unstaked, and the actual asset paid when reducing a debt. This is the real asset, not a receipt or marker for it. Examples: the ETH leg of a stake, or the USDC leg paid to repay an Aave loan. Processors read the repaid/supplied asset id from this leg."},{"type":"string","enum":["COLLATERAL"],"description":"An asset posted or locked as collateral, or seized as collateral during a liquidation, as distinct from a plain principal deposit. Role is per-transfer, so the same token can be UNDERLYING in one transfer and COLLATERAL in another. Example: the collateral (often an aToken or its underlying) taken from a borrower in an Aave V3 liquidation."},{"type":"string","enum":["RECEIPT_TOKEN"],"description":"A token that represents a claim on a supplied or staked position (a receipt or share) rather than the underlying itself. Covers interest-bearing receipts and value-accruing shares regardless of mechanic. Examples: Aave aTokens (aUSDC), Compound cTokens, JustLend jTokens, ERC-4626 vault shares, liquid-staking receipts. Whether it rebases or accrues via an exchange rate is captured by the token TokenType, not by this role."},{"type":"string","enum":["LP_SHARE"],"description":"A liquidity-pool share representing proportional ownership of a basket of two or more pooled underlyings. Examples: Uniswap v2 pair tokens, Curve and Balancer LP tokens, a Uniswap v3 concentrated-liquidity position NFT."},{"type":"string","enum":["LIABILITY_TOKEN"],"description":"A borrow/debt marker representing an outstanding liability (principal plus accrued interest), typically non-transferable. Examples: Aave variable and stable debt tokens (variableDebtUSDC). It must be booked on the liability side and is structurally distinct from a RECEIPT_TOKEN (asset side), so the two never share one value. Lets processors identify the debt leg by role instead of matching `variableDebt`/`stableDebt` symbol prefixes."},{"type":"string","enum":["REWARD"],"description":"An incentive, yield, or fee-share token realized from a position separately from principal. Examples: claimed governance/incentive tokens, or accrued trading-fee rewards."},{"type":"string","enum":["OTHER"],"description":"A protocol-specific or not-yet-classified token leg that does not fit the roles above. Use sparingly; prefer adding a generic role once a pattern recurs across protocols."}]},"fromAddress":{"type":"string","minLength":1},"fromAddressLabel":{"type":"string","minLength":1},"quoteCurrency":{"type":"string","minLength":1},"quoteMeta":{"type":"object","properties":{"s":{"type":"string","enum":["SYNC_SOURCE","FMV_ENGINE","DERIVED_REPRESENTED","DERIVED_SIBLING","POLICY","MANUAL"]},"ts":{"type":"integer","minimum":1,"maximum":8210266876799}},"required":["s"],"additionalProperties":false},"quoteSource":{"type":"string","minLength":1},"toAddress":{"type":"string","minLength":1},"toAddressLabel":{"type":"string","minLength":1},"tokenAddress":{"type":"string","minLength":1},"txHash":{"type":"string","minLength":1},"txIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["IN","OUT","GAS","SELF"]},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Plain decimal value encoded as a string"},"valueQuote":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Plain decimal value encoded as a string"}},"required":["chainId","fromAddress","toAddress","tokenAddress","txHash","txIndex","type","value"],"additionalProperties":false}}},"required":["blockHeight","transfers"],"additionalProperties":false},"hasUnresolved":{"type":"boolean"},"hash":{"type":"string","minLength":1},"recordRef":{"type":"string","pattern":"^transaction-import-record-[0-9a-f]{32}$","description":"Public transaction import record reference"},"sourceRows":{"type":"array","items":{"type":"object","properties":{"lineNumber":{"type":"integer","minimum":1,"maximum":9007199254740991},"parsedRow":{"$ref":"#/components/schemas/TransactionImportRecordsListResponseDto__schema0"},"rawBytesHash":{"type":"string","minLength":1}},"required":["lineNumber","parsedRow","rawBytesHash"],"additionalProperties":false}},"status":{"type":"string","enum":["PENDING","RESOLVED","FLAGGED","IN_LEDGER","EXCLUDED"]},"timestamp":{"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))$"},"unresolved":{"type":"object","properties":{"items":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kind":{"type":"string","enum":["TOKEN","DECIMALS","TIMEZONE"]},"message":{"type":"string","minLength":1},"rowsAffected":{"type":"integer","minimum":0,"maximum":9007199254740991},"suggestedDecimals":{"type":"integer","minimum":0,"maximum":255},"symbol":{"type":"string","minLength":1},"tokenAddress":{"type":"string","minLength":1}},"required":["id","kind","message"],"additionalProperties":false}},"warnings":{"default":[],"type":"array","items":{"type":"object","properties":{"acknowledged":{"default":false,"type":"boolean"},"id":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"message":{"type":"string","minLength":1},"rowsAffected":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["acknowledged","id","kind","message"],"additionalProperties":false}}},"required":["items","warnings"],"additionalProperties":false}},"required":["core","hasUnresolved","hash","recordRef","sourceRows","status","timestamp","unresolved"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"TransactionImportRecordsListResponseDto__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/TransactionImportRecordsListResponseDto__schema0"}]}},{"type":"object","additionalProperties":{"allOf":[{"$ref":"#/components/schemas/TransactionImportRecordsListResponseDto__schema0"}]}}]},"ResolveTransactionImportRequestDto":{"type":"object","properties":{"acknowledgedWarningIds":{"type":"array","items":{"type":"string","minLength":1}},"decimalResolutions":{"type":"array","items":{"type":"object","properties":{"decimals":{"type":"integer","minimum":0,"maximum":255},"tokenAddress":{"type":"string","minLength":1}},"required":["decimals","tokenAddress"],"additionalProperties":false}},"timezone":{"type":"string","minLength":1},"tokenResolutions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"tokenAddress":{"type":"string","minLength":1},"action":{"type":"string","enum":["link_asset"]},"assetId":{"type":"string","minLength":1}},"required":["tokenAddress","action","assetId"],"additionalProperties":false},{"type":"object","properties":{"tokenAddress":{"type":"string","minLength":1},"action":{"type":"string","enum":["coingecko_id"]},"coingeckoId":{"type":"string","minLength":1}},"required":["tokenAddress","action","coingeckoId"],"additionalProperties":false},{"type":"object","properties":{"tokenAddress":{"type":"string","minLength":1},"action":{"type":"string","enum":["manual_price"]},"manualPrice":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Plain non-negative decimal value encoded as a string"}},"required":["tokenAddress","action","manualPrice"],"additionalProperties":false},{"type":"object","properties":{"tokenAddress":{"type":"string","minLength":1},"action":{"type":"string","enum":["zero_value"]}},"required":["tokenAddress","action"],"additionalProperties":false},{"type":"object","properties":{"tokenAddress":{"type":"string","minLength":1},"action":{"type":"string","enum":["skip_rows"]}},"required":["tokenAddress","action"],"additionalProperties":false}],"type":"object"}}},"additionalProperties":false},"FinalizeTransactionImportRequestDto":{"type":"object","properties":{},"additionalProperties":false},"TransactionImportJobResponseDto":{"type":"object","properties":{"jobId":{"type":"string","minLength":1}},"required":["jobId"],"additionalProperties":false},"AccountFilterOptionsResponseDto":{"type":"object","properties":{"accountNumbers":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"description":"Stable FilterBar option value."},"label":{"type":"string","minLength":1,"description":"Human-readable FilterBar option label."},"accountNumber":{"type":"string","minLength":1,"description":"Portfolio account number."},"name":{"type":"string","minLength":1,"description":"Current account name."}},"required":["value","label","accountNumber","name"],"additionalProperties":false,"description":"One account number available to Chart of Accounts filters."}},"accountTypes":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"],"description":"Persisted top-level account type."},"label":{"type":"string","minLength":1,"description":"Human-readable FilterBar option label."}},"required":["value","label"],"additionalProperties":false,"description":"One DB-owned account type available to account filters."}},"subTypes":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"description":"Stable FilterBar option value."},"label":{"type":"string","minLength":1,"description":"Human-readable FilterBar option label."}},"required":["value","label"],"additionalProperties":false,"description":"One persisted account subtype available to account filters."}},"normalBalanceTypes":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","enum":["DR","CR"],"description":"Persisted normal-balance entry type."},"label":{"type":"string","minLength":1,"description":"Human-readable FilterBar option label."}},"required":["value","label"],"additionalProperties":false,"description":"One DB-owned normal-balance type available to account filters."}},"wallets":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"description":"Stable FilterBar option value."},"label":{"type":"string","minLength":1,"description":"Human-readable FilterBar option label."},"chainId":{"type":"string","minLength":1,"description":"Public wallet chain identifier."},"address":{"type":"string","minLength":1,"description":"Public wallet address."},"name":{"type":"string","description":"Current wallet name, which may be empty."}},"required":["value","label","chainId","address","name"],"additionalProperties":false,"description":"One current wallet association identified only by public chain and address."}},"includeNoWallet":{"type":"object","properties":{"value":{"type":"string","enum":["noWallet"],"description":"Stable value for accounts without a current wallet."},"label":{"type":"string","enum":["No wallet"],"description":"No-wallet option label."}},"required":["value","label"],"additionalProperties":false,"description":"Presence option for accounts without a current wallet."},"assets":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"description":"Stable FilterBar option value."},"label":{"type":"string","minLength":1,"description":"Human-readable FilterBar option label."},"assetId":{"type":"string","minLength":1,"description":"Public asset identifier."},"symbol":{"type":"string","minLength":1,"description":"Current asset symbol."}},"required":["value","label","assetId","symbol"],"additionalProperties":false,"description":"One account asset available to Chart of Accounts filters."}},"currencies":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","minLength":1,"description":"Stable FilterBar option value."},"label":{"type":"string","minLength":1,"description":"Human-readable FilterBar option label."},"assetId":{"type":"string","minLength":1,"description":"Public currency asset identifier."},"symbol":{"type":"string","minLength":1,"description":"Current currency symbol."}},"required":["value","label","assetId","symbol"],"additionalProperties":false,"description":"One account currency available to Chart of Accounts filters."}},"statuses":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","enum":["active","archived"],"description":"Account active-state filter value."},"label":{"type":"string","minLength":1,"description":"Human-readable FilterBar option label."}},"required":["value","label"],"additionalProperties":false,"description":"One account lifecycle status available to account filters."}},"paymentLabelStates":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","enum":["withLabel","withoutLabel"],"description":"Payment-label presence filter value."},"label":{"type":"string","minLength":1,"description":"Human-readable FilterBar option label."}},"required":["value","label"],"additionalProperties":false,"description":"One payment-label presence state available to account filters."}},"hierarchy":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","enum":["parent","leaf"],"description":"Hierarchy-role filter value."},"label":{"type":"string","minLength":1,"description":"Human-readable FilterBar option label."}},"required":["value","label"],"additionalProperties":false,"description":"One hierarchy role available to Chart of Accounts filters."}},"origins":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","enum":["SYSTEM_MANAGED","SYSTEM_DEFAULT","USER_MANAGED"],"description":"Persisted origin value."},"label":{"type":"string","minLength":1,"description":"Human-readable FilterBar option label."}},"required":["value","label"],"additionalProperties":false,"description":"One origin value available to account filters."}}},"required":["accountNumbers","accountTypes","subTypes","normalBalanceTypes","wallets","includeNoWallet","assets","currencies","statuses","paymentLabelStates","hierarchy","origins"],"additionalProperties":false,"description":"Complete grouped Chart of Accounts filter options with no mixed pagination."},"PortfolioTransactionPeriodOptionsResponseDto":{"type":"object","properties":{"period":{"nullable":true,"description":"The portfolio activity period, or null when the portfolio records no transactions and no journal entries. A partially bounded period is not representable: either both bounds are present or the period is null.","type":"object","properties":{"minTimestamp":{"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":"Timestamp of the earliest recorded portfolio transaction or journal entry."},"maxTimestamp":{"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":"Timestamp of the latest recorded portfolio transaction or journal entry."}},"required":["minTimestamp","maxTimestamp"],"additionalProperties":false}},"required":["period"],"additionalProperties":false,"description":"Single portfolio activity period shared by transaction, journal-entry, and cost-basis date filters."},"FilterOptionsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"optionKind":{"type":"string","enum":["portfolioTransactionAddress"],"description":"Option discriminator for portfolio transaction address filter options."},"value":{"type":"string","minLength":1,"description":"Stable FilterBar option value. The app sends this value back as selected during hydration."},"label":{"type":"string","minLength":1,"description":"Human-readable option label displayed in the FilterBar."},"transfersCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of raw wallet transaction transfers matching this option before projected accounting rows are joined."},"identity":{"oneOf":[{"type":"object","properties":{"category":{"type":"string","enum":["counterparty"],"description":"Counterparty-backed address source category used by the app adapter."},"address":{"type":"string","minLength":1,"description":"Address value used to filter portfolio transaction transfers."},"chainId":{"description":"Optional chain ID when the option resolves to a chain-specific address.","type":"string","minLength":1},"chainName":{"description":"Optional display name for the chain associated with chainId.","type":"string","minLength":1}},"required":["category","address"],"additionalProperties":false,"description":"Counterparty identity fields used by the app address filter adapter."},{"type":"object","properties":{"category":{"type":"string","enum":["addressBook"],"description":"Address-book-backed address source category used by the app adapter."},"address":{"type":"string","minLength":1,"description":"Address value used to filter portfolio transaction transfers."},"addressBookItemType":{"type":"string","enum":["CUSTOMER","VENDOR","EMPLOYEE","OTHER"],"description":"Address book item type. Values come from the persisted DB enum."}},"required":["category","address","addressBookItemType"],"additionalProperties":false,"description":"Address book identity fields used by the app address filter adapter."},{"type":"object","properties":{"category":{"type":"string","enum":["wallet"],"description":"Wallet-backed address source category used by the app adapter."},"address":{"type":"string","minLength":1,"description":"Address value used to filter portfolio transaction transfers."},"chainId":{"description":"Optional chain ID when the option resolves to a chain-specific address.","type":"string","minLength":1},"chainName":{"description":"Optional display name for the chain associated with chainId.","type":"string","minLength":1},"walletName":{"type":"string","description":"Wallet display name."},"walletType":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Wallet type. Values come from the persisted DB enum."},"walletOwnerPortfolio":{"description":"Public portfolio context for a peer portfolio wallet owner.","type":"object","properties":{"slug":{"type":"string","minLength":1,"pattern":"^[a-z0-9-]+$","description":"Public portfolio slug for the portfolio that owns this wallet address."},"name":{"type":"string","minLength":1,"description":"Human-readable portfolio name for the portfolio that owns this wallet address."}},"required":["slug","name"],"additionalProperties":false},"childAddresses":{"type":"array","items":{"type":"object","properties":{"address":{"type":"string","minLength":1,"description":"Child wallet address represented by the parent wallet option."},"chainId":{"type":"string","minLength":1,"description":"Chain ID for the child wallet address."}},"required":["address","chainId"],"additionalProperties":false,"description":"Child wallet address included when a parent wallet option represents multiple concrete wallet addresses."},"description":"Concrete child wallet addresses included by a parent wallet option."}},"required":["category","address","walletName","walletType","childAddresses"],"additionalProperties":false,"description":"Wallet identity fields used by the app address filter adapter."},{"type":"object","properties":{"category":{"type":"string","enum":["raw"],"description":"Raw address source category used by the app adapter."},"address":{"type":"string","minLength":1,"description":"Address value used to filter portfolio transaction transfers."},"chainId":{"description":"Optional chain ID when the option resolves to a chain-specific address.","type":"string","minLength":1},"chainName":{"description":"Optional display name for the chain associated with chainId.","type":"string","minLength":1}},"required":["category","address"],"additionalProperties":false,"description":"Raw address identity fields used by the app address filter adapter."}],"description":"Typed identity fields used by the app address filter adapter.","type":"object"},"metrics":{"description":"Optional secondary metrics displayed with this option.","type":"array","items":{"oneOf":[{"type":"object","properties":{"metricKind":{"type":"string","enum":["count"],"description":"Metric discriminator for a count value."},"value":{"type":"string","description":"Human-readable count value associated with the option."},"unit":{"type":"string","description":"Count unit, such as transactions."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Count metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["money"],"description":"Metric discriminator for a money value."},"value":{"type":"string","description":"Decimal money amount encoded as a string."},"currency":{"type":"string","description":"Currency code for the money amount, such as USD."}},"required":["metricKind","value","currency"],"additionalProperties":false,"description":"Money metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["percentage"],"description":"Metric discriminator for a percentage value."},"value":{"type":"string","description":"Percentage amount encoded as a string."},"unit":{"type":"string","enum":["%"],"description":"Percentage unit marker."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Percentage metric displayed next to a selectable filter option."}],"description":"Optional metric that helps users compare filter option significance without changing filter semantics.","type":"object"}}},"required":["optionKind","value","label","transfersCount","identity"],"additionalProperties":false,"description":"One selectable portfolio transaction address filter option returned by the filter options endpoint."},{"type":"object","properties":{"optionKind":{"type":"string","enum":["portfolioTransactionAccountName"],"description":"Option discriminator for portfolio transaction account-name filter options."},"value":{"type":"string","minLength":1,"description":"Public account number used as the stable FilterBar value for selected account-name filters."},"label":{"type":"string","minLength":1,"description":"Human-readable account option label displayed in the FilterBar."},"accountNumber":{"type":"string","minLength":1,"description":"Chart-of-accounts number for the ledger account."},"name":{"type":"string","minLength":1,"description":"Human-readable ledger account name."},"accountType":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"],"description":"Ledger account type. Values come from the persisted DB enum."},"subType":{"type":"string","minLength":1,"description":"Ledger account subtype used by the chart of accounts."},"currency":{"type":"string","minLength":1,"description":"Fiat or asset currency identifier associated with the account."},"assetId":{"nullable":true,"description":"Associated asset id for asset-backed accounts, or null.","type":"string","minLength":1},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of distinct portfolio transactions represented by this account option."},"metrics":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"metricKind":{"type":"string","enum":["count"],"description":"Metric discriminator for a count value."},"value":{"type":"string","description":"Human-readable count value associated with the option."},"unit":{"type":"string","description":"Count unit, such as transactions."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Count metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["money"],"description":"Metric discriminator for a money value."},"value":{"type":"string","description":"Decimal money amount encoded as a string."},"currency":{"type":"string","description":"Currency code for the money amount, such as USD."}},"required":["metricKind","value","currency"],"additionalProperties":false,"description":"Money metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["percentage"],"description":"Metric discriminator for a percentage value."},"value":{"type":"string","description":"Percentage amount encoded as a string."},"unit":{"type":"string","enum":["%"],"description":"Percentage unit marker."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Percentage metric displayed next to a selectable filter option."}],"description":"Optional metric that helps users compare filter option significance without changing filter semantics.","type":"object"},"description":"Count metrics displayed with this account option."}},"required":["optionKind","value","label","accountNumber","name","accountType","subType","currency","assetId","transactionCount","metrics"],"additionalProperties":false,"description":"One selectable portfolio transaction account-name option."},{"type":"object","properties":{"optionKind":{"type":"string","enum":["portfolioTransactionAsset"],"description":"Option discriminator for portfolio transaction asset filter options."},"value":{"type":"string","minLength":1,"description":"Stable FilterBar option value. This is the public asset ID and must match assetId."},"assetId":{"type":"string","minLength":1,"description":"Public asset ID represented by this option. This must match value."},"symbol":{"type":"string","minLength":1,"description":"Human-readable asset symbol displayed in the FilterBar."},"name":{"type":"string","minLength":1,"description":"Human-readable asset name displayed in the FilterBar."},"totalValue":{"type":"string","pattern":"^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Total portfolio transaction value for this asset encoded as a decimal string in quoteCurrency."},"quoteCurrency":{"type":"string","minLength":1,"description":"Portfolio quote currency for totalValue and money metrics."},"isSpam":{"type":"boolean","description":"Whether the asset is considered spam in the current portfolio scope."},"metrics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"metricKind":{"type":"string","enum":["count"],"description":"Metric discriminator for a count value."},"value":{"type":"string","description":"Human-readable count value associated with the option."},"unit":{"type":"string","description":"Count unit, such as transactions."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Count metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["money"],"description":"Metric discriminator for a money value."},"value":{"type":"string","description":"Decimal money amount encoded as a string."},"currency":{"type":"string","description":"Currency code for the money amount, such as USD."}},"required":["metricKind","value","currency"],"additionalProperties":false,"description":"Money metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["percentage"],"description":"Metric discriminator for a percentage value."},"value":{"type":"string","description":"Percentage amount encoded as a string."},"unit":{"type":"string","enum":["%"],"description":"Percentage unit marker."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Percentage metric displayed next to a selectable filter option."}],"description":"Optional metric that helps users compare filter option significance without changing filter semantics.","type":"object"},"description":"Display metrics for the asset option."}},"required":["optionKind","value","assetId","symbol","name","totalValue","quoteCurrency","isSpam","metrics"],"additionalProperties":false,"description":"One selectable portfolio transaction asset filter option."},{"type":"object","properties":{"optionKind":{"type":"string","enum":["portfolioTransactionCounterparty"],"description":"Option discriminator for portfolio transaction counterparty filter options."},"value":{"type":"string","minLength":1,"description":"Public filter value. Counterparty ID when reportType is present; workspace-unique counterparty name for portfolio transaction filters otherwise."},"label":{"type":"string","minLength":1,"description":"Human-readable counterparty label displayed in the FilterBar."},"name":{"type":"string","minLength":1,"description":"Human-readable counterparty name."},"counterpartyId":{"type":"string","minLength":1,"description":"Stable counterparty ID used by saved report filters. Matches value when reportType is present."},"lineCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of matching scoped journal entry lines, or matching rows in the selected report when reportType is present."},"metrics":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"metricKind":{"type":"string","enum":["count"],"description":"Metric discriminator for a count value."},"value":{"type":"string","description":"Human-readable count value associated with the option."},"unit":{"type":"string","description":"Count unit, such as transactions."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Count metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["money"],"description":"Metric discriminator for a money value."},"value":{"type":"string","description":"Decimal money amount encoded as a string."},"currency":{"type":"string","description":"Currency code for the money amount, such as USD."}},"required":["metricKind","value","currency"],"additionalProperties":false,"description":"Money metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["percentage"],"description":"Metric discriminator for a percentage value."},"value":{"type":"string","description":"Percentage amount encoded as a string."},"unit":{"type":"string","enum":["%"],"description":"Percentage unit marker."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Percentage metric displayed next to a selectable filter option."}],"description":"Optional metric that helps users compare filter option significance without changing filter semantics.","type":"object"},"description":"Count metrics displayed with this counterparty."}},"required":["optionKind","value","label","name","counterpartyId","lineCount","metrics"],"additionalProperties":false,"description":"One selectable portfolio transaction counterparty filter option."},{"type":"object","properties":{"optionKind":{"type":"string","enum":["portfolioTransactionWallet"],"description":"Option discriminator for portfolio transaction wallet filter options."},"value":{"type":"string","minLength":1,"description":"Stable FilterBar option value using the public wallet identity format chainId:address."},"chainId":{"type":"string","minLength":1,"description":"Public chain ID for the wallet option."},"address":{"type":"string","minLength":1,"description":"Public wallet address for the wallet option."},"displayName":{"type":"string","minLength":1,"description":"Human-readable wallet display name."},"chainName":{"type":"string","minLength":1,"description":"Human-readable chain name for the wallet option."},"walletType":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Wallet type. Values come from the persisted DB enum."},"valueQuote":{"description":"Current wallet value in the portfolio quote currency encoded as a decimal string.","type":"string","minLength":1},"operationsCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of operations represented by this wallet option."},"tokenCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of distinct tokens represented by this wallet option."},"lastTransactionTimestamp":{"description":"Most recent wallet transaction timestamp encoded as an ISO datetime string.","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))$"},"isBalanceMatch":{"type":"boolean","description":"Whether computed and snapshot balances match for this wallet option."},"metrics":{"description":"Optional display metrics for the wallet option. Value-bearing wallets include a money metric.","type":"array","items":{"oneOf":[{"type":"object","properties":{"metricKind":{"type":"string","enum":["count"],"description":"Metric discriminator for a count value."},"value":{"type":"string","description":"Human-readable count value associated with the option."},"unit":{"type":"string","description":"Count unit, such as transactions."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Count metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["money"],"description":"Metric discriminator for a money value."},"value":{"type":"string","description":"Decimal money amount encoded as a string."},"currency":{"type":"string","description":"Currency code for the money amount, such as USD."}},"required":["metricKind","value","currency"],"additionalProperties":false,"description":"Money metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["percentage"],"description":"Metric discriminator for a percentage value."},"value":{"type":"string","description":"Percentage amount encoded as a string."},"unit":{"type":"string","enum":["%"],"description":"Percentage unit marker."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Percentage metric displayed next to a selectable filter option."}],"description":"Optional metric that helps users compare filter option significance without changing filter semantics.","type":"object"}}},"required":["optionKind","value","chainId","address","displayName","chainName","walletType","operationsCount","tokenCount","isBalanceMatch"],"additionalProperties":false,"description":"One selectable portfolio transaction wallet filter option."},{"type":"object","properties":{"optionKind":{"type":"string","enum":["portfolioTransactionResponsibilityCenter"],"description":"Option discriminator for portfolio transaction responsibility-center filter options."},"value":{"type":"string","minLength":1,"description":"Public FilterBar value for the responsibility center. The value encodes the responsibility-center type key and portfolio-unique center name, never internal database ids."},"label":{"type":"string","minLength":1,"description":"Human-readable responsibility center label displayed in the FilterBar, including type context."},"responsibilityCenterName":{"type":"string","minLength":1,"description":"Human-readable responsibility center name."},"responsibilityCenterCode":{"description":"Stable code for the center within its type when one exists.","type":"string","minLength":1},"responsibilityCenterTypeKey":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","description":"Stable responsibility-center type key. It uses lowercase alphanumeric snake_case segments."},"responsibilityCenterTypeName":{"type":"string","minLength":1,"description":"Human-readable responsibility-center type name."},"responsibilityCenterKind":{"type":"string","enum":["COST","REVENUE","PROFIT","INVESTMENT"],"description":"Responsibility-center managerial kind. Values come from the persisted DB enum."},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of distinct portfolio transactions represented by this responsibility center option."},"metrics":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"metricKind":{"type":"string","enum":["count"],"description":"Metric discriminator for a count value."},"value":{"type":"string","description":"Human-readable count value associated with the option."},"unit":{"type":"string","description":"Count unit, such as transactions."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Count metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["money"],"description":"Metric discriminator for a money value."},"value":{"type":"string","description":"Decimal money amount encoded as a string."},"currency":{"type":"string","description":"Currency code for the money amount, such as USD."}},"required":["metricKind","value","currency"],"additionalProperties":false,"description":"Money metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["percentage"],"description":"Metric discriminator for a percentage value."},"value":{"type":"string","description":"Percentage amount encoded as a string."},"unit":{"type":"string","enum":["%"],"description":"Percentage unit marker."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Percentage metric displayed next to a selectable filter option."}],"description":"Optional metric that helps users compare filter option significance without changing filter semantics.","type":"object"},"description":"Count metrics displayed with this responsibility center."}},"required":["optionKind","value","label","responsibilityCenterName","responsibilityCenterTypeKey","responsibilityCenterTypeName","responsibilityCenterKind","transactionCount","metrics"],"additionalProperties":false,"description":"One selectable portfolio transaction responsibility center option."},{"type":"object","properties":{"optionKind":{"type":"string","enum":["portfolioTransactionLotPresence"],"description":"Option discriminator for portfolio transaction cost-basis lot presence."},"value":{"type":"string","enum":["withLots","withoutLots"],"description":"Stable FilterBar option value for the with or without lots choice."},"label":{"type":"string","minLength":1,"description":"Human-readable FilterBar label for the lot presence option."},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of portfolio transactions represented by this lot presence option."},"metrics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"metricKind":{"type":"string","enum":["count"],"description":"Metric discriminator for a count value."},"value":{"type":"string","description":"Human-readable count value associated with the option."},"unit":{"type":"string","description":"Count unit, such as transactions."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Count metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["money"],"description":"Metric discriminator for a money value."},"value":{"type":"string","description":"Decimal money amount encoded as a string."},"currency":{"type":"string","description":"Currency code for the money amount, such as USD."}},"required":["metricKind","value","currency"],"additionalProperties":false,"description":"Money metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["percentage"],"description":"Metric discriminator for a percentage value."},"value":{"type":"string","description":"Percentage amount encoded as a string."},"unit":{"type":"string","enum":["%"],"description":"Percentage unit marker."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Percentage metric displayed next to a selectable filter option."}],"description":"Optional metric that helps users compare filter option significance without changing filter semantics.","type":"object"},"description":"Count metrics displayed with this lot presence option."}},"required":["optionKind","value","label","transactionCount","metrics"],"additionalProperties":false,"description":"One selectable portfolio transaction cost-basis lot presence option."},{"type":"object","properties":{"optionKind":{"type":"string","enum":["portfolioTransactionJournalEntryPresence"],"description":"Option discriminator for portfolio transaction journal entry presence."},"value":{"type":"string","enum":["withJournalEntries","withoutJournalEntries"],"description":"Stable FilterBar option value for the with or without journal entries choice."},"label":{"type":"string","minLength":1,"description":"Human-readable FilterBar label for the journal entry presence option."},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of portfolio transactions represented by this journal entry presence option."},"metrics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"metricKind":{"type":"string","enum":["count"],"description":"Metric discriminator for a count value."},"value":{"type":"string","description":"Human-readable count value associated with the option."},"unit":{"type":"string","description":"Count unit, such as transactions."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Count metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["money"],"description":"Metric discriminator for a money value."},"value":{"type":"string","description":"Decimal money amount encoded as a string."},"currency":{"type":"string","description":"Currency code for the money amount, such as USD."}},"required":["metricKind","value","currency"],"additionalProperties":false,"description":"Money metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["percentage"],"description":"Metric discriminator for a percentage value."},"value":{"type":"string","description":"Percentage amount encoded as a string."},"unit":{"type":"string","enum":["%"],"description":"Percentage unit marker."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Percentage metric displayed next to a selectable filter option."}],"description":"Optional metric that helps users compare filter option significance without changing filter semantics.","type":"object"},"description":"Count metrics displayed with this journal entry presence option."}},"required":["optionKind","value","label","transactionCount","metrics"],"additionalProperties":false,"description":"One selectable portfolio transaction journal entry presence option."},{"type":"object","properties":{"optionKind":{"type":"string","enum":["portfolioTransactionStatusCount"]},"value":{"type":"string","enum":["PROPOSED","ERROR","POSTED","CLOSED"]},"label":{"type":"string","minLength":1},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"metrics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"metricKind":{"type":"string","enum":["count"],"description":"Metric discriminator for a count value."},"value":{"type":"string","description":"Human-readable count value associated with the option."},"unit":{"type":"string","description":"Count unit, such as transactions."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Count metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["money"],"description":"Metric discriminator for a money value."},"value":{"type":"string","description":"Decimal money amount encoded as a string."},"currency":{"type":"string","description":"Currency code for the money amount, such as USD."}},"required":["metricKind","value","currency"],"additionalProperties":false,"description":"Money metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["percentage"],"description":"Metric discriminator for a percentage value."},"value":{"type":"string","description":"Percentage amount encoded as a string."},"unit":{"type":"string","enum":["%"],"description":"Percentage unit marker."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Percentage metric displayed next to a selectable filter option."}],"description":"Optional metric that helps users compare filter option significance without changing filter semantics.","type":"object"}}},"required":["optionKind","value","label","transactionCount","metrics"],"additionalProperties":false},{"type":"object","properties":{"optionKind":{"type":"string","enum":["portfolioTransactionWarning"],"description":"Option discriminator for portfolio transaction warning filter options."},"value":{"type":"string","minLength":1,"description":"Persisted advisory code used as the stable warning filter value."},"label":{"type":"string","minLength":1,"description":"Warning code displayed by default in public API clients."},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of distinct portfolio transactions containing this warning code."},"metrics":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"metricKind":{"type":"string","enum":["count"],"description":"Metric discriminator for a count value."},"value":{"type":"string","description":"Human-readable count value associated with the option."},"unit":{"type":"string","description":"Count unit, such as transactions."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Count metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["money"],"description":"Metric discriminator for a money value."},"value":{"type":"string","description":"Decimal money amount encoded as a string."},"currency":{"type":"string","description":"Currency code for the money amount, such as USD."}},"required":["metricKind","value","currency"],"additionalProperties":false,"description":"Money metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["percentage"],"description":"Metric discriminator for a percentage value."},"value":{"type":"string","description":"Percentage amount encoded as a string."},"unit":{"type":"string","enum":["%"],"description":"Percentage unit marker."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Percentage metric displayed next to a selectable filter option."}],"description":"Optional metric that helps users compare filter option significance without changing filter semantics.","type":"object"},"description":"Count metrics displayed with this warning option."}},"required":["optionKind","value","label","transactionCount","metrics"],"additionalProperties":false,"description":"One selectable portfolio transaction warning filter option."},{"type":"object","properties":{"optionKind":{"type":"string","enum":["rawTransactionProcessingState"],"description":"Option discriminator for source transaction processing state."},"value":{"type":"string","enum":["PARTIAL","UNPROCESSED"],"description":"Stable option value. A wallet movement is linked when it belongs to an accounting transaction (its portfolioTransactionId is set). UNPROCESSED means none of the source transaction's wallet movements is linked; PARTIAL means some are linked and others are not."},"label":{"type":"string","minLength":1,"description":"Human-readable label for the processing state option."},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of source transactions in this processing state that hold at least one unlinked wallet movement of a non-spam token. Source transactions without wallet movements, or whose only unlinked movements are spam, are not counted, so it can be lower than a list_raw_transactions result for the same processingState."},"isLowerBound":{"type":"boolean","description":"True when the portfolio holds more unfinished source transactions than Tokenbooks counts at once; transactionCount is then a lower bound."},"metrics":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"metricKind":{"type":"string","enum":["count"],"description":"Metric discriminator for a count value."},"value":{"type":"string","description":"Human-readable count value associated with the option."},"unit":{"type":"string","description":"Count unit, such as transactions."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Count metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["money"],"description":"Metric discriminator for a money value."},"value":{"type":"string","description":"Decimal money amount encoded as a string."},"currency":{"type":"string","description":"Currency code for the money amount, such as USD."}},"required":["metricKind","value","currency"],"additionalProperties":false,"description":"Money metric displayed next to a selectable filter option."},{"type":"object","properties":{"metricKind":{"type":"string","enum":["percentage"],"description":"Metric discriminator for a percentage value."},"value":{"type":"string","description":"Percentage amount encoded as a string."},"unit":{"type":"string","enum":["%"],"description":"Percentage unit marker."}},"required":["metricKind","value","unit"],"additionalProperties":false,"description":"Percentage metric displayed next to a selectable filter option."}],"description":"Optional metric that helps users compare filter option significance without changing filter semantics.","type":"object"},"description":"Count metric displayed with this option, suffixed with + when the count is a lower bound."}},"required":["optionKind","value","label","transactionCount","isLowerBound","metrics"],"additionalProperties":false,"description":"One selectable processing state for source transactions that are not fully processed into accounting transactions."}],"type":"object"}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false,"description":"Public page of typed filter options returned by one registered provider."},"FilterOptionsModelInvalidationRequestDto":{"type":"object","properties":{"models":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","enum":["Apikey","InviteCode","Portfolio","PortfolioProcessingCheckpoint","PortfolioCloneLog","ExchangeCredentials","AccountingIntegrationOAuthState","AccountingIntegration","AccountingIntegrationOAuth","ContractMetadata","Wallet","AddressBookItem","WalletSyncStatus","Chain","Integration","NftCollection","Token","PortfolioTokenPreference","Asset","CryptoAccount","WalletTransaction","WalletTransactionTransfer","LastWalletBalanceSnapshot","WalletBalanceHistory","WalletBalance","ComputedWalletBalance","PortfolioWallets","WalletValueFlow","RecommendedWallets","WalletTokenBalanceQuoteHistoryCache","WalletAssetDailyValueFact","PortfolioUsageCounter","OrganizationUsageCounter","CoinGeckoAssetPlatform","CoinGeckoCoin","CoinGeckoDayClosePrice","CoinGeckoCoinHistoryProbe","CoinGeckoDexDayClosePrice","CoinMarketCapPlatform","CoinMarketCapCoin","CoinMarketCapPrice","WorkspaceRole","User","Session","Jwks","OauthClient","OauthRefreshToken","OauthAccessToken","OauthConsent","OauthResource","OauthClientResource","OauthClientAssertion","Account","Verification","TwoFactor","Passkey","Organization","PublicApiRegistration","Member","Team","TeamMember","PortfolioMember","Invitation","Subscription","SubscriptionPlan","AddOn","AddOnSubscription","WorkspaceSecuritySettings","SecurityAuditEvent","PortfolioEvent","EventSubscriptionCursor","PaymentRequest","FiatPaymentSettings","ReapPayment","ReapPaymentDocumentDelivery","BlockchainAccount","SafeWallet","PaymentTransaction","PaymentSignature","PaymentTransactionLine","PaymentRequestResponsibilityCenterAssignment","PaymentTransactionLineResponsibilityCenterAssignment","LedgerAccount","LedgerAccountBalance","AccountingRule","ExternalPostingPolicy","ExternalAccountMapping","ExternalPostingBatch","ExternalPostingDocument","ExternalPostingLine","ExternalPostingLineSource","PeriodClose","PortfolioTransactionContext","PortfolioTransaction","JournalEntry","JournalEntryLine","JournalEntryLineResponsibilityCenterAssignment","CostBasisLotLedger","IntercompanyMovePair","IntercompanyMovePairLotLink","CapitalLossAdjustment","CapitalGainsLossReport","IncomeExpenseReport","ProfitAndLossReport","Counterparty","CounterpartyAddress","CounterpartyResponsibilityCenterDefault","CounterpartyPaymentMethod","ResponsibilityCenter","ResponsibilityCenterType","Comment","SlackWorkspaceBinding","SlackUserLink","SlackEntityThread","ConsolidationScope","ConsolidationScopePortfolio","TransactionImport","TransactionImportSourceRow","ImportedTransaction","AdjustmentJournalImport","AdjustmentJournalImportSourceRow","DefiProtocol","DefiProtocolContract","DefiPosition","DefiPositionTokenSnapshot","DefiPositionTransferSummary","TokenRedemptionRateDaily","TokenSpamStatus","BankAccount","TokenRebaseEvent","TokenReflectionEvent"]},"description":"ZenStack-derived DB model names that changed in the current portfolio scope. The server invalidates every registered filter provider dependency matching these models."}},"required":["models"],"additionalProperties":false,"description":"Request body for model-scoped filter option cache invalidation."},"FilterOptionsModelInvalidationResponseDto":{"type":"object","properties":{"models":{"type":"array","items":{"type":"string","enum":["Apikey","InviteCode","Portfolio","PortfolioProcessingCheckpoint","PortfolioCloneLog","ExchangeCredentials","AccountingIntegrationOAuthState","AccountingIntegration","AccountingIntegrationOAuth","ContractMetadata","Wallet","AddressBookItem","WalletSyncStatus","Chain","Integration","NftCollection","Token","PortfolioTokenPreference","Asset","CryptoAccount","WalletTransaction","WalletTransactionTransfer","LastWalletBalanceSnapshot","WalletBalanceHistory","WalletBalance","ComputedWalletBalance","PortfolioWallets","WalletValueFlow","RecommendedWallets","WalletTokenBalanceQuoteHistoryCache","WalletAssetDailyValueFact","PortfolioUsageCounter","OrganizationUsageCounter","CoinGeckoAssetPlatform","CoinGeckoCoin","CoinGeckoDayClosePrice","CoinGeckoCoinHistoryProbe","CoinGeckoDexDayClosePrice","CoinMarketCapPlatform","CoinMarketCapCoin","CoinMarketCapPrice","WorkspaceRole","User","Session","Jwks","OauthClient","OauthRefreshToken","OauthAccessToken","OauthConsent","OauthResource","OauthClientResource","OauthClientAssertion","Account","Verification","TwoFactor","Passkey","Organization","PublicApiRegistration","Member","Team","TeamMember","PortfolioMember","Invitation","Subscription","SubscriptionPlan","AddOn","AddOnSubscription","WorkspaceSecuritySettings","SecurityAuditEvent","PortfolioEvent","EventSubscriptionCursor","PaymentRequest","FiatPaymentSettings","ReapPayment","ReapPaymentDocumentDelivery","BlockchainAccount","SafeWallet","PaymentTransaction","PaymentSignature","PaymentTransactionLine","PaymentRequestResponsibilityCenterAssignment","PaymentTransactionLineResponsibilityCenterAssignment","LedgerAccount","LedgerAccountBalance","AccountingRule","ExternalPostingPolicy","ExternalAccountMapping","ExternalPostingBatch","ExternalPostingDocument","ExternalPostingLine","ExternalPostingLineSource","PeriodClose","PortfolioTransactionContext","PortfolioTransaction","JournalEntry","JournalEntryLine","JournalEntryLineResponsibilityCenterAssignment","CostBasisLotLedger","IntercompanyMovePair","IntercompanyMovePairLotLink","CapitalLossAdjustment","CapitalGainsLossReport","IncomeExpenseReport","ProfitAndLossReport","Counterparty","CounterpartyAddress","CounterpartyResponsibilityCenterDefault","CounterpartyPaymentMethod","ResponsibilityCenter","ResponsibilityCenterType","Comment","SlackWorkspaceBinding","SlackUserLink","SlackEntityThread","ConsolidationScope","ConsolidationScopePortfolio","TransactionImport","TransactionImportSourceRow","ImportedTransaction","AdjustmentJournalImport","AdjustmentJournalImportSourceRow","DefiProtocol","DefiProtocolContract","DefiPosition","DefiPositionTokenSnapshot","DefiPositionTransferSummary","TokenRedemptionRateDaily","TokenSpamStatus","BankAccount","TokenRebaseEvent","TokenReflectionEvent"]},"description":"Distinct ZenStack-derived DB model names accepted for invalidation."},"cacheStatus":{"type":"string","enum":["invalidated"],"description":"Cache status marker for explicit model-scoped filter-options invalidation."},"invalidatedRevisionKeys":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Number of distinct typed revision keys invalidated across registered providers for the supplied models."}},"required":["models","cacheStatus","invalidatedRevisionKeys"],"additionalProperties":false,"description":"Response returned after explicitly invalidating filter option cache revisions affected by changed DB models."},"RawTransactionListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RawTransactionCompleteDto"}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"RawTransactionListWithDetailsResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Operational current-row WalletTransaction UUID"},"wallet":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"},"name":{"nullable":true,"description":"Wallet display name","type":"string"},"type":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Wallet type"}},"required":["chainId","address","name","type"],"additionalProperties":false},"hash":{"type":"string"},"blockHeight":{"type":"string","pattern":"^\\d+$"},"timestamp":{"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))$"},"memo":{"nullable":true,"type":"string"},"processingState":{"type":"string","enum":["PROCESSED","PARTIAL","UNPROCESSED"]},"walletOperations":{"type":"array","items":{"type":"object","properties":{"txIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["IN","OUT","GAS","SELF"]},"from":{"type":"object","properties":{"address":{"type":"string"},"label":{"nullable":true,"type":"string"}},"required":["address","label"],"additionalProperties":false},"to":{"type":"object","properties":{"address":{"type":"string"},"label":{"nullable":true,"type":"string"}},"required":["address","label"],"additionalProperties":false},"token":{"type":"object","properties":{"chainId":{"type":"string"},"address":{"type":"string"},"assetId":{"type":"string"},"symbol":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["ERC20"],"description":"Standard fungible token with a freely transferable, free-floating balance. The default for the vast majority of tokens. Examples: USDC, UNI, LINK, and any plain ERC-20 (EVM) or fungible SPL (Solana) token that is not one of the more specific DeFi types below."},{"type":"string","enum":["NATIVE"],"description":"The chain's native gas asset, used to pay transaction fees and not represented by a token contract. Examples: ETH on Ethereum, SOL on Solana, MATIC on Polygon, TRX on Tron, NEAR on NEAR. The wrapped form (e.g. WETH, wSOL) is a separate ERC20/NATIVE token linked by representation metadata, not this value."},{"type":"string","enum":["FIAT"],"description":"Off-chain fiat currency balance rather than an on-chain token. Examples: a USD, EUR, or GBP cash balance held on a centralized exchange or bank account."},{"type":"string","enum":["NFT"],"description":"Non-fungible token. Stored as one Token row per (contract, tokenId) with address `${contractAddress}#${tokenId}`. Examples: a Uniswap v3 concentrated-liquidity position NFT, or an art/PFP collectible. An NFT may still be a DeFi position container (e.g. a Uniswap v3 LP NFT); the position itself is modeled separately."},{"type":"string","enum":["REBASE_LST"],"description":"Rebasing liquid-staking token: the holder BALANCE grows over time to distribute staking rewards while the token stays ~1:1 pegged to the staked asset (balance-growing mechanic, staking domain). Example: stETH (Lido), where balanceOf increases each day with no incoming transfer. Contrast VALUE_ACCRUING for the wrapped, non-rebasing form (e.g. wstETH) that keeps a fixed balance and accrues via an exchange rate."},{"type":"string","enum":["INTEREST_BEARING"],"description":"Interest-bearing lending receipt whose holder BALANCE grows continuously at ~1:1 with the supplied underlying (Aave-style scaled balance multiplied by a rising liquidity index; balance-growing mechanic, lending domain). Examples: Aave aTokens such as aUSDC and aWETH, where your aUSDC quantity increases as interest accrues and 1 aUSDC always redeems for ~1 USDC. Mechanically the same balance-growth shape as REBASE_LST but for a lending deposit rather than staking. Contrast VALUE_ACCRUING for Compound cTokens, which instead keep a fixed balance and appreciate via an exchange rate."},{"type":"string","enum":["VALUE_ACCRUING"],"description":"Value-accruing receipt or share: the holder BALANCE is fixed and each unit becomes redeemable for a rising amount of a single underlying via an on-chain exchange rate (value-accruing mechanic). Examples: ERC-4626 vault shares (Yearn v3, Morpho), Beefy `moo*` vault shares (the core `BeefyVaultV7` is NOT ERC-4626 — it exposes `want()` and `getPricePerFullShare()` where a 4626 vault would expose `asset()` and `convertToAssets()`), Compound cTokens, wrapped LSTs (wstETH, rETH, cbETH, sfrxETH), and Solana LSTs (mSOL, JitoSOL). The represented underlying is usually discoverable on-chain (e.g. ERC-4626 `asset()`), but the exchange RATE is a time-varying derived value and must not be stored as a fixed ratio. Contrast INTEREST_BEARING and REBASE_LST, where the balance grows instead."},{"type":"string","enum":["LP_SHARE"],"description":"Liquidity-pool share representing proportional ownership of a BASKET of two or more pooled underlyings, so it has no single represented underlying token. Examples: Uniswap v2 pair tokens, Curve LP tokens, Balancer BPT, PancakeSwap LP tokens, Raydium/Orca LP tokens. A single-underlying receipt is VALUE_ACCRUING; a multi-underlying pool token is LP_SHARE."},{"type":"string","enum":["DEBT"],"description":"Non-transferable borrow or liability marker. The balance equals the amount owed (principal plus accrued interest) and is booked on the liability side, never as an asset. Examples: Aave variable and stable debt tokens such as variableDebtUSDC. Transfers and approvals typically revert, so it is a position record exposed as a token rather than a tradeable token."},{"type":"string","enum":["REFLECT"],"description":"Reflection / redistribution token: holder balances change via a fee-redistribution rate shift rather than via transfers (reflect.finance forks). Example: SAFEMOON-style tokens that redistribute a transfer tax to all holders."},{"type":"string","enum":["VOTE_ESCROWED"],"description":"Vote-escrowed lock position, typically non-transferable, created by locking a governance token for a fixed duration to receive boosted rewards or voting power. Examples: veCRV (Curve), veBAL (Balancer)."}]},"decimals":{"type":"integer","minimum":0,"maximum":9007199254740991},"isSpam":{"type":"boolean"},"stablecoinPeggedFiatCurrency":{"nullable":true,"type":"string"},"representsTokenAddress":{"nullable":true,"type":"string"}},"required":["chainId","address","assetId","symbol","type","decimals","isSpam","stablecoinPeggedFiatCurrency","representsTokenAddress"],"additionalProperties":false},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Precise signed decimal value encoded as a string."},"quote":{"nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Precise signed decimal value encoded as a string."},"currency":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"meta":{"nullable":true,"type":"object","properties":{"s":{"type":"string","enum":["SYNC_SOURCE","FMV_ENGINE","DERIVED_REPRESENTED","DERIVED_SIBLING","POLICY","MANUAL"]},"ts":{"type":"integer","minimum":1,"maximum":8210266876799}},"required":["s"],"additionalProperties":false}},"required":["value","currency","source","meta"],"additionalProperties":false},"defi":{"nullable":true,"type":"object","properties":{"operation":{"nullable":true,"anyOf":[{"type":"string","enum":["PROTOCOL_DEPOSIT"],"description":"Deposit assets into protocol-managed custody without immediate disposal"},{"type":"string","enum":["PROTOCOL_WITHDRAW"],"description":"Withdraw assets from protocol-managed custody back to the wallet"},{"type":"string","enum":["VAULT_DEPOSIT"],"description":"Deposit into a tokenized vault: one underlying is pooled under a manager or strategy and the depositor receives a fungible share"},{"type":"string","enum":["VAULT_WITHDRAW"],"description":"Redemption from a tokenized vault: share burned, underlying returned"},{"type":"string","enum":["SWAP"],"description":"Token swap/exchange on DEX (e.g., ETH → USDC on Uniswap)"},{"type":"string","enum":["PROVIDE_LIQUIDITY"],"description":"Add tokens to liquidity pool (e.g., add ETH+USDC to Uniswap pool)"},{"type":"string","enum":["REMOVE_LIQUIDITY"],"description":"Remove tokens from liquidity pool (e.g., withdraw from Uniswap pool)"},{"type":"string","enum":["LEND"],"description":"Supply tokens to lending protocol (e.g., deposit USDC to Aave)"},{"type":"string","enum":["WITHDRAW_LEND"],"description":"Withdraw supplied tokens from lending protocol (e.g., withdraw USDC from Aave)"},{"type":"string","enum":["LEND_REDUCE"],"description":"Reduce supplied lending exposure without receiving underlying back to the wallet"},{"type":"string","enum":["BORROW"],"description":"Borrow tokens from lending protocol (e.g., borrow ETH from Aave)"},{"type":"string","enum":["REPAY"],"description":"Repay borrowed tokens to lending protocol"},{"type":"string","enum":["LOAN_LIQUIDATION"],"description":"Forced loan liquidation that reduces protocol debt and seizes collateral"},{"type":"string","enum":["STAKE"],"description":"Stake tokens for rewards (e.g., stake ETH for staking rewards)"},{"type":"string","enum":["UNSTAKE"],"description":"Unstake tokens from staking protocol"},{"type":"string","enum":["CLAIM_REWARDS"],"description":"Claim earned rewards from staking, LP fees, or other yield sources"}]},"tokenRole":{"nullable":true,"anyOf":[{"type":"string","enum":["UNDERLYING"],"description":"The base/principal asset moving into or out of a position: the asset supplied, withdrawn, borrowed, repaid, staked, or unstaked, and the actual asset paid when reducing a debt. This is the real asset, not a receipt or marker for it. Examples: the ETH leg of a stake, or the USDC leg paid to repay an Aave loan. Processors read the repaid/supplied asset id from this leg."},{"type":"string","enum":["COLLATERAL"],"description":"An asset posted or locked as collateral, or seized as collateral during a liquidation, as distinct from a plain principal deposit. Role is per-transfer, so the same token can be UNDERLYING in one transfer and COLLATERAL in another. Example: the collateral (often an aToken or its underlying) taken from a borrower in an Aave V3 liquidation."},{"type":"string","enum":["RECEIPT_TOKEN"],"description":"A token that represents a claim on a supplied or staked position (a receipt or share) rather than the underlying itself. Covers interest-bearing receipts and value-accruing shares regardless of mechanic. Examples: Aave aTokens (aUSDC), Compound cTokens, JustLend jTokens, ERC-4626 vault shares, liquid-staking receipts. Whether it rebases or accrues via an exchange rate is captured by the token TokenType, not by this role."},{"type":"string","enum":["LP_SHARE"],"description":"A liquidity-pool share representing proportional ownership of a basket of two or more pooled underlyings. Examples: Uniswap v2 pair tokens, Curve and Balancer LP tokens, a Uniswap v3 concentrated-liquidity position NFT."},{"type":"string","enum":["LIABILITY_TOKEN"],"description":"A borrow/debt marker representing an outstanding liability (principal plus accrued interest), typically non-transferable. Examples: Aave variable and stable debt tokens (variableDebtUSDC). It must be booked on the liability side and is structurally distinct from a RECEIPT_TOKEN (asset side), so the two never share one value. Lets processors identify the debt leg by role instead of matching `variableDebt`/`stableDebt` symbol prefixes."},{"type":"string","enum":["REWARD"],"description":"An incentive, yield, or fee-share token realized from a position separately from principal. Examples: claimed governance/incentive tokens, or accrued trading-fee rewards."},{"type":"string","enum":["OTHER"],"description":"A protocol-specific or not-yet-classified token leg that does not fit the roles above. Use sparingly; prefer adding a generic role once a pattern recurs across protocols."}]},"positionRef":{"nullable":true,"type":"string"}},"required":["operation","tokenRole","positionRef"],"additionalProperties":false},"portfolioTransactionId":{"nullable":true,"type":"string"}},"required":["txIndex","type","from","to","token","value","quote","defi","portfolioTransactionId"],"additionalProperties":false}},"details":{"$ref":"#/components/schemas/RawTransactionListWithDetailsResponseDto__schema0"}},"required":["id","wallet","hash","blockHeight","timestamp","memo","processingState","walletOperations","details"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"pageSize":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Items returned per page."},"nextPageToken":{"description":"Opaque token for retrieving the next page.","type":"string","minLength":1}},"required":["pageSize"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"RawTransactionListWithDetailsResponseDto__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/RawTransactionListWithDetailsResponseDto__schema0"}]}},{"type":"object","additionalProperties":{"allOf":[{"$ref":"#/components/schemas/RawTransactionListWithDetailsResponseDto__schema0"}]}}]},"RawTransactionWithDetailsDto":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Operational current-row WalletTransaction UUID"},"wallet":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"},"name":{"nullable":true,"description":"Wallet display name","type":"string"},"type":{"type":"string","enum":["BLOCKCHAIN","EXCHANGE","BANK"],"description":"Wallet type"}},"required":["chainId","address","name","type"],"additionalProperties":false},"hash":{"type":"string"},"blockHeight":{"type":"string","pattern":"^\\d+$"},"timestamp":{"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))$"},"memo":{"nullable":true,"type":"string"},"processingState":{"type":"string","enum":["PROCESSED","PARTIAL","UNPROCESSED"]},"walletOperations":{"type":"array","items":{"type":"object","properties":{"txIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"type":{"type":"string","enum":["IN","OUT","GAS","SELF"]},"from":{"type":"object","properties":{"address":{"type":"string"},"label":{"nullable":true,"type":"string"}},"required":["address","label"],"additionalProperties":false},"to":{"type":"object","properties":{"address":{"type":"string"},"label":{"nullable":true,"type":"string"}},"required":["address","label"],"additionalProperties":false},"token":{"type":"object","properties":{"chainId":{"type":"string"},"address":{"type":"string"},"assetId":{"type":"string"},"symbol":{"type":"string"},"type":{"anyOf":[{"type":"string","enum":["ERC20"],"description":"Standard fungible token with a freely transferable, free-floating balance. The default for the vast majority of tokens. Examples: USDC, UNI, LINK, and any plain ERC-20 (EVM) or fungible SPL (Solana) token that is not one of the more specific DeFi types below."},{"type":"string","enum":["NATIVE"],"description":"The chain's native gas asset, used to pay transaction fees and not represented by a token contract. Examples: ETH on Ethereum, SOL on Solana, MATIC on Polygon, TRX on Tron, NEAR on NEAR. The wrapped form (e.g. WETH, wSOL) is a separate ERC20/NATIVE token linked by representation metadata, not this value."},{"type":"string","enum":["FIAT"],"description":"Off-chain fiat currency balance rather than an on-chain token. Examples: a USD, EUR, or GBP cash balance held on a centralized exchange or bank account."},{"type":"string","enum":["NFT"],"description":"Non-fungible token. Stored as one Token row per (contract, tokenId) with address `${contractAddress}#${tokenId}`. Examples: a Uniswap v3 concentrated-liquidity position NFT, or an art/PFP collectible. An NFT may still be a DeFi position container (e.g. a Uniswap v3 LP NFT); the position itself is modeled separately."},{"type":"string","enum":["REBASE_LST"],"description":"Rebasing liquid-staking token: the holder BALANCE grows over time to distribute staking rewards while the token stays ~1:1 pegged to the staked asset (balance-growing mechanic, staking domain). Example: stETH (Lido), where balanceOf increases each day with no incoming transfer. Contrast VALUE_ACCRUING for the wrapped, non-rebasing form (e.g. wstETH) that keeps a fixed balance and accrues via an exchange rate."},{"type":"string","enum":["INTEREST_BEARING"],"description":"Interest-bearing lending receipt whose holder BALANCE grows continuously at ~1:1 with the supplied underlying (Aave-style scaled balance multiplied by a rising liquidity index; balance-growing mechanic, lending domain). Examples: Aave aTokens such as aUSDC and aWETH, where your aUSDC quantity increases as interest accrues and 1 aUSDC always redeems for ~1 USDC. Mechanically the same balance-growth shape as REBASE_LST but for a lending deposit rather than staking. Contrast VALUE_ACCRUING for Compound cTokens, which instead keep a fixed balance and appreciate via an exchange rate."},{"type":"string","enum":["VALUE_ACCRUING"],"description":"Value-accruing receipt or share: the holder BALANCE is fixed and each unit becomes redeemable for a rising amount of a single underlying via an on-chain exchange rate (value-accruing mechanic). Examples: ERC-4626 vault shares (Yearn v3, Morpho), Beefy `moo*` vault shares (the core `BeefyVaultV7` is NOT ERC-4626 — it exposes `want()` and `getPricePerFullShare()` where a 4626 vault would expose `asset()` and `convertToAssets()`), Compound cTokens, wrapped LSTs (wstETH, rETH, cbETH, sfrxETH), and Solana LSTs (mSOL, JitoSOL). The represented underlying is usually discoverable on-chain (e.g. ERC-4626 `asset()`), but the exchange RATE is a time-varying derived value and must not be stored as a fixed ratio. Contrast INTEREST_BEARING and REBASE_LST, where the balance grows instead."},{"type":"string","enum":["LP_SHARE"],"description":"Liquidity-pool share representing proportional ownership of a BASKET of two or more pooled underlyings, so it has no single represented underlying token. Examples: Uniswap v2 pair tokens, Curve LP tokens, Balancer BPT, PancakeSwap LP tokens, Raydium/Orca LP tokens. A single-underlying receipt is VALUE_ACCRUING; a multi-underlying pool token is LP_SHARE."},{"type":"string","enum":["DEBT"],"description":"Non-transferable borrow or liability marker. The balance equals the amount owed (principal plus accrued interest) and is booked on the liability side, never as an asset. Examples: Aave variable and stable debt tokens such as variableDebtUSDC. Transfers and approvals typically revert, so it is a position record exposed as a token rather than a tradeable token."},{"type":"string","enum":["REFLECT"],"description":"Reflection / redistribution token: holder balances change via a fee-redistribution rate shift rather than via transfers (reflect.finance forks). Example: SAFEMOON-style tokens that redistribute a transfer tax to all holders."},{"type":"string","enum":["VOTE_ESCROWED"],"description":"Vote-escrowed lock position, typically non-transferable, created by locking a governance token for a fixed duration to receive boosted rewards or voting power. Examples: veCRV (Curve), veBAL (Balancer)."}]},"decimals":{"type":"integer","minimum":0,"maximum":9007199254740991},"isSpam":{"type":"boolean"},"stablecoinPeggedFiatCurrency":{"nullable":true,"type":"string"},"representsTokenAddress":{"nullable":true,"type":"string"}},"required":["chainId","address","assetId","symbol","type","decimals","isSpam","stablecoinPeggedFiatCurrency","representsTokenAddress"],"additionalProperties":false},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Precise signed decimal value encoded as a string."},"quote":{"nullable":true,"type":"object","properties":{"value":{"nullable":true,"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Precise signed decimal value encoded as a string."},"currency":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"},"meta":{"nullable":true,"type":"object","properties":{"s":{"type":"string","enum":["SYNC_SOURCE","FMV_ENGINE","DERIVED_REPRESENTED","DERIVED_SIBLING","POLICY","MANUAL"]},"ts":{"type":"integer","minimum":1,"maximum":8210266876799}},"required":["s"],"additionalProperties":false}},"required":["value","currency","source","meta"],"additionalProperties":false},"defi":{"nullable":true,"type":"object","properties":{"operation":{"nullable":true,"anyOf":[{"type":"string","enum":["PROTOCOL_DEPOSIT"],"description":"Deposit assets into protocol-managed custody without immediate disposal"},{"type":"string","enum":["PROTOCOL_WITHDRAW"],"description":"Withdraw assets from protocol-managed custody back to the wallet"},{"type":"string","enum":["VAULT_DEPOSIT"],"description":"Deposit into a tokenized vault: one underlying is pooled under a manager or strategy and the depositor receives a fungible share"},{"type":"string","enum":["VAULT_WITHDRAW"],"description":"Redemption from a tokenized vault: share burned, underlying returned"},{"type":"string","enum":["SWAP"],"description":"Token swap/exchange on DEX (e.g., ETH → USDC on Uniswap)"},{"type":"string","enum":["PROVIDE_LIQUIDITY"],"description":"Add tokens to liquidity pool (e.g., add ETH+USDC to Uniswap pool)"},{"type":"string","enum":["REMOVE_LIQUIDITY"],"description":"Remove tokens from liquidity pool (e.g., withdraw from Uniswap pool)"},{"type":"string","enum":["LEND"],"description":"Supply tokens to lending protocol (e.g., deposit USDC to Aave)"},{"type":"string","enum":["WITHDRAW_LEND"],"description":"Withdraw supplied tokens from lending protocol (e.g., withdraw USDC from Aave)"},{"type":"string","enum":["LEND_REDUCE"],"description":"Reduce supplied lending exposure without receiving underlying back to the wallet"},{"type":"string","enum":["BORROW"],"description":"Borrow tokens from lending protocol (e.g., borrow ETH from Aave)"},{"type":"string","enum":["REPAY"],"description":"Repay borrowed tokens to lending protocol"},{"type":"string","enum":["LOAN_LIQUIDATION"],"description":"Forced loan liquidation that reduces protocol debt and seizes collateral"},{"type":"string","enum":["STAKE"],"description":"Stake tokens for rewards (e.g., stake ETH for staking rewards)"},{"type":"string","enum":["UNSTAKE"],"description":"Unstake tokens from staking protocol"},{"type":"string","enum":["CLAIM_REWARDS"],"description":"Claim earned rewards from staking, LP fees, or other yield sources"}]},"tokenRole":{"nullable":true,"anyOf":[{"type":"string","enum":["UNDERLYING"],"description":"The base/principal asset moving into or out of a position: the asset supplied, withdrawn, borrowed, repaid, staked, or unstaked, and the actual asset paid when reducing a debt. This is the real asset, not a receipt or marker for it. Examples: the ETH leg of a stake, or the USDC leg paid to repay an Aave loan. Processors read the repaid/supplied asset id from this leg."},{"type":"string","enum":["COLLATERAL"],"description":"An asset posted or locked as collateral, or seized as collateral during a liquidation, as distinct from a plain principal deposit. Role is per-transfer, so the same token can be UNDERLYING in one transfer and COLLATERAL in another. Example: the collateral (often an aToken or its underlying) taken from a borrower in an Aave V3 liquidation."},{"type":"string","enum":["RECEIPT_TOKEN"],"description":"A token that represents a claim on a supplied or staked position (a receipt or share) rather than the underlying itself. Covers interest-bearing receipts and value-accruing shares regardless of mechanic. Examples: Aave aTokens (aUSDC), Compound cTokens, JustLend jTokens, ERC-4626 vault shares, liquid-staking receipts. Whether it rebases or accrues via an exchange rate is captured by the token TokenType, not by this role."},{"type":"string","enum":["LP_SHARE"],"description":"A liquidity-pool share representing proportional ownership of a basket of two or more pooled underlyings. Examples: Uniswap v2 pair tokens, Curve and Balancer LP tokens, a Uniswap v3 concentrated-liquidity position NFT."},{"type":"string","enum":["LIABILITY_TOKEN"],"description":"A borrow/debt marker representing an outstanding liability (principal plus accrued interest), typically non-transferable. Examples: Aave variable and stable debt tokens (variableDebtUSDC). It must be booked on the liability side and is structurally distinct from a RECEIPT_TOKEN (asset side), so the two never share one value. Lets processors identify the debt leg by role instead of matching `variableDebt`/`stableDebt` symbol prefixes."},{"type":"string","enum":["REWARD"],"description":"An incentive, yield, or fee-share token realized from a position separately from principal. Examples: claimed governance/incentive tokens, or accrued trading-fee rewards."},{"type":"string","enum":["OTHER"],"description":"A protocol-specific or not-yet-classified token leg that does not fit the roles above. Use sparingly; prefer adding a generic role once a pattern recurs across protocols."}]},"positionRef":{"nullable":true,"type":"string"}},"required":["operation","tokenRole","positionRef"],"additionalProperties":false},"portfolioTransactionId":{"nullable":true,"type":"string"}},"required":["txIndex","type","from","to","token","value","quote","defi","portfolioTransactionId"],"additionalProperties":false}},"details":{"$ref":"#/components/schemas/RawTransactionWithDetailsDto__schema0"}},"required":["id","wallet","hash","blockHeight","timestamp","memo","processingState","walletOperations","details"],"additionalProperties":false},"RawTransactionWithDetailsDto__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/RawTransactionWithDetailsDto__schema0"}]}},{"type":"object","additionalProperties":{"allOf":[{"$ref":"#/components/schemas/RawTransactionWithDetailsDto__schema0"}]}}]},"RawWalletTransactionImportRequestDto":{"type":"object","properties":{"conflictMode":{"default":"skip","description":"How to handle source transactions that already exist","type":"string","enum":["skip","error","replace_if_mutable"]},"validateBlockOrdering":{"default":false,"description":"When true, blockchain transactions are checked for block-height ↔ timestamp ordering against neighbors","type":"boolean"},"transactions":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"txHash":{"description":"Source tx hash or stable id; required for blockchain wallets (enforced in service), auto-generated for exchange/bank when omitted","type":"string","minLength":1},"timestamp":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}],"description":"Transaction timestamp (ISO 8601)"},"blockHeight":{"description":"Optional block height as an integer string","type":"string","pattern":"^\\d+$"},"memo":{"description":"Optional transaction memo","type":"string"},"source":{"description":"Optional source system","type":"string","minLength":1},"details":{"default":{},"description":"Source-specific raw JSON details","allOf":[{"$ref":"#/components/schemas/RawWalletTransactionImportRequestDto__schema0"}]},"tags":{"description":"Applied to the resulting PortfolioTransaction post-classification","maxItems":50,"type":"array","items":{"type":"string","minLength":1}},"files":{"description":"Already-uploaded file descriptors; attached post-classification","maxItems":10,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Unique identifier for the attachment"},"fileName":{"type":"string","minLength":1,"description":"Original file name"},"fileSize":{"type":"integer","minimum":1,"maximum":10485760,"description":"File size in bytes (max 10MB)"},"mimeType":{"type":"string","minLength":1,"description":"MIME type, e.g. application/pdf"},"uploadedAt":{"anyOf":[{"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))$"},{"type":"string","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(?:Z))$"}],"description":"When the file was uploaded (ISO 8601)"}},"required":["id","fileName","fileSize","mimeType","uploadedAt"],"additionalProperties":false}},"transfers":{"minItems":1,"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","minLength":1,"description":"Chain ID for the token identity"},"tokenAddress":{"type":"string","minLength":1,"description":"Token contract or asset address"},"type":{"type":"string","enum":["IN","OUT","GAS"],"description":"Transfer direction/type"},"value":{"type":"string","pattern":"^-?\\d+(\\.\\d+)?$","description":"Transfer quantity as a decimal string"},"fromAddress":{"type":"string","minLength":1,"description":"Sender address"},"fromAddressLabel":{"description":"Sender label","type":"string","minLength":1},"toAddress":{"type":"string","minLength":1,"description":"Recipient address"},"toAddressLabel":{"description":"Recipient label","type":"string","minLength":1},"valueQuote":{"description":"Transfer value in the quote currency","type":"string","pattern":"^-?\\d+(\\.\\d+)?$"},"quoteCurrency":{"description":"Quote currency","type":"string","minLength":1},"quoteSource":{"description":"Quote source","type":"string","minLength":1}},"required":["chainId","tokenAddress","type","value","fromAddress","toAddress"],"additionalProperties":false},"description":"Raw transfers included in the transaction"}},"required":["timestamp","transfers"],"additionalProperties":false},"description":"Raw wallet transactions to import"}},"required":["transactions"],"additionalProperties":false},"RawWalletTransactionImportRequestDto__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]},{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/RawWalletTransactionImportRequestDto__schema0"}]}},{"type":"object","additionalProperties":{"allOf":[{"$ref":"#/components/schemas/RawWalletTransactionImportRequestDto__schema0"}]}}]},"RawWalletTransactionImportResponseDto":{"type":"object","properties":{"created":{"type":"array","items":{"type":"object","properties":{"txHash":{"type":"string","minLength":1,"description":"Source transaction hash or stable ID"}},"required":["txHash"],"additionalProperties":false}},"replaced":{"type":"array","items":{"type":"object","properties":{"txHash":{"type":"string","minLength":1,"description":"Source transaction hash or stable ID"}},"required":["txHash"],"additionalProperties":false}},"skipped":{"type":"array","items":{"type":"object","properties":{"txHash":{"type":"string","minLength":1,"description":"Source transaction hash or stable ID"},"reason":{"type":"string","minLength":1,"description":"Reason the transaction was skipped"}},"required":["txHash","reason"],"additionalProperties":false}},"failed":{"type":"array","items":{"type":"object","properties":{"txHash":{"type":"string","minLength":1,"description":"Source transaction hash or stable ID"},"error":{"type":"string","minLength":1,"description":"Failure message"}},"required":["txHash","error"],"additionalProperties":false}}},"required":["created","replaced","skipped","failed"],"additionalProperties":false},"TriggerSyncRequestDto":{"type":"object","properties":{"wallets":{"description":"Wallets to sync by exact chainId and walletAddress pair","minItems":1,"type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","description":"Chain ID"},"walletAddress":{"type":"string","description":"Wallet address"}},"required":["chainId","walletAddress"],"additionalProperties":false}},"full":{"default":false,"description":"Full resync if true, incremental if false","type":"boolean"},"toBlock":{"description":"Stop at a specific block. This is allowed only for test API keys.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ignoreBalanceCheck":{"description":"Bypass the wallet balance gate. This is allowed only for test API keys.","type":"boolean"},"amountOfIgnoredLatestTxns":{"description":"Omit the newest N transactions. This is allowed only for test API keys and requires full=true.","type":"integer","minimum":0,"maximum":9007199254740991},"tokens":{"description":"Optional exact token filters for token-scoped wallet sync","type":"array","items":{"type":"object","properties":{"chainId":{"type":"string","minLength":1,"description":"Chain identifier for the token"},"address":{"type":"string","minLength":1,"description":"Token contract or mint address"}},"required":["chainId","address"]}}},"additionalProperties":false},"SyncJobResponseDto":{"type":"object","properties":{"jobId":{"type":"string","description":"Job ID for tracking progress"},"portfolioSlug":{"type":"string","description":"Portfolio slug being synced"}},"required":["jobId","portfolioSlug"],"additionalProperties":false},"ReclassifySyncRequestDto":{"type":"object","properties":{"reason":{"description":"Optional reason recorded on the reclassification job","type":"string","minLength":1}},"additionalProperties":false},"SyncProgressResponseDto":{"type":"object","properties":{"status":{"type":"string","enum":["pending","processing","completed","failed"],"description":"Overall sync status"},"wallets":{"type":"array","items":{"type":"object","properties":{"lastSyncAt":{"description":"When the wallet last finished a sync (ISO 8601)","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))$"},"syncMessages":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"code":{"type":"string","enum":["EXCHANGE_RECONNECT_REQUIRED"]},"message":{"type":"string","minLength":1},"severity":{"default":"ERROR","type":"string","enum":["ERROR","WARN"]},"details":{"type":"object","properties":{"provider":{"type":"string","minLength":1},"reconnectRequired":{"type":"boolean","enum":[true]},"errorType":{"type":"string","enum":["ExternalServiceAuthenticationError"]}},"required":["provider","reconnectRequired","errorType"],"additionalProperties":false}},"required":["code","message","severity","details"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["SYNC_PROCESSING_FAILED"]},"message":{"type":"string","minLength":1},"severity":{"default":"ERROR","type":"string","enum":["ERROR","WARN"]},"details":{"type":"object","properties":{"retryable":{"type":"boolean","enum":[true]},"errorType":{"type":"string","enum":["SyncProcessingError"]}},"required":["retryable","errorType"],"additionalProperties":false}},"required":["code","message","severity","details"],"additionalProperties":false},{"type":"object","properties":{"code":{"type":"string","enum":["SYNC_WARNING"]},"message":{"type":"string","minLength":1},"severity":{"default":"ERROR","type":"string","enum":["ERROR","WARN"]},"details":{"type":"object","properties":{"errorType":{"type":"string","enum":["SyncWarning"]}},"required":["errorType"],"additionalProperties":false}},"required":["code","message","severity","details"],"additionalProperties":false}],"type":"object"},"description":"Safe structured messages from the last finished sync"},"chainId":{"type":"string","description":"Chain ID"},"address":{"type":"string","description":"Wallet address"},"status":{"type":"string","enum":["pending","processing","completed","failed"],"description":"Sync status"},"progressPercent":{"type":"number","minimum":0,"maximum":100,"description":"Progress percentage"},"transactionsSynced":{"description":"Transactions synced so far","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalTransactions":{"description":"Total transactions to sync","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errorMessage":{"description":"Error message if failed","type":"string"}},"required":["syncMessages","chainId","address","status","progressPercent"],"additionalProperties":false},"description":"Per-wallet progress"},"startedAt":{"description":"When sync started (ISO 8601)","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))$"},"updatedAt":{"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":"Last progress update (ISO 8601)"},"completedAt":{"description":"When sync completed (ISO 8601)","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))$"}},"required":["status","wallets","updatedAt"],"additionalProperties":false},"WorkspaceReportExportRequestDto":{"type":"object","properties":{"payload":{"oneOf":[{"type":"object","properties":{"scopeId":{"type":"string","minLength":1},"locale":{"type":"string","minLength":1},"type":{"type":"string","enum":["consolidated-profit-and-loss"]},"format":{"type":"string","enum":["xlsx"]},"filters":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"}}}},"required":["locale","type","format","filters"],"additionalProperties":false},{"type":"object","properties":{"scopeId":{"type":"string","minLength":1},"locale":{"type":"string","minLength":1},"type":{"type":"string","enum":["consolidated-balance-sheet"]},"format":{"type":"string","enum":["xlsx"]},"filters":{"type":"object","properties":{"asOfDate":{"type":"string"}},"required":["asOfDate"]}},"required":["locale","type","format","filters"],"additionalProperties":false}],"type":"object"},"format":{"type":"string","enum":["xlsx","pdf","json"],"description":"Export format"},"totalsOnly":{"description":"When true, only calculate totals without generating binary export","type":"boolean"}},"required":["payload","format"]},"JobStatusResponseDto":{"type":"object","properties":{"jobId":{"type":"string","description":"Job ID"},"status":{"type":"string","enum":["pending","completed","failed"],"description":"Job status"},"finishedOn":{"description":"BullMQ completion timestamp in milliseconds","type":"number"},"returnValue":{"description":"Raw job return value"},"progress":{"type":"object","properties":{"completed":{"type":"number","description":"Completed units"},"total":{"type":"number","description":"Total units"},"transactionsSynced":{"type":"number","description":"Synced transaction count"}},"required":["completed","total","transactionsSynced"],"additionalProperties":false,"description":"Job progress counters"}},"required":["jobId","status","progress"],"additionalProperties":false},"ReapQuoteSimulationRequestDto":{"type":"object","properties":{"network":{"type":"string","enum":["SWIFT","ACH","SEPA","FPS","EFT","FAST","CHATS","KFTC","ZENGIN","INSTAPAY","PESONET","PROMPTPAY","BECS","IMPS","NEFT","BI-FAST","UAEFTS","SPEI","SPID","PIX"],"description":"Reap payout network / bank method (e.g. SEPA, ACH, IMPS)"},"receivingAmount":{"type":"string","pattern":"^\\d+(\\.\\d+)?$","description":"Amount the recipient should receive, as a decimal string in the receiving currency (e.g. \"500000\")"},"receivingCurrency":{"description":"ISO 4217 receiving currency; defaults to the network default","type":"string","minLength":3,"maxLength":3},"recipientBankCountry":{"description":"ISO 3166-1 alpha-2 recipient bank country; defaults to the network default","type":"string","minLength":2,"maxLength":2},"senderCurrency":{"default":"USDC","description":"Stablecoin funding the simulated payout","type":"string","enum":["USDC","USDT","USDe"]},"purposeOfPayment":{"default":"payment_for_business_services","description":"Reap purpose-of-payment classification","type":"string","enum":["payment_for_goods","payment_for_business_services","payment_for_salary_or_benefits","capital_investment_or_item","other"]}},"required":["network","receivingAmount"],"additionalProperties":false},"ReapQuoteSimulationResponseDto":{"type":"object","properties":{"status":{"type":"string","enum":["quoted","corridor_unavailable","amount_out_of_range","limit_skipped"]},"corridor":{"type":"object","properties":{"network":{"type":"string"},"receivingCurrency":{"type":"string"},"recipientBankCountry":{"type":"string"},"senderCurrency":{"type":"string"},"amountBounds":{"nullable":true,"description":"Corridor min/max receiving amount, when the corridor is enabled","type":"object","properties":{"minAmount":{"type":"string"},"maxAmount":{"type":"string"}},"required":["minAmount","maxAmount"],"additionalProperties":false}},"required":["network","receivingCurrency","recipientBankCountry","senderCurrency","amountBounds"],"additionalProperties":false},"quote":{"nullable":true,"type":"object","properties":{"exchangeRate":{"type":"string","description":"Receiving units per 1 sender unit (e.g. 95.1058)"},"senderCurrency":{"type":"string"},"receivingCurrency":{"type":"string"},"processingFee":{"type":"string","description":"Total processing fee, in the sender currency"},"itemizedFees":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Stable fee bucket key (fixed | variable | special)"},"label":{"type":"string","description":"Human-readable fee label, e.g. \"Fixed fee\""},"amount":{"type":"string","description":"Component fee amount, in the sender currency"},"percentage":{"nullable":true,"description":"Percentage of the base sender amount, when applicable","type":"string"}},"required":["key","label","amount","percentage"],"additionalProperties":false}},"totalReceivable":{"type":"string","description":"Amount the recipient receives"},"quoteValiditySeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Seconds the draft quote remains valid before auto-expiry"},"summary":{"type":"string","description":"Human-readable multi-line fee breakdown"}},"required":["exchangeRate","senderCurrency","receivingCurrency","processingFee","itemizedFees","totalReceivable","quoteValiditySeconds","summary"],"additionalProperties":false},"note":{"nullable":true,"type":"string"}},"required":["status","corridor","quote","note"],"additionalProperties":false},"CreatePortfolioTransactionOutputDto":{"type":"object","properties":{"portfolioTransactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Identity of the transaction created from the supplied processed transaction. Its create event is written in the same transaction as the command, so the transaction exists once the command succeeds."}},"required":["portfolioTransactionId"],"additionalProperties":false},"ApplyIntercompanyMoveProcessingOutputDto":{"type":"object","properties":{"pairId":{"type":"string","description":"Identity allocated for the pair this command staged. Nothing has been posted to the books when it is returned: the runner applies the paired accounting after this command commits, and writes the durable pair record under this id."}},"required":["pairId"],"additionalProperties":false},"RemoveIntercompanyMoveProcessingOutputDto":{"type":"object","properties":{"pairId":{"type":"string","description":"Identity of the durable pair whose removal this command staged. The pair and its accounting are still in place when the value is returned: the runner reclassifies both endpoints after this command commits."}},"required":["pairId"],"additionalProperties":false},"SplitPortfolioTransactionOutputDto":{"type":"object","properties":{"sourceTransactionIds":{"type":"array","items":{"type":"string"},"description":"The distinct transactions the selected operations were taken from, deduplicated from the request. Each one is staged for rearrangement; whether it survives depends on whether any of its operations were left behind."},"newTransactionId":{"type":"string","description":"Identity allocated for the transaction the selected operations will move into. That transaction does not exist when the value is returned: the runner creates it after this command commits."},"operationTypeChange":{"type":"string","enum":["DEPOSIT_FIAT","INCOME","REFUND","REBATE","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"],"description":"The operation type requested for the new transaction, echoed back from the request. It records what was asked for, not an observation of a committed transaction."}},"required":["sourceTransactionIds","newTransactionId","operationTypeChange"],"additionalProperties":false},"ApplyPortfolioConversionOutputDto":{"type":"object","properties":{"portfolioTransactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Identity of the single ADJUSTMENT transaction this command created to carry the whole conversion. Its create event is written in the same transaction as the command, so the transaction exists once the command succeeds. The cascade recomputation it enqueues runs afterwards."},"previewHash":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"SHA-256 over the conversion material the apply was computed from: the submitted workbook input, the balances it was previewed against, and the rows it generated. The same value is recorded on the transaction, so a caller can confirm the applied conversion is the one it reviewed."}},"required":["portfolioTransactionId","previewHash"],"additionalProperties":false},"ApplyIntercompanyMovePairsBulkOutputDto":{"type":"object","properties":{"results":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"pair":{"type":"object","properties":{"txId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"currentSide":{"type":"string","enum":["SEND","RECEIVE"]},"counterpartPortfolioId":{"type":"integer","minimum":1,"maximum":9007199254740991},"counterpartPortfolioTransactionId":{"type":"string"},"treatment":{"type":"string","enum":["OPERATING_FUNDING","CARRYOVER_BASIS_TRANSFER"]},"reason":{"type":"string"}},"required":["txId","currentSide","counterpartPortfolioId","counterpartPortfolioTransactionId","treatment"],"additionalProperties":false,"description":"The submitted pair, echoed back so a caller can match this row to its request."},"status":{"type":"string","enum":["STAGED"],"description":"This pair passed validation and was staged for the runner. Nothing has been posted to the books when the row is returned: the runner applies the paired accounting after this command commits."},"pairId":{"type":"string","description":"Identity allocated for the pair this row staged. The durable pair record and its journal entries are written by the runner after commit."}},"required":["pair","status","pairId"],"additionalProperties":false},{"type":"object","properties":{"pair":{"type":"object","properties":{"txId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"currentSide":{"type":"string","enum":["SEND","RECEIVE"]},"counterpartPortfolioId":{"type":"integer","minimum":1,"maximum":9007199254740991},"counterpartPortfolioTransactionId":{"type":"string"},"treatment":{"type":"string","enum":["OPERATING_FUNDING","CARRYOVER_BASIS_TRANSFER"]},"reason":{"type":"string"}},"required":["txId","currentSide","counterpartPortfolioId","counterpartPortfolioTransactionId","treatment"],"additionalProperties":false,"description":"The submitted pair, echoed back so a caller can match this row to its request."},"status":{"type":"string","enum":["ERROR"],"description":"This pair was rejected before staging, so nothing was staged for it. Other rows in the same response may still have been staged."},"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION_ERROR","IMMUTABLE_ENDPOINT","PROCESSING_ERROR"],"description":"Stable category of the rejection, for branching without matching on the message."},"message":{"type":"string","description":"User-facing sentence naming what about this pair was rejected."}},"required":["code","message"],"additionalProperties":false,"description":"Why this pair was rejected."}},"required":["pair","status","error"],"additionalProperties":false}],"type":"object"},"description":"One row per submitted pair, in submission order. A row reports whether that pair was staged or rejected, so a mixed response is ordinary: a rejected row never blocks the rows around it."}},"required":["results"],"additionalProperties":false},"CreateManualJournalEntryOutputDto":{"type":"object","properties":{"portfolioTransactionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$","description":"Identity of the ADJUSTMENT transaction created to hold the submitted journal entry. Its create event and journal are written in the same transaction as the command, so the transaction exists once the command succeeds rather than after a later runner pass."}},"required":["portfolioTransactionId"],"additionalProperties":false},"ClosePeriodOutputDto":{"type":"object","properties":{"periodCloseId":{"type":"string","minLength":1,"description":"Identity of the period-close lifecycle record the runner committed. Unlike the staging commands, this close is already durable when the value is returned."},"transactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many portfolio transactions the close sealed."},"totalDebits":{"type":"string","description":"Period-incremental net-account debits in the portfolio's functional currency, as a canonical decimal string rather than a number so no precision is lost in transit."},"totalCredits":{"type":"string","description":"The credit counterpart of `totalDebits`, in the same currency and format. The two are always equal; a result where they are not is rejected here rather than published."},"inputHash":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Lowercase SHA-256 fold of the per-transaction source-content digests the close read. It fingerprints what went in, not what came out."},"outputHash":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Lowercase SHA-256 fold of the per-transaction journal-content digests the close produced."}},"required":["periodCloseId","transactionCount","totalDebits","totalCredits","inputHash","outputHash"],"additionalProperties":false},"ReopenPeriodOutputDto":{"type":"object","properties":{"periodCloseId":{"type":"string","description":"Identity of the period-close record the runner reopened. It comes back from the runner rather than being echoed from the request, so it names the close that was actually released."},"reopenedTransactionCount":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many portfolio transactions the reopen released from the closed period."}},"required":["periodCloseId","reopenedTransactionCount"],"additionalProperties":false}}},"x-command-permissions":{"CreatePortfolioTransactionCommand":["portfolio:transactions:create"],"RemoveWalletOperationsFromPortfolioTransactionCommand":["portfolio:transactions:update"],"ApplyIntercompanyMoveProcessingCommand":["portfolio:transactions:update"],"RemoveIntercompanyMoveProcessingCommand":["portfolio:transactions:update"],"ReprocessPortfolioTransactionCommand":["portfolio:transactions:update"],"RefreshPortfolioTransactionFmvCommand":["portfolio:transactions:update","portfolio:accounting:fmv:adjust"],"UpdatePortfolioTransactionFmvCommand":["portfolio:transactions:update","portfolio:accounting:fmv:adjust"],"UpdatePortfolioTransactionOperationTypeCommand":["portfolio:transactions:update"],"MergePortfolioTransactionsCommand":["portfolio:transactions:update"],"SplitPortfolioTransactionCommand":["portfolio:transactions:update"],"UpdatePortfolioTransactionJournalEntryLineCommand":["portfolio:transactions:update"],"UpsertJournalEntryLineCostCenterCommand":["portfolio:transactions:update"],"LinkPaymentToPortfolioTransactionCommand":["portfolio:transactions:update"],"UpdatePortfolioTransactionMemoCommand":["portfolio:transactions:update"],"UpsertPortfolioTransactionTagsCommand":["portfolio:transactions:update"],"AttachFileToPortfolioTransactionCommand":["portfolio:transactions:update"],"RemoveFileFromPortfolioTransactionCommand":["portfolio:transactions:update"],"DeletePortfolioTransactionCommand":["portfolio:transactions:delete"],"UpdatePortfolioTransactionStatusCommand":["portfolio:transactions:update"],"ApplyPortfolioConversionCommand":["portfolio:transactions:create"],"ApplyIntercompanyMovePairsBulkCommand":["portfolio:transactions:update"],"CreateManualJournalEntryCommand":["portfolio:transactions:create"],"BookPriorPeriodAdjustmentCommand":["portfolio:accounting:close"],"ClosePeriodCommand":["portfolio:accounting:close"],"ReopenPeriodCommand":["portfolio:accounting:reopen"]}}