{"openapi":"3.1.1","info":{"title":"Techspeed Clearing Portal API","description":"Techspeed Clearing Portal API -- programmatic access to brokerage clearing services including account onboarding, trade submission, positions, balances, and reference data.\n\n## Authentication\n\nOAuth 2.0 `client_credentials` flow.\n\n```\nPOST /v2/oauth/token\nContent-Type: application/x-www-form-urlencoded\n\ngrant_type=client_credentials&client_id={id}&client_secret={secret}\n```\n\n| Environment | Access Token | Refresh Token |\n|-------------|-------------|---------------|\n| Production  | 15 minutes  | 30 days       |\n| Sandbox     | 60 minutes  | 365 days      |\n\nInclude the token in every request:\n\n```\nAuthorization: Bearer {access_token}\n```\n\n## Rate Limiting\n\n| Environment | Limit         | Algorithm    |\n|-------------|---------------|--------------|\n| Production  | 200 req/min   | Token bucket |\n| Sandbox     | 1,000 req/min | Token bucket |\n\nResponse headers on every request:\n\n| Header                | Description               |\n|-----------------------|---------------------------|\n| `X-RateLimit-Limit`     | Requests allowed per window |\n| `X-RateLimit-Remaining` | Requests remaining          |\n\nExceeding the limit returns **429 Too Many Requests** with a `Retry-After` header (seconds).\n\n## Error Handling\n\nAll errors return a consistent JSON body:\n\n```json\n{\n  \"code\": \"bad_request\",\n  \"message\": \"Human-readable description of the problem.\"\n}\n```\n\n| HTTP Status | Code                     | Description                          |\n|-------------|--------------------------|--------------------------------------|\n| 400         | `bad_request`            | Malformed request or invalid field   |\n| 401         | `unauthorized`           | Missing or expired token             |\n| 403         | `forbidden`              | Valid token but insufficient scope   |\n| 404         | `not_found`              | Resource does not exist              |\n| 409         | `conflict`               | Duplicate or state conflict          |\n| 422         | `unprocessable_entity`   | Semantically invalid payload         |\n| 429         | `rate_limit_exceeded`    | Too many requests                    |\n| 500         | `internal_error`         | Unexpected server error              |\n\nEvery response includes an `X-Request-ID` header for tracing.\n\n## Conventions\n\n| Area        | Convention                                           |\n|-------------|------------------------------------------------------|\n| Field names | `snake_case`                                         |\n| Decimals    | Strings (e.g. `\"123.45\"`) to avoid floating-point    |\n| Identifiers | UUID v4 strings                                      |\n| Timestamps  | ISO 8601 with timezone (`2026-01-15T09:30:00Z`)      |\n| Dates       | `YYYY-MM-DD`                                         |\n| Null fields | Omitted from response                                |\n| Countries   | ISO 3166-1 alpha-3 (e.g. `USA`, `CAN`)              |\n| States      | 2-letter codes (e.g. `NY`, `CA`)                     |\n\n## Dry-Run Mode\n\nAppend `?dry_run=true` to **POST /v2/accounts** or **POST /v2/accounts/{id}/trades** to validate and resolve the payload without persisting. The response includes the resolved payload and any warnings.\n\n## Sandbox\n\nThe sandbox environment uses separate credentials and ships with pre-seeded data:\n\n- **Company / Correspondent**: `SBOX`\n- **Symbols**: AAPL, MSFT, AMZN, GOOGL, META, NVDA, TSLA, JPM, JNJ, V, UNH, XOM, WMT, BRK.B, SPY\n\nMock endpoints at `/v2/sandbox/mock/*` return realistic fake data with no authentication required.","version":"2.0.0"},"servers":[{"url":"https://starclear-staging.techspeedclearing.com","description":"StarClear staging — what mock-fintrade is currently configured for"}],"paths":{"/v2/oauth/token":{"post":{"tags":["OAuth"],"summary":"Exchange client credentials or refresh token for an access token.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/TokenRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/TokenRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/TokenResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/cash-account-violations":{"get":{"tags":["Accounts"],"summary":"List violations for the account. Defaults to historical+active;\npass active_only=true to surface only currently-enforced restrictions.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"violation_type","in":"query","schema":{"type":"string"}},{"name":"active_only","in":"query","schema":{"type":"boolean"}},{"name":"page_size","in":"query","description":"Page size (1–1000, default 100).","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":100,"example":100},"example":100},{"name":"page_token","in":"query","description":"Opaque cursor from the previous response's `next_page_token`. Omit to fetch the first page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfCashAccountViolationResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfCashAccountViolationResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfCashAccountViolationResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/cash-account-violations/summary":{"get":{"tags":["Accounts"],"summary":"Roll-up — strongest live restriction + counts by violation type.\nUseful for the \"is this account currently Cash Only?\" check\nwithout paginating the violation history.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/CashAccountViolationSummaryResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/CashAccountViolationSummaryResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/CashAccountViolationSummaryResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts":{"get":{"tags":["Accounts"],"summary":"List accounts accessible to the authenticated client.","description":"created_after is inclusive (&gt;=); created_before is exclusive (&lt;) so that\nadjacent ranges (e.g. Jan then Feb) are chainable without double-counting the\nboundary. Accepts ISO 8601 dates (2026-01-01) or full timestamps\n(2026-01-01T14:30:00Z); bare dates are treated as midnight UTC.","parameters":[{"name":"status","in":"query","description":"Account status filter. Typical values: SUBMITTED, APPROVED, REJECTED, ACTIVE, INACTIVE, ACCOUNT_CLOSED.","schema":{"type":"string","example":"APPROVED"},"example":"APPROVED"},{"name":"created_after","in":"query","schema":{"type":"string"}},{"name":"created_before","in":"query","schema":{"type":"string"}},{"name":"page_size","in":"query","description":"Page size (1–1000, default 100).","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":100,"example":100},"example":100},{"name":"page_token","in":"query","description":"Opaque cursor from the previous response's `next_page_token`. Omit to fetch the first page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfAccountResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfAccountResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfAccountResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"post":{"tags":["Account Creation"],"summary":"Create a new account (draft). Pass ?dry_run=true to validate without persisting.","description":"The correspondent field accepts a code, name, MPID, or UUID and is resolved server-side.\nWhen dry_run=true the response includes the resolved payload and any validation warnings.\nServer-side defaults: account_sub_type defaults to CASH, country defaults to USA.\nUse GET /v2/reference-data to discover valid enum values for all fields.","parameters":[{"name":"dry_run","in":"query","description":"Validate the request without persisting. Set to `true` to preview the resolved payload and any warnings; omit or set to `false` to actually create/submit.","schema":{"type":"boolean","default":false,"example":true},"example":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCreateRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/AccountCreateRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/AccountCreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/DryRunAccountResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/DryRunAccountResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/DryRunAccountResponse"}}}},"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/AccountResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}":{"get":{"tags":["Accounts"],"summary":"Get a single account by ID.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/AccountResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"patch":{"tags":["Account Creation"],"summary":"Update account fields (same shape as POST, include only changed sections).","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCreateRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/AccountCreateRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/AccountCreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/AccountResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/close":{"post":{"tags":["Account Creation"],"summary":"Close an account (terminal state). Optional body: `{\"reason\": \"...\"}`.","description":"Moves the account to ACCOUNT_CLOSED permanently. Idempotent — repeat calls are\nno-ops. Alpaca-aligned; matches Alpaca's close-account action semantically.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CloseAccountRequest"}]}},"text/json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CloseAccountRequest"}]}},"application/*+json":{"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CloseAccountRequest"}]}}}},"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/margin-calls":{"get":{"tags":["Accounts"],"summary":"List open margin calls (Reg T / Maintenance / Day Trading / House / Fed) for the account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"call_type","in":"query","schema":{"type":"string"}},{"name":"page_size","in":"query","description":"Page size (1–1000, default 100).","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":100,"example":100},"example":100},{"name":"page_token","in":"query","description":"Opaque cursor from the previous response's `next_page_token`. Omit to fetch the first page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfMarginCallResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfMarginCallResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfMarginCallResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/margin-calls/summary":{"get":{"tags":["Accounts"],"summary":"Aggregate open-call totals for the account — overall count + by_type + by_aging_bucket.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/AccountMarginCallSummaryResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/AccountMarginCallSummaryResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/AccountMarginCallSummaryResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/activities":{"get":{"tags":["Activities"],"summary":"Get activities for a specific account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"activity_type","in":"query","schema":{"type":"string","default":"ALL"}},{"name":"date_from","in":"query","description":"Inclusive start date filter (YYYY-MM-DD).","schema":{"type":"string","format":"date","example":"2024-01-01"},"example":"2024-01-01"},{"name":"date_to","in":"query","description":"Inclusive end date filter (YYYY-MM-DD).","schema":{"type":"string","format":"date","example":"2024-12-31"},"example":"2024-12-31"},{"name":"page_size","in":"query","description":"Page size (1–1000, default 100).","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":100,"example":100},"example":100},{"name":"page_token","in":"query","description":"Opaque cursor from the previous response's `next_page_token`. Omit to fetch the first page.","schema":{"type":"string"}},{"name":"direction","in":"query","schema":{"type":"string","default":"desc"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfActivityResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfActivityResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfActivityResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/assets":{"get":{"tags":["Assets"],"summary":"List available assets (securities).","parameters":[{"name":"asset_class","in":"query","description":"Asset class filter. Valid values: us_equity, us_option, fixed_income.","schema":{"type":"string","example":"us_equity"},"example":"us_equity"},{"name":"status","in":"query","description":"Account status filter. Typical values: SUBMITTED, APPROVED, REJECTED, ACTIVE, INACTIVE, ACCOUNT_CLOSED.","schema":{"type":"string","example":"APPROVED"},"example":"APPROVED"},{"name":"exchange","in":"query","description":"Exchange name filter (e.g. 'NYSE', 'NASDAQ', 'ARCA').","schema":{"type":"string","example":"NASDAQ"},"example":"NASDAQ"},{"name":"page_size","in":"query","description":"Page size (1–1000, default 100).","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":100,"example":100},"example":100},{"name":"page_token","in":"query","description":"Opaque cursor from the previous response's `next_page_token`. Omit to fetch the first page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfAssetResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfAssetResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfAssetResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/assets/{symbol_or_id}":{"get":{"tags":["Assets"],"summary":"Get asset detail by symbol or ID.","parameters":[{"name":"symbol_or_id","in":"path","description":"Security ticker symbol (e.g. 'AAPL') or security_master UUID.","required":true,"schema":{"type":"string","example":"AAPL"},"example":"AAPL"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/AssetResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/AssetResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/AssetResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/authorized-persons":{"post":{"tags":["Authorized Persons"],"summary":"Create an authorized person for an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizedPersonRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/AuthorizedPersonRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/AuthorizedPersonRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/AuthorizedPersonResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizedPersonResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/AuthorizedPersonResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["Authorized Persons"],"summary":"List authorized persons for an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuthorizedPersonResponse"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuthorizedPersonResponse"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AuthorizedPersonResponse"}}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/authorized-persons/{person_id}":{"get":{"tags":["Authorized Persons"],"summary":"Get a single authorized person by ID.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"person_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/AuthorizedPersonResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizedPersonResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/AuthorizedPersonResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["Authorized Persons"],"summary":"Delete an authorized person.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"person_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/balances":{"get":{"tags":["Balances"],"summary":"Get account balances. Pass as_of=YYYY-MM-DD for a historical cash snapshot.","description":"Without as_of: returns the live balance — cash from SUM(all) journal_master plus\nmargin fields (buying_power, sma, initial/maintenance margin, fed/house/exchange\nexcess) from the margin engine.\n\nWith as_of: returns only the historical cash balance at EOD on that date, using\ntrade-date semantics. All margin fields are null in the response because they\nrequire a margin-engine replay of the historical state that isn't yet supported.\nCap: 730 days back.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"as_of","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/BalanceResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/banking-instructions/ach":{"post":{"tags":["Banking Instructions"],"summary":"Add an ACH instruction to an account.","description":"Creates an ACH disbursement instruction. Required fields: bank_name,\nrouting_number, account_number, account_type (CHECKING/SAVINGS).\nOwnership is verified before deletion — instructions can only be\ndeleted for accounts the API client has access to.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AchInstructionRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/AchInstructionRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/AchInstructionRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/AchInstructionResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/AchInstructionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/AchInstructionResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["Banking Instructions"],"summary":"List ACH instructions for an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AchInstructionResponse"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AchInstructionResponse"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AchInstructionResponse"}}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/banking-instructions/ach/{ach_id}":{"get":{"tags":["Banking Instructions"],"summary":"Get a specific ACH instruction.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"ach_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/AchInstructionResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/AchInstructionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/AchInstructionResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["Banking Instructions"],"summary":"Remove an ACH instruction (soft delete).","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"ach_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/banking-instructions/wire":{"post":{"tags":["Banking Instructions"],"summary":"Add a wire instruction to an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WireInstructionRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/WireInstructionRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/WireInstructionRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/WireInstructionResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/WireInstructionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/WireInstructionResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["Banking Instructions"],"summary":"List wire instructions for an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WireInstructionResponse"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WireInstructionResponse"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WireInstructionResponse"}}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/banking-instructions/wire/{wire_id}":{"get":{"tags":["Banking Instructions"],"summary":"Get a specific wire instruction.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"wire_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/WireInstructionResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/WireInstructionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/WireInstructionResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["Banking Instructions"],"summary":"Remove a wire instruction (soft delete).","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"wire_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/beneficial-owners":{"post":{"tags":["Beneficial Owners"],"summary":"Add a beneficial owner to an account.","description":"Beneficial owners are identified by first_name + last_name + tax_id.\nRequired by the CDD Rule for legal entity accounts.\nFields: owner_type, first_name, last_name, title, date_of_birth, address,\nssn_tax_id, id_type, id_number, id_issuing_authority, ownership_percentage.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BeneficialOwnerRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/BeneficialOwnerRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/BeneficialOwnerRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/BeneficialOwnerResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/BeneficialOwnerResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/BeneficialOwnerResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["Beneficial Owners"],"summary":"List beneficial owners for an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BeneficialOwnerResponse"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BeneficialOwnerResponse"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BeneficialOwnerResponse"}}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/beneficial-owners/{owner_id}":{"get":{"tags":["Beneficial Owners"],"summary":"Get a specific beneficial owner.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"owner_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/BeneficialOwnerResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/BeneficialOwnerResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/BeneficialOwnerResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["Beneficial Owners"],"summary":"Remove a beneficial owner (soft delete).","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"owner_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/balances":{"get":{"tags":["Balances"],"summary":"List balances for every account the caller can see.","description":"Returns the live balance shape (cash, equity, margin fields, etc.) per\naccount, ordered by internal account id ASC for stable cursor pagination.\n\nPagination is identical to /v2/accounts: pass page_size (default 100,\nmax 1000) and page_token (opaque cursor returned in the previous\nresponse). When next_page_token is null the caller has reached the end.\n\nAs-of historical snapshots are not supported on the bulk endpoint —\nuse the per-account /v2/accounts/{account_id}/balances?as_of= path.","parameters":[{"name":"page_size","in":"query","description":"Page size (1–1000, default 100).","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":100,"example":100},"example":100},{"name":"page_token","in":"query","description":"Opaque cursor from the previous response's `next_page_token`. Omit to fetch the first page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfBalanceResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfBalanceResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfBalanceResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/correspondents/{correspondent_id}/activities":{"get":{"tags":["Correspondents"],"summary":"List activity (trades + journals) for every account under the correspondent.","description":"activity_type: TRADE | JOURNAL | ALL (default ALL). Money-market sweeps and\ncorporate actions appear in the JOURNAL stream — filter by entry_type\nclient-side if you need them separated.","parameters":[{"name":"correspondent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"activity_type","in":"query","schema":{"type":"string","default":"ALL"}},{"name":"date_from","in":"query","description":"Inclusive start date filter (YYYY-MM-DD).","schema":{"type":"string","format":"date","example":"2024-01-01"},"example":"2024-01-01"},{"name":"date_to","in":"query","description":"Inclusive end date filter (YYYY-MM-DD).","schema":{"type":"string","format":"date","example":"2024-12-31"},"example":"2024-12-31"},{"name":"page_size","in":"query","description":"Page size (1–1000, default 100).","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":100,"example":100},"example":100},{"name":"page_token","in":"query","description":"Opaque cursor from the previous response's `next_page_token`. Omit to fetch the first page.","schema":{"type":"string"}},{"name":"direction","in":"query","schema":{"type":"string","default":"desc"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfActivityResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfActivityResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfActivityResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/correspondents":{"get":{"tags":["Correspondents"],"summary":"List correspondents the calling client can see.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{}},"application/json":{"schema":{}},"text/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/correspondents/{correspondent_id}":{"get":{"tags":["Correspondents"],"summary":"Get correspondent metadata with active-account count.","parameters":[{"name":"correspondent_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/CorrespondentSummary"}},"application/json":{"schema":{"$ref":"#/components/schemas/CorrespondentSummary"}},"text/json":{"schema":{"$ref":"#/components/schemas/CorrespondentSummary"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/correspondents/{correspondent_id}/moneyline":{"get":{"tags":["Correspondents"],"summary":"List per-account moneyline rows for every account under a correspondent.","description":"Without as_of: live balance shape (cash, equity, margin fields, MV) per account.\nWith as_of (≤730 days back): historical cash + MM only — margin fields are null\nbecause they require a margin-engine replay that isn't in scope.","parameters":[{"name":"correspondent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"as_of","in":"query","schema":{"type":"string","format":"date"}},{"name":"page_size","in":"query","description":"Page size (1–1000, default 100).","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":100,"example":100},"example":100},{"name":"page_token","in":"query","description":"Opaque cursor from the previous response's `next_page_token`. Omit to fetch the first page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfBalanceResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfBalanceResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfBalanceResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/correspondents/{correspondent_id}/moneyline/summary":{"get":{"tags":["Correspondents"],"summary":"Single rolled-up totals row for the correspondent.","parameters":[{"name":"correspondent_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/CorrespondentMoneylineSummaryResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/CorrespondentMoneylineSummaryResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/CorrespondentMoneylineSummaryResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/correspondents/{correspondent_id}/positions":{"get":{"tags":["Correspondents"],"summary":"List positions across every account under a correspondent. Each row carries account_id.","parameters":[{"name":"correspondent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"as_of","in":"query","schema":{"type":"string","format":"date"}},{"name":"page_size","in":"query","description":"Page size (1–1000, default 100).","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":100,"example":100},"example":100},{"name":"page_token","in":"query","description":"Opaque cursor from the previous response's `next_page_token`. Omit to fetch the first page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfPositionResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfPositionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfPositionResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/correspondents/{correspondent_id}/positions/by-symbol":{"get":{"tags":["Correspondents"],"summary":"Positions aggregated by symbol firmwide for this correspondent — concentration view.","parameters":[{"name":"correspondent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"side","in":"query","description":"Trade side. Valid values: BUY, SELL, SELL_SHORT, SELL_SHORT_EXEMPT","schema":{"type":"string","example":"BUY"},"example":"BUY"},{"name":"page_size","in":"query","description":"Page size (1–1000, default 100).","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":100,"example":100},"example":100},{"name":"page_token","in":"query","description":"Opaque cursor from the previous response's `next_page_token`. Omit to fetch the first page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfPositionBySymbolResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfPositionBySymbolResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfPositionBySymbolResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/correspondents/{correspondent_id}/margin-calls":{"get":{"tags":["Correspondents"],"summary":"List open margin calls (Reg T / Maintenance / DT / House / Fed) with aging.","parameters":[{"name":"correspondent_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"call_type","in":"query","schema":{"type":"string"}},{"name":"page_size","in":"query","description":"Page size (1–1000, default 100).","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":100,"example":100},"example":100},{"name":"page_token","in":"query","description":"Opaque cursor from the previous response's `next_page_token`. Omit to fetch the first page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfMarginCallResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfMarginCallResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfMarginCallResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/correspondents/{correspondent_id}/margin-calls/summary":{"get":{"tags":["Correspondents"],"summary":"Aggregate margin-call totals — overall count + by_type + by_aging_bucket.","parameters":[{"name":"correspondent_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/MarginCallSummaryResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/MarginCallSummaryResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/MarginCallSummaryResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/custodian":{"put":{"tags":["Custodian"],"summary":"Set or update UGMA/UTMA custodian details for an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustodianRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/CustodianRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CustodianRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/CustodianResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/CustodianResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/CustodianResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["Custodian"],"summary":"Get custodian details for an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/CustodianResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/CustodianResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/CustodianResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["Custodian"],"summary":"Remove custodian details from an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/documents":{"post":{"tags":["Documents"],"summary":"Upload a document for an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/DocumentRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/DocumentRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["Documents"],"summary":"List documents for an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentResponse"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentResponse"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentResponse"}}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/documents/{document_id}":{"get":{"tags":["Documents"],"summary":"Get a single document by ID.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"document_id","in":"path","description":"Document identifier UUID.","required":true,"schema":{"type":"string","example":"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"},"example":"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/entity-info":{"put":{"tags":["Entity Info"],"summary":"Set or update entity information for a corporate/trust account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntityInfoRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/EntityInfoRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/EntityInfoRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/EntityInfoResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/EntityInfoResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/EntityInfoResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["Entity Info"],"summary":"Get entity information for an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/EntityInfoResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/EntityInfoResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/EntityInfoResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["Entity Info"],"summary":"Remove entity information from an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/sandbox/mock/accounts":{"post":{"tags":["Sandbox Mock"],"summary":"Mock: Create account — returns realistic fake response.","responses":{"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/AccountResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}}}},"get":{"tags":["Sandbox Mock"],"summary":"Mock: List accounts — returns 3 fake accounts.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountResponse"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountResponse"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AccountResponse"}}}}}}}},"/v2/sandbox/mock/accounts/{account_id}/trades":{"post":{"tags":["Sandbox Mock"],"summary":"Mock: Submit trade — returns realistic fake response with fees.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/TradeResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/TradeResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/TradeResponse"}}}}}}},"/v2/sandbox/mock/accounts/{account_id}/positions":{"get":{"tags":["Sandbox Mock"],"summary":"Mock: List positions — returns 3 fake positions.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"200":{"description":"OK"}}}},"/v2/sandbox/mock/accounts/{account_id}/balances":{"get":{"tags":["Sandbox Mock"],"summary":"Mock: Get balances — returns fake balance data.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"200":{"description":"OK"}}}},"/v2/sandbox/mock/reference-data":{"get":{"tags":["Sandbox Mock"],"summary":"Mock: Get reference data — same as real endpoint.","responses":{"200":{"description":"OK"}}}},"/v2/money-market/funds":{"get":{"tags":["Money Market"],"summary":"List active money-market funds the firm sponsors.","description":"Returns one row per active fund with its symbol, latest 7-day SEC yield,\ndaily dividend factor, sweep cutoff, and minimum sweep amount. Pass\n`include_inactive=true` to also return decommissioned funds (useful\nfor partners reconciling against historical sweep events).","parameters":[{"name":"include_inactive","in":"query","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MoneyMarketFundResponse"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MoneyMarketFundResponse"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MoneyMarketFundResponse"}}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/money-market/funds/{fund_id}":{"get":{"tags":["Money Market"],"summary":"Get one money-market fund by id.","parameters":[{"name":"fund_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/MoneyMarketFundResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/MoneyMarketFundResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/MoneyMarketFundResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/money-market":{"get":{"tags":["Money Market"],"summary":"Current money-market holdings for an account.","description":"Returns one row per (account, fund) pair where the account either holds shares\nor has accrued (unpaid) dividend. Mid-month between redemption and the\ndistribution journal a row may show `shares = 0` + non-zero\n`accrued_dividend` — that's the customer's still-owed position.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MoneyMarketHoldingResponse"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MoneyMarketHoldingResponse"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MoneyMarketHoldingResponse"}}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/money-market/distributions":{"get":{"tags":["Money Market"],"summary":"Past dividend distributions for an account, newest first.","description":"Each row represents a single distribution event aggregated from the daily\naccruals on the same monthly journal. Optional `from`/`to` filter on\nthe distribution date. Paginated via opaque `page_token` — clients follow\n`next_page_token` until null.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"page_size","in":"query","description":"Page size (1–1000, default 100).","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":100,"example":100},"example":100},{"name":"page_token","in":"query","description":"Opaque cursor from the previous response's `next_page_token`. Omit to fetch the first page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfMoneyMarketDistributionResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfMoneyMarketDistributionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfMoneyMarketDistributionResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/money-market/sweep-events":{"get":{"tags":["Money Market"],"summary":"Sweep decisions for an account, newest first.","description":"Returns both `EXECUTED` (a sweep happened) and `SKIP_*` (and the\nreason it didn't) rows so partner UIs can show a complete activity history,\nnot just successful sweeps. Optional `from`/`to` filter on the\nsweep date.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"from","in":"query","schema":{"type":"string","format":"date"}},{"name":"to","in":"query","schema":{"type":"string","format":"date"}},{"name":"page_size","in":"query","description":"Page size (1–1000, default 100).","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":100,"example":100},"example":100},{"name":"page_token","in":"query","description":"Opaque cursor from the previous response's `next_page_token`. Omit to fetch the first page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfMoneyMarketSweepEventResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfMoneyMarketSweepEventResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfMoneyMarketSweepEventResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/positions":{"get":{"tags":["Positions"],"summary":"List positions. Pass as_of=YYYY-MM-DD for a historical holdings snapshot.","description":"Without as_of: returns live positions including market value, cost basis, P&amp;L,\ncurrent price, and lastday price.\n\nWith as_of: returns only symbol + qty + side at EOD on that date, using trade-date\nsemantics. Market value, cost basis, average entry price, unrealized P&amp;L, current\nprice, and lastday price are null because they require lot-tracking replay and\nhistorical price/margin context that aren't yet supported. Cap: 730 days back.\n\nResponse is paginated for forward compatibility, but today always returns the\nfull set in a single page (next_page_token is null).","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"as_of","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfPositionResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfPositionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfPositionResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/positions/{symbol}":{"get":{"tags":["Positions"],"summary":"Get position for a specific symbol.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"symbol","in":"path","description":"Security ticker symbol. Must exist in the security master.","required":true,"schema":{"type":"string","example":"AAPL"},"example":"AAPL"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PositionResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PositionResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PositionResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/reference-data":{"get":{"tags":["Reference Data"],"summary":"Get valid values for all enum-like fields used in account creation.\nThese are the exact string values the API accepts.","description":"Returns all valid enum values for account creation fields.\nPass these exact strings in POST /v2/accounts requests.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{}},"application/json":{"schema":{}},"text/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/reference-data/trading":{"get":{"tags":["Reference Data"],"summary":"Get valid values for trade submission fields: brokers, exchanges, and trade sides.","description":"Returns valid brokers, exchanges, and trade sides.\nPass these exact strings in POST /v2/accounts/{id}/trades requests.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{}},"application/json":{"schema":{}},"text/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/reference-data/brokers":{"get":{"tags":["Reference Data"],"summary":"Get the full NSCC broker master: every MPID with its firm name and Coredera\nbroker_identifier UUID.","description":"Intended for downstream portals that want to maintain a local mirror of the\nbroker master (so their trade-entry dropdowns stay functional during Coredera\nreference-data outages). Returns every broker loaded in the in-process cache —\ntypically ~2600 rows — sorted by MPID symbol.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{}},"application/json":{"schema":{}},"text/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/reference-data/countries":{"get":{"tags":["Reference Data"],"summary":"Get available countries (code and name).","description":"Returns all countries with ISO alpha-2 and alpha-3 codes.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{}},"application/json":{"schema":{}},"text/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/reference-data/countries/{country_code}/states":{"get":{"tags":["Reference Data"],"summary":"Get available states/provinces for a country.","description":"Returns states/provinces for the specified country.\nAccepts both ISO alpha-2 (US) and alpha-3 (USA) country codes.","parameters":[{"name":"country_code","in":"path","description":"ISO alpha-2 (US) or alpha-3 (USA) country code.","required":true,"schema":{"type":"string","example":"USA"},"example":"USA"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{}},"application/json":{"schema":{}},"text/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/reference-data/correspondents":{"get":{"tags":["Reference Data"],"summary":"Get available correspondents (introducing broker firms).\nThese are provisioned during onboarding — this endpoint is read-only.","description":"Returns correspondents provisioned for your firm.\nUse any returned value as the correspondent field in POST /v2/accounts.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{}},"application/json":{"schema":{}},"text/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/reference-data/offices":{"get":{"tags":["Reference Data"],"summary":"Get available offices (branch locations).\nThese are provisioned during onboarding — this endpoint is read-only.","description":"Returns available branch offices.\nThese are provisioned during onboarding and cannot be created via the API.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{}},"application/json":{"schema":{}},"text/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/reference-data/rep-codes":{"get":{"tags":["Reference Data"],"summary":"Get available rep codes.\nThese are provisioned during onboarding — this endpoint is read-only.","description":"Returns the rep codes registered for use on new accounts. Use the `code`\nvalue as the `rep_code` field in POST /v2/accounts.\n\nFilter with `correspondent=CODE` and/or `office=NUMBER` to narrow the list\nto a specific introducing broker or branch. The result is automatically\nscoped to the rep codes the calling client has access to (per the access\nrules configured in the staff Angular UX at /maintenance/api-clients).\n\nCRD numbers and internal identifiers are intentionally withheld.","parameters":[{"name":"correspondent","in":"query","description":"Optional correspondent code filter (e.g. \"TSCP\").","schema":{"type":"string","example":"TSCP"},"example":"TSCP"},{"name":"office","in":"query","description":"Optional office number filter (e.g. \"110\").","schema":{"type":"string","example":"110"},"example":"110"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{}},"application/json":{"schema":{}},"text/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/reference-data/companies":{"get":{"tags":["Reference Data"],"summary":"Get available companies.\nThese are provisioned during onboarding — this endpoint is read-only.","description":"Returns companies provisioned for your firm.\nUse any returned value as the company field in POST /v2/accounts.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{}},"application/json":{"schema":{}},"text/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/sub-accounts":{"post":{"tags":["Sub-Accounts"],"summary":"Create a sub-account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubAccountRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/SubAccountRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/SubAccountRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/SubAccountResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/SubAccountResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/SubAccountResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["Sub-Accounts"],"summary":"List sub-accounts for an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubAccountResponse"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubAccountResponse"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubAccountResponse"}}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/sub-accounts/{sub_account_id}":{"get":{"tags":["Sub-Accounts"],"summary":"Get a single sub-account by ID.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"sub_account_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/SubAccountResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/SubAccountResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/SubAccountResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/reference-data/securities":{"get":{"tags":["Reference Data"],"summary":"List tradable US equities for use in vendor trade-entry UIs.","description":"Returns a filtered view of the security master: US venues (regulated\nexchanges + OTC), alphabetic ticker symbols ≤6 characters, equity-\nclass only. Each row has exactly four fields: `symbol`, `cusip`,\n`issuer_name`, `description`.\n\n**Caching:** The response carries `Cache-Control: public, max-age=60,\nmust-revalidate` and a strong `ETag` derived from the max updated_at\ntimestamp plus the total row count. Send the ETag back in an\n`If-None-Match` header on subsequent requests; the server returns\n`304 Not Modified` with an empty body if nothing has changed. Any\nedit, insert, or delete in the underlying security master bumps the\nETag on the next revalidation (≤60 seconds worst case).\n\n**Pagination:** Cursor-based via `page_token`. Default page size is\n1000 (max 5000). Loop until `next_page_token` is null to fetch the\nfull universe.\n\n**Recommended cadence:** refresh once per hour. Because of the\nconditional-request support, unchanged refreshes cost ~zero bandwidth.","parameters":[{"name":"page_size","in":"query","description":"Page size (1–1000, default 100).","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":1000,"example":100},"example":100},{"name":"page_token","in":"query","description":"Opaque cursor from the previous response's `next_page_token`. Omit to fetch the first page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/TradableSecurityListResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/TradableSecurityListResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/TradableSecurityListResponse"}}}},"304":{"description":"Not Modified"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/trades":{"post":{"tags":["Trades"],"summary":"Submit an executed trade. Pass ?dry_run=true to validate without persisting.","description":"Blotter, source_of_entry, company, and correspondent are auto-populated from the account.\nThe sec_fee and taf_fee are auto-calculated; any vendor-supplied values are ignored.\nUse GET /v2/reference-data/trading for valid brokers, exchanges, and trade sides.\nWhen dry_run=true the response includes the resolved trade and any validation warnings.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"dry_run","in":"query","description":"Validate the request without persisting. Set to `true` to preview the resolved payload and any warnings; omit or set to `false` to actually create/submit.","schema":{"type":"boolean","default":false,"example":true},"example":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TradeRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/TradeRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/TradeRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/DryRunTradeResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/DryRunTradeResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/DryRunTradeResponse"}}}},"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/TradeResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/TradeResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/TradeResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["Trades"],"summary":"List trades for an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"date_from","in":"query","description":"Inclusive start date filter (YYYY-MM-DD).","schema":{"type":"string","format":"date","example":"2024-01-01"},"example":"2024-01-01"},{"name":"date_to","in":"query","description":"Inclusive end date filter (YYYY-MM-DD).","schema":{"type":"string","format":"date","example":"2024-12-31"},"example":"2024-12-31"},{"name":"page_size","in":"query","description":"Page size (1–1000, default 100).","schema":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32","default":100,"example":100},"example":100},{"name":"page_token","in":"query","description":"Opaque cursor from the previous response's `next_page_token`. Omit to fetch the first page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfTradeResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfTradeResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponseOfListOfTradeResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/trades/{trade_id}":{"delete":{"tags":["Trades"],"summary":"Cancel/reverse a trade.","description":"Cancels a posted trade by creating a reversal entry in the journal.\nThe original trade and its cancel entry both remain in the ledger\n(SUM(all) balance rule). Cannot cancel already-cancelled trades.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},{"name":"trade_id","in":"path","description":"Trade identifier UUID (from the POST /trades response `id` field).","required":true,"schema":{"type":"string","example":"64b78fb9-92a7-c377-6567-d34c14492660"},"example":"64b78fb9-92a7-c377-6567-d34c14492660"}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/accounts/{account_id}/trusted-contact":{"put":{"tags":["Trusted Contact"],"summary":"Set or update the trusted contact for an account (FINRA Rule 4512).","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustedContactRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/TrustedContactRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/TrustedContactRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/TrustedContactResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/TrustedContactResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/TrustedContactResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["Trusted Contact"],"summary":"Get the trusted contact for an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/TrustedContactResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/TrustedContactResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/TrustedContactResponse"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["Trusted Contact"],"summary":"Remove the trusted contact from an account.","parameters":[{"name":"account_id","in":"path","description":"Account identifier UUID.","required":true,"schema":{"type":"string","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/webhooks":{"post":{"tags":["Webhooks"],"summary":"Register a webhook endpoint.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateRequest"}},"text/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateRequest"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/WebhookCreateRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}},"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}},"text/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"400":{"description":"Bad Request","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Unprocessable Entity","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["Webhooks"],"summary":"List registered webhooks.","responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookResponse"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookResponse"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookResponse"}}}}},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/v2/webhooks/{webhook_id}":{"delete":{"tags":["Webhooks"],"summary":"Remove a webhook.","parameters":[{"name":"webhook_id","in":"path","description":"Webhook subscription identifier UUID.","required":true,"schema":{"type":"string","example":"3d5ac7f3-4c2e-48c2-b5f8-a0e1c7d4f612"},"example":"3d5ac7f3-4c2e-48c2-b5f8-a0e1c7d4f612"}],"responses":{"204":{"description":"No Content"},"401":{"description":"Unauthorized","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Forbidden","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Not Found","content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"application/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}},"text/json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"AccountCreateRequest":{"type":"object","properties":{"contact":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ContactInfo"}]},"identity":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/IdentityInfo"}]},"disclosures":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/DisclosureInfo"}]},"account_type":{"type":["null","string"],"description":"Legal entity type. Valid values: INDIVIDUAL, JOINT, CORPORATE, TRUST, IRA, UGMA_UTMA, PARTNERSHIP, LIMITED_PARTNERSHIP, LLP, LLLP, LLC, S_CORP, SOLE_PROPRIETORSHIP, PROFESSIONAL_CORPORATION, DBA","example":"JOINT"},"account_sub_type":{"type":["null","string"],"description":"Account sub-type. Valid values: CASH, MARGIN, DVP, CASH_TRANSFER, CASH_SAFEKEEPING, MARGIN_DAY_TRADER, MARGIN_PORTFOLIO","example":"CASH"},"correspondent":{"type":["null","string"],"description":"Correspondent code, name, MPID, or UUID. See `GET /v2/reference-data/correspondents` for valid values.","example":"TSCP"},"company":{"type":["null","string"],"description":"Company name, code, or UUID. See `GET /v2/reference-data/companies` for valid values.","example":"TechSpeed Clearing LLC"},"fpl_opt_in":{"type":["null","boolean"],"description":"True to opt into Fully Paid Lending program.","example":false},"rep_code":{"type":["null","string"],"description":"Rep code string (e.g. 'JD01'). See `GET /v2/reference-data/rep-codes` for valid values. Optional — omit or send empty string to leave unassigned.","example":"JD01"},"office":{"type":["null","string"],"description":"Office number string. See `GET /v2/reference-data/offices` for valid values.","example":"110"},"account_name":{"type":["null","string"],"description":"Free-form display name for the account. Joint accounts typically include both names (e.g. 'John Doe & Sarah Thompson JTWROS').","example":"John Doe"},"sweep_indicator":{"type":["null","boolean"],"description":"True to enroll in bank sweep program for uninvested cash.","example":false},"trusted_contact":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TrustedContactInfo"}]},"joint_account":{"oneOf":[{"type":"null"},{"description":"Co-applicant info. Required when account_type is JOINT.","$ref":"#/components/schemas/JointAccountInfo"}]},"ira":{"oneOf":[{"type":"null"},{"description":"IRA details. Required when account_type is IRA.","$ref":"#/components/schemas/IraInfo"}]},"confirms":{"oneOf":[{"type":"null"},{"description":"Trade confirmation delivery preference.","$ref":"#/components/schemas/DeliveryPreference"}]},"statements":{"oneOf":[{"type":"null"},{"description":"Account statement delivery preference.","$ref":"#/components/schemas/DeliveryPreference"}]},"associations":{"type":["null","array"],"items":{"$ref":"#/components/schemas/AssociationInfo"},"description":"Industry affiliations (FINRA/exchange/BD associations)."},"duplicate_statements":{"type":["null","array"],"items":{"$ref":"#/components/schemas/DuplicateStatementRecipient"},"description":"Duplicate statement/confirm recipients. Required when account holder is an\n    associated person of a FINRA member firm — the employing firm must receive copies."},"fdid_ccid":{"type":["null","string"],"description":"FDID/CCID — CAT/OATS regulatory identifier for the account.","example":"20000009"}},"description":"Account creation request with nested sections.\nAligned with FINRA New Account Application (Advanced) template."},"AccountMarginCallSummaryResponse":{"type":"object","properties":{"account_id":{"type":"string","description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"as_of":{"type":["null","string"]},"total_open_calls":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"total_remaining_amount":{"type":["null","string"]},"by_type":{"type":"array","items":{"$ref":"#/components/schemas/MarginCallByType"}},"by_aging_bucket":{"type":"array","items":{"$ref":"#/components/schemas/MarginCallByBucket"}}},"description":"Per-account roll-up of open margin calls — same shape as\nMarginCallSummaryResponse but scoped to a single account\n(so the top-level identifier is account_id, not correspondent_identifier).\nReuses MarginCallByType and MarginCallByBucket\nfor the breakdowns."},"AccountResponse":{"type":"object","properties":{"id":{"type":"string"},"account_number":{"type":["null","string"]},"account_name":{"type":["null","string"],"description":"Free-form display name for the account. Joint accounts typically include both names (e.g. 'John Doe & Sarah Thompson JTWROS').","example":"John Doe"},"display_name":{"type":["null","string"],"description":"Display name shown on statements and UI.","example":"John Doe"},"account_type":{"type":["null","string"],"description":"Legal entity type. Valid values: INDIVIDUAL, JOINT, CORPORATE, TRUST, IRA, UGMA_UTMA, PARTNERSHIP, LIMITED_PARTNERSHIP, LLP, LLLP, LLC, S_CORP, SOLE_PROPRIETORSHIP, PROFESSIONAL_CORPORATION, DBA","example":"JOINT"},"account_sub_type":{"type":["null","string"],"description":"Account sub-type. Valid values: CASH, MARGIN, DVP, CASH_TRANSFER, CASH_SAFEKEEPING, MARGIN_DAY_TRADER, MARGIN_PORTFOLIO","example":"CASH"},"status":{"type":["null","string"],"description":"Account status filter. Typical values: SUBMITTED, APPROVED, REJECTED, ACTIVE, INACTIVE, ACCOUNT_CLOSED.","example":"APPROVED"},"company":{"type":["null","string"],"description":"Company name, code, or UUID. See `GET /v2/reference-data/companies` for valid values.","example":"TechSpeed Clearing LLC"},"correspondent":{"type":["null","string"],"description":"Correspondent code, name, MPID, or UUID. See `GET /v2/reference-data/correspondents` for valid values.","example":"TSCP"},"kyc_status":{"type":["null","string"],"description":"KYC verification status. Typical values: PENDING, VERIFIED, FAILED, EXEMPT.","example":"PENDING"},"closed_at":{"type":["null","string"]},"action_required_reason":{"type":["null","string"]},"inactive_reason":{"type":["null","string"]},"submission_failure_reason":{"type":["null","string"]},"created_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of record creation.","example":"2024-01-15T14:30:00Z"},"updated_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of last update.","example":"2024-01-15T14:30:00Z"},"account_blocked":{"type":"boolean","description":"Most severe block — when true, no orders or transfers may be placed."},"account_blocked_reason":{"type":["null","string"]},"trading_blocked":{"type":"boolean","description":"When true, no orders may be placed. Transfers may still be allowed."},"trading_blocked_reason":{"type":["null","string"]},"transfers_blocked":{"type":"boolean","description":"When true, no ACH or wire transfers may be initiated."},"transfers_blocked_reason":{"type":["null","string"]},"liquidation_only":{"type":"boolean","description":"When true, only orders that REDUCE existing exposure are accepted:\nno opening buys, no opening short sells. Closes/covers allowed."},"liquidation_only_reason":{"type":["null","string"]}}},"AchInstructionRequest":{"type":"object","properties":{"bank_name":{"type":"string"},"routing_number":{"type":"string"},"account_number":{"type":"string"},"account_type":{"type":"string","description":"Legal entity type. Valid values: INDIVIDUAL, JOINT, CORPORATE, TRUST, IRA, UGMA_UTMA, PARTNERSHIP, LIMITED_PARTNERSHIP, LLP, LLLP, LLC, S_CORP, SOLE_PROPRIETORSHIP, PROFESSIONAL_CORPORATION, DBA","example":"JOINT"},"account_title":{"type":"string"},"instruction_type":{"type":["null","string"]},"notes":{"type":["null","string"]}}},"AchInstructionResponse":{"type":"object","properties":{"id":{"type":"string"},"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"bank_name":{"type":["null","string"]},"routing_number":{"type":["null","string"]},"account_number":{"type":["null","string"]},"account_type":{"type":["null","string"],"description":"Legal entity type. Valid values: INDIVIDUAL, JOINT, CORPORATE, TRUST, IRA, UGMA_UTMA, PARTNERSHIP, LIMITED_PARTNERSHIP, LLP, LLLP, LLC, S_CORP, SOLE_PROPRIETORSHIP, PROFESSIONAL_CORPORATION, DBA","example":"JOINT"},"account_title":{"type":["null","string"]},"instruction_type":{"type":["null","string"]},"status":{"type":["null","string"],"description":"Account status filter. Typical values: SUBMITTED, APPROVED, REJECTED, ACTIVE, INACTIVE, ACCOUNT_CLOSED.","example":"APPROVED"},"notes":{"type":["null","string"]},"created_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of record creation.","example":"2024-01-15T14:30:00Z"},"updated_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of last update.","example":"2024-01-15T14:30:00Z"}}},"ActivityResponse":{"type":"object","properties":{"id":{"type":"string"},"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"activity_type":{"type":["null","string"]},"type":{"type":["null","string"]},"symbol":{"type":["null","string"],"description":"Security ticker symbol. Must exist in the security master.","example":"AAPL"},"qty":{"type":["null","string"],"description":"Quantity as a decimal string (supports fractional shares).","example":"100"},"price":{"type":["null","string"],"description":"Execution price per share, as a decimal string.","example":"175.50"},"side":{"type":["null","string"],"description":"Trade side. Valid values: BUY, SELL, SELL_SHORT, SELL_SHORT_EXEMPT","example":"BUY"},"net_amount":{"type":["null","string"],"description":"Net amount after fees, decimal string.","example":"17545.00"},"description":{"type":["null","string"]},"order_number":{"type":["null","string"]},"trade_date":{"type":["null","string"],"description":"Trade date (YYYY-MM-DD).","example":"2024-01-15"},"settlement_date":{"type":["null","string"],"description":"Settlement date (YYYY-MM-DD). Optional — when omitted the server derives a business-day T+N date (`securities.settlement_days`, default T+1) advanced over the company holiday calendar (the `holidays` table); it is NOT a naive calendar +1. Supply explicitly for non-regular-way settlement (T+0 cash, DTC Fail, Velocity, etc.) — a supplied value is feed-authoritative and stored verbatim.","example":"2024-01-16"},"created_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of record creation.","example":"2024-01-15T14:30:00Z"}}},"AssetResponse":{"type":"object","properties":{"id":{"type":"string"},"symbol":{"type":["null","string"],"description":"Security ticker symbol. Must exist in the security master.","example":"AAPL"},"name":{"type":["null","string"],"description":"Full legal name.","example":"John Doe"},"cusip":{"type":["null","string"]},"isin":{"type":["null","string"]},"sedol":{"type":["null","string"]},"exchange":{"type":["null","string"],"description":"Exchange name filter (e.g. 'NYSE', 'NASDAQ', 'ARCA').","example":"NASDAQ"},"asset_class":{"type":["null","string"],"description":"Asset class filter. Valid values: us_equity, us_option, fixed_income.","example":"us_equity"},"status":{"type":["null","string"],"description":"Account status filter. Typical values: SUBMITTED, APPROVED, REJECTED, ACTIVE, INACTIVE, ACCOUNT_CLOSED.","example":"APPROVED"},"tradable":{"type":["null","boolean"]},"marginable":{"type":["null","boolean"]},"shortable":{"type":["null","boolean"]},"currency":{"type":["null","string"],"description":"ISO 4217 currency code.","example":"USD"}}},"AssociationInfo":{"type":"object","properties":{"name":{"type":["null","string"],"description":"Association name (e.g., firm name).","example":"John Doe"},"type":{"type":["null","string"],"description":"Association type (e.g., BROKER_DEALER, INVESTMENT_ADVISER, FINRA, STATE_REGULATOR)."},"number":{"type":["null","string"],"description":"CRD number or registration number."}},"description":"FINRA/exchange association. Used to report the applicant's affiliation\nwith broker-dealers, investment advisers, or regulatory organizations."},"AuthorizedPersonRequest":{"type":"object","properties":{"first_name":{"type":"string","description":"Legal first name.","example":"John"},"last_name":{"type":"string","description":"Legal last name / surname.","example":"Doe"},"relationship":{"type":["null","string"],"description":"Relationship to the primary account holder (e.g. 'Spouse', 'Child', 'Parent', 'Sibling').","example":"Spouse"},"authorization_type":{"type":["null","string"]},"date_of_birth":{"type":["null","string"],"description":"Date of birth in ISO 8601 (YYYY-MM-DD).","example":"1985-06-15"},"tax_id":{"type":["null","string"],"description":"Tax identifier. Format depends on tax_id_type (SSN: 123-45-6789, EIN: 12-3456789).","example":"123-45-6789"},"phone":{"type":["null","string"],"description":"Phone number (US format typical).","example":"234-567-8910"},"email":{"type":["null","string"],"description":"Email address. RFC 5322 format.","example":"john.doe@example.com"},"address_line1":{"type":["null","string"],"description":"First line of the street address.","example":"123 Main Street"},"address_line2":{"type":["null","string"],"description":"Second line of the street address (optional).","example":"Suite 400"},"city":{"type":["null","string"],"description":"City name (free text).","example":"Paoli"},"state":{"type":["null","string"],"description":"2-letter state/province code. Must be valid for the selected country. See `GET /v2/reference-data/countries/{country}/states` for valid values.","example":"IN"},"country":{"type":["null","string"],"description":"ISO 3166-1 alpha-3 country code (e.g. 'USA', 'CAN', 'GBR'). See `GET /v2/reference-data/countries` for valid values.","example":"USA"},"postal_code":{"type":["null","string"],"description":"ZIP / postal code.","example":"46001"},"effective_date":{"type":["null","string"]},"expiration_date":{"type":["null","string"]},"notarized":{"type":["null","boolean"]},"kyc_status":{"type":["null","string"],"description":"KYC verification status. Typical values: PENDING, VERIFIED, FAILED, EXEMPT.","example":"PENDING"},"kyc_verification_id":{"type":["null","string"],"description":"External KYC vendor's verification ID (e.g. Alloy entity ID). Null if not yet verified."}}},"AuthorizedPersonResponse":{"type":"object","properties":{"id":{"type":"string"},"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"first_name":{"type":["null","string"],"description":"Legal first name.","example":"John"},"last_name":{"type":["null","string"],"description":"Legal last name / surname.","example":"Doe"},"relationship":{"type":["null","string"],"description":"Relationship to the primary account holder (e.g. 'Spouse', 'Child', 'Parent', 'Sibling').","example":"Spouse"},"authorization_type":{"type":["null","string"]},"date_of_birth":{"type":["null","string"],"description":"Date of birth in ISO 8601 (YYYY-MM-DD).","example":"1985-06-15"},"tax_id":{"type":["null","string"],"description":"Tax identifier. Format depends on tax_id_type (SSN: 123-45-6789, EIN: 12-3456789).","example":"123-45-6789"},"phone":{"type":["null","string"],"description":"Phone number (US format typical).","example":"234-567-8910"},"email":{"type":["null","string"],"description":"Email address. RFC 5322 format.","example":"john.doe@example.com"},"address_line1":{"type":["null","string"],"description":"First line of the street address.","example":"123 Main Street"},"address_line2":{"type":["null","string"],"description":"Second line of the street address (optional).","example":"Suite 400"},"city":{"type":["null","string"],"description":"City name (free text).","example":"Paoli"},"state":{"type":["null","string"],"description":"2-letter state/province code. Must be valid for the selected country. See `GET /v2/reference-data/countries/{country}/states` for valid values.","example":"IN"},"country":{"type":["null","string"],"description":"ISO 3166-1 alpha-3 country code (e.g. 'USA', 'CAN', 'GBR'). See `GET /v2/reference-data/countries` for valid values.","example":"USA"},"postal_code":{"type":["null","string"],"description":"ZIP / postal code.","example":"46001"},"effective_date":{"type":["null","string"]},"expiration_date":{"type":["null","string"]},"notarized":{"type":["null","boolean"]},"kyc_status":{"type":["null","string"],"description":"KYC verification status. Typical values: PENDING, VERIFIED, FAILED, EXEMPT.","example":"PENDING"},"kyc_verification_id":{"type":["null","string"],"description":"External KYC vendor's verification ID (e.g. Alloy entity ID). Null if not yet verified."},"created_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of record creation.","example":"2024-01-15T14:30:00Z"},"updated_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of last update.","example":"2024-01-15T14:30:00Z"}}},"BalanceResponse":{"type":"object","properties":{"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"equity":{"type":["null","string"]},"market_value":{"type":["null","string"]},"long_market_value":{"type":["null","string"]},"short_market_value":{"type":["null","string"]},"cash":{"type":["null","string"],"description":"Combined Cash &amp; Money Market — what most dealers display as\nthe customer's spendable balance. Equals `cash_only + mm_balance`.\nPreserves pre-V21 numeric value for partners reading this field\n(they were getting the lumped sum already, just unaware)."},"cash_only":{"type":["null","string"],"description":"True free credit — pure customer cash with the Money Market leg\nexcluded. Added V21 alongside `mm_balance` so partners can\ndistinguish the two without changing the meaning of the legacy\n`cash` field."},"mm_balance":{"type":["null","string"],"description":"Money Market sweep holdings, $1 NAV (so dollars == shares)."},"sma":{"type":["null","string"]},"buying_power":{"type":["null","string"]},"regt_buying_power":{"type":["null","string"]},"daytrading_buying_power":{"type":["null","string"]},"initial_margin":{"type":["null","string"]},"maintenance_margin":{"type":["null","string"]},"fed_excess":{"type":["null","string"]},"house_excess":{"type":["null","string"]},"exchange_excess":{"type":["null","string"]},"open_calls":{"type":["null","string"]},"currency":{"type":["null","string"],"description":"ISO 4217 currency code.","example":"USD"},"balance_date":{"type":["null","string"]},"margin_type":{"type":["null","string"],"description":"EOD or INTRADAY — vendors use this to distinguish a daily-close\nsnapshot from a live intraday recalc. Added 1.0.310."},"as_of":{"type":["null","string"],"description":"Timestamp of the margin recalc that produced this row. Vendors render\nthis as the \"as of\" indicator. ISO-8601 UTC. Added 1.0.310."},"net_account_value":{"type":["null","string"],"description":"Net Account Value — mirrors `equity` for all account types.\nSurfaces the single firm-authoritative number some vendors prefer\nover reconstructing equity client-side. Added 1.0.310."},"multiplier":{"type":["null","string"],"description":"Per-account Reg-T buying-power multiplier. Default \"2\" (Reg-T standard\n2:1 long). The margin engine multiplies SMA by this value to derive\n`regt_buying_power`, so vendors can self-check leverage policy\nwithout a second API call. Day-trading leverage stays separate via\n`daytrading_buying_power`."},"maintenance_buying_power":{"type":["null","string"],"description":"Buying power capped by maintenance excess. The composite\n`buying_power` field is the MIN of Reg-T, maintenance, and the\nfirm limit; surfacing the three legs lets vendors reconcile which\nconstraint is binding when the composite differs from Reg-T."},"firm_limit_buying_power":{"type":["null","string"],"description":"Firm-defined absolute buying-power ceiling."},"maintenance_excess":{"type":["null","string"],"description":"equity − maintenance_requirement. Complement to\n`fed_excess` / `house_excess` / `exchange_excess`.\nNegative = maintenance call."},"cash_account_restriction":{"type":["null","string"],"description":"Strongest currently-enforced cash-account restriction.\n`\"90_DAY_FREEZE\"` when the account is in a Reg T 220.8\nfreeride / GFV freeze; `\"WARNING\"` when on warning; null\nwhen no restriction is in force. For full violation history\nhit `GET /v2/accounts/{id}/cash-account-violations`."},"cash_account_restriction_until":{"type":["null","string"],"description":"End date of the active restriction (typically ISO YYYY-MM-DD)."},"cash_account_restriction_days_remaining":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"description":"Calendar days until the active restriction lifts.","format":"int32"},"account_blocked":{"type":"boolean"},"account_blocked_reason":{"type":["null","string"]},"trading_blocked":{"type":"boolean"},"trading_blocked_reason":{"type":["null","string"]},"transfers_blocked":{"type":"boolean"},"transfers_blocked_reason":{"type":["null","string"]},"liquidation_only":{"type":"boolean"},"liquidation_only_reason":{"type":["null","string"]}}},"BeneficialOwnerRequest":{"type":"object","properties":{"owner_type":{"type":"string"},"first_name":{"type":"string","description":"Legal first name.","example":"John"},"last_name":{"type":"string","description":"Legal last name / surname.","example":"Doe"},"title":{"type":["null","string"]},"date_of_birth":{"type":"string","description":"Date of birth in ISO 8601 (YYYY-MM-DD).","example":"1985-06-15"},"address_line1":{"type":"string","description":"First line of the street address.","example":"123 Main Street"},"address_line2":{"type":["null","string"],"description":"Second line of the street address (optional).","example":"Suite 400"},"city":{"type":["null","string"],"description":"City name (free text).","example":"Paoli"},"state":{"type":["null","string"],"description":"2-letter state/province code. Must be valid for the selected country. See `GET /v2/reference-data/countries/{country}/states` for valid values.","example":"IN"},"country":{"type":["null","string"],"description":"ISO 3166-1 alpha-3 country code (e.g. 'USA', 'CAN', 'GBR'). See `GET /v2/reference-data/countries` for valid values.","example":"USA"},"postal_code":{"type":["null","string"],"description":"ZIP / postal code.","example":"46001"},"tax_id":{"type":"string","description":"Tax identifier. Format depends on tax_id_type (SSN: 123-45-6789, EIN: 12-3456789).","example":"123-45-6789"},"id_type":{"type":["null","string"],"description":"Government ID type. Valid values: DRIVERS_LICENSE, PASSPORT, STATE_ID, OTHER_GOVERNMENT_ID, MILITARY_ID","example":"DRIVERS_LICENSE"},"id_number":{"type":["null","string"],"description":"ID number as printed on the document.","example":"D12345678"},"id_issuing_authority":{"type":["null","string"],"description":"Authority that issued the ID (e.g. 'NY DMV', 'U.S. Department of State').","example":"NY DMV"},"middle_name":{"type":["null","string"],"description":"Middle name. Use empty string if none.","example":"Andrew"},"id_issue_date":{"type":["null","string"],"description":"ID issue date (YYYY-MM-DD).","example":"2022-02-02"},"id_expiration_date":{"type":["null","string"],"description":"ID expiration date (YYYY-MM-DD).","example":"2032-02-02"},"phone":{"type":["null","string"],"description":"Phone number (US format typical).","example":"234-567-8910"},"email":{"type":["null","string"],"description":"Email address. RFC 5322 format.","example":"john.doe@example.com"},"ownership_percentage":{"type":["null","string"]},"kyc_status":{"type":["null","string"],"description":"KYC verification status. Typical values: PENDING, VERIFIED, FAILED, EXEMPT.","example":"PENDING"},"kyc_verification_id":{"type":["null","string"],"description":"External KYC vendor's verification ID (e.g. Alloy entity ID). Null if not yet verified."}}},"BeneficialOwnerResponse":{"type":"object","properties":{"id":{"type":"string"},"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"owner_type":{"type":["null","string"]},"first_name":{"type":["null","string"],"description":"Legal first name.","example":"John"},"last_name":{"type":["null","string"],"description":"Legal last name / surname.","example":"Doe"},"title":{"type":["null","string"]},"date_of_birth":{"type":["null","string"],"description":"Date of birth in ISO 8601 (YYYY-MM-DD).","example":"1985-06-15"},"address_line1":{"type":["null","string"],"description":"First line of the street address.","example":"123 Main Street"},"address_line2":{"type":["null","string"],"description":"Second line of the street address (optional).","example":"Suite 400"},"city":{"type":["null","string"],"description":"City name (free text).","example":"Paoli"},"state":{"type":["null","string"],"description":"2-letter state/province code. Must be valid for the selected country. See `GET /v2/reference-data/countries/{country}/states` for valid values.","example":"IN"},"country":{"type":["null","string"],"description":"ISO 3166-1 alpha-3 country code (e.g. 'USA', 'CAN', 'GBR'). See `GET /v2/reference-data/countries` for valid values.","example":"USA"},"postal_code":{"type":["null","string"],"description":"ZIP / postal code.","example":"46001"},"tax_id":{"type":["null","string"],"description":"Tax identifier. Format depends on tax_id_type (SSN: 123-45-6789, EIN: 12-3456789).","example":"123-45-6789"},"id_type":{"type":["null","string"],"description":"Government ID type. Valid values: DRIVERS_LICENSE, PASSPORT, STATE_ID, OTHER_GOVERNMENT_ID, MILITARY_ID","example":"DRIVERS_LICENSE"},"id_number":{"type":["null","string"],"description":"ID number as printed on the document.","example":"D12345678"},"id_issuing_authority":{"type":["null","string"],"description":"Authority that issued the ID (e.g. 'NY DMV', 'U.S. Department of State').","example":"NY DMV"},"middle_name":{"type":["null","string"],"description":"Middle name. Use empty string if none.","example":"Andrew"},"id_issue_date":{"type":["null","string"],"description":"ID issue date (YYYY-MM-DD).","example":"2022-02-02"},"id_expiration_date":{"type":["null","string"],"description":"ID expiration date (YYYY-MM-DD).","example":"2032-02-02"},"phone":{"type":["null","string"],"description":"Phone number (US format typical).","example":"234-567-8910"},"email":{"type":["null","string"],"description":"Email address. RFC 5322 format.","example":"john.doe@example.com"},"ownership_percentage":{"type":["null","string"]},"kyc_status":{"type":["null","string"],"description":"KYC verification status. Typical values: PENDING, VERIFIED, FAILED, EXEMPT.","example":"PENDING"},"kyc_verification_id":{"type":["null","string"],"description":"External KYC vendor's verification ID (e.g. Alloy entity ID). Null if not yet verified."},"created_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of record creation.","example":"2024-01-15T14:30:00Z"},"updated_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of last update.","example":"2024-01-15T14:30:00Z"}}},"CashAccountViolationByType":{"type":"object","properties":{"violation_type":{"type":["null","string"]},"count":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"active_count":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"}}},"CashAccountViolationResponse":{"type":"object","properties":{"violation_id":{"type":["null","string"]},"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"violation_type":{"type":["null","string"],"description":"FREE_RIDING | GFV | CASH_LIQUIDATION."},"violation_date":{"type":["null","string"]},"description":{"type":["null","string"]},"restriction_applied":{"type":["null","string"],"description":"NONE | WARNING | 90_DAY_FREEZE."},"restriction_start_date":{"type":["null","string"]},"restriction_end_date":{"type":["null","string"]},"is_active_restriction":{"type":"boolean","description":"True when CURRENT_DATE falls inside the restriction window."},"days_remaining":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"description":"Calendar days until restriction lifts, or null when not active.","format":"int32"}},"description":"Cash-account violation detail (Reg T 220.8 free-ride, GFV, cash\nliquidation). Distinct from margin calls — these drive 90-day Cash Only\nrestrictions, not 3-day Reg T cure windows. Source:\ncoredera.cash_account_violation (via portal.v_account_cash_account_violation)."},"CashAccountViolationSummaryResponse":{"type":"object","properties":{"account_id":{"type":"string","description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"as_of":{"type":["null","string"]},"has_active_restriction":{"type":"boolean","description":"Currently in 90-Day Freeze, Warning, or other live restriction."},"active_restriction":{"type":["null","string"],"description":"Strongest live restriction (NONE | WARNING | 90_DAY_FREEZE)."},"active_days_remaining":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"description":"Days until the most recent active restriction lifts.","format":"int32"},"total_violations":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"by_type":{"type":"array","items":{"$ref":"#/components/schemas/CashAccountViolationByType"}}},"description":"Per-account roll-up of cash-account violations. The \"active\" stats slice\nout only currently-enforced restrictions; the totals include historical\n(already-expired) violations for compliance reporting."},"CloseAccountRequest":{"type":"object","properties":{"reason":{"type":["null","string"],"description":"Optional free-form explanation (customer request, compliance, deceased, etc.)."}}},"ContactInfo":{"type":"object","properties":{"email_address":{"type":["null","string"],"description":"Primary email address.","example":"john.doe@example.com"},"phone_number":{"type":["null","string"],"description":"Primary phone number with country code (e.g., \"+12125551234\").","example":"234-567-8910"},"mobile_phone":{"type":["null","string"],"description":"Mobile phone number (if different from primary).","example":"234-567-8911"},"work_phone":{"type":["null","string"],"description":"Work phone number.","example":""},"home_phone":{"type":["null","string"],"description":"Home phone number.","example":"234-567-8910"},"street_address":{"type":["null","array"],"items":{"type":"string"},"description":"Array of 1–2 street address lines.","example":["123 Main Street","Suite 400"]},"city":{"type":["null","string"],"description":"City name (free text).","example":"Paoli"},"state":{"type":["null","string"],"description":"2-letter state/province code. Must be valid for the selected country. See `GET /v2/reference-data/countries/{country}/states` for valid values.","example":"IN"},"postal_code":{"type":["null","string"],"description":"ZIP / postal code.","example":"46001"},"country":{"type":["null","string"],"description":"ISO 3166-1 alpha-3 country code (e.g. 'USA', 'CAN', 'GBR'). See `GET /v2/reference-data/countries` for valid values.","example":"USA"},"mailing_street_address":{"type":["null","array"],"items":{"type":"string"},"description":"Array of 1–2 mailing address lines. Defaults to street_address if omitted.","example":["123 Main Street","Suite 400"]},"mailing_city":{"type":["null","string"],"description":"Mailing city name.","example":"Paoli"},"mailing_state":{"type":["null","string"],"description":"2-letter state/province code for the mailing address.","example":"IN"},"mailing_postal_code":{"type":["null","string"],"description":"Mailing ZIP / postal code.","example":"46001"},"mailing_country":{"type":["null","string"],"description":"ISO 3166-1 alpha-3 country code for the mailing address.","example":"USA"}}},"CorrespondentMoneylineSummaryResponse":{"type":"object","properties":{"correspondent_identifier":{"type":"string"},"as_of":{"type":["null","string"]},"account_count":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"total_equity":{"type":["null","string"]},"total_net_market_value":{"type":["null","string"]},"total_long_market_value":{"type":["null","string"]},"total_short_market_value":{"type":["null","string"]},"total_cash":{"type":["null","string"],"description":"Combined Cash &amp; Money Market sum (matches BalanceResponse.cash semantics)."},"total_cash_only":{"type":["null","string"]},"total_mm_balance":{"type":["null","string"]},"total_sma":{"type":["null","string"]},"total_buying_power":{"type":["null","string"]},"total_open_calls":{"type":["null","string"]},"currency":{"type":["null","string"],"description":"ISO 4217 currency code.","example":"USD"}},"description":"Rolled-up moneyline totals across every account under a correspondent.\nDriven by the per-account v_balance view (V21 shape) aggregated firmwide.\nAll monetary values are decimal-as-string with 2dp for parity with\nBalanceResponse."},"CorrespondentSummary":{"type":"object","properties":{"identifier":{"type":"string"},"code":{"type":["null","string"]},"name":{"type":["null","string"],"description":"Full legal name.","example":"John Doe"},"account_count":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"description":"Active account count under this correspondent. Optional — omitted when\nthe caller hits the list endpoint (one extra query per row would be\nexpensive); populated on the single-get endpoint.","format":"int32"}},"description":"Lightweight correspondent metadata. Returned by /v2/correspondents (list)\nand /v2/correspondents/{id} (single get)."},"CustodianRequest":{"type":"object","properties":{"custodian_first_name":{"type":"string"},"custodian_last_name":{"type":"string"},"custodian_type":{"type":["null","string"]},"custodian_ssn":{"type":["null","string"]},"custodian_date_of_birth":{"type":["null","string"]},"custodian_phone":{"type":["null","string"]},"custodian_email":{"type":["null","string"]},"custodian_address_line1":{"type":["null","string"]},"custodian_address_line2":{"type":["null","string"]},"custodian_city":{"type":["null","string"]},"custodian_state":{"type":["null","string"]},"custodian_country":{"type":["null","string"]},"custodian_postal_code":{"type":["null","string"]},"minor_first_name":{"type":["null","string"]},"minor_last_name":{"type":["null","string"]},"minor_date_of_birth":{"type":["null","string"]},"minor_ssn":{"type":["null","string"]},"state_of_ugma_utma":{"type":["null","string"]},"age_of_termination":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"kyc_status":{"type":["null","string"],"description":"KYC verification status. Typical values: PENDING, VERIFIED, FAILED, EXEMPT.","example":"PENDING"},"kyc_verification_id":{"type":["null","string"],"description":"External KYC vendor's verification ID (e.g. Alloy entity ID). Null if not yet verified."},"minor_kyc_status":{"type":["null","string"]},"minor_kyc_verification_id":{"type":["null","string"]}}},"CustodianResponse":{"type":"object","properties":{"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"custodian_first_name":{"type":["null","string"]},"custodian_last_name":{"type":["null","string"]},"custodian_type":{"type":["null","string"]},"custodian_ssn":{"type":["null","string"]},"custodian_date_of_birth":{"type":["null","string"]},"custodian_phone":{"type":["null","string"]},"custodian_email":{"type":["null","string"]},"custodian_address_line1":{"type":["null","string"]},"custodian_address_line2":{"type":["null","string"]},"custodian_city":{"type":["null","string"]},"custodian_state":{"type":["null","string"]},"custodian_country":{"type":["null","string"]},"custodian_postal_code":{"type":["null","string"]},"minor_first_name":{"type":["null","string"]},"minor_last_name":{"type":["null","string"]},"minor_date_of_birth":{"type":["null","string"]},"minor_ssn":{"type":["null","string"]},"state_of_ugma_utma":{"type":["null","string"]},"age_of_termination":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"format":"int32"},"kyc_status":{"type":["null","string"],"description":"KYC verification status. Typical values: PENDING, VERIFIED, FAILED, EXEMPT.","example":"PENDING"},"minor_kyc_status":{"type":["null","string"]},"created_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of record creation.","example":"2024-01-15T14:30:00Z"},"updated_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of last update.","example":"2024-01-15T14:30:00Z"}}},"DeliveryPreference":{"type":"object","properties":{"delivery_type":{"type":["null","string"],"description":"Delivery method: MAIL or EMAIL.","example":"Mail"},"delivery_email":{"type":["null","string"],"description":"Optional: email address for delivery (defaults to account contact email if not specified)."}},"description":"Document delivery preferences for trade confirmations and account statements."},"DisclosureInfo":{"type":"object","properties":{"is_control_person":{"type":["null","boolean"],"description":"Director/officer/10%+ shareholder of a publicly traded company.","example":false},"control_person_company":{"type":["null","string"],"description":"Company name (required if is_control_person is true).","example":""},"control_person_symbol":{"type":["null","string"],"description":"Ticker symbol (required if is_control_person is true).","example":""},"is_affiliated_exchange_or_finra":{"type":["null","boolean"],"description":"Employed by or associated with an exchange or FINRA member firm.","example":false},"other_firm_name":{"type":["null","string"],"description":"Name of the other BD firm (if affiliated).","example":""},"has_other_firm_accounts":{"type":["null","boolean"],"description":"Has accounts at other brokerage firms.","example":false},"is_politically_exposed":{"type":["null","boolean"],"description":"Senior military, governmental, or political official in a non-US country.","example":false},"pep_country":{"type":["null","string"],"description":"Country name (required if is_politically_exposed is true).","example":""},"immediate_family_exposed":{"type":["null","boolean"],"description":"Immediate family member is a PEP.","example":false},"employment_status":{"type":["null","string"],"description":"EMPLOYED, SELF_EMPLOYED, RETIRED, STUDENT, UNEMPLOYED.","example":"EMPLOYED"},"employer_name":{"type":["null","string"],"description":"Employer name (required if employed).","example":"Example Corp"},"employer_address":{"type":["null","string"],"description":"Employer street address.","example":"500 Market St"},"employer_city":{"type":["null","string"],"description":"Employer city.","example":"Indianapolis"},"employer_state":{"type":["null","string"],"description":"Employer state (2-letter code).","example":"IN"},"employer_postal_code":{"type":["null","string"],"description":"Employer ZIP/postal code.","example":"46201"},"employer_country":{"type":["null","string"],"description":"Employer country (ISO alpha-3, default \"USA\").","example":"USA"},"employment_position":{"type":["null","string"],"description":"Occupation / position title.","example":"Engineering"},"job_title":{"type":["null","string"],"description":"Specific job title (more granular than employment_position).","example":"Senior Engineer"},"years_with_employer":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"description":"Years at current employer.","format":"int32","example":5}},"description":"Regulatory disclosures: industry affiliations, PEP status, employment.\nFINRA NAF Section 2D."},"DocumentRequest":{"type":"object","properties":{"doc_type":{"type":["null","string"]},"date":{"type":["null","string"]},"doc_due_date":{"type":["null","string"]},"doc_renewal_date":{"type":["null","string"]},"doc_received_date":{"type":["null","string"]},"doc_description":{"type":["null","string"]}}},"DocumentResponse":{"type":"object","properties":{"id":{"type":"string"},"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"doc_type":{"type":["null","string"]},"date":{"type":["null","string"]},"doc_due_date":{"type":["null","string"]},"doc_renewal_date":{"type":["null","string"]},"doc_received_date":{"type":["null","string"]},"doc_description":{"type":["null","string"]},"created_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of record creation.","example":"2024-01-15T14:30:00Z"},"updated_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of last update.","example":"2024-01-15T14:30:00Z"}}},"DryRunAccountResponse":{"type":"object","properties":{"dry_run":{"type":"boolean","description":"Validate the request without persisting. Set to `true` to preview the resolved payload and any warnings; omit or set to `false` to actually create/submit.","example":true},"valid":{"type":"boolean"},"account_type":{"type":["null","string"],"description":"Legal entity type. Valid values: INDIVIDUAL, JOINT, CORPORATE, TRUST, IRA, UGMA_UTMA, PARTNERSHIP, LIMITED_PARTNERSHIP, LLP, LLLP, LLC, S_CORP, SOLE_PROPRIETORSHIP, PROFESSIONAL_CORPORATION, DBA","example":"JOINT"},"account_sub_type":{"type":["null","string"],"description":"Account sub-type. Valid values: CASH, MARGIN, DVP, CASH_TRANSFER, CASH_SAFEKEEPING, MARGIN_DAY_TRADER, MARGIN_PORTFOLIO","example":"CASH"},"resolved_payload":{},"warnings":{"type":"array","items":{"type":"string"}}},"description":"Returned when ?dry_run=true — validates and resolves but does not persist."},"DryRunTradeResponse":{"type":"object","properties":{"dry_run":{"type":"boolean","description":"Validate the request without persisting. Set to `true` to preview the resolved payload and any warnings; omit or set to `false` to actually create/submit.","example":true},"valid":{"type":"boolean"},"symbol":{"type":["null","string"],"description":"Security ticker symbol. Must exist in the security master.","example":"AAPL"},"side":{"type":["null","string"],"description":"Trade side. Valid values: BUY, SELL, SELL_SHORT, SELL_SHORT_EXEMPT","example":"BUY"},"qty":{"type":["null","string"],"description":"Quantity as a decimal string (supports fractional shares).","example":"100"},"gross_amount":{"type":["null","string"],"description":"Gross amount (qty × price), decimal string.","example":"17550.00"},"net_amount":{"type":["null","string"],"description":"Net amount after fees, decimal string.","example":"17545.00"},"calculated_fees":{},"resolved_payload":{},"warnings":{"type":"array","items":{"type":"string"}}}},"DuplicateStatementRecipient":{"type":"object","properties":{"recipientName":{"type":["null","string"],"description":"Recipient firm or individual name (required)."},"recipientType":{"type":["null","string"],"description":"Recipient type: EMPLOYER, COMPLIANCE_OFFICER, OTHER."},"deliveryMethod":{"type":["null","string"],"description":"Delivery method: MAIL, EMAIL, BOTH."},"emailAddress":{"type":["null","string"],"description":"Email address for electronic delivery."},"attn":{"type":["null","string"],"description":"Attention line (e.g., \"Compliance Department\")."},"addressLine1":{"type":["null","string"],"description":"Street address (for mail delivery)."},"addressLine2":{"type":["null","string"],"description":"Address line 2."},"city":{"type":["null","string"],"description":"City."},"state":{"type":["null","string"],"description":"State (2-letter code)."},"country":{"type":["null","string"],"description":"Country (ISO alpha-3)."},"postalCode":{"type":["null","string"],"description":"ZIP/postal code."},"sendConfirms":{"type":["null","boolean"],"description":"Send trade confirmations to this recipient. Default true."},"sendStatements":{"type":["null","boolean"],"description":"Send account statements to this recipient. Default true."},"sendTaxDocs":{"type":["null","boolean"],"description":"Send tax documents (1099, etc.) to this recipient. Default false."},"effectiveDate":{"type":["null","string"],"description":"Effective date for duplicate delivery (YYYY-MM-DD). Defaults to account open date."}},"description":"Duplicate statement/confirmation recipient (FINRA Rule 3210).\nWhen an account holder is an associated person of a FINRA member firm,\nthe employing firm must receive duplicate copies of trade confirmations,\naccount statements, and/or tax documents."},"EntityInfoRequest":{"type":"object","properties":{"entity_name":{"type":"string"},"entity_type":{"type":["null","string"]},"formation_state":{"type":["null","string"]},"formation_date":{"type":["null","string"]},"ein_tax_id":{"type":["null","string"]},"business_description":{"type":["null","string"]},"business_address_line1":{"type":["null","string"]},"business_city":{"type":["null","string"]},"business_state":{"type":["null","string"]},"business_country":{"type":["null","string"]},"business_zipcode":{"type":["null","string"]},"business_phone":{"type":["null","string"]},"cdd_exemption_type":{"type":["null","string"]},"kyb_status":{"type":["null","string"]}}},"EntityInfoResponse":{"type":"object","properties":{"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"entity_name":{"type":["null","string"]},"entity_type":{"type":["null","string"]},"formation_state":{"type":["null","string"]},"formation_date":{"type":["null","string"]},"ein_tax_id":{"type":["null","string"]},"business_description":{"type":["null","string"]},"business_address_line1":{"type":["null","string"]},"business_city":{"type":["null","string"]},"business_state":{"type":["null","string"]},"business_country":{"type":["null","string"]},"business_zipcode":{"type":["null","string"]},"business_phone":{"type":["null","string"]},"cdd_exemption_type":{"type":["null","string"]},"kyb_status":{"type":["null","string"]},"created_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of record creation.","example":"2024-01-15T14:30:00Z"},"updated_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of last update.","example":"2024-01-15T14:30:00Z"}}},"IdentityInfo":{"type":"object","properties":{"given_name":{"type":["null","string"],"description":"First name (CIP legal name).","example":"John"},"middle_name":{"type":["null","string"],"description":"Middle name (CIP — improves OFAC screening accuracy).","example":"Andrew"},"family_name":{"type":["null","string"],"description":"Last name (CIP legal name).","example":"Doe"},"name_prefix":{"type":["null","string"],"description":"Name prefix: Mr, Mrs, Ms, Dr."},"name_suffix":{"type":["null","string"],"description":"Name suffix: Sr, Jr, III, etc."},"date_of_birth":{"type":["null","string"],"description":"Date of birth (YYYY-MM-DD).","example":"1985-06-15"},"marital_status":{"type":["null","string"],"description":"SINGLE, MARRIED, DOMESTIC_PARTNER, DIVORCED, WIDOWED.","example":"Married"},"tax_id":{"type":["null","string"],"description":"SSN, ITIN, or EIN (digits only, no dashes).","example":"123-45-6789"},"tax_id_type":{"type":["null","string"],"description":"Tax ID type: SSN, ITIN, EIN.","example":"SSN"},"country_of_citizenship":{"type":["null","string"],"description":"ISO 3166-1 alpha-3 (default \"USA\").","example":"USA"},"country_of_birth":{"type":["null","string"],"description":"ISO 3166-1 alpha-3.","example":"USA"},"country_of_tax_residence":{"type":["null","string"],"description":"ISO 3166-1 alpha-3 (default \"USA\").","example":"USA"},"id_type":{"type":["null","string"],"description":"Gov't photo ID type: DRIVERS_LICENSE, PASSPORT, STATE_ID, OTHER_GOVERNMENT_ID.","example":"DRIVERS_LICENSE"},"id_number":{"type":["null","string"],"description":"Gov't photo ID number.","example":"D12345678"},"id_issuing_authority":{"type":["null","string"],"description":"Place or country of ID issuance.","example":"NY DMV"},"id_issue_date":{"type":["null","string"],"description":"ID issue date (YYYY-MM-DD).","example":"2022-02-02"},"id_expiration_date":{"type":["null","string"],"description":"ID expiration date (YYYY-MM-DD).","example":"2032-02-02"},"funding_source":{"type":["null","array"],"items":{"type":"string"},"description":"Funding sources: employment_income, investments, inheritance, business_income, savings, other.","example":["employment_income"]},"annual_income_min":{"type":["null","string"],"description":"Monetary string (e.g., \"50000\"). Server maps to FINRA NAF range.","example":"25001"},"annual_income_max":{"type":["null","string"],"description":"Monetary string. Server uses max of min/max.","example":"50000"},"liquid_net_worth_min":{"type":["null","string"],"description":"Monetary string.","example":"50001"},"liquid_net_worth_max":{"type":["null","string"],"description":"Monetary string.","example":"200000"},"total_net_worth_min":{"type":["null","string"],"description":"Monetary string.","example":"50001"},"total_net_worth_max":{"type":["null","string"],"description":"Monetary string.","example":"200000"},"investment_experience":{"type":["null","string"],"description":"Overall: NONE, LIMITED, MODERATE, EXTENSIVE.","example":"EXTENSIVE"},"investment_objective":{"type":["null","string"],"description":"GROWTH, INCOME, SPECULATION, PRESERVATION, OTHER.","example":"SPECULATION"},"time_horizon":{"type":["null","string"],"description":"SHORT, MEDIUM, LONG, VERY_LONG.","example":"MEDIUM"},"tax_bracket":{"type":["null","string"],"description":"Tax bracket: 0_15, 16_25, 26_30, 31_35, 35_PLUS.","example":"0_15"},"risk_tolerance":{"type":["null","string"],"description":"CONSERVATIVE, MODERATELY_CONSERVATIVE, MODERATE, MODERATELY_AGGRESSIVE, SIGNIFICANT_RISK.","example":"MODERATE"},"liquidity_needs":{"type":["null","string"],"description":"VERY_IMPORTANT, IMPORTANT, SOMEWHAT_IMPORTANT, DOES_NOT_MATTER.","example":"false"},"annual_expenses":{"type":["null","string"],"description":"Range code (e.g., \"0_50000\"). Use reference-data endpoint.","example":""},"special_expenses":{"type":["null","string"],"description":"Range code for non-recurring expenses."},"special_expenses_timeframe":{"type":["null","string"],"description":"WITHIN_2_YEARS, THREE_TO_FIVE_YEARS, SIX_TO_TEN_YEARS."},"number_of_dependents":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"description":"Number of dependents (0-99).","format":"int32","example":3},"non_resident_alien":{"type":["null","boolean"],"description":"True if non-US person (W-8BEN applicable)."},"w8_form_type":{"type":["null","string"],"description":"W-8BEN, W-8BEN-E, W-8ECI, W-8IMY."},"w8_submission_date":{"type":["null","string"],"description":"W-8 submission date (YYYY-MM-DD)."},"w8_expiration_date":{"type":["null","string"],"description":"W-8 expiration date (YYYY-MM-DD)."},"w8_exempt":{"type":["null","string"],"description":"W-8 exemption indicator.","example":""},"w9_certified":{"type":["null","boolean"],"description":"True if W-9 certification completed."},"w9_certified_date":{"type":["null","string"],"description":"W-9 certification date (YYYY-MM-DD)."},"backup_withholding":{"type":["null","boolean"],"description":"True if subject to backup withholding."},"investment_experience_detail":{"type":["null","array"],"items":{"$ref":"#/components/schemas/InvestmentExperienceDetail"},"description":"Per-asset-class investment experience (FINRA NAF Section 2G)."},"tax_lot_method":{"type":["null","string"],"description":"Tax lot accounting method: FIFO (default), LIFO, AVG_COST. Defaults to FIFO per IRS rules.","example":"LIFO"},"option_level":{"type":["null","string"],"description":"Options trading level (0-5). Set by compliance based on experience and net worth.","example":"Covered Calls"},"advisor":{"type":["null","string"],"description":"Financial advisor name (for advisory accounts).","example":""},"dividend_reinvest":{"type":["null","boolean"],"description":"Dividend reinvestment: true to enroll in DRIP."},"kyc_status":{"type":["null","string"],"description":"KYC status: PENDING (default), APPROVED, REJECTED, REVIEW.","example":"PENDING"},"kyc_verification_id":{"type":["null","string"],"description":"Plaid identity verification session ID."},"kyc_verified_at":{"type":["null","string"],"description":"ISO 8601 timestamp of verification completion."}},"description":"CIP identity, financial profile, suitability, and tax certification.\nAligned with FINRA New Account Application sections 2-3."},"InvestmentExperienceDetail":{"type":"object","properties":{"assetClass":{"type":["null","string"],"description":"MUTUAL_FUNDS_ETFS, INDIVIDUAL_STOCKS, BONDS, OPTIONS, SECURITIES_FUTURES, ANNUITIES, ALTERNATIVES, MARGIN."},"years":{"type":["null","string"],"description":"NONE, ONE_TO_FIVE, OVER_FIVE."},"transactionsPerYear":{"type":["null","string"],"description":"ZERO_TO_FIVE, SIX_TO_FIFTEEN, OVER_FIFTEEN. Not applicable for MARGIN."}},"description":"Per-asset-class investment experience (FINRA NAF Section 2G).\nSubmit one entry per asset class the applicant has experience with."},"IraInfo":{"type":"object","properties":{"ira_type":{"type":["null","string"],"description":"IRA type: TRADITIONAL, ROTH, SEP, SIMPLE, ROLLOVER, INHERITED, EDUCATIONAL, SELF_DIRECTED, SPOUSAL, NONDEDUCTIBLE."},"distribution":{"type":["null","boolean"],"description":"Distribution: true/false."},"fed_tax_withholding":{"type":["null","boolean"],"description":"Federal tax withholding: true/false."},"frequency":{"type":["null","string"],"description":"Distribution frequency: DAILY, WEEKLY, BIWEEKLY, MONTHLY, QUARTERLY, SEMI_ANNUAL, ANNUAL."},"state":{"type":["null","string"],"description":"IRA state (2-letter code).","example":"IN"}},"description":"IRA account details. Required when account_type is IRA."},"JointAccountInfo":{"type":"object","properties":{"firstName":{"type":["null","string"],"description":"First name."},"middleName":{"type":["null","string"],"description":"Middle name."},"lastName":{"type":["null","string"],"description":"Last name."},"dateOfBirth":{"type":["null","string"],"description":"Date of birth (YYYY-MM-DD)."},"taxId":{"type":["null","string"],"description":"SSN or Tax ID."},"relationship":{"type":["null","string"],"description":"Relationship to primary: SPOUSE, PARENT, CHILD, SIBLING, OTHER."},"phone":{"type":["null","string"],"description":"Phone number."},"email":{"type":["null","string"],"description":"Email address."},"minor":{"type":["null","boolean"],"description":"Is co-applicant a minor?"},"jointType":{"type":["null","string"],"description":"Joint account type: JTWROS, TENANTS_IN_COMMON, COMMUNITY_PROPERTY, etc."},"address":{"type":["null","string"],"description":"Street address."},"city":{"type":["null","string"],"description":"City."},"state":{"type":["null","string"],"description":"State (2-letter code)."},"country":{"type":["null","string"],"description":"Country (ISO alpha-3)."},"postalCode":{"type":["null","string"],"description":"ZIP/postal code."},"idType":{"type":["null","string"],"description":"Gov't photo ID type: DRIVERS_LICENSE, PASSPORT, STATE_ID, OTHER_GOVERNMENT_ID."},"idNumber":{"type":["null","string"],"description":"Gov't photo ID number."},"idIssuingAuthority":{"type":["null","string"],"description":"Place/country of issuance."},"idIssueDate":{"type":["null","string"],"description":"ID issue date (YYYY-MM-DD)."},"idExpirationDate":{"type":["null","string"],"description":"ID expiration date (YYYY-MM-DD)."},"citizenship":{"type":["null","string"],"description":"Country of citizenship (ISO alpha-3)."},"taxCountry":{"type":["null","string"],"description":"Country of tax residence (ISO alpha-3)."},"taxIdType":{"type":["null","string"],"description":"Tax ID type: SSN, ITIN, EIN."},"employmentStatus":{"type":["null","string"],"description":"EMPLOYED, SELF_EMPLOYED, RETIRED, STUDENT, UNEMPLOYED."},"occupation":{"type":["null","string"],"description":"Occupation."},"employerName":{"type":["null","string"],"description":"Employer name."},"kycStatus":{"type":["null","string"],"description":"KYC status: PENDING, APPROVED, REJECTED, REVIEW."},"kycVerificationId":{"type":["null","string"],"description":"Plaid verification ID."}},"description":"Joint account co-applicant information. Required when account_type is JOINT.\nThe co-applicant undergoes the same CIP verification as the primary applicant."},"MarginCallByBucket":{"type":"object","properties":{"bucket":{"type":["null","string"]},"count":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"total_remaining":{"type":["null","string"]}}},"MarginCallByType":{"type":"object","properties":{"call_type":{"type":["null","string"]},"count":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"total_remaining":{"type":["null","string"]}}},"MarginCallResponse":{"type":"object","properties":{"call_id":{"type":["null","string"],"description":"External identifier (coredera.call_log.call_log_identifier — VARCHAR(50))."},"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"call_type":{"type":["null","string"],"description":"Reg T / Maintenance / Day Trading / House / Fed (lookup_value-driven)."},"call_status":{"type":["null","string"],"description":"Open / Partial / Close / New (lookup_value-driven)."},"original_amount":{"type":["null","string"]},"remaining_amount":{"type":["null","string"]},"satisfied_amount":{"type":["null","string"]},"opened_at":{"type":["null","string"],"description":"ISO date when the call opened (call_log.date)."},"due_date":{"type":["null","string"],"description":"ISO date by which the call must be satisfied — computed in SQL as\n`opened_at + cure_days` where `cure_days` comes from the\noperator-managed `coredera.margin_call_cure_window` settings.\nNull when no setting exists for the call type yet."},"aging_days":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"description":"Days since the call opened — computed in SQL so all callers see the same value.","format":"int32"},"age_bucket":{"type":["null","string"],"description":"0-1 / 2-3 / 4-5 / 6-10 / 10+ — aging classification."},"currency":{"type":["null","string"],"description":"ISO 4217 currency code.","example":"USD"},"remarks":{"type":["null","string"]}},"description":"Open margin call detail. Sourced from coredera.call_log filtered to\ndelete_flag = 0 AND remaining_amount &gt; 0 (see CallLogMapper). Replaces\nthe rolled-up dollar figure exposed via string? BalanceResponse.OpenCalls\nwith per-call detail, type, and aging."},"MarginCallSummaryResponse":{"type":"object","properties":{"correspondent_identifier":{"type":"string"},"as_of":{"type":["null","string"]},"total_open_calls":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"total_remaining_amount":{"type":["null","string"]},"by_type":{"type":"array","items":{"$ref":"#/components/schemas/MarginCallByType"}},"by_aging_bucket":{"type":"array","items":{"$ref":"#/components/schemas/MarginCallByBucket"}}},"description":"Correspondent-level roll-up of open margin calls — totals plus a breakdown\nby call type and by aging bucket. Surfaces what a correspondent risk team\nneeds without paginating the full per-call list."},"MoneyMarketDistributionResponse":{"type":"object","properties":{"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"fund_id":{"type":["null","string"]},"symbol":{"type":["null","string"],"description":"Security ticker symbol. Must exist in the security master.","example":"AAPL"},"distribution_date":{"type":["null","string"],"description":"ISO date the distribution journal posted."},"period_start":{"type":["null","string"],"description":"First accrual day in this distribution period."},"period_end":{"type":["null","string"],"description":"Last accrual day in this distribution period."},"gross_amount":{"type":["null","string"],"description":"Total dividend gross before company / correspondent / customer split.","example":"17550.00"},"customer_amount":{"type":["null","string"],"description":"The amount actually paid to the customer."},"journal_number":{"type":["null","string"],"description":"Internal journal reference for back-office reconciliation."},"accrual_day_count":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"description":"Number of accrual days that rolled into this distribution.","format":"int32"}},"description":"One settled money-market distribution event. Returned by\n`GET /v2/accounts/{accountId}/money-market/distributions`."},"MoneyMarketFundResponse":{"type":"object","properties":{"fund_id":{"type":["null","string"],"description":"Stable opaque identifier (UUID-like). Use this in subsequent requests."},"symbol":{"type":["null","string"],"description":"Trading symbol of the fund (e.g. `GMOXX`).","example":"AAPL"},"name":{"type":["null","string"],"description":"Full legal name.","example":"John Doe"},"is_active":{"type":"boolean","description":"True when the fund is currently accepting sweep traffic."},"latest_seven_day_yield":{"type":["null","string"],"description":"Most recent annualized 7-day SEC yield. String to preserve full precision per\n    the v2 number-as-string convention."},"latest_dividend_factor":{"type":["null","string"],"description":"Most recent per-share daily dividend factor."},"latest_rate_date":{"type":["null","string"],"description":"ISO date the latest rate was published for. Null when no rate row exists yet."},"cutoff_time_et":{"type":["null","string"],"description":"Daily cutoff in US/Eastern (HH:mm:ss). Free credit posted after this rolls to next eligibility."},"sweep_min_amount":{"type":["null","string"],"description":"Sweep floor — below this free credit the engine logs SKIP_BELOW_MIN."},"sweep_delay_days":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"description":"Calendar days post-settlement before cash becomes sweep-eligible.","format":"int32"},"accrue_on_buy_day":{"type":"boolean","description":"True when same-day buyers earn that day's dividend."},"accrue_on_sell_day":{"type":"boolean","description":"True when same-day sellers earn that day's dividend."}},"description":"Public catalog row for a money-market fund the firm sponsors. Returned by\n`GET /v2/money-market/funds` and `GET /v2/money-market/funds/{fundId}`."},"MoneyMarketHoldingResponse":{"type":"object","properties":{"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"fund_id":{"type":["null","string"]},"symbol":{"type":["null","string"],"description":"Security ticker symbol. Must exist in the security master.","example":"AAPL"},"fund_name":{"type":["null","string"]},"shares_settled":{"type":["null","string"],"description":"Settled-date share count — the canonical \"shares I own\"."},"shares_trade_date":{"type":["null","string"],"description":"Trade-date share count. In the steady state this matches\n    string? MoneyMarketHoldingResponse.SharesSettled; differs on T+1 settlement days."},"market_value":{"type":["null","string"],"description":"Settled shares × latest close price."},"accrued_dividend":{"type":["null","string"],"description":"Sum of customer-side daily dividend accruals not yet distributed —\n    what the account is owed at the next monthly distribution."},"last_distribution_date":{"type":["null","string"],"description":"ISO date of the most recent distribution journal for this (account, fund)."}},"description":"One money-market holding for an account. Returned by\n`GET /v2/accounts/{accountId}/money-market`."},"MoneyMarketSweepEventResponse":{"type":"object","properties":{"sweep_event_id":{"type":["null","string"]},"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"fund_id":{"type":["null","string"],"description":"Null on `SKIP_NO_FUND` rows where the engine couldn't resolve a fund."},"symbol":{"type":["null","string"],"description":"Security ticker symbol. Must exist in the security master.","example":"AAPL"},"sweep_date":{"type":["null","string"]},"direction":{"type":["null","string"],"description":"`SWEEP` = customer cash → fund; `REDEEM` = fund → customer cash."},"amount":{"type":["null","string"],"description":"Null on SKIP_* events."},"decision":{"type":["null","string"],"description":"One of `EXECUTED`, `SKIP_OPTOUT`, `SKIP_NO_FUND`, `SKIP_BELOW_MIN`, `SKIP_NO_CASH`."},"decision_reason":{"type":["null","string"]},"free_credit_at_decision":{"type":["null","string"]},"triggered_by":{"type":["null","string"],"description":"`CRON`, `MANUAL`, `TRADE_ENTRY`, `WITHDRAWAL`."},"created_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of record creation.","example":"2024-01-15T14:30:00Z"}},"description":"One sweep decision. Returned by\n`GET /v2/accounts/{accountId}/money-market/sweep-events`."},"PaginatedResponseOfListOfAccountResponse":{"type":"object","properties":{"data":{"type":["null","array"],"items":{"$ref":"#/components/schemas/AccountResponse"}},"next_page_token":{"type":["null","string"]}}},"PaginatedResponseOfListOfActivityResponse":{"type":"object","properties":{"data":{"type":["null","array"],"items":{"$ref":"#/components/schemas/ActivityResponse"}},"next_page_token":{"type":["null","string"]}}},"PaginatedResponseOfListOfAssetResponse":{"type":"object","properties":{"data":{"type":["null","array"],"items":{"$ref":"#/components/schemas/AssetResponse"}},"next_page_token":{"type":["null","string"]}}},"PaginatedResponseOfListOfBalanceResponse":{"type":"object","properties":{"data":{"type":["null","array"],"items":{"$ref":"#/components/schemas/BalanceResponse"}},"next_page_token":{"type":["null","string"]}}},"PaginatedResponseOfListOfCashAccountViolationResponse":{"type":"object","properties":{"data":{"type":["null","array"],"items":{"$ref":"#/components/schemas/CashAccountViolationResponse"}},"next_page_token":{"type":["null","string"]}}},"PaginatedResponseOfListOfMarginCallResponse":{"type":"object","properties":{"data":{"type":["null","array"],"items":{"$ref":"#/components/schemas/MarginCallResponse"}},"next_page_token":{"type":["null","string"]}}},"PaginatedResponseOfListOfMoneyMarketDistributionResponse":{"type":"object","properties":{"data":{"type":["null","array"],"items":{"$ref":"#/components/schemas/MoneyMarketDistributionResponse"}},"next_page_token":{"type":["null","string"]}}},"PaginatedResponseOfListOfMoneyMarketSweepEventResponse":{"type":"object","properties":{"data":{"type":["null","array"],"items":{"$ref":"#/components/schemas/MoneyMarketSweepEventResponse"}},"next_page_token":{"type":["null","string"]}}},"PaginatedResponseOfListOfPositionBySymbolResponse":{"type":"object","properties":{"data":{"type":["null","array"],"items":{"$ref":"#/components/schemas/PositionBySymbolResponse"}},"next_page_token":{"type":["null","string"]}}},"PaginatedResponseOfListOfPositionResponse":{"type":"object","properties":{"data":{"type":["null","array"],"items":{"$ref":"#/components/schemas/PositionResponse"}},"next_page_token":{"type":["null","string"]}}},"PaginatedResponseOfListOfTradeResponse":{"type":"object","properties":{"data":{"type":["null","array"],"items":{"$ref":"#/components/schemas/TradeResponse"}},"next_page_token":{"type":["null","string"]}}},"PositionBySymbolResponse":{"type":"object","properties":{"symbol":{"type":["null","string"],"description":"Security ticker symbol. Must exist in the security master.","example":"AAPL"},"asset_id":{"type":["null","string"],"description":"Internal asset ID (optional, resolved from symbol if omitted)."},"cusip":{"type":["null","string"]},"isin":{"type":["null","string"]},"issuer_name":{"type":["null","string"]},"total_qty":{"type":["null","string"]},"long_qty":{"type":["null","string"]},"short_qty":{"type":["null","string"]},"total_market_value":{"type":["null","string"]},"total_cost_basis":{"type":["null","string"]},"weighted_avg_price":{"type":["null","string"]},"current_price":{"type":["null","string"]},"account_count":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"description":"Number of distinct accounts holding this symbol — concentration signal.","format":"int32"},"currency":{"type":["null","string"],"description":"ISO 4217 currency code.","example":"USD"},"price_as_of":{"type":["null","string"]}},"description":"Positions aggregated by symbol across all accounts under a correspondent.\nSourced from portal.v_correspondent_position_by_symbol (V23)."},"PositionResponse":{"type":"object","properties":{"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"asset_id":{"type":["null","string"],"description":"Internal asset ID (optional, resolved from symbol if omitted)."},"symbol":{"type":["null","string"],"description":"Security ticker symbol. Must exist in the security master.","example":"AAPL"},"issuer_name":{"type":["null","string"]},"side":{"type":["null","string"],"description":"Trade side. Valid values: BUY, SELL, SELL_SHORT, SELL_SHORT_EXEMPT","example":"BUY"},"qty":{"type":["null","string"],"description":"Quantity as a decimal string (supports fractional shares).","example":"100"},"qty_available":{"type":["null","string"]},"avg_entry_price":{"type":["null","string"]},"current_price":{"type":["null","string"]},"market_value":{"type":["null","string"]},"cost_basis":{"type":["null","string"]},"unrealized_pl":{"type":["null","string"]},"unrealized_plpc":{"type":["null","string"]},"cusip":{"type":["null","string"]},"isin":{"type":["null","string"]},"exchange":{"type":["null","string"],"description":"Exchange name filter (e.g. 'NYSE', 'NASDAQ', 'ARCA').","example":"NASDAQ"},"lastday_price":{"type":["null","string"]},"change_today":{"type":["null","string"]},"currency":{"type":["null","string"],"description":"ISO 4217 currency code.","example":"USD"},"price_as_of":{"type":["null","string"]}}},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["null","integer","string"],"description":"Account status filter. Typical values: SUBMITTED, APPROVED, REJECTED, ACTIVE, INACTIVE, ACCOUNT_CLOSED.","format":"int32","example":"APPROVED"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}}},"SubAccountRequest":{"type":"object","properties":{"sub_ac_name":{"type":"string"},"sub_ac_no":{"type":["null","string"]}}},"SubAccountResponse":{"type":"object","properties":{"id":{"type":"string"},"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"sub_ac_name":{"type":["null","string"]},"sub_ac_no":{"type":["null","string"]},"is_active":{"type":["null","boolean"]},"created_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of record creation.","example":"2024-01-15T14:30:00Z"},"updated_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of last update.","example":"2024-01-15T14:30:00Z"}}},"TokenRequest":{"type":"object","properties":{"grant_type":{"type":"string"},"client_id":{"type":["null","string"],"description":"API client identifier UUID.","example":"3d5ac7f3-4c2e-48c2-b5f8-a0e1c7d4f612"},"client_secret":{"type":["null","string"]},"refresh_token":{"type":["null","string"]}}},"TokenResponse":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string"},"expires_in":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"format":"int32"},"refresh_token":{"type":"string"}}},"TradableSecurityListResponse":{"type":"object","properties":{"securities":{"type":"array","items":{"$ref":"#/components/schemas/TradableSecurityResponse"}},"next_page_token":{"type":["null","string"],"description":"Opaque cursor for the next page; null when the current page is the last."},"total_count":{"pattern":"^-?(?:0|[1-9]\\d*)$","type":["integer","string"],"description":"Total row count across the full filtered set (not just this page). Useful for client-side cache sizing.","format":"int32"}},"description":"Paginated response envelope for GET /v2/reference-data/securities."},"TradableSecurityResponse":{"type":"object","properties":{"symbol":{"type":"string","description":"Ticker symbol (alphabetic, ≤6 chars; may contain a dot like \"BRK.B\").","example":"AAPL"},"cusip":{"type":["null","string"],"description":"9-character CUSIP. May be null for some ETFs / ADRs where the master lacks it."},"short_name":{"type":["null","string"],"description":"Short display name (e.g. \"APPLE INC\", \"SPDR S&amp;P 500 ETF TRUST\"). Already\ntrimmed server-side — no leading/trailing whitespace, internal runs of\nwhitespace collapsed to single spaces.","example":"APPLE INC"}},"description":"One row in GET /v2/reference-data/securities. Deliberately minimal —\nfour business fields and nothing else. No internal UUIDs, no\nupdated_at, no security_master_id. Vendors cache this list locally\nand index it by symbol."},"TradeFees":{"type":"object","properties":{"clearing_fee":{"type":["null","string"],"description":"Clearing fee (decimal string).","example":"0.00"},"commission1":{"type":["null","string"],"description":"Primary commission (decimal string).","example":"0.10"},"commission2":{"type":["null","string"],"description":"Secondary commission (decimal string).","example":"0.00"},"commission3":{"type":["null","string"],"description":"Tertiary commission (decimal string).","example":"0.00"},"ecn_fee":{"type":["null","string"],"description":"ECN / access fee.","example":"0.00"},"foreign_tax":{"type":["null","string"],"description":"Foreign transaction tax.","example":"0.00"},"other_clearing_fee":{"type":["null","string"],"description":"Other clearing fee (OCC option fee auto-calc may override).","example":"0.00"},"pfof":{"type":["null","string"],"description":"Payment for order flow received.","example":"0.00"}},"description":"Fees that can be set on a trade request. Regulatory fees (sec_fee, taf_fee)\nare NOT on this model — the portal auto-calculates those from SEC Rule 31\nand FINRA TAF rate tables and they would be overwritten if submitted. They\ndo appear on TradeFeesResponse so vendors can see the actual\ncalculated amounts after booking."},"TradeFeesResponse":{"type":"object","properties":{"clearing_fee":{"type":["null","string"],"description":"Clearing fee (decimal string).","example":"0.00"},"commission1":{"type":["null","string"],"description":"Primary commission (decimal string).","example":"0.10"},"commission2":{"type":["null","string"],"description":"Secondary commission (decimal string).","example":"0.00"},"commission3":{"type":["null","string"],"description":"Tertiary commission (decimal string).","example":"0.00"},"ecn_fee":{"type":["null","string"],"description":"ECN / access fee.","example":"0.00"},"foreign_tax":{"type":["null","string"],"description":"Foreign transaction tax.","example":"0.00"},"other_clearing_fee":{"type":["null","string"],"description":"Other clearing fee (OCC option fee auto-calc may override).","example":"0.00"},"pfof":{"type":["null","string"],"description":"Payment for order flow received.","example":"0.00"},"sec_fee":{"type":["null","string"],"description":"Server-calculated SEC Section 31 fee. Not settable on input.","example":"0.01"},"taf_fee":{"type":["null","string"],"description":"Server-calculated FINRA Trading Activity Fee. Not settable on input.","example":"0.01"}},"description":"Fees returned on a trade response. Includes the server-calculated regulatory\nfees (sec_fee, taf_fee) so the vendor sees exactly what was charged."},"TradeRequest":{"type":"object","properties":{"symbol":{"type":"string","description":"Security ticker symbol. Must exist in the security master.","example":"AAPL"},"qty":{"type":"string","description":"Quantity as a decimal string (supports fractional shares).","example":"100"},"side":{"type":"string","description":"Trade side. Valid values: BUY, SELL, SELL_SHORT, SELL_SHORT_EXEMPT","example":"BUY"},"price":{"type":"string","description":"Execution price per share, as a decimal string.","example":"175.50"},"trade_date":{"type":"string","description":"Trade date (YYYY-MM-DD).","example":"2024-01-15"},"settlement_date":{"type":"string","description":"Settlement date (YYYY-MM-DD). Optional — when omitted the server derives a business-day T+N date (`securities.settlement_days`, default T+1) advanced over the company holiday calendar (the `holidays` table); it is NOT a naive calendar +1. Supply explicitly for non-regular-way settlement (T+0 cash, DTC Fail, Velocity, etc.) — a supplied value is feed-authoritative and stored verbatim.","example":"2024-01-16"},"execution_datetime":{"type":["null","string"],"description":"Exact execution timestamp in ISO 8601 with timezone marker. Both `Z` (UTC) and explicit offsets like `-04:00` are accepted; portal normalizes to UTC before forwarding. Read responses always echo UTC with the `Z` suffix. Required for CAT/OATS reporting.","example":"2024-01-15T14:30:00Z"},"gross_amount":{"type":"string","description":"Gross amount (qty × price), decimal string.","example":"17550.00"},"net_amount":{"type":"string","description":"Net amount after fees, decimal string.","example":"17545.00"},"capacity":{"type":"string","description":"Trade capacity. Valid values: AGENCY, PRINCIPAL, RISKLESS_PRINCIPAL, MIXED.","example":"AGENCY"},"executing_broker":{"type":"string","description":"Executing broker MPID. See `GET /v2/reference-data/trading` for valid brokers.","example":"NITE"},"executed_exchange":{"type":"string","description":"Execution venue. Name, MIC code, or `OFF_EXCHANGE` for off-exchange prints. See `GET /v2/reference-data/trading`.","example":"NASDAQ"},"contra_broker":{"type":["null","string"],"description":"Contra broker MPID (optional).","example":""},"blotter":{"type":"string","description":"Blotter name or code for trade grouping. Free-form; some correspondents use regional/desk codes (e.g. 'BLOT-USEQ-001') while others leave it empty.","example":"BLOT-USEQ-001"},"contra_account":{"type":["null","string"],"description":"UUID of the contra-side account for internal crosses. Omit or send null for externally-cleared trades.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"settlement_type":{"type":["null","string"],"description":"Non-standard settlement code. Valid values: 'DTC', 'DTC Fail', 'Balance Open', 'Obligation Warehouse', 'Velocity'. Send null for regular-way settlement."},"solicited":{"type":["null","boolean"],"description":"True if the trade was solicited by a rep.","example":false},"source_of_entry":{"type":["null","string"]},"client_trade_id":{"type":["null","string"],"description":"Vendor's own trade ID (up to 100 chars). Used for idempotency — duplicate IDs are rejected.","example":"CLIENT-123456"},"rep_code":{"type":["null","string"],"description":"Rep code string (e.g. 'JD01'). See `GET /v2/reference-data/rep-codes` for valid values. Optional — omit or send empty string to leave unassigned.","example":"JD01"},"office_number":{"type":["null","string"]},"currency":{"type":["null","string"],"description":"ISO 4217 currency code.","example":"USD"},"currency_rate":{"type":["null","string"],"description":"FX rate to USD. Defaults to 1.0 for USD trades.","example":1},"accrued_interest":{"type":["null","string"],"description":"Accrued interest on fixed-income trades, as a decimal string. Send '0.00' (or null) for equity trades where it doesn't apply.","example":"0.00"},"yield":{"type":["null","string"],"description":"Yield for fixed-income trades."},"yield_type":{"type":["null","string"],"description":"Yield type for fixed-income trades."},"short_sale_exempt":{"type":["null","boolean"]},"locate_id":{"type":["null","string"]},"locate_source":{"type":["null","string"]},"order_capacity":{"type":["null","string"]},"time_in_force":{"type":["null","string"],"description":"Time in force. Valid values: DAY, GTC (good-till-canceled), IOC (immediate-or-cancel), FOK (fill-or-kill).","example":"DAY"},"order_type":{"type":["null","string"],"description":"Order type. Valid values: MARKET, LIMIT, STOP, STOP_LIMIT.","example":"LIMIT"},"limit_price":{"type":["null","string"],"description":"Limit price (required when order_type=LIMIT or STOP_LIMIT).","example":"175.50"},"execution_venue":{"type":["null","string"],"description":"MIC code of the execution venue (e.g. 'XNAS' for NASDAQ, 'XNYS' for NYSE, 'ARCX' for NYSE Arca). Null for OFF_EXCHANGE trades.","example":"XNAS"},"average_price_indicator":{"type":["null","boolean"]},"average_price_group_id":{"type":["null","string"],"description":"Grouping ID linking multiple executions that together form a single average-priced trade. Required when average_price_indicator=true; null otherwise.","example":"APG-20260422-AAPL"},"as_of_indicator":{"type":["null","boolean"]},"as_of_original_trade_date":{"type":["null","string"],"description":"Original trade date (YYYY-MM-DD) for an as-of trade booking. Required when as_of_indicator=true; null otherwise.","example":"2026-04-20"},"step_out_indicator":{"type":["null","boolean"]},"give_up_firm":{"type":["null","string"]},"open_close":{"type":["null","string"],"description":"Whether the trade opens or closes an options position. Valid values: 'OPEN', 'CLOSE'. Applies to options only — leave null for equity trades.","example":"OPEN"},"covered_indicator":{"type":["null","boolean"]},"market_maker_indicator":{"type":["null","boolean"]},"directed_order_indicator":{"type":["null","boolean"]},"program_trade_indicator":{"type":["null","boolean"]},"large_trader_id":{"type":["null","string"],"description":"SEC Large Trader ID (Rule 13h-1) if the customer is a registered large trader. Null otherwise.","example":"LT-1234567"},"algo_id":{"type":["null","string"]},"special_handling_codes":{"type":["null","array"],"items":{"type":"string"},"description":"CAT reportable special-handling codes. Array of strings. Typical values: 'NONE', 'RESERVE', 'MANUAL', 'TRAINING', 'ERROR'. Send ['NONE'] or omit for standard executions.","example":["NONE"]},"settlement_location":{"type":["null","string"]},"dvp_indicator":{"type":["null","boolean"]},"custodian_id":{"type":["null","string"],"description":"UUID of the custodian/agent bank for institutional DVP settlement. Null for retail trades.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"correction_indicator":{"type":["null","string"],"description":"Correction type. Valid values: NEW (default), CANCEL, CORRECT, AS_OF. Send null for normal new trades."},"original_trade_id":{"type":["null","string"],"description":"Trade ID (UUID) being corrected/cancelled. Required when correction_indicator is CANCEL or CORRECT; send null otherwise.","example":"64b78fb9-92a7-c377-6567-d34c14492660"},"trailer":{"type":["null","string"],"description":"Optional order grouping trailer (free text)."},"bunch_order_number":{"type":["null","string"],"description":"Bunched order number if this trade is part of a block. Null for non-bunched trades.","example":"BUNCH-20260422-001"},"fees":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TradeFees"}]}},"description":"Trade submission request. Portal maps this to the\nJava trading service's Transaction DTO format."},"TradeResponse":{"type":"object","properties":{"id":{"type":"string"},"client_trade_id":{"type":["null","string"],"description":"Vendor's own trade ID (up to 100 chars). Used for idempotency — duplicate IDs are rejected.","example":"CLIENT-123456"},"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"symbol":{"type":["null","string"],"description":"Security ticker symbol. Must exist in the security master.","example":"AAPL"},"asset_id":{"type":["null","string"],"description":"Internal asset ID (optional, resolved from symbol if omitted)."},"qty":{"type":["null","string"],"description":"Quantity as a decimal string (supports fractional shares).","example":"100"},"side":{"type":["null","string"],"description":"Trade side. Valid values: BUY, SELL, SELL_SHORT, SELL_SHORT_EXEMPT","example":"BUY"},"price":{"type":["null","string"],"description":"Execution price per share, as a decimal string.","example":"175.50"},"status":{"type":["null","string"],"description":"Account status filter. Typical values: SUBMITTED, APPROVED, REJECTED, ACTIVE, INACTIVE, ACCOUNT_CLOSED.","example":"APPROVED"},"trade_date":{"type":["null","string"],"description":"Trade date (YYYY-MM-DD).","example":"2024-01-15"},"settlement_date":{"type":["null","string"],"description":"Settlement date (YYYY-MM-DD). Optional — when omitted the server derives a business-day T+N date (`securities.settlement_days`, default T+1) advanced over the company holiday calendar (the `holidays` table); it is NOT a naive calendar +1. Supply explicitly for non-regular-way settlement (T+0 cash, DTC Fail, Velocity, etc.) — a supplied value is feed-authoritative and stored verbatim.","example":"2024-01-16"},"execution_datetime":{"type":["null","string"],"description":"Execution timestamp, normalized to UTC ISO 8601 (with `Z` suffix).\nIf the vendor submitted `-07:00` or similar offset, this echoes\nthe equivalent UTC instant, not the submitted string — so the vendor\ncan verify timezone normalization worked as intended.","example":"2024-01-15T14:30:00Z"},"gross_amount":{"type":["null","string"],"description":"Gross amount (qty × price), decimal string.","example":"17550.00"},"net_amount":{"type":["null","string"],"description":"Net amount after fees, decimal string.","example":"17545.00"},"capacity":{"type":["null","string"],"description":"Trade capacity. Valid values: AGENCY, PRINCIPAL, RISKLESS_PRINCIPAL, MIXED.","example":"AGENCY"},"trade_number":{"type":["null","string"]},"journal_number":{"type":["null","string"]},"executing_broker":{"type":["null","string"],"description":"Executing broker MPID. See `GET /v2/reference-data/trading` for valid brokers.","example":"NITE"},"executed_exchange":{"type":["null","string"],"description":"Execution venue. Name, MIC code, or `OFF_EXCHANGE` for off-exchange prints. See `GET /v2/reference-data/trading`.","example":"NASDAQ"},"contra_broker":{"type":["null","string"],"description":"Contra broker MPID (optional).","example":""},"blotter":{"type":["null","string"],"description":"Blotter name or code for trade grouping. Free-form; some correspondents use regional/desk codes (e.g. 'BLOT-USEQ-001') while others leave it empty.","example":"BLOT-USEQ-001"},"contra_account":{"type":["null","string"],"description":"UUID of the contra-side account for internal crosses. Omit or send null for externally-cleared trades.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"settlement_type":{"type":["null","string"],"description":"Non-standard settlement code. Valid values: 'DTC', 'DTC Fail', 'Balance Open', 'Obligation Warehouse', 'Velocity'. Send null for regular-way settlement."},"solicited":{"type":["null","boolean"],"description":"True if the trade was solicited by a rep.","example":false},"source_of_entry":{"type":["null","string"]},"rep_code":{"type":["null","string"],"description":"Rep code string (e.g. 'JD01'). See `GET /v2/reference-data/rep-codes` for valid values. Optional — omit or send empty string to leave unassigned.","example":"JD01"},"office_number":{"type":["null","string"]},"currency":{"type":["null","string"],"description":"ISO 4217 currency code.","example":"USD"},"currency_rate":{"type":["null","string"],"description":"FX rate to USD. Defaults to 1.0 for USD trades.","example":1},"accrued_interest":{"type":["null","string"],"description":"Accrued interest on fixed-income trades, as a decimal string. Send '0.00' (or null) for equity trades where it doesn't apply.","example":"0.00"},"yield":{"type":["null","string"],"description":"Yield for fixed-income trades."},"yield_type":{"type":["null","string"],"description":"Yield type for fixed-income trades."},"short_sale_exempt":{"type":["null","boolean"]},"locate_id":{"type":["null","string"]},"locate_source":{"type":["null","string"]},"order_capacity":{"type":["null","string"]},"time_in_force":{"type":["null","string"],"description":"Time in force. Valid values: DAY, GTC (good-till-canceled), IOC (immediate-or-cancel), FOK (fill-or-kill).","example":"DAY"},"order_type":{"type":["null","string"],"description":"Order type. Valid values: MARKET, LIMIT, STOP, STOP_LIMIT.","example":"LIMIT"},"limit_price":{"type":["null","string"],"description":"Limit price (required when order_type=LIMIT or STOP_LIMIT).","example":"175.50"},"execution_venue":{"type":["null","string"],"description":"MIC code of the execution venue (e.g. 'XNAS' for NASDAQ, 'XNYS' for NYSE, 'ARCX' for NYSE Arca). Null for OFF_EXCHANGE trades.","example":"XNAS"},"average_price_indicator":{"type":["null","boolean"]},"average_price_group_id":{"type":["null","string"],"description":"Grouping ID linking multiple executions that together form a single average-priced trade. Required when average_price_indicator=true; null otherwise.","example":"APG-20260422-AAPL"},"as_of_indicator":{"type":["null","boolean"]},"as_of_original_trade_date":{"type":["null","string"],"description":"Original trade date (YYYY-MM-DD) for an as-of trade booking. Required when as_of_indicator=true; null otherwise.","example":"2026-04-20"},"step_out_indicator":{"type":["null","boolean"]},"give_up_firm":{"type":["null","string"]},"open_close":{"type":["null","string"],"description":"Whether the trade opens or closes an options position. Valid values: 'OPEN', 'CLOSE'. Applies to options only — leave null for equity trades.","example":"OPEN"},"covered_indicator":{"type":["null","boolean"]},"market_maker_indicator":{"type":["null","boolean"]},"directed_order_indicator":{"type":["null","boolean"]},"program_trade_indicator":{"type":["null","boolean"]},"large_trader_id":{"type":["null","string"],"description":"SEC Large Trader ID (Rule 13h-1) if the customer is a registered large trader. Null otherwise.","example":"LT-1234567"},"algo_id":{"type":["null","string"]},"special_handling_codes":{"type":["null","array"],"items":{"type":"string"},"description":"CAT reportable special-handling codes. Array of strings. Typical values: 'NONE', 'RESERVE', 'MANUAL', 'TRAINING', 'ERROR'. Send ['NONE'] or omit for standard executions.","example":["NONE"]},"settlement_location":{"type":["null","string"]},"dvp_indicator":{"type":["null","boolean"]},"custodian_id":{"type":["null","string"],"description":"UUID of the custodian/agent bank for institutional DVP settlement. Null for retail trades.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"correction_indicator":{"type":["null","string"],"description":"Correction type. Valid values: NEW (default), CANCEL, CORRECT, AS_OF. Send null for normal new trades."},"original_trade_id":{"type":["null","string"],"description":"Trade ID (UUID) being corrected/cancelled. Required when correction_indicator is CANCEL or CORRECT; send null otherwise.","example":"64b78fb9-92a7-c377-6567-d34c14492660"},"trailer":{"type":["null","string"],"description":"Optional order grouping trailer (free text)."},"bunch_order_number":{"type":["null","string"],"description":"Bunched order number if this trade is part of a block. Null for non-bunched trades.","example":"BUNCH-20260422-001"},"created_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of record creation.","example":"2024-01-15T14:30:00Z"},"updated_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of last update.","example":"2024-01-15T14:30:00Z"},"fees":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/TradeFeesResponse"}]}},"description":"Trade submission response. Every field the vendor can set on\nTradeRequest is echoed back here so the caller can\nverify what the server actually accepted and persisted. Fields the\nserver computed or overrode (net_amount, settlement_date when auto-\ncalc fired, execution_datetime normalized to UTC) reflect the stored\ntruth, not the submitted value.\n\nThe GET /trades (list) path populates only the subset that's\navailable from the portal.v_trade_activity view — advanced trade\nfields will be null on list responses until the view is expanded.\nNull fields are omitted from the JSON via the\n`DefaultIgnoreCondition = WhenWritingNull` policy in Program.cs."},"TrustedContactInfo":{"type":"object","properties":{"givenName":{"type":["null","string"],"description":"First name."},"familyName":{"type":["null","string"],"description":"Last name."},"emailAddress":{"type":["null","string"],"description":"Email address."},"phone":{"type":["null","string"],"description":"Phone number with country code."},"relationship":{"type":["null","string"],"description":"Relationship: SPOUSE, PARENT, CHILD, SIBLING, OTHER."},"addressLine1":{"type":["null","string"],"description":"Street address."},"city":{"type":["null","string"],"description":"City."},"state":{"type":["null","string"],"description":"State (2-letter code)."},"postalCode":{"type":["null","string"],"description":"ZIP/postal code."},"country":{"type":["null","string"],"description":"Country (ISO alpha-3)."}},"description":"Trusted contact person (FINRA Rule 4512).\nAuthorized to be contacted regarding the account holder's well-being."},"TrustedContactRequest":{"type":"object","properties":{"name":{"type":"string","description":"Full legal name.","example":"John Doe"},"relationship":{"type":["null","string"],"description":"Relationship to the primary account holder (e.g. 'Spouse', 'Child', 'Parent', 'Sibling').","example":"Spouse"},"phone":{"type":["null","string"],"description":"Phone number (US format typical).","example":"234-567-8910"},"email":{"type":["null","string"],"description":"Email address. RFC 5322 format.","example":"john.doe@example.com"},"address_line1":{"type":["null","string"],"description":"First line of the street address.","example":"123 Main Street"},"city":{"type":["null","string"],"description":"City name (free text).","example":"Paoli"},"state":{"type":["null","string"],"description":"2-letter state/province code. Must be valid for the selected country. See `GET /v2/reference-data/countries/{country}/states` for valid values.","example":"IN"},"country":{"type":["null","string"],"description":"ISO 3166-1 alpha-3 country code (e.g. 'USA', 'CAN', 'GBR'). See `GET /v2/reference-data/countries` for valid values.","example":"USA"},"postal_code":{"type":["null","string"],"description":"ZIP / postal code.","example":"46001"}}},"TrustedContactResponse":{"type":"object","properties":{"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"name":{"type":["null","string"],"description":"Full legal name.","example":"John Doe"},"relationship":{"type":["null","string"],"description":"Relationship to the primary account holder (e.g. 'Spouse', 'Child', 'Parent', 'Sibling').","example":"Spouse"},"tcp_status":{"type":["null","string"]},"phone":{"type":["null","string"],"description":"Phone number (US format typical).","example":"234-567-8910"},"email":{"type":["null","string"],"description":"Email address. RFC 5322 format.","example":"john.doe@example.com"},"address_line1":{"type":["null","string"],"description":"First line of the street address.","example":"123 Main Street"},"city":{"type":["null","string"],"description":"City name (free text).","example":"Paoli"},"state":{"type":["null","string"],"description":"2-letter state/province code. Must be valid for the selected country. See `GET /v2/reference-data/countries/{country}/states` for valid values.","example":"IN"},"country":{"type":["null","string"],"description":"ISO 3166-1 alpha-3 country code (e.g. 'USA', 'CAN', 'GBR'). See `GET /v2/reference-data/countries` for valid values.","example":"USA"},"postal_code":{"type":["null","string"],"description":"ZIP / postal code.","example":"46001"},"created_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of record creation.","example":"2024-01-15T14:30:00Z"},"updated_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of last update.","example":"2024-01-15T14:30:00Z"}}},"WebhookCreateRequest":{"type":"object","properties":{"url":{"type":"string"},"secret":{"type":["null","string"]},"events":{"type":"array","items":{"type":"string"}}}},"WebhookResponse":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"is_active":{"type":"boolean"},"created_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of record creation.","example":"2024-01-15T14:30:00Z"}}},"WireInstructionRequest":{"type":"object","properties":{"bank_name":{"type":"string"},"bank_aba":{"type":["null","string"]},"bank_swift":{"type":["null","string"]},"bank_address":{"type":["null","string"]},"intermediary_bank_name":{"type":["null","string"]},"intermediary_swift":{"type":["null","string"]},"intermediary_aba":{"type":["null","string"]},"beneficiary_name":{"type":"string"},"beneficiary_account":{"type":"string"},"beneficiary_address":{"type":["null","string"]},"ffc_name":{"type":["null","string"]},"ffc_account":{"type":["null","string"]},"instruction_type":{"type":["null","string"]},"notes":{"type":["null","string"]}}},"WireInstructionResponse":{"type":"object","properties":{"id":{"type":"string"},"account_id":{"type":["null","string"],"description":"Account identifier UUID.","example":"b2041a44-8e18-37c5-8f47-8b7a24841c79"},"bank_name":{"type":["null","string"]},"bank_aba":{"type":["null","string"]},"bank_swift":{"type":["null","string"]},"bank_address":{"type":["null","string"]},"intermediary_bank_name":{"type":["null","string"]},"intermediary_swift":{"type":["null","string"]},"intermediary_aba":{"type":["null","string"]},"beneficiary_name":{"type":["null","string"]},"beneficiary_account":{"type":["null","string"]},"beneficiary_address":{"type":["null","string"]},"ffc_name":{"type":["null","string"]},"ffc_account":{"type":["null","string"]},"instruction_type":{"type":["null","string"]},"status":{"type":["null","string"],"description":"Account status filter. Typical values: SUBMITTED, APPROVED, REJECTED, ACTIVE, INACTIVE, ACCOUNT_CLOSED.","example":"APPROVED"},"title_match_verified":{"type":["null","boolean"]},"notes":{"type":["null","string"]},"created_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of record creation.","example":"2024-01-15T14:30:00Z"},"updated_at":{"type":["null","string"],"description":"ISO 8601 UTC timestamp of last update.","example":"2024-01-15T14:30:00Z"}}}}},"tags":[{"name":"OAuth","description":"OAuth 2.0 `client_credentials` authentication. Use **POST /v2/oauth/token** to obtain an access token and **POST /v2/oauth/refresh** to refresh it."},{"name":"Accounts","description":"List and retrieve accounts. Supports cursor-based pagination and status / date-range filtering. Results are scope-filtered to the client's assigned accounts.\n\n### List Filters\n\n| Parameter        | Type   | Description                                                                                             |\n|------------------|--------|---------------------------------------------------------------------------------------------------------|\n| `status`         | string | Alpaca-aligned lifecycle state. Common: `SUBMITTED`, `ACTION_REQUIRED`, `APPROVED`, `ACTIVE`, `REJECTED`, `ACCOUNT_CLOSED`. Full vocabulary accepted for forward compatibility. |\n| `created_after`  | string | ISO 8601 date/timestamp. **Inclusive** (`>=`).                                                          |\n| `created_before` | string | ISO 8601 date/timestamp. **Exclusive** (`<`). Adjacent ranges chain without overlap.                    |\n| `page_size`      | int    | Default 100, max 1000                                                                                   |\n| `page_token`     | string | Cursor from a prior response                                                                            |\n\n### Lifecycle\n\nAccount `status` follows the Alpaca Broker API vocabulary (11 states). `POST /v2/accounts` creates directly in `SUBMITTED`; compliance transitions happen out-of-band. `POST /v2/accounts/{id}/close` transitions to the terminal `ACCOUNT_CLOSED`.\n\n### Block Flags (V30)\n\nEvery account response carries four Alpaca-style block flags plus the Coredera-specific `liquidation_only` mode:\n\n| Field                     | Meaning                                                                  |\n|---------------------------|--------------------------------------------------------------------------|\n| `account_blocked`         | Cannot place orders OR transfers. Most severe.                           |\n| `trading_blocked`         | Cannot place orders. Transfers may still be allowed.                     |\n| `transfers_blocked`       | Cannot initiate ACH or wire transfers.                                   |\n| `liquidation_only`        | Only orders that REDUCE existing exposure are accepted (no buys, no opening short sells). |\n| `*_reason`                | Human-readable reason populated when the matching flag is `true`.        |\n\nEnforcement happens at order entry (trading service) and transfer entry (account service) — vendors can read the flags here and pre-validate UI, but the server is authoritative.\n\n### Margin Calls\n\nPer-account open margin calls and roll-up summary:\n\n| Endpoint                                              | Description                                                              |\n|-------------------------------------------------------|--------------------------------------------------------------------------|\n| `GET /v2/accounts/{id}/margin-calls`                  | Paginated list of open calls (Reg T / Fed / Maintenance / House / Day Trading) with `due_date`, `aging_days`, `age_bucket`. Filter by `call_type`. |\n| `GET /v2/accounts/{id}/margin-calls/summary`          | Live roll-up: total open count + by_type + by_aging_bucket. SUMs `call_log` at query time, so always current. |\n\n`due_date` is computed as `opened_at + cure_days(call_type)` from the operator-managed `coredera.margin_call_cure_window` settings table — change a cure window in the maintenance UI and every open call's due_date updates on the next request.\n\n### Cash Account Violations\n\nReg T 220.8 free-ride / GFV / cash-liquidation events that drive 90-Day Cash Only restrictions (distinct from margin calls — different lifecycle, separate table):\n\n| Endpoint                                                 | Description                                                              |\n|----------------------------------------------------------|--------------------------------------------------------------------------|\n| `GET /v2/accounts/{id}/cash-account-violations`          | Paginated list — `violation_type` (`FREE_RIDING` / `GFV` / `CASH_LIQUIDATION`), `restriction_applied` (`NONE` / `WARNING` / `90_DAY_FREEZE`), `restriction_start_date`, `restriction_end_date`, `is_active_restriction`, `days_remaining`. Filter by `violation_type` or `active_only=true`. |\n| `GET /v2/accounts/{id}/cash-account-violations/summary`  | Live roll-up — `has_active_restriction`, `active_restriction` (strongest), `active_days_remaining`, plus counts by violation type. |\n\nThe Balance API surfaces the strongest active restriction (`cash_account_restriction` field) so vendors can detect 90-Day Cash Only state from a single Balance call."},{"name":"Account Creation","description":"Create new brokerage accounts via **POST /v2/accounts**.\n\n### Required Fields\n\n| Field            | Type   | Description                                                                       |\n|------------------|--------|-----------------------------------------------------------------------------------|\n| `account_type`   | string | `INDIVIDUAL`, `JOINT`, `CORPORATE`, `TRUST`, `IRA`, `UGMA_UTMA`, `PARTNERSHIP`, `LIMITED_PARTNERSHIP`, `LLP`, `LLLP`, `LLC`, `S_CORP`, `SOLE_PROPRIETORSHIP`, `PROFESSIONAL_CORPORATION`, `DBA` |\n| `correspondent`  | string | Code, name, MPID, or UUID -- see GET /v2/reference-data/correspondents             |\n| `company`        | string | Code, name, or UUID -- see GET /v2/reference-data/companies                        |\n\nFor US-person identities (`identity.non_resident_alien != true`), also required: `identity.given_name`, `identity.family_name`, `identity.tax_id`, `identity.tax_id_type`, `identity.tax_lot_method`. For non-resident aliens, only given_name and family_name are required; tax fields are covered by the W-8BEN workflow.\n\n### Optional Fields (Top-Level)\n\n| Field              | Type   | Description                                                                    |\n|--------------------|--------|--------------------------------------------------------------------------------|\n| `account_sub_type` | string | Clearing type: `CASH` (default), `MARGIN`, `DVP`, `OMNIBUS`, `CASH_TRANSFER`, `CASH_SAFEKEEPING`, `MARGIN_DAY_TRADER`, `MARGIN_PORTFOLIO`. IRA accounts default to `CASH`. |\n| `fpl_opt_in`       | bool   | Opt in to Fully Paid Lending (SEC 15c3-3 / FINRA 4330)                         |\n| `sweep_indicator`  | bool   | Opt into cash sweep program                                                    |\n| `rep_code`         | string | Registered rep code (e.g. `JD01`). Resolved server-side; no default             |\n| `office`           | string | Office/branch number (e.g. `001`). Resolved server-side; no default             |\n| `account_name`     | string | Display name; auto-generated from `identity.given_name + family_name` if omitted |\n| `fdid_ccid`        | string | CAT/OATS regulatory identifier                                                 |\n\n### Identity Highlights\n\n| Field                    | Type   | Description                                                  |\n|--------------------------|--------|--------------------------------------------------------------|\n| `tax_id_type`            | string | `SSN`, `ITIN`, `EIN`                                         |\n| `tax_lot_method`         | string | `FIFO`, `LIFO`, `AVG_COST`, `SPECIFIC_ID` (1099 cost basis)  |\n| `country_of_citizenship` | string | ISO alpha-3 (default `USA`)                                  |\n| `country_of_tax_residence` | string | ISO alpha-3 (default `USA`)                                |\n| `country_of_birth`       | string | ISO alpha-3; persisted for CIP/CDD reporting                 |\n| `non_resident_alien`     | bool   | Set `true` for NRA flow; pairs with `w8_form_type`, etc.     |\n| `investment_experience`  | string | `NONE`, `LIMITED`, `MODERATE`, `EXTENSIVE`                   |\n| `investment_objective`   | string | `GROWTH`, `INCOME`, `SPECULATION`, `PRESERVATION`, `OTHER`   |\n| `time_horizon`           | string | `SHORT`, `MEDIUM`, `LONG`, `VERY_LONG`                       |\n| `risk_tolerance`         | string | `CONSERVATIVE`, `MODERATELY_CONSERVATIVE`, `MODERATE`, `MODERATELY_AGGRESSIVE`, `SIGNIFICANT_RISK` |\n| `funding_source`         | string[] | `employment_income`, `investments`, `inheritance`, `business_income`, `savings`, `other`. Only first entry is stored. |\n\nUse **GET /v2/reference-data** for the full enumeration of every lookup-backed field. Unrecognized values are silently dropped (use `?dry_run=true` to see what the server resolved).\n\n### Disclosures\n\n| Field                              | Type | Description                                                   |\n|------------------------------------|------|---------------------------------------------------------------|\n| `is_control_person`                | bool | Director/officer/10%+ shareholder of a public company         |\n| `is_affiliated_exchange_or_finra`  | bool | FINRA Rule 3210 associated person (shared flag with `has_other_firm_accounts` -- see field docs) |\n| `is_politically_exposed`           | bool | PEP status                                                    |\n| `immediate_family_exposed`         | bool | Immediate family is a PEP                                     |\n| `employment_status`                | string | `EMPLOYED`, `SELF_EMPLOYED`, `RETIRED`, `STUDENT`, `UNEMPLOYED` |\n\n### Nested Sections (all optional at create time)\n\n- `contact` -- email, phone, street address\n- `identity` -- CIP + financial profile (required fields listed above)\n- `disclosures` -- regulatory affiliations + employment\n- `trusted_contact` -- FINRA Rule 4512 designee (can also be set via `PUT /v2/accounts/{id}/trusted-contact`)\n- `joint_account` -- co-applicant (required when `account_type` is `JOINT`)\n- `ira` -- IRA type + distribution preferences (required when `account_type` is `IRA`). `frequency` defaults to `ANNUAL` if omitted.\n- `confirms` / `statements` -- delivery preferences; setting `delivery_email` alone implies `delivery_type=EMAIL`\n- `associations[]` -- FINRA/exchange affiliations\n- `duplicate_statements[]` -- FINRA Rule 3210 duplicate recipients\n\n### What's Resolved Server-Side\n\nVendor-supplied strings are resolved via reference-data lookups before insert:\n\n- `correspondent` / `company` -- code/name/UUID -> ID\n- `rep_code` / `office` -- code -> ID\n- Country codes (ISO alpha-2 / alpha-3) -> country row\n- State codes (2-letter) -> state row within resolved country\n- All enum lookups (`tax_id_type`, `marital_status`, `employment_status`, `relationship`, etc.)\n\nCountry defaults to `USA` when omitted on identity / address records.\n\n### Account Status Lifecycle\n\nPOST creates an account directly in **SUBMITTED** (compliance review in progress). Alpaca-aligned vocabulary; see the API.md status lifecycle table for the full state machine."},{"name":"Activities","description":"Account activity feed. Filterable by `type` (`TRADE`, `JOURNAL`), date range (`start_date`, `end_date`), with cursor-based pagination."},{"name":"Assets","description":"Security master search. Query by ticker symbol or CUSIP to retrieve security details including name, type, exchange, and pricing data."},{"name":"Authorized Persons","description":"Authorized trading representatives on an account. Manage persons authorized to place trades or make account changes."},{"name":"Balances","description":"Account balance summary. Live by default; pass `as_of=YYYY-MM-DD` for a historical **cash** balance snapshot (trade-date semantics, capped at 730 days back).\n\n### Field Categories\n\n**Cash & positions** are computed on demand from `journal_master` SUM — always live.\n\n**Margin metrics** come from the latest `coredera.margin` snapshot. Use `margin_type` (`EOD` | `INTRADAY`) and `as_of` (ISO 8601 UTC) to detect freshness — `INTRADAY` rows are written by an async listener on every journal event, so the moment an account trades you'll see a fresh recompute. If `margin_type` is `EOD` during market hours, the account simply hasn't traded yet today.\n\n### Buying Power Breakdown\n\n| Field                       | Description                                                                |\n|-----------------------------|----------------------------------------------------------------------------|\n| `buying_power`              | Composite — the MIN of the three components below (capped at 0).            |\n| `regt_buying_power`         | Reg-T leverage: `sma * multiplier`. Long 2:1, short 1:1 by default.        |\n| `daytrading_buying_power`   | Intraday day-trade leverage (4x). Separate from Reg-T.                     |\n| `maintenance_buying_power`  | Capped by maintenance excess. Surfaces when maintenance is the binding leg. |\n| `firm_limit_buying_power`   | Firm-defined absolute ceiling.                                             |\n| `multiplier`                | Per-account Reg-T multiplier (default `2.00`). Set via admin.              |\n| `maintenance_excess`        | `equity − maintenance_requirement`. Negative = maintenance call.           |\n\n`regt_buying_power` does **NOT** account for pending unfilled orders today — the platform has no order book. Subtract pending notional client-side.\n\n### Cash Account Restriction\n\nSurfaces the strongest currently-enforced Reg T 220.8 / GFV restriction so vendors detect 90-Day Cash Only state from one call:\n\n| Field                                       | Description                                                       |\n|---------------------------------------------|-------------------------------------------------------------------|\n| `cash_account_restriction`                  | `90_DAY_FREEZE` / `WARNING` / null.                               |\n| `cash_account_restriction_until`            | End date of the restriction (typically `YYYY-MM-DD`).             |\n| `cash_account_restriction_days_remaining`   | Calendar days until the restriction lifts.                        |\n\nFor full violation history: `GET /v2/accounts/{id}/cash-account-violations`.\n\n### Account Block Flags\n\nMirror of the four block fields on the Account endpoint — surfaced here so partners get the full state from one Balance call:\n\n| Field                          | Meaning                                                            |\n|--------------------------------|--------------------------------------------------------------------|\n| `account_blocked`              | Most severe — orders and transfers both blocked.                   |\n| `trading_blocked`              | Order entry blocked. Transfers may still be allowed.               |\n| `transfers_blocked`            | ACH / wire blocked. Orders may still be allowed.                   |\n| `liquidation_only`             | Only position-reducing orders accepted.                            |\n| `*_reason`                     | Human reason for the matching flag.                                |\n\n### Margin Calls\n\nThe scalar `open_calls` field is the SUM of `call_log.remaining_amount` captured at margin-write time — useful for historical reconciliation. For the LIVE per-call detail (with `call_type`, `due_date`, `aging_days`), call `GET /v2/accounts/{id}/margin-calls`.\n\n### Historical Snapshot Limitations\n\nWhen `as_of` is supplied, only `cash`, `currency`, and `balance_date` are populated. All margin fields, restriction flags, and block flags are null — they require a margin-engine replay of the historical state that isn't currently supported."},{"name":"Banking Instructions","description":"ACH and wire transfer instructions for an account. Separate endpoints for ACH (`/v2/accounts/{id}/banking/ach`) and wire (`/v2/accounts/{id}/banking/wire`) instructions."},{"name":"Beneficial Owners","description":"FINRA-required beneficial ownership disclosure for entity accounts. Full CRUD operations on **POST/GET/PUT/DELETE /v2/accounts/{id}/beneficial-owners**."},{"name":"Correspondents","description":"Correspondent-portal aggregations — endpoints for vendors building a portal for an introducing broker. List or roll-up across every account a correspondent introduces, instead of paginating account-by-account.\n\n### Endpoints\n\n| Endpoint                                                            | Description                                                            |\n|---------------------------------------------------------------------|------------------------------------------------------------------------|\n| `GET /v2/correspondents`                                            | List correspondents the calling client can see.                        |\n| `GET /v2/correspondents/{id}`                                       | Correspondent metadata + active-account count.                         |\n| `GET /v2/correspondents/{id}/moneyline`                             | Per-account balance rows across the correspondent.                     |\n| `GET /v2/correspondents/{id}/moneyline/summary`                     | Single rolled-up totals row.                                           |\n| `GET /v2/correspondents/{id}/positions`                             | Per-account positions across the correspondent.                        |\n| `GET /v2/correspondents/{id}/positions/by-symbol`                   | Aggregated by symbol firmwide — concentration view.                    |\n| `GET /v2/correspondents/{id}/margin-calls`                          | Open margin calls (Reg T / Fed / Maintenance / House / Day Trading) with `due_date`, `aging_days`, `age_bucket`. Filter by `call_type`. |\n| `GET /v2/correspondents/{id}/margin-calls/summary`                  | Roll-up — overall count + by_type + by_aging_bucket.                   |\n| `GET /v2/correspondents/{id}/activities`                            | Journal activity across the correspondent.                             |\n\n### Access Enforcement\n\nTwo-layer auth:\n  1. `CorrespondentAccessMiddleware` gates `/v2/correspondents/{id}/*` against the JWT `correspondents` claim.\n  2. `ScopeMiddleware` gates each sub-resource by its per-resource scope (positions / balances / activities / margin_calls).\n\n### Same DTOs as Per-Account Endpoints\n\nMargin-call rows return the same `MarginCallResponse` shape as `GET /v2/accounts/{id}/margin-calls`; balance rows return `BalanceResponse` carrying `account_id`. A vendor who already handles per-account responses doesn't need a new client model."},{"name":"Custodian","description":"UGMA/UTMA custodian details for custodial accounts. Captures the custodian's identity and relationship to the minor beneficiary."},{"name":"Documents","description":"Account document upload and retrieval. Supports common document types required for account onboarding and maintenance."},{"name":"Entity Info","description":"Corporate, trust, or other legal entity details. Includes formation state, EIN, entity type, and formation date."},{"name":"Sandbox Mock","description":"No-auth mock endpoints returning realistic fake data at `/v2/sandbox/mock/*`. Use for UI development and rapid prototyping without credentials or live data."},{"name":"Money Market"},{"name":"Positions","description":"Account positions. Live by default; pass `as_of=YYYY-MM-DD` for a historical holdings snapshot (trade-date semantics, capped at 730 days back).\n\n### Response Shape\n\nWrapped in `{ data: [...], next_page_token }` for forward compatibility with cursor-based pagination. Today always returns the full set in a single page.\n\n### Historical Snapshot Limitations\n\nWhen `as_of` is supplied, only `symbol`, `qty`, `side`, `asset_id`, `cusip`, `isin`, `issuer_name`, and `currency` are populated. `market_value`, `cost_basis`, `avg_entry_price`, `unrealized_pl`, `current_price`, `lastday_price`, `change_today`, and `exchange` are null -- they require lot-tracking replay and historical price/margin context that aren't yet supported at historical dates."},{"name":"Reference Data","description":"Read-only endpoints returning enumerations, codes, and configuration values used by other endpoints.\n\n| Endpoint                                        | Description                                   |\n|-------------------------------------------------|-----------------------------------------------|\n| `GET /v2/reference-data`                        | Account enums (types, sub-types, objectives)  |\n| `GET /v2/reference-data/trading`                | Brokers, exchanges, trade sides               |\n| `GET /v2/reference-data/countries`              | ISO alpha-3 country list                      |\n| `GET /v2/reference-data/countries/{code}/states` | States/provinces for a country               |\n| `GET /v2/reference-data/correspondents`         | Available correspondents                      |\n| `GET /v2/reference-data/offices`                | Office codes                                  |\n| `GET /v2/reference-data/companies`              | Available companies                            |\n\nAll fields in the API accept clean string values. No integer IDs or UUIDs are required for reference data lookups."},{"name":"Sub-Accounts","description":"Sub-account management under a parent account. Create and manage sub-accounts for allocation and reporting purposes."},{"name":"Trades","description":"Submit trades via **POST /v2/accounts/{id}/trades**.\n\n### Core Fields\n\n| Field                 | Type   | Description                           |\n|-----------------------|--------|---------------------------------------|\n| `symbol`              | string | Ticker symbol                         |\n| `qty`                 | string | Quantity (string decimal)             |\n| `side`                | string | `BUY`, `SELL`, `SHORT`, `COVER`       |\n| `price`               | string | Execution price (string decimal)      |\n| `trade_date`          | string | `YYYY-MM-DD`                          |\n| `settlement_date`     | string | `YYYY-MM-DD`                          |\n| `execution_datetime`  | string | ISO 8601 execution timestamp          |\n| `gross_amount`        | string | Gross trade amount (string decimal)   |\n| `net_amount`          | string | Net trade amount (string decimal)     |\n\n### Clearing Fields\n\n| Field               | Type   | Description                                    |\n|---------------------|--------|------------------------------------------------|\n| `capacity`          | string | `AGENCY`, `PRINCIPAL`, `RISKLESS_PRINCIPAL`    |\n| `executing_broker`  | string | Executing broker code                          |\n| `executed_exchange` | string | Exchange code                                  |\n| `contra_broker`     | string | Contra-side broker code                        |\n| `solicited`         | bool   | Whether the trade was solicited                |\n| `client_trade_id`   | string | Client-assigned idempotency key                |\n\n**Auto-assigned**: `blotter`, `source_of_entry`, `company`, `correspondent`, `rep_code`, and `office` are derived from the account and do not need to be submitted.\n\n### Fees\n\n**Vendor fees** (pass-through -- submit your values):\n\n`commission_1`, `commission_2`, `commission_3`, `clearing_fee`, `ecn_fee`, `foreign_tax`, `other_clearing_fee`, `pfof`\n\n**Regulatory fees** (auto-calculated -- vendor values ignored):\n\n`sec_fee`, `taf_fee`\n\nUse **GET /v2/reference-data/trading** to retrieve valid brokers, exchanges, and side values."},{"name":"Trusted Contact","description":"FINRA Rule 4512 trusted contact person. A single trusted contact per account, used by the firm to address possible financial exploitation."},{"name":"Webhooks","description":"Event notification configuration. Register callback URLs to receive real-time notifications for account and trade lifecycle events.\n\n### Signed Deliveries\n\nEvery dispatched webhook includes HMAC-SHA256 signature headers computed over the raw request body using your registered `secret`:\n\n```\nX-Webhook-ID: evt_<uuid>\nX-Webhook-Signature: sha256=<hex-hmac>\n```\n\nVerify by recomputing `HMAC-SHA256(raw_body, secret)` and comparing the hex digest. Deliveries to subscriptions without a registered secret are sent unsigned (no `X-Webhook-Signature` header); register a secret to enable signature verification.\n\nThe body includes `{event, timestamp, data}` -- `timestamp` is ISO 8601 UTC at dispatch."}]}