{"openapi":"3.1.0","info":{"title":"YieldBoard","version":"2.1.0"},"paths":{"/api/auth/register":{"post":{"tags":["auth"],"summary":"Register","operationId":"register_api_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/verify-email":{"post":{"tags":["auth"],"summary":"Verify Email","description":"Verify email using token from the verification link.","operationId":"verify_email_api_auth_verify_email_post","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend Verification","description":"Resend verification email for current user.","operationId":"resend_verification_api_auth_resend_verification_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh","operationId":"refresh_api_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/service-token":{"post":{"tags":["auth"],"summary":"Service Token","description":"Mint a long-lived JWT for use by an external service/agent\n(e.g. an external Claude Code instance driving the API).\n\nAuth semantics identical to /login (email + password). Differs\nonly in the token lifetime: 1-365 days instead of the 30 min\ninteractive session default. No refresh flow - once expired,\nthe caller mints a new token.\n\nResponse includes only the token itself. The caller stores it\nand sends as `Authorization: Bearer <token>` on every request.","operationId":"service_token_api_auth_service_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/change-password":{"post":{"tags":["auth"],"summary":"Change Password","operationId":"change_password_api_auth_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Send a password reset email. Always returns success to avoid email enumeration.","operationId":"forgot_password_api_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Reset password using a token from the email link.","operationId":"reset_password_api_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me":{"get":{"tags":["user"],"summary":"Get Profile","operationId":"get_profile_api_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["user"],"summary":"Update Profile","operationId":"update_profile_api_me_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/me/addresses":{"get":{"tags":["user"],"summary":"List Addresses","operationId":"list_addresses_api_me_addresses_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AddressResponse"},"type":"array","title":"Response List Addresses Api Me Addresses Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["user"],"summary":"Add Address","operationId":"add_address_api_me_addresses_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/me/addresses/export":{"get":{"tags":["user"],"summary":"Export Addresses","description":"Export every owned address (UserAddress + CexAddress).\n\n`expand` toggles xpub treatment:\n  - \"xpub\"    (default): one row per registered xpub. Tax advisor\n              ready, compact.\n  - \"derived\": expand every xpub to its individual gap-scanned\n              addresses, each as its own row.\n\n`chain` filters to a single chain (\"bitcoin\", \"ethereum\", …) or\n\"all\" (default) for cross-chain export. CEX rows are kept only\nwhen their stored chain matches (or when chain == \"all\").\n\n`format` selects \"csv\" (default, tabular, opens in Excel) or\n\"json\" (structured array with named fields, friendlier for\nprogrammatic consumers).\n\nBalances come from the cached snapshot (no live fetch); a stale\nsnapshot shows whatever was last seen.","operationId":"export_addresses_api_me_addresses_export_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"expand","in":"query","required":false,"schema":{"type":"string","default":"xpub","title":"Expand"}},{"name":"chain","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Chain"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","default":"csv","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/addresses/import":{"post":{"tags":["user"],"summary":"Import Addresses","description":"Import wallets/xpubs/CEX addresses from a v2 JSON export.\n\nBody shape: {\"mode\": \"skip\"|\"merge\", \"payload\": <parsed JSON>}.\n- \"skip\"  (default): existing (chain, address) rows stay untouched.\n- \"merge\": existing rows pick up the file's label + is_archived.\n\nWallets *not* in the file are NEVER deleted; this is purely\nadditive. Tax-relevant data (lots, predecessor history, reward\nevents) cascade off UserAddress so a \"replace mode\" would be\ndestructive - deliberately not offered.","operationId":"import_addresses_api_me_addresses_import_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/me/addresses/{addr_id}":{"put":{"tags":["user"],"summary":"Update Address","operationId":"update_address_api_me_addresses__addr_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"addr_id","in":"path","required":true,"schema":{"type":"integer","title":"Addr Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["user"],"summary":"Delete Address","operationId":"delete_address_api_me_addresses__addr_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"addr_id","in":"path","required":true,"schema":{"type":"integer","title":"Addr Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/addresses/bulk-disable":{"patch":{"tags":["user"],"summary":"Bulk Disable Addresses","description":"Bulk-toggle is_disabled flag on N addresses. Used by the wallet\nmulti-select action bar. Wallets keep their `is_archived` state and\nstay visible in NodeView; downstream calculations (portfolio,\nrewards, tax) filter them out.","operationId":"bulk_disable_addresses_api_me_addresses_bulk_disable_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDisableRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/me/addresses/rescan-due":{"get":{"tags":["user"],"summary":"Rescan Due","description":"Which of the user's xpub addresses are past their rescan TTL\nand should be re-derived. Each entry is\n{id, address, chain, last_scanned (iso or null), ttl_hours}.","operationId":"rescan_due_api_me_addresses_rescan_due_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/me/addresses/{addr_id}/rescan":{"post":{"tags":["user"],"summary":"Rescan Address","description":"Force a fresh read of one address.\n\n- xpubs (Bitcoin, Ethereum): re-derive gap-scan via the chain's\n  rescan_xpub - finds newly used addresses + refreshes per-derived\n  balance snapshots.\n- wallet (single address): force-refresh the balance snapshot\n  bypassing the TTL cache, plus a per-chain event sync if the\n  chain has one wired (Bitcoin uses sync_address_events for the\n  tx_in / tx_out history).\n\nReturns the refreshed descriptor so the frontend can re-render.","operationId":"rescan_address_api_me_addresses__addr_id__rescan_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"addr_id","in":"path","required":true,"schema":{"type":"integer","title":"Addr Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/addresses/tag":{"post":{"tags":["user"],"summary":"Tag Address","description":"Set or update a classification tag for an arbitrary on-chain address.\nBody: {chain, address, tag, label?}. Idempotent - upserts by (user, chain, address).","operationId":"tag_address_api_me_addresses_tag_post","security":[{"OAuth2PasswordBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["user"],"summary":"Untag Address","description":"Remove a tag entry (= revert to unclassified). Used when the user\nchanges their mind about a predecessor address classification.","operationId":"untag_address_api_me_addresses_tag_delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"chain","in":"query","required":true,"schema":{"type":"string","title":"Chain"}},{"name":"address","in":"query","required":true,"schema":{"type":"string","title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/settings":{"get":{"tags":["user"],"summary":"List Settings","operationId":"list_settings_api_me_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SettingResponse"},"type":"array","title":"Response List Settings Api Me Settings Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/me/settings/{key}":{"put":{"tags":["user"],"summary":"Set Setting","operationId":"set_setting_api_me_settings__key__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["user"],"summary":"Delete Setting","operationId":"delete_setting_api_me_settings__key__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/test-key/{service}":{"post":{"tags":["user"],"summary":"Test Api Key","description":"Test a personal API key by making a minimal request to the service.","operationId":"test_api_key_api_me_test_key__service__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"service","in":"path","required":true,"schema":{"type":"string","title":"Service"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users":{"get":{"tags":["admin"],"summary":"List Users","operationId":"list_users_api_admin_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserResponse"},"type":"array","title":"Response List Users Api Admin Users Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/users/{user_id}":{"get":{"tags":["admin"],"summary":"Get User","operationId":"get_user_api_admin_users__user_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["admin"],"summary":"Update User","operationId":"update_user_api_admin_users__user_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUserUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Delete User","operationId":"delete_user_api_admin_users__user_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/reset-password":{"post":{"tags":["admin"],"summary":"Reset Password","operationId":"reset_password_api_admin_users__user_id__reset_password_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminResetPassword"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users/{user_id}/impersonate":{"post":{"tags":["admin"],"summary":"Impersonate","description":"Generate a token to view the app as another user.","operationId":"impersonate_api_admin_users__user_id__impersonate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/limits":{"get":{"tags":["admin"],"summary":"Get Limits","description":"Return effective per-service rate limits and budgets (defaults + overrides).","operationId":"get_limits_api_admin_limits_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/limits/{service}":{"put":{"tags":["admin"],"summary":"Put Limits","description":"Update one or more limit fields for a service. Pass null to clear.","operationId":"put_limits_api_admin_limits__service__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"service","in":"path","required":true,"schema":{"type":"string","title":"Service"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin"],"summary":"Reset Limits","description":"Reset a service to its built-in defaults.","operationId":"reset_limits_api_admin_limits__service__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"service","in":"path","required":true,"schema":{"type":"string","title":"Service"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/portfolio-config":{"get":{"tags":["admin"],"summary":"Get Portfolio Config","operationId":"get_portfolio_config_api_admin_portfolio_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["admin"],"summary":"Put Portfolio Config","operationId":"put_portfolio_config_api_admin_portfolio_config_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortfolioConfigUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/limits/{service}/refresh":{"post":{"tags":["admin"],"summary":"Refresh Limits","description":"Make one minimal request to the upstream service so its rate-limit\nheaders (or body error) update our locally-stored quota snapshot.\nReturns the fresh usage entry for the service.","operationId":"refresh_limits_api_admin_limits__service__refresh_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"service","in":"path","required":true,"schema":{"type":"string","title":"Service"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/cex/exchanges":{"get":{"tags":["cex"],"summary":"List Supported Exchanges","description":"List exchanges the backend supports. Frontend uses this to build\nthe picker so adding a new exchange on the backend automatically\nshows up in the UI.","operationId":"list_supported_exchanges_api_me_cex_exchanges_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ExchangeOption"},"type":"array","title":"Response List Supported Exchanges Api Me Cex Exchanges Get"}}}}}}},"/api/me/cex":{"get":{"tags":["cex"],"summary":"List Accounts","operationId":"list_accounts_api_me_cex_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CexAccountResponse"},"type":"array","title":"Response List Accounts Api Me Cex Get"}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["cex"],"summary":"Add Account","operationId":"add_account_api_me_cex_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CexAccountCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CexAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/me/cex/{account_id}":{"patch":{"tags":["cex"],"summary":"Update Account","description":"Update a CEX account: label, and optionally rotate API credentials.","operationId":"update_account_api_me_cex__account_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CexAccountUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CexAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["cex"],"summary":"Delete Account","operationId":"delete_account_api_me_cex__account_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/cex/{account_id}/test":{"post":{"tags":["cex"],"summary":"Test Account","operationId":"test_account_api_me_cex__account_id__test_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"integer","title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/providers/instances":{"get":{"tags":["providers"],"summary":"List Instances","operationId":"list_instances_api_providers_instances_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["providers"],"summary":"Create Instance","operationId":"create_instance_api_providers_instances_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstanceCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/providers/instances/{inst_id}":{"put":{"tags":["providers"],"summary":"Update Instance","operationId":"update_instance_api_providers_instances__inst_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"inst_id","in":"path","required":true,"schema":{"type":"integer","title":"Inst Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstanceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["providers"],"summary":"Delete Instance","operationId":"delete_instance_api_providers_instances__inst_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"inst_id","in":"path","required":true,"schema":{"type":"integer","title":"Inst Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/providers/instances/{inst_id}/test":{"post":{"tags":["providers"],"summary":"Test Instance","description":"Sweep one real call per registered capability of this provider.\n\nOptional comma-separated ``chains`` / ``calls`` query params limit\nthe sweep to a subset - used by the \"Test All\" UI button to honour\nthe chain dropdown + capability multi-select filters above the\nprovider list. Both omitted = sweep every wired capability.\n\nThis populates the per-(chain, call_type, provider) latency tracker\nso providers that LatencyAware would otherwise never reach (because\nthey lost the latency race once and now never get traffic) still\nget periodic measurements. Falls back to a plain `test_url` ping\nonly when the provider has no wired capabilities.","operationId":"test_instance_api_providers_instances__inst_id__test_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"inst_id","in":"path","required":true,"schema":{"type":"integer","title":"Inst Id"}},{"name":"chains","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chains"}},{"name":"calls","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calls"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/providers/tiers":{"get":{"tags":["providers"],"summary":"List Tiers","operationId":"list_tiers_api_providers_tiers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"tags":["providers"],"summary":"Create Tier","operationId":"create_tier_api_providers_tiers_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/providers/tiers/{tier_id}":{"put":{"tags":["providers"],"summary":"Update Tier","operationId":"update_tier_api_providers_tiers__tier_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tier_id","in":"path","required":true,"schema":{"type":"integer","title":"Tier Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["providers"],"summary":"Delete Tier","operationId":"delete_tier_api_providers_tiers__tier_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"tier_id","in":"path","required":true,"schema":{"type":"integer","title":"Tier Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/providers/routing":{"get":{"tags":["providers"],"summary":"List Routing","operationId":"list_routing_api_providers_routing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["providers"],"summary":"Set Routing","description":"Replace all routing entries. Expects the full list.\nRefuses to wipe existing routing with an empty or smaller set\n(protects against frontend autoSave race on initial load).","operationId":"set_routing_api_providers_routing_put","requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RoutingEntry"},"type":"array","title":"Entries"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/providers/auto-testbed/config":{"get":{"tags":["providers"],"summary":"Get Auto Testbed Config","description":"Effective testbed scheduler config - YAML defaults overlaid by\nadmin overrides from data/config.json.","operationId":"get_auto_testbed_config_api_providers_auto_testbed_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"tags":["providers"],"summary":"Set Auto Testbed Config","description":"Persist max_age_h to data/config.json. Effective on the next\nscheduler tick (no restart needed).","operationId":"set_auto_testbed_config_api_providers_auto_testbed_config_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoTestbedConfigUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/providers/capabilities":{"get":{"tags":["providers"],"summary":"List Capabilities","description":"Return all capabilities from YAML - what each provider CAN do.","operationId":"list_capabilities_api_providers_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/providers/catalog":{"get":{"tags":["providers"],"summary":"Provider Catalog","description":"Return provider definitions from YAML - available services + tiers.","operationId":"provider_catalog_api_providers_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/tax/ingest":{"post":{"tags":["tax"],"summary":"Ingest","description":"Bulk-populate cost_basis_lots + disposals from cached chain events.\n\nIdempotent on (source, source_ref) - re-running adds new entries\nonly. Pass `reset=true` to wipe the user's lots+disposals first;\nthat's required after adding a new address, since the address\nchange re-classifies historical txs (an OUT might become a\nTRANSFER once the destination is known to be own).","operationId":"ingest_api_tax_ingest_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"reset","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Reset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tax/holding-status":{"get":{"tags":["tax"],"summary":"Holding Status","description":"Per-coin holding-period rollup for the HODL widget.\n\nReturns totals (tax-free vs still-holding amounts/values) per coin,\nplus a small set of upcoming-tax-free \"milestones\" bucketed by\nacquired-month. Avoids streaming tens of thousands of tiny reward\nlots to the frontend - those stay in the DB for the §23 FIFO\naudit trail, but the widget only needs the user-visible buckets.","operationId":"holding_status_api_tax_holding_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/tax/predecessor-impact":{"get":{"tags":["tax"],"summary":"Predecessor Impact","description":"Rank external predecessor addresses by their tax-optimization\npotential - i.e. how much taxable gain across the user's history\nwould (optimistically) flip to tax-free if the address turned out\nto be one of the user's own wallets that they never tracked.\n\nWalks every taxable disposal in the user's lot consumption, parses\nthe consumed lots' source_ref to find the acquiring tx, looks up\nthat tx's vin in the chain-event cache, and accumulates the\ntaxable gain per external vin address.\n\nCaveat (shown in the UI): identifying a predecessor as own only\n*might* flip the lot - the actual holding boundary then becomes\nthe predecessor's own acquired date, which could still be inside\n365d. The aggregate here is an upper bound for prioritization.","operationId":"predecessor_impact_api_tax_predecessor_impact_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/tax/transactions":{"get":{"tags":["tax"],"summary":"Transactions","description":"Aggregated transaction history for one chain.\n\nUTXO-chain caches store one row per (user_address, tx, direction)\npair. A transaction that touches multiple of the user's own\naddresses (e.g. send + change back to a different wallet, or a\nplain self-transfer between two own wallets) thus shows up as N\nrows with offsetting amounts. The raw per-address view is\nmisleading for the user - they read it as N separate events when\nit's really one transaction with a net effect of zero or just a\nminer fee.\n\nHere we group cached rows by txid and reduce each group to ONE\nrow classified by:\n\n  - direction='transfer': only user-owned addresses involved\n    (net ≈ 0; the \"amount\" surfaced is the negative fee).\n  - direction='in':  net inflow > 0 (external sender → user).\n  - direction='out': net outflow < 0 (user → external).\n\nRows without a txid fall back to per-row classification so we\ndon't accidentally merge unrelated events.","operationId":"transactions_api_tax_transactions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"chain","in":"query","required":true,"schema":{"type":"string","title":"Chain"}},{"name":"exclude_disabled","in":"query","required":false,"schema":{"type":"boolean","description":"Skip disabled wallets so forensic-what-if disables reflect immediately in tx list","default":true,"title":"Exclude Disabled"},"description":"Skip disabled wallets so forensic-what-if disables reflect immediately in tx list"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/holdings":{"get":{"tags":["tokens"],"summary":"Holdings","description":"Per-tax_symbol Aggregation der offenen Positionen.\n\nReturned pro Coin:\n  - amount (Summe amount_remaining über alle Token-Lots)\n  - cost_basis_eur (gewichteter Rest-Cost)\n  - market_eur (aktuelle Position × today's price)\n  - by_chain: {chain: amount, cost_basis_eur, market_eur, n_lots}\n  - first_seen, last_activity","operationId":"holdings_api_tokens_holdings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/tokens/{symbol}/transactions":{"get":{"tags":["tokens"],"summary":"Transactions","description":"Chronologische Transfer-Liste für einen tax_symbol, cross-chain gemergt.","operationId":"transactions_api_tokens__symbol__transactions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"symbol","in":"path","required":true,"schema":{"type":"string","title":"Symbol"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/registry":{"get":{"tags":["tokens"],"summary":"Get Registry","description":"Liste aller TokenRegistry-Einträge. Optional gefiltert nach source\n(curated/learned/user_whitelisted/ignored) oder chain.","operationId":"get_registry_api_tokens_registry_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"chain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chain"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/registry/{chain}/{contract}":{"patch":{"tags":["tokens"],"summary":"Patch Registry","description":"Ändert source oder tax_symbol eines Registry-Eintrags. Curated\nentries werden NICHT überschrieben (Server-Antwort 403).","operationId":"patch_registry_api_tokens_registry__chain___contract__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}},{"name":"contract","in":"path","required":true,"schema":{"type":"string","title":"Contract"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_patch_registry_api_tokens_registry__chain___contract__patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/tokens/sync":{"post":{"tags":["tokens"],"summary":"Sync","description":"Trigger a full re-sync of curated ERC-20 + TRC-20 transfer events\nfor the current user. Returns per-chain counts.","operationId":"sync_api_tokens_sync_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"chain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"restrict to one chain","title":"Chain"},"description":"restrict to one chain"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/chains":{"get":{"summary":"List Chains","operationId":"list_chains_api_chains_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/{chain}/resolve":{"post":{"summary":"Resolve","operationId":"resolve_api__chain__resolve_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/{chain}/wallet-balances":{"post":{"summary":"Get Wallet Balances","operationId":"get_wallet_balances_api__chain__wallet_balances_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletBalancesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/{chain}/calculate":{"post":{"summary":"Calculate","operationId":"calculate_api__chain__calculate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/{chain}/calculate/stream":{"post":{"summary":"Calculate Stream","operationId":"calculate_stream_api__chain__calculate_stream_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/overview/cached":{"get":{"summary":"Get Cached Overview","description":"Return the most recently pre-aggregated overview for this user.\n\nFrontend compares the response's ``addresses_hash`` against its own\nlocally computed hash (same SHA-256 over sorted ``chain:address``\nrows). Mismatch -> fall back to the live parallel fetch and the\nbackground worker will refresh the entry on its next tick.","operationId":"get_cached_overview_api_overview_cached_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"currency","in":"query","required":false,"schema":{"type":"string","default":"EUR","title":"Currency"}},{"name":"filter","in":"query","required":false,"schema":{"type":"string","default":"all","title":"Filter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Invalidate Cached Overview","description":"Wipe every cached overview for this user (all currencies + filters).\n\nCalled by the global \"Refresh\" button in the Dashboard header. The\nfrontend follows up with a fresh doCalculate, which will hit a 404\nhere and run the live parallel fetch. The next background_refresh\ntick will recompute and repopulate this row from scratch.","operationId":"invalidate_cached_overview_api_overview_cached_delete","security":[{"OAuth2PasswordBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/me/first-activity":{"get":{"summary":"Get My First Activity","description":"Standalone endpoint for callers that don't need the overview\ncache - PeriodSelector loads this on mount even when the overview\nblob has expired or the user is on a non-Overview module.","operationId":"get_my_first_activity_api_me_first_activity_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/{chain}/unified/stream":{"post":{"summary":"Unified Stream","description":"Combined rewards + portfolio in a single streaming endpoint.\n\nEmits progress events, then a single result containing:\n- rewards: payouts, tax, prices (same as calculate/stream)\n- portfolio: balance series, current_balance, current_value (same as portfolio/stream)\n\nSaves one round-trip and avoids duplicate price loading.","operationId":"unified_stream_api__chain__unified_stream_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/{chain}/resolve/stream":{"post":{"summary":"Resolve Stream","description":"Streaming resolve - emits per-step progress events while the\nchain module derives addresses / scans for activity. Used today\nprimarily by the Bitcoin xpub flow where each derived address\nrequires a separate blockstream call (~1.5s throttle × 40 addrs).\n\nSSE event shape mirrors calculate_stream:\n  {\"type\": \"progress\", \"message\": \"Scanning ...\"}\n  {\"type\": \"result\",   \"data\": <resolve_address response>}\n  {\"type\": \"error\",    \"message\": \"...\"}","operationId":"resolve_stream_api__chain__resolve_stream_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/{chain}/activity":{"get":{"summary":"Chain Activity","description":"Per-address first_used / last_used timestamps for the expanded\nxpub view. Takes comma-separated addresses. Reads from the shared\nevent cache (`chain_reward_event`) via the chain-generic\nactivity_for_addresses helper - any chain that persists tx_in /\ntx_out events (bitcoin, bitcoin-cash, dash, …) participates.","operationId":"chain_activity_api__chain__activity_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}},{"name":"addresses","in":"query","required":true,"schema":{"type":"string","title":"Addresses"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/bitcoin/activity":{"get":{"summary":"Bitcoin Activity Legacy","operationId":"bitcoin_activity_legacy_api_bitcoin_activity_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"addresses","in":"query","required":true,"schema":{"type":"string","title":"Addresses"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/{chain}/portfolio":{"post":{"summary":"Chain Portfolio","description":"Portfolio time-series (daily balance × historical price) for one\nchain. Generic across every chain that exposes get_current_balance -\nBitcoin uses tx events from the cache, staking chains use rewards\nagainst a constant principal (Phase 4 will add principal events).","operationId":"chain_portfolio_api__chain__portfolio_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/{chain}/portfolio/stream":{"post":{"summary":"Chain Portfolio Stream","description":"Streaming variant of /portfolio - emits per-address progress so\nthe per-chain portfolio view can show the same address-level loader\nas the cross-chain overview.","operationId":"chain_portfolio_stream_api__chain__portfolio_stream_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"chain","in":"path","required":true,"schema":{"type":"string","title":"Chain"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/portfolio":{"get":{"summary":"My Portfolio Overview","description":"Cross-chain portfolio snapshot for the current user.\n\nAggregates current balances across every chain the user holds.\nReturns per-chain rollup + grand total in the requested currency.","operationId":"my_portfolio_overview_api_me_portfolio_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"currency","in":"query","required":false,"schema":{"type":"string","default":"EUR","title":"Currency"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/portfolio/history":{"get":{"summary":"My Portfolio History","description":"Cross-chain Total-Value time series. Sums balance_history(value)\nacross every chain the user holds for the same date range, returns\na single {date, value} list.","operationId":"my_portfolio_history_api_me_portfolio_history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":true,"schema":{"type":"string","title":"Start Date"}},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","title":"End Date"}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","default":"EUR","title":"Currency"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/portfolio/stream":{"get":{"summary":"My Portfolio Stream","description":"Streaming cross-chain portfolio - yields per-chain progress so the\nfrontend can show the same chain-chip UX as the rewards loader.\n\nEvents:\n  {\"type\":\"start\",\"chains\":[\"bitcoin\",\"ethereum\",...]}\n  {\"type\":\"chain_start\",\"chain\":\"bitcoin\"}\n  {\"type\":\"chain_done\",\"chain\":\"bitcoin\",\"overview\":{...},\"history\":[{date,value}]}\n  {\"type\":\"result\",\"data\":{\"overview\":{...},\"history\":{...}}}\n  {\"type\":\"error\",\"message\":\"...\"}","operationId":"my_portfolio_stream_api_me_portfolio_stream_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"start_date","in":"query","required":true,"schema":{"type":"string","title":"Start Date"}},{"name":"end_date","in":"query","required":true,"schema":{"type":"string","title":"End Date"}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","default":"EUR","title":"Currency"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/stale-cache":{"get":{"summary":"My Stale Cache","description":"Return reward-cache entries for this user's addresses where the\nmost recent upstream refresh failed (rate-limit / incomplete fetch)\nAND the failure is newer than the last successful fetch. Frontend\nrenders a stale-data banner from this.","operationId":"my_stale_cache_api_me_stale_cache_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/allnodes/nodes":{"get":{"summary":"Allnodes List","operationId":"allnodes_list_api_allnodes_nodes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/usage":{"get":{"summary":"Api Usage","description":"Usage stats per service bucket. When a user is authenticated AND\nhas a personal API key saved for a service, return the user-keyed\nbucket under the plain service name - the server-keyed bucket is\nirrelevant for that user's requests.","operationId":"api_usage_api_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/prices/current":{"get":{"summary":"Current Prices","operationId":"current_prices_api_prices_current_get","parameters":[{"name":"currency","in":"query","required":false,"schema":{"type":"string","default":"EUR","title":"Currency"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/settings":{"get":{"summary":"Get Settings","operationId":"get_settings_api_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/features":{"get":{"summary":"Get Features","description":"Public feature flags. Admins always see everything; others see only\nwhat's enabled in config.json under `features.*`.","operationId":"get_features_api_features_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/features":{"get":{"summary":"Get Admin Features","description":"Raw feature config for the admin UI - without the per-user override.","operationId":"get_admin_features_api_admin_features_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"put":{"summary":"Set Features","operationId":"set_features_api_admin_features_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeaturesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/providers":{"get":{"summary":"Admin Providers","description":"Live health snapshot of every registered (chain, provider).\nDrives the Admin UI - shows breaker state and per-provider quota\nso the operator can see at a glance which upstream is in trouble.","operationId":"admin_providers_api_admin_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/settings/beaconchain-key":{"post":{"summary":"Set Beaconchain Key","operationId":"set_beaconchain_key_api_settings_beaconchain_key_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/settings/etherscan-key":{"post":{"summary":"Set Etherscan Key","operationId":"set_etherscan_key_api_settings_etherscan_key_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/settings/subscan-key":{"post":{"summary":"Set Subscan Key","operationId":"set_subscan_key_api_settings_subscan_key_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/settings/blockchair-key":{"post":{"summary":"Set Blockchair Key","operationId":"set_blockchair_key_api_settings_blockchair_key_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/settings/email":{"get":{"summary":"Get Email Settings","operationId":"get_email_settings_api_settings_email_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"summary":"Set Email Settings","operationId":"set_email_settings_api_settings_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/settings/email/brevo-senders":{"post":{"summary":"Brevo Senders","description":"Fetch SMTP info + available senders from Brevo.","operationId":"brevo_senders_api_settings_email_brevo_senders_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrevoAutoConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/settings/email/brevo-autoconfigure":{"post":{"summary":"Brevo Autoconfigure","description":"Apply Brevo SMTP config with the chosen sender.","operationId":"brevo_autoconfigure_api_settings_email_brevo_autoconfigure_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrevoApplyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/settings/email/test":{"post":{"summary":"Test Email","operationId":"test_email_api_settings_email_test_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/database":{"get":{"summary":"Database Info","description":"Get database size and backup info.","operationId":"database_info_api_admin_database_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/database/backup":{"post":{"summary":"Create Backup","description":"Create a database backup now.","operationId":"create_backup_api_admin_database_backup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/database/config":{"post":{"summary":"Set Db Config","description":"Update backup configuration.","operationId":"set_db_config_api_admin_database_config_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatabaseConfigRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/admin/database/backup/{name}":{"delete":{"summary":"Delete Backup","description":"Delete a specific backup.","operationId":"delete_backup_api_admin_database_backup__name__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/me/shares":{"get":{"summary":"List Shares","operationId":"list_shares_api_me_shares_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"OAuth2PasswordBearer":[]}]},"post":{"summary":"Create Share","description":"Create a shared snapshot link. Runs overview calculation and stores results.","operationId":"create_share_api_me_shares_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShareRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/api/me/shares/{token}":{"patch":{"summary":"Update Share","operationId":"update_share_api_me_shares__token__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Req"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Share","operationId":"delete_share_api_me_shares__token__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shared/{token}":{"get":{"summary":"Get Shared","description":"Public endpoint - no auth needed. Returns snapshot data.","operationId":"get_shared_api_shared__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health":{"get":{"summary":"Health","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/version":{"get":{"summary":"Version","operationId":"version_api_version_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/{path}":{"get":{"summary":"Spa Fallback","description":"Serve index.html for all non-API routes (SPA fallback).","operationId":"spa_fallback__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddressCreateRequest":{"properties":{"chain":{"type":"string","title":"Chain"},"address":{"type":"string","title":"Address"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["chain","address"],"title":"AddressCreateRequest"},"AddressResponse":{"properties":{"id":{"type":"integer","title":"Id"},"chain":{"type":"string","title":"Chain"},"address":{"type":"string","title":"Address"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"address_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Type"},"account_info":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Info"},"is_archived":{"type":"boolean","title":"Is Archived","default":false},"is_disabled":{"type":"boolean","title":"Is Disabled","default":false}},"type":"object","required":["id","chain","address","label","address_type","account_info"],"title":"AddressResponse"},"AddressUpdateRequest":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"is_archived":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Archived"},"is_disabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Disabled"}},"type":"object","title":"AddressUpdateRequest"},"AdminResetPassword":{"properties":{"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["new_password"],"title":"AdminResetPassword"},"AdminUserUpdate":{"properties":{"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_admin":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Admin"}},"type":"object","title":"AdminUserUpdate"},"ApiKeyRequest":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"ApiKeyRequest"},"AutoTestbedConfigUpdate":{"properties":{"max_age_h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Age H"}},"type":"object","title":"AutoTestbedConfigUpdate"},"Body_patch_registry_api_tokens_registry__chain___contract__patch":{"properties":{"source":{"anyOf":[{"type":"string","enum":["user_whitelisted","ignored","learned"]},{"type":"null"}],"title":"Source"},"tax_symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Symbol"}},"type":"object","title":"Body_patch_registry_api_tokens_registry__chain___contract__patch"},"BrevoApplyRequest":{"properties":{"api_key":{"type":"string","title":"Api Key"},"sender_email":{"type":"string","title":"Sender Email"},"sender_name":{"type":"string","title":"Sender Name","default":"YieldBoard"}},"type":"object","required":["api_key","sender_email"],"title":"BrevoApplyRequest"},"BrevoAutoConfigRequest":{"properties":{"api_key":{"type":"string","title":"Api Key"}},"type":"object","required":["api_key"],"title":"BrevoAutoConfigRequest"},"BulkDisableRequest":{"properties":{"address_ids":{"items":{"type":"integer"},"type":"array","title":"Address Ids"},"disabled":{"type":"boolean","title":"Disabled"}},"type":"object","required":["address_ids","disabled"],"title":"BulkDisableRequest"},"CalculateRequest":{"properties":{"payout_addresses":{"items":{"type":"string"},"type":"array","title":"Payout Addresses","default":[]},"start_date":{"type":"string","title":"Start Date"},"end_date":{"type":"string","title":"End Date"},"node_count":{"type":"integer","title":"Node Count","default":0},"currency":{"type":"string","title":"Currency","default":"EUR"}},"type":"object","required":["start_date","end_date"],"title":"CalculateRequest"},"CexAccountCreate":{"properties":{"exchange":{"type":"string","title":"Exchange"},"label":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Label"},"api_key":{"type":"string","maxLength":255,"minLength":1,"title":"Api Key"},"api_secret":{"type":"string","title":"Api Secret","default":""}},"type":"object","required":["exchange","api_key"],"title":"CexAccountCreate"},"CexAccountResponse":{"properties":{"id":{"type":"integer","title":"Id"},"exchange":{"type":"string","title":"Exchange"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"api_key_preview":{"type":"string","title":"Api Key Preview"},"last_synced_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Synced At"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","exchange","label","api_key_preview","last_synced_at","created_at"],"title":"CexAccountResponse"},"CexAccountUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Label"},"api_key":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Api Key"},"api_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Secret"}},"type":"object","title":"CexAccountUpdate"},"ChangePasswordRequest":{"properties":{"old_password":{"type":"string","title":"Old Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["old_password","new_password"],"title":"ChangePasswordRequest"},"CreateShareRequest":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"start_date":{"type":"string","title":"Start Date"},"end_date":{"type":"string","title":"End Date"},"chain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chain"},"currency":{"type":"string","title":"Currency","default":"EUR"},"expires_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires Days","default":30}},"type":"object","required":["start_date","end_date"],"title":"CreateShareRequest"},"DatabaseConfigRequest":{"properties":{"backup_interval_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Backup Interval Hours"},"backups_to_keep":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Backups To Keep"}},"type":"object","title":"DatabaseConfigRequest"},"EmailConfigRequest":{"properties":{"email_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Mode"},"smtp_host":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smtp Host"},"smtp_port":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Smtp Port"},"smtp_security":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smtp Security"},"smtp_user":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smtp User"},"smtp_pass":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Smtp Pass"},"brevo_api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brevo Api Key"},"sender_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Email"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"}},"type":"object","title":"EmailConfigRequest"},"ExchangeOption":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"secret_required":{"type":"boolean","title":"Secret Required","default":true}},"type":"object","required":["id","display_name"],"title":"ExchangeOption"},"FeaturesRequest":{"properties":{"portfolio":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Portfolio"}},"type":"object","title":"FeaturesRequest"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InstanceCreate":{"properties":{"provider":{"type":"string","title":"Provider"},"label":{"type":"string","title":"Label"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"tier":{"type":"string","title":"Tier","default":"free"}},"type":"object","required":["provider","label"],"title":"InstanceCreate"},"InstanceUpdate":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"},"tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tier"},"rate_interval":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate Interval"},"daily_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daily Limit"},"monthly_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Limit"},"price_monthly":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Monthly"},"max_workers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Workers"},"batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Size"},"batch_sleep":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Batch Sleep"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},"type":"object","title":"InstanceUpdate"},"LimitUpdate":{"properties":{"min_interval":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Interval"},"monthly_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Limit"},"daily_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daily Limit"}},"type":"object","title":"LimitUpdate"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"PortfolioConfigUpdate":{"properties":{"snapshot_ttl_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Snapshot Ttl Seconds"},"events_cooldown_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Events Cooldown Seconds"},"xpub_rescan_ttl_hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Xpub Rescan Ttl Hours"},"background_refresh_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Background Refresh Enabled"},"background_refresh_tick_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Background Refresh Tick Seconds"},"background_refresh_stale_fraction":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Background Refresh Stale Fraction"},"background_refresh_max_per_tick":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Background Refresh Max Per Tick"},"background_refresh_per_call_sleep_s":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Background Refresh Per Call Sleep S"}},"type":"object","title":"PortfolioConfigUpdate"},"RefreshRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshRequest"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["email","password"],"title":"RegisterRequest"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"ResolveRequest":{"properties":{"address":{"type":"string","title":"Address"},"wallet_only":{"type":"boolean","title":"Wallet Only","default":false}},"type":"object","required":["address"],"title":"ResolveRequest"},"RoutingEntry":{"properties":{"chain":{"type":"string","title":"Chain"},"call_type":{"type":"string","title":"Call Type"},"instance_id":{"type":"integer","title":"Instance Id"},"priority":{"type":"integer","title":"Priority","default":1},"strategy":{"type":"string","title":"Strategy","default":"failover"}},"type":"object","required":["chain","call_type","instance_id"],"title":"RoutingEntry"},"ServiceTokenRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"ttl_days":{"type":"integer","title":"Ttl Days","default":30}},"type":"object","required":["email","password"],"title":"ServiceTokenRequest","description":"LoginRequest fields (email, password) plus a TTL in days.\nKept separate from LoginRequest so /login stays untouched."},"SettingResponse":{"properties":{"key":{"type":"string","title":"Key"},"value":{"type":"string","title":"Value"}},"type":"object","required":["key","value"],"title":"SettingResponse"},"SettingUpdateRequest":{"properties":{"value":{"type":"string","title":"Value"}},"type":"object","required":["value"],"title":"SettingUpdateRequest"},"TestEmailRequest":{"properties":{"to_email":{"type":"string","format":"email","title":"To Email"}},"type":"object","required":["to_email"],"title":"TestEmailRequest"},"TierCreate":{"properties":{"provider":{"type":"string","title":"Provider"},"name":{"type":"string","title":"Name"},"rate_interval":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate Interval"},"daily_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daily Limit"},"monthly_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Limit"},"price_monthly":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Monthly"},"max_workers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Workers"},"batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Size"},"batch_sleep":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Batch Sleep"}},"type":"object","required":["provider","name"],"title":"TierCreate"},"TierUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"rate_interval":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate Interval"},"daily_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Daily Limit"},"monthly_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Limit"},"price_monthly":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Monthly"},"max_workers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Workers"},"batch_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Size"},"batch_sleep":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Batch Sleep"}},"type":"object","title":"TierUpdate"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"}},"type":"object","required":["access_token","refresh_token"],"title":"TokenResponse"},"UpdateUserRequest":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"UpdateUserRequest"},"UserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"is_admin":{"type":"boolean","title":"Is Admin"},"email_verified":{"type":"boolean","title":"Email Verified"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","email","display_name","is_admin","email_verified","created_at"],"title":"UserResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WalletBalancesRequest":{"properties":{"addresses":{"items":{"type":"string"},"type":"array","title":"Addresses"}},"type":"object","required":["addresses"],"title":"WalletBalancesRequest"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/auth/login"}}}}}}