{"openapi":"3.0.3","info":{"title":"Issuance & Secondary Markets API","description":"APIs to Create Individual broker dealer accounts, Trigger KYC on the investors in the account, Review account information and KYC results, View Primary offering that are available to invest and manage investments in the assets."},"servers":[{"url":"https://gateway-web-api.tzero.com/app"}],"tags":[{"name":"Authentication","description":"Authenticating and Authorizing API request(token, refresh)."},{"name":"Onboarding","description":"Managing accounts and users (create account, KYC, trusted contact, financial info)."},{"name":"Investments","description":"Investments and assets (create, update, submit, cancel, agreements)."},{"name":"Documents","description":"Document generation for wire instructions."},{"name":"Bank Accounts","description":"Managing bank accounts linked to an investor account (add, list, delete, verify)."},{"name":"Balance","description":"Retrieving fiat balances and asset position balances for an account."},{"name":"Markets","description":"Market schedule information including pre-market, regular, and post-market hours."},{"name":"Trading","description":"Order management for secondary-market trading (fees, submit, cancel, list orders)."}],"paths":{"/pi/v1/accounts/individual":{"post":{"tags":["Onboarding"],"summary":"Onboard Individual account","description":"Onboard Individual with identity information. Requires agreement (terms & conditions) and transactionId.","operationId":"onboardIndividualAccount","security":[{"x-api-key":[],"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIndividualAccountRequest"},"example":{"transactionId":"a0000000-0000-0000-0000-000000000001","investor":{"agreement":{"acceptedAccountsTermsAndCondition":true,"termsAcceptedAt":"2025-01-28T12:00:00","eSignatureFullName":"John M Doe"},"optOutOfTrustedContact":true,"email":"john.doe@example.com","firstName":"John","middleName":"M","lastName":"Doe","citizenshipCountry":"US","taxCountry":"US","dateOfBirth":"1990-01-31","employment":{"employmentStatus":"FULL_TIME_EMPLOYED","employerName":"Acme Corp","occupation":"Software Engineer"},"physicalAddress":{"street":"1122 King Road","street2":"Apt 12","city":"New York","stateOrProvince":"NY","postalCode":"10001","country":"US"},"mailingAddress":{"street":"456 Oak Ave","city":"New York","stateOrProvince":"NY","postalCode":"10002","country":"US"},"phoneNumbers":[{"countryCode":"1","countryCodeAlpha":"US","nationalNumber":"2125550123","ext":"123","type":"PRIMARY"},{"countryCode":"1","countryCodeAlpha":"US","nationalNumber":"2125550999","type":"ALTERNATE"}],"governmentIdentifiers":[{"type":"TIN","country":"US","identifier":"123456789"}]}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"},"example":{"id":"PR-1234-5678","type":"INDIVIDUAL","status":"ACTIVE","createdTs":"2025-12-11T11:30:42.534426Z","transactionId":"a0000000-0000-0000-0000-000000000001","investors":[{"type":"PRIMARY_USER","id":"43XSYHc0h4aU5cxMkqhIQn","email":"john.doe@example.com","firstName":"John","middleName":"M","lastName":"Doe","citizenshipCountry":"US","dateOfBirth":"1990-01-31","employment":{"employmentStatus":"FULL_TIME_EMPLOYED","employerName":"Acme Corp","occupation":"Software Engineer"},"physicalAddress":{"id":"2f3b2c1a-4c1b-4b1b-9d1a-111111111111","street":"1122 King Road","street2":"Apt 12","city":"New York","stateOrProvince":"NY","postalCode":"10001","country":"US"},"mailingAddress":{"id":"3a4b5c6d-7e8f-9a0b-1c2d-444444444444","street":"456 Oak Ave","city":"New York","stateOrProvince":"NY","postalCode":"10002","country":"US"},"phoneNumbers":[{"id":"4c2d3e4f-5a6b-7c8d-9e0f-222222222222","countryCode":"1","countryCodeAlpha":"US","nationalNumber":"2125550123","ext":"123","type":"PRIMARY"},{"id":"5d3e4f5a-6b7c-8d9e-0f1a-333333333333","countryCode":"1","countryCodeAlpha":"US","nationalNumber":"2125550999","type":"ALTERNATE"}],"governmentIdentifiers":[{"id":"aaaaaaaa-bbbb-cccc-dddd-333333333333","type":"TIN","country":"US","identifier":"123456789","createdTs":"2025-12-11T11:30:42.534426Z"}]}]}}}},"400":{"description":"Bad Request (validation failed or invalid payload). Body: `errors` array; each item has `code`, `message`, optional `field`.\n\n**Create-account business validation codes:**\n\n| Code | Meaning |\n|------|---------|\n| DATE_OF_BIRTH_REQUIRED | Date of birth is required. |\n| DATE_OF_BIRTH_INVALID | Date of birth format invalid; use YYYY-MM-DD. |\n| DATE_OF_BIRTH_IN_FUTURE | Date of birth cannot be in the future. |\n| DOB_NOT_ALLOWED | Date of birth not allowed; date cannot be more than 120 years in the past. |\n| INVESTOR_AGE_INSUFFICIENT | Investor must be at least 18 years old. |\n| TAX_COUNTRY_MUST_BE_US | Tax country must be US when physical address or citizenship is US. |\n| GOVERNMENT_IDENTIFIER_TYPE_INVALID | Gov ID type not allowed for this country (e.g. Expected TIN for US only; INTERNATIONAL_TIN or PASSPORT for non-US). |\n| PASSPORT_REQUIRED_FOR_NON_US | A passport is required when physical address is not in the US. |\n| GOVERNMENT_IDENTIFIER_COUNTRY_MISMATCH | Gov ID country must match investor's citizenship, or address country. |\n| GOVERNMENT_IDENTIFIER_LENGTH_INVALID | Government identifier length invalid for type/country. |\n| PHYSICAL_ADDRESS_REQUIRED | Physical address is required. |\n| CITIZENSHIP_COUNTRY_INVALID | Citizenship country must be two-letter ISO code. |\n| TAX_COUNTRY_INVALID | Tax country must be two-letter ISO code. |\n| ADDRESS_COUNTRY_INVALID | Address country must be two-letter ISO code. |\n| EMAIL_REQUIRED, EMAIL_INVALID | Email required / invalid format. |\n| FIRST_NAME_REQUIRED, LAST_NAME_REQUIRED | Name fields required. |\n| ACCOUNT_EMAIL_ALREADY_EXISTS | An account with this email already exists. |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"dateOfBirth":{"summary":"DoB validation (dateOfBirth in future)","value":{"errors":[{"code":"DATE_OF_BIRTH_IN_FUTURE","message":"Date of birth cannot be in the future","field":"investor.dateOfBirth"}]}},"jurisdiction":{"summary":"Jurisdiction (country not allowed)","value":{"errors":[{"code":"JURISDICTION_COUNTRY_NOT_ALLOWED","message":"Country is not in the allowed list for account applications","field":"investor.physicalAddress.country"}]}},"govId":{"summary":"Gov ID (passport required for non-US)","value":{"errors":[{"code":"PASSPORT_REQUIRED_FOR_NON_US","message":"A passport number is required when physical address is not in the US","field":"investor.governmentIdentifiers"}]}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Entity — jurisdiction not allowed. Same body as 400 (`errors` array).\n\n**Create-account jurisdiction codes (422):**\n\n| Code | Meaning |\n|------|---------|\n| JURISDICTION_COUNTRY_NOT_ALLOWED | Country is not in the allowed list for account applications. |\n| JURISDICTION_STATE_REQUIRED_FOR_US | State (region) is required when country is US. |\n| JURISDICTION_STATE_FORMAT_INVALID | State must be a two-character code when country is US. |\n| JURISDICTION_STATE_NOT_ALLOWED | State is not in the allowed list for account applications. |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"jurisdictionCountry":{"summary":"Jurisdiction country not allowed","value":{"errors":[{"code":"JURISDICTION_COUNTRY_NOT_ALLOWED","message":"Country is not in the allowed list for account applications","field":"investor.physicalAddress.country"}]}}}}}},"500":{"description":"Internal Server Error"}}}},"/pi/v1/accounts/{accountId}/users/{userId}":{"put":{"tags":["Onboarding"],"summary":"Update user of the account","description":"Updates a user on an existing account. Validates that the user belongs to the account.\nAll request fields are optional. Provided fields that are editable are updated or overridden; omitted fields are left unchanged.\nFor array fields such as phoneNumbers and governmentIdentifiers, the request body carries replace semantics: the array you send is the full desired set.\nAny existing items omitted from the array are treated as desired to be deleted. When null/absent, fields are unchanged.\n","operationId":"updateInvestor","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Account identifier.","schema":{"type":"string"},"example":"PR-1234-5678"},{"name":"userId","in":"path","required":true,"description":"Identity ID of the user to update (must belong to the account).","schema":{"type":"string"},"example":"43XSYHc0h4aU5cxMkqhIQn"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvestorRequest"},"examples":{"updateInvestor":{"summary":"Update investor","value":{"transactionId":"a0000000-0000-0000-0000-000000000001","investor":{"firstName":"John","middleName":"M","lastName":"Doe","citizenshipCountry":"US","taxCountry":"US","dateOfBirth":"1990-01-31","employment":{"employmentStatus":"FULL_TIME_EMPLOYED","employerName":"Acme Corp","occupation":"Software Engineer"},"physicalAddress":{"street":"1122 King Road","street2":"Apt 12","city":"New York","stateOrProvince":"NY","postalCode":"10001","country":"US"},"mailingAddress":{"street":"456 Oak Ave","city":"New York","stateOrProvince":"NY","postalCode":"10002","country":"US"},"phoneNumbers":[{"countryCode":"1","countryCodeAlpha":"US","nationalNumber":"2125550123","ext":"123","type":"PRIMARY"}],"governmentIdentifiers":[{"type":"TIN","country":"US","identifier":"123456789"}]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorUpdateResponse"},"example":{"investor":{"type":"PRIMARY_USER","id":"43XSYHc0h4aU5cxMkqhIQn","email":"john.doe@example.com","firstName":"John","middleName":"M","lastName":"Doe","citizenshipCountry":"US","dateOfBirth":"1990-01-31","employment":{"employmentStatus":"FULL_TIME_EMPLOYED","employerName":"Acme Corp","occupation":"Software Engineer"},"physicalAddress":{"id":"2f3b2c1a-4c1b-4b1b-9d1a-111111111111","street":"1122 King Road","street2":"Apt 12","city":"New York","stateOrProvince":"NY","postalCode":"10001","country":"US"},"mailingAddress":{"id":"3a4b5c6d-7e8f-9a0b-1c2d-444444444444","street":"456 Oak Ave","city":"New York","stateOrProvince":"NY","postalCode":"10002","country":"US"},"phoneNumbers":[{"id":"4c2d3e4f-5a6b-7c8d-9e0f-222222222222","countryCode":"1","countryCodeAlpha":"US","nationalNumber":"2125550123","ext":"123","type":"PRIMARY"}],"governmentIdentifiers":[{"id":"aaaaaaaa-bbbb-cccc-dddd-333333333333","type":"TIN","country":"US","identifier":"123456789","createdTs":"2025-12-11T11:30:42.534426Z"}]},"transactionId":"a0000000-0000-0000-0000-000000000001"}}}},"400":{"description":"Bad Request (validation / user does not belong to account / invalid payload). Body: `errors` array with `code`, `message`, optional `field`.\n\n**Update-user business validation codes:**\n\n| Code | Meaning |\n|------|---------|\n| INVESTOR_DOES_NOT_BELONG_TO_ACCOUNT | The specified user does not belong to this account. |\n| DATE_OF_BIRTH_INVALID, DATE_OF_BIRTH_IN_FUTURE, DOB_NOT_ALLOWED, INVESTOR_AGE_INSUFFICIENT | Same as create (DoB rules). |\n| TAX_COUNTRY_MUST_BE_US | Tax country must be US when physical address or citizenship is US. |\n| GOVERNMENT_IDENTIFIER_TYPE_INVALID | Gov ID type not allowed for this country (e.g. TIN for US only). |\n| PASSPORT_REQUIRED_FOR_NON_US | A passport is required when physical address is not in the US. |\n| GOVERNMENT_IDENTIFIER_COUNTRY_MISMATCH | Gov ID country must match user, citizenship, or address country. |\n| GOVERNMENT_IDENTIFIER_LENGTH_INVALID | Government identifier length invalid. |\n| GOVERNMENT_IDENTIFIER_AT_LEAST_ONE_REQUIRED | At least one government identifier must be retained; cannot delete all. |\n| FIELD_NOT_MUTABLE | Field cannot be changed (e.g. physicalAddress.country change not allowed). |\n| FIRST_NAME_REQUIRED, LAST_NAME_REQUIRED | When provided, must not be blank. |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"govIdType":{"summary":"Gov ID type invalid (e.g. INTERNATIONAL_TIN when US)","value":{"errors":[{"code":"GOVERNMENT_IDENTIFIER_TYPE_INVALID","message":"Government Identifier type needs to be TIN for US residents.","field":"investor.governmentIdentifiers"}]}}}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}},"/pi/v1/accounts/{accountId}":{"get":{"tags":["Onboarding"],"summary":"Get account by ID","operationId":"getAccountById","parameters":[{"name":"accountId","in":"path","required":true,"description":"Account identifier.","schema":{"type":"string"},"example":"PR-1234-5678"}],"security":[{"x-api-key":[],"bearerAuth":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}},"400":{"description":"Bad Request (e.g. invalid accountId format). Body: `errors` array with `code`, `message`, optional `field`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden (caller does not have access to this account).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found (account does not exist or caller has no access). Body: `errors` array; code typically `NOT_FOUND`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"notFound":{"summary":"Account not found","value":{"errors":[{"code":"NOT_FOUND","message":"Account not found: {accountId}"}]}}}}}},"500":{"description":"Internal Server Error (e.g. account retrieval failed). Body: `errors` array; code e.g. `ACCOUNT_RETRIEVAL_FAILED`, `INTERNAL_ERROR`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/pi/v1/accounts/{accountId}/users/{userId}/financialInfo":{"get":{"tags":["Onboarding"],"summary":"Get financial information for user","description":"Returns financial information (net worth, annual income) for the specified user. Validates that the user belongs to the account; caller must have access to the account.\n","operationId":"getFinancialInfo","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Account identifier.","schema":{"type":"string"},"example":"PR-1234-5678"},{"name":"userId","in":"path","required":true,"description":"User ID must belong to the account.","schema":{"type":"string"},"example":"43XSYHc0h4aU5cxMkqhIQn"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancialInfoResponse"},"example":{"accountId":"PR-1234-5678","netWorth":500000,"annualIncome":120000,"annualIncomeLastChangedTs":"2025-12-11T11:30:42.534426Z"}}}},"400":{"description":"Bad Request (e.g. user does not belong to account). Body: `errors` array; code e.g. INVESTOR_DOES_NOT_BELONG_TO_ACCOUNT.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}},"patch":{"tags":["Onboarding"],"summary":"Add or update financial information for user","description":"Add or update financial information for the specified user. Validates that the user belongs to the account; then updates only the provided fields (net worth, annual income). All request fields are optional; omitted fields are left unchanged.\n","operationId":"patchFinancialInfo","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Account identifier.","schema":{"type":"string"},"example":"PR-1234-5678"},{"name":"userId","in":"path","required":true,"description":"User ID must belong to the account.","schema":{"type":"string"},"example":"43XSYHc0h4aU5cxMkqhIQn"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchFinancialInfoRequest"},"example":{"transactionId":"a0000000-0000-0000-0000-000000000001","netWorth":500000,"annualIncome":120000}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancialInfoResponse"},"example":{"accountId":"PR-1234-5678","netWorth":500000,"annualIncome":120000,"annualIncomeLastChangedTs":"2025-12-11T11:30:42.534426Z","transactionId":"a0000000-0000-0000-0000-000000000001"}}}},"400":{"description":"Bad Request (validation failed or user does not belong to account). Body: `errors` array; e.g. NET_WORTH_INVALID, ANNUAL_INCOME_INVALID, INVESTOR_DOES_NOT_BELONG_TO_ACCOUNT.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}},"/pi/v1/accounts/{accountId}/trustedContact":{"post":{"tags":["Onboarding"],"summary":"Add trusted contact","description":"Add a trusted contact to the account's primary user. If the account already has a trusted contact, the request fails with a conflict.","operationId":"addTrustedContact","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Account identifier.","schema":{"type":"string"},"example":"PR-1234-5678"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustedContactRequest"},"example":{"transactionId":"a0000000-0000-0000-0000-000000000001","email":"trusted.contact@example.com","firstName":"Jane","lastName":"Contact","physicalAddress":{"street":"456 Oak Avenue","city":"New York","stateOrProvince":"NY","postalCode":"10001","country":"US"},"phoneNumber":"+12125550456"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrustedContactResponse"},"example":{"trustedContact":{"id":"7e8f9a0b-1c2d-3e4f-5a6b-777777777777","email":"trusted.contact@example.com","firstName":"Jane","lastName":"Contact","physicalAddress":{"street":"456 Oak Avenue","city":"New York","stateOrProvince":"NY","postalCode":"10001","country":"US"},"phoneNumber":"+12125550456"},"transactionId":"a0000000-0000-0000-0000-000000000001"}}}},"400":{"description":"Bad Request (validation or trusted contact already exists). Same error body; see ErrorResponse and x-businessValidationErrorCodes in components.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}},"/pi/v1/accounts/{accountId}/trustedContact/{trustedContactUserId}":{"delete":{"tags":["Onboarding"],"summary":"Remove trusted contact","description":"Remove the trusted contact from the account's primary user. The path parameter must be the identity ID of the current trusted contact.","operationId":"removeTrustedContact","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Account identifier.","schema":{"type":"string"},"example":"PR-1234-5678"},{"name":"trustedContactUserId","in":"path","required":true,"description":"Identity ID of the trusted contact to remove (must match the account's current trusted contact).","schema":{"type":"string"},"example":"7e8f9a0b-1c2d-3e4f-5a6b-777777777777"}],"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request (trustedContactUserId does not match account's trusted contact)"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}},"/pi/v1/users/{userId}/kyc":{"get":{"tags":["Onboarding"],"summary":"Get KYC status for user","description":"Retrieve the KYC status for a specific user (identity ID). Returns status, and when document verification (DocV) is required, may include docUrl and qrMessage for the user to complete verification.\n\n**KYC status values:**\n| Status | Meaning |\n|--------|---------|\n| PENDING | KYC submitted; pending manual review or document verification. User may need to complete DocV (see docUrl/qrMessage when present). |\n| APPROVED | KYC approved; user is verified. |\n| NOT_APPROVED | KYC not approved (non-retryable). |\n| NOT_APPROVED_RETRYABLE | KYC not approved; user may retry. |\n| VENDOR_ERROR / CANNOT_PROCESS | Vendor or processing error; may retry later. |\n\n**When to expect docUrl and qrMessage:** These fields are populated when status is PENDING and document verification (DocV) is required. The client can present docUrl (link) or qrMessage (QR code image data) to the user so they can upload their ID document. When docStatus is USER_ACTION_REQUIRED, the user must complete the DocV flow; after they do, docStatus moves to PROCESSING then COMPLETED (or EXPIRED/FAILED).\n","operationId":"getUserKycStatus","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"userId","in":"path","required":true,"description":"Identity (user) ID.","schema":{"type":"string"},"example":"43XSYHc0h4aU5cxMkqhIQn"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostKycResponse"},"example":{"userId":"43XSYHc0h4aU5cxMkqhIQn","kycResult":{"status":"APPROVED","id":"b1c2d3e4-f5a6-7b8c-9d0e-555555555555","createdTs":"2025-12-11T11:35:00.000000","modifiedTs":"2025-12-11T11:40:00.000000"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden (caller does not have access to this user's KYC).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found (no KYC record for this user, or user does not exist). Body: `errors` array; code typically `KYC_NOT_FOUND`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"kycNotFound":{"summary":"KYC not found for user","value":{"errors":[{"code":"KYC_NOT_FOUND","message":"KYC not found for user: {userId}"}]}}}}}},"500":{"description":"Internal Server Error (e.g. KYC retrieval failed). Body: `errors` array; code e.g. `KYC_RETRIEVAL_ERROR`, `INTERNAL_ERROR`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Onboarding"],"summary":"Trigger KYC for user","description":"Trigger a KYC check for a specific user.","operationId":"triggerKyc","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"userId","in":"path","required":true,"description":"Identity (user) ID.","schema":{"type":"string"},"example":"43XSYHc0h4aU5cxMkqhIQn"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerKycRequest"},"example":{"transactionId":"a0000000-0000-0000-0000-000000000001"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostKycResponse"},"example":{"userId":"43XSYHc0h4aU5cxMkqhIQn","kycResult":{"status":"PENDING","id":"b1c2d3e4-f5a6-7b8c-9d0e-555555555555","createdTs":"2025-12-11T11:35:00.000000"},"transactionId":"a0000000-0000-0000-0000-000000000001"}}}},"400":{"description":"Bad Request (validation or invalid payload)"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}},"/pi/v1/assets":{"get":{"tags":["Investments"],"summary":"Get assets","description":"Returns list of available assets.","security":[{"x-api-key":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetsResponse"},"examples":{"success":{"summary":"Example response","value":{"assets":[{"assetId":"39737","symbol":"AF","assetName":"Abstract Face","assetDescription":"","assetType":{"code":"COMMON_STOCK","label":"Common Stock","description":"Common Stock."},"requiresAccreditation":false,"pricePerShare":10,"minimumInvestment":50,"maximumInvestment":100000,"status":"OPEN","offeringCloseDate":"2026-06-30T23:59:59-04:00","offering":{"code":"REG_D_506C","label":"Reg D 506 (c)","description":"Reg D 506 (c) offering."},"countries":["US"],"paymentTypes":[{"code":"WIRE","label":"WIRE","description":"Wire Transfer."}]}]}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}}}},"/pi/v1/assets/{assetId}/investments":{"post":{"tags":["Investments"],"summary":"Create investment","description":"Create a new investment for an asset.\n\n`numberOfShares` is optional; when it is not provided investment `amount`\nis used to compute the `numberOfShares`. If the shares cannot be computed or If fractional shares is not supported , the request gets rejected with `INVALID_AMOUNT_AND_SHARES`.\n\nFor Reg CF assets, regCFInvestmentTermsAccepted must be true.\nAnnual income and net worth are required for Reg A and Reg CF.\n","operationId":"createInvestment","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"assetId","in":"path","required":true,"description":"Asset identifier","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvestmentRequest"},"examples":{"withInvestmentAmount":{"summary":"Investment amount provided — numberOfShares computed automatically","value":{"accountId":"1234-5678","transactionId":"a0000000-0000-0000-0000-000000000001","amount":499.51}},"withInvestmentAmountAndShares":{"summary":"Investment amount and numberOfShares provided","value":{"accountId":"1234-5678","transactionId":"a0000000-0000-0000-0000-000000000002","amount":499.51,"numberOfShares":239}},"withInvesmentAmountAndRegCF":{"summary":"Reg CF asset (terms acceptance required)","value":{"accountId":"1234-5678","transactionId":"a0000000-0000-0000-0000-000000000003","amount":499.51,"regCFInvestmentTermsAccepted":true}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentDetails"},"example":{"investmentId":"inv-123","amount":1000,"numberOfShares":1000,"fundedAmount":0,"status":"CREATED","assetId":"39737","transactionId":"txn-001","paymentType":"WIRE","createdTs":"2025-12-11T11:30:42.534426Z","modifiedTs":"2025-12-11T11:30:42.534426Z"}}}},"400":{"description":"Bad Request (validation failed or invalid payload). Body: `errors` array; each item has `code`, `message`, optional `field`.\n\n**Create investment — error codes:**\n\n| Code | Meaning |\n|------|---------|\n| ACCOUNT_ID_REQUIRED | Account identifier is required. |\n| TRANSACTION_ID_REQUIRED | Transaction ID is required. |\n| AMOUNT_REQUIRED | Amount is required. |\n| AMOUNT_INVALID | Amount must be positive. |\n| NUMBER_OF_SHARES_INVALID | Number of shares must be positive when provided. |\n| ASSET_NOT_OPEN | Asset is not open for investment. |\n| INVALID_AMOUNT_AND_SHARES | `amount` is not a valid investment in the asset. If `details` object is available it may contain following fields `recommendedAmount`, `recommendedNumberOfShares`, and `pricePerShare`. |\n| REG_CF_TERMS_NOT_ACCEPTED | Reg CF investment terms must be accepted (Reg CF assets). |\n| REG_CF_TERMS_ONLY_APPLICABLE_TO_REG_CF | Reg CF terms acceptance is only applicable to Reg CF assets. |\n| ANNUAL_INCOME_REQUIRED | Annual income is required for Reg A and Reg CF investments. |\n| NET_WORTH_REQUIRED | Net worth is required for Reg A and Reg CF investments. |\n| INVESTMENT_CREATE_ERROR | Investment could not be created. |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"amountRequired":{"summary":"Amount required","value":{"errors":[{"code":"AMOUNT_REQUIRED","message":"Amount is required","field":"amount"}]}},"assetNotOpen":{"summary":"Asset not open","value":{"errors":[{"code":"ASSET_NOT_OPEN","message":"Cannot create investment; asset is not open for investment."}]}},"amountAndSharesMismatch":{"summary":"Amount and Number of Shars mismatch — recommended amounts in `details` object.","value":{"errors":[{"code":"INVALID_AMOUNT_AND_SHARES","message":"Investment amount must be adjusted to match Asset's price per share.","field":"amount","details":{"recommendedAmount":499.51,"recommendedNumberOfShares":239,"pricePerShare":2.09}}]}},"amountBelowMin":{"summary":"Investment Amount below requested minimum amount for the asset","value":{"errors":[{"code":"INVALID_AMOUNT_AND_SHARES","message":"Investment amount {2} is below the minimum required to purchase one share of the Asset.","field":"amount"}]}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found (account or primary user)"},"500":{"description":"Internal Server Error"}}},"put":{"tags":["Investments"],"summary":"Update investment","description":"Update an existing investment (amount, payment details, etc.).\nInvestment must belong to the account and match the asset in the path.\nPayment details can also be configured via the dedicated PUT `.../payment` endpoint.\nWhen `amount` is provided without `numberOfShares`, the amount is validated against the asset. On mismatch, a `INVALID_AMOUNT_AND_SHARES` error is returned.\n","operationId":"updateInvestment","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"assetId","in":"path","required":true,"description":"Asset identifier.","schema":{"type":"string"},"example":"39737"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvestmentRequest"},"example":{"accountId":"PR-1234-5678","investmentId":"U7F7D95Y","transactionId":"a0000000-0000-0000-0000-000000000002","amount":1500,"paymentType":"ACH","bankAccountId":"fia-abc-123"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentDetails"},"example":{"investmentId":"U7F7D95Y","amount":1500,"fundedAmount":0,"status":"CREATED","assetId":"39737","transactionId":"a0000000-0000-0000-0000-000000000002","paymentType":"ACH","createdTs":"2025-12-11T11:30:42.534426Z","modifiedTs":"2025-12-11T12:00:00.000000Z"}}}},"400":{"description":"Bad Request (validation failed or invalid payload). Body: `errors` array; each item has `code`, `message`, optional `field`.\n\n**Update investment — error codes:**\n\n| Code | Meaning |\n|------|---------|\n| ACCOUNT_ID_REQUIRED | Account identifier is required. |\n| TRANSACTION_ID_REQUIRED | Transaction ID is required. |\n| AMOUNT_INVALID | Amount must be positive when provided. |\n| NUMBER_OF_SHARES_INVALID | Number of shares must be positive when provided. |\n| INVESTMENT_UPDATE_NOT_ALLOWED | Investment update not allowed. |\n| INVESTMENT_STATUS_NOT_ALLOWED_TO_UPDATE | Investment not allowed to be updated in current status. |\n| ASSET_NOT_RELATED_TO_INVESTMENT | Asset is not related to the investment (path assetId mismatch). |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found (account, primary user, or investment)"},"500":{"description":"Internal Server Error"}}}},"/pi/v1/assets/{assetId}/investments/{investmentId}/payment":{"put":{"tags":["Investments"],"summary":"Add Payment details to the investment on file.","description":"Add payment details to an existing investment. This is a separate step from\nupdating investment amount/shares. Only WIRE and ACH payment types are supported.\nFor ACH, a `bankAccountId` (linked bank account) must be provided.\n","operationId":"addInvestmentPayment","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"assetId","in":"path","required":true,"description":"Asset identifier.","schema":{"type":"string"},"example":"39737"},{"name":"investmentId","in":"path","required":true,"description":"Investment identifier.","schema":{"type":"string"},"example":"U7F7D95Y"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentRequest"},"example":{"accountId":"PR-1234-5678","paymentType":"ACH","bankAccountId":"bank-account-uuid","transactionId":"a0000000-0000-0000-0000-000000000003"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentDetails"},"example":{"investmentId":"U7F7D95Y","amount":1500,"fundedAmount":0,"status":"CREATED","assetId":"39737","transactionId":"a0000000-0000-0000-0000-000000000003","paymentType":"ACH","createdTs":"2025-12-11T11:30:42.534426Z","modifiedTs":"2025-12-11T12:15:00.000000Z"}}}},"400":{"description":"Bad Request (validation failed or invalid payload). Body: `errors` array; each item has `code`, `message`, optional `field`.\n\n**Update payment — error codes:**\n\n| Code | Meaning |\n|------|---------|\n| ACCOUNT_ID_REQUIRED | Account identifier is required. |\n| PAYMENT_TYPE_REQUIRED | Payment type is required. |\n| BANK_ACCOUNT_ID_REQUIRED | Bank account ID is required when payment type is ACH. |\n| TRANSACTION_ID_REQUIRED | Transaction ID is required. |\n| PAYMENT_TYPE_NOT_SUPPORTED | Payment type is not supported. Only WIRE and ACH are allowed. |\n| INVESTMENT_STATUS_NOT_ALLOWED_TO_UPDATE | Investment cannot be updated in its current status (e.g. SUBMITTED). |\n| PAYMENT_UPDATE_NOT_ALLOWED | Payment update not allowed (fallback code). |\n| ASSET_NOT_RELATED_TO_INVESTMENT | Asset is not related to the investment (path assetId mismatch). |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"paymentTypeNotSupported":{"summary":"Unsupported payment type","value":{"errors":[{"code":"PAYMENT_TYPE_NOT_SUPPORTED","message":"Payment type STRIPE is not supported for external API."}]}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found (account, investment, or primary user)"},"500":{"description":"Internal Server Error (INTERNAL_ERROR — unexpected error)"}}}},"/pi/v1/accounts/{accountId}/bankAccounts":{"post":{"tags":["Bank Accounts"],"summary":"Add bank account","description":"Adds a new bank account to the given account using directly provided bank details.\nThe bank account can be used as a funding source for ACH investments.\n","operationId":"addBankAccount","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Account identifier.","schema":{"type":"string"},"example":"PR-1234-5678"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBankAccountRequest"},"example":{"accountNumber":"123456789","routingNumber":"021000021","accountType":"CHECKING","bankName":"Chase","bankOwnerName":"John Doe","transactionId":"a0000000-0000-0000-0000-000000000010","partnerVerified":true,"verificationResult":"Verified via Plaid"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountDetails"},"example":{"bankAccountId":"ach-uuid-123","bankName":"Chase","maskedAccountNumber":"6789","accountType":"CHECKING","status":"PENDING","transactionId":"a0000000-0000-0000-0000-000000000010"}}}},"400":{"description":"Bad Request (validation failed or invalid payload). Body: `errors` array; each item has `code`, `message`, optional `field`.\n\n**Add bank account — error codes:**\n\n| Code | Meaning |\n|------|---------|\n| ACCOUNT_NUMBER_REQUIRED | Account number is required. |\n| ACCOUNT_NUMBER_INVALID | Account number must be 4 to 17 digits. |\n| ROUTING_NUMBER_REQUIRED | Routing number is required. |\n| ROUTING_NUMBER_INVALID | Routing number must be exactly 9 digits. |\n| ACCOUNT_TYPE_INVALID | Account type must be CHECKING or SAVINGS. Accepts case-insensitive values (e.g. \"checking\", \"CHECKING\"). |\n| BANK_NAME_REQUIRED | Bank name is required. |\n| BANK_OWNER_NAME_REQUIRED | Bank owner name is required. |\n| TRANSACTION_ID_REQUIRED | Transaction ID is required. |\n| PARTNER_VERIFICATION_REQUIRED | partnerVerified must be true. Partner must verify bank details before linking. |\n| BANK_LINK_NOT_AVAILABLE | KYC not completed; complete KYC before adding a bank account. |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found (account not found)"},"500":{"description":"Internal Server Error (INTERNAL_ERROR — unexpected error)"},"502":{"description":"Bad Gateway (ach-service unavailable or returned an error)"}}},"get":{"tags":["Bank Accounts"],"summary":"Get bank accounts","description":"Retrieves all active bank accounts linked to the given account.\n","operationId":"getBankAccounts","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Account identifier.","schema":{"type":"string"},"example":"PR-1234-5678"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BankAccountDetails"}},"example":[{"bankAccountId":"ach-uuid-123","bankName":"Chase","maskedAccountNumber":"****6789","accountType":"CHECKING","status":"APPROVED"},{"bankAccountId":"ach-uuid-456","bankName":"Bank of America","maskedAccountNumber":"****1234","accountType":"SAVINGS","status":"PENDING"}]}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found (account not found)"},"500":{"description":"Internal Server Error (INTERNAL_ERROR — unexpected error)"},"502":{"description":"Bad Gateway (ach-service unavailable or returned an error)"}}}},"/pi/v1/accounts/{accountId}/bankAccounts/{bankAccountId}":{"delete":{"tags":["Bank Accounts"],"summary":"Remove bank account","description":"Removes (soft-deletes) a bank account. The record is preserved for audit purposes\nbut will no longer appear in active account listings or be usable for new transactions.\n","operationId":"removeBankAccount","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Account identifier.","schema":{"type":"string"},"example":"PR-1234-5678"},{"name":"bankAccountId","in":"path","required":true,"description":"Bank account identifier.","schema":{"type":"string"},"example":"ach-uuid-123"}],"responses":{"204":{"description":"No Content (bank account successfully removed)"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found (account or bank account not found)"},"500":{"description":"Internal Server Error (INTERNAL_ERROR — unexpected error)"},"502":{"description":"Bad Gateway (ach-service unavailable or returned an error)"}}}},"/pi/v1/accounts/{accountId}/bankAccounts/{bankAccountId}/transfer":{"post":{"tags":["Bank Accounts"],"summary":"Initiate Deposit/Withdrawal from/to the Customer's Account","description":"Initiates a deposit or withdrawal transaction from User's linked bank account.\n","operationId":"transfer","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Account identifier.","schema":{"type":"string"},"example":"PR-1234-5678"},{"name":"bankAccountId","in":"path","required":true,"description":"Bank account identifier.","schema":{"type":"string"},"example":"ach-uuid-123"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBankTransferRequest"},"example":{"transactionId":"a0000000-0000-0000-0000-000000000010","amount":10000,"transactionType":"DEPOSIT","currency":"USD"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBankTransferResponse"},"example":{"transactionId":"a0000000-0000-0000-0000-000000000010","amount":10000,"transferId":"6789","bankAccountId":"ach-uuid-123","transactionType":"DEPOSIT","currency":"USD"}}}},"400":{"description":"Bad Request (validation failed or invalid payload). Body: `errors` array; each item has `code`, `message`, optional `field`.\n\n**Add bank account — error codes:**\n\n| Code | Meaning |\n|------|---------|\n| TRANSACTION_TYPE | Transaction type is required. |\n| AMOUNT_INVALID | Account is required and should be greater than 0 and less than 100K USD |\n| TRANSACTION_ID_REQUIRED | Transaction ID is required. |\n| BANK_NOT_AVAILABLE | Bank account is either unknown or pending approval |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found (account not found)"},"500":{"description":"Internal Server Error (INTERNAL_ERROR — unexpected error)"},"502":{"description":"Bad Gateway (service unavailable or returned an error)"}}}},"/pi/v1/accounts/{accountId}/balances":{"get":{"tags":["Balance"],"summary":"Get Account Balance","description":"Returns fiat balances and asset positions for the requested account.\n","operationId":"getAccountBalance","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string"},"description":"Account ID."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountBalanceResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Account not found"},"500":{"description":"Internal Server Error"}}}},"/pi/v1/investments/accounts/{accountId}":{"get":{"tags":["Investments"],"summary":"Get all investments for account","description":"Returns all investments for the given account.","operationId":"getInvestmentsByAccount","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"description":"Account identifier.","schema":{"type":"string"},"example":"PR-1234-5678"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InvestmentDTO"}},"example":[{"investmentId":"U7F7D95Y","amount":1000,"numberOfShares":100,"costBasis":1000,"fundedAmount":0,"status":"CREATED","assetId":"39737","transactionId":"a0000000-0000-0000-0000-000000000001","paymentType":"WIRE","createdTs":"2025-12-11T11:30:42.534426Z","modifiedTs":"2025-12-11T11:30:42.534426Z"}]}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}},"/pi/v1/investments/{investmentId}/submit":{"post":{"tags":["Investments"],"summary":"Submit investment","description":"Submit the investment.\nPayment is processed first; on success the investment is submitted.\n","operationId":"submitInvestment","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"investmentId","in":"path","required":true,"description":"Investment identifier.","schema":{"type":"string"},"example":"U7F7D95Y"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitInvestmentRequest"},"example":{"accountId":"PR-1234-5678","transactionId":"a0000000-0000-0000-0000-000000000003"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentDetails"},"example":{"investmentId":"U7F7D95Y","amount":1000,"fundedAmount":1000,"status":"SUBMITTED","assetId":"39737","transactionId":"a0000000-0000-0000-0000-000000000003","paymentType":"WIRE","createdTs":"2025-12-11T11:30:42.534426Z","modifiedTs":"2025-12-11T12:15:00.000000Z"}}}},"400":{"description":"Bad Request (validation failed or invalid payload). Body: `errors` array; each item has `code`, `message`, optional `field`.\n\n**Submit investment — error codes:**\n\n| Code | Meaning |\n|------|---------|\n| ACCOUNT_ID_REQUIRED | Account identifier is required. |\n| TRANSACTION_ID_REQUIRED | Transaction ID is required. |\n| COUNTRY_MISMATCH | Jurisdiction is not supported; cannot proceed with payment or submission. |\n| PAYMENT_SUBMISSION_FAILED | Payment could not be submitted. |\n| PAYMENT_SUBMIT_ERROR | Payment submission error. |\n| INVESTMENT_NOT_FOUND | Investment not found or can no longer be submitted. |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found (account or primary user)"},"500":{"description":"Internal Server Error"}}}},"/pi/v1/investments/{investmentId}":{"delete":{"tags":["Investments"],"summary":"Cancel investment","description":"Cancel an investment.","operationId":"cancelInvestment","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"investmentId","in":"path","required":true,"description":"Investment identifier.","schema":{"type":"string"},"example":"U7F7D95Y"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelInvestmentRequest"},"example":{"accountId":"PR-1234-5678","transactionId":"a0000000-0000-0000-0000-000000000004"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentDetails"},"example":{"investmentId":"U7F7D95Y","amount":1000,"fundedAmount":0,"status":"CANCELLED","assetId":"39737","transactionId":"a0000000-0000-0000-0000-000000000004","paymentType":"WIRE","createdTs":"2025-12-11T11:30:42.534426Z","modifiedTs":"2025-12-11T12:30:00.000000Z"}}}},"400":{"description":"Bad Request (validation failed or invalid payload). Body: `errors` array; each item has `code`, `message`, optional `field`.\n\n**Cancel investment — error codes:**\n\n| Code | Meaning |\n|------|---------|\n| ACCOUNT_ID_REQUIRED | Account identifier is required. |\n| TRANSACTION_ID_REQUIRED | Transaction ID is required. |\n| INVESTMENT_CANNOT_BE_CANCELLED | This investment can no longer be canceled. |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found (account, primary user, or investment)"},"500":{"description":"Internal Server Error"}}}},"/pi/v1/assets/{assetId}/investments/{investmentId}/agreement":{"post":{"tags":["Investments"],"summary":"Sign MSA for investment","description":"Sign the Master Subscription Agreement for an investment.\nSignature name must match the account holder's full name.\n","operationId":"signInvestmentAgreement","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"assetId","in":"path","required":true,"description":"Asset identifier.","schema":{"type":"string"},"example":"39737"},{"name":"investmentId","in":"path","required":true,"description":"Investment identifier.","schema":{"type":"string"},"example":"U7F7D95Y"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestmentSignatureRequest"},"example":{"accountId":"PR-1234-5678","transactionId":"a0000000-0000-0000-0000-000000000005","userSignature":"John Doe","version":"1.0"}}}},"responses":{"200":{"description":"OK (investment status becomes SIGNED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgreementDTO"},"example":{"id":"770e8400-e29b-41d4-a716-446655440002","userId":"43XSYHc0h4aU5cxMkqhIQn","assetId":"39737","signedTs":"2025-12-11T12:20:00.000000Z","documentId":"660e8400-e29b-41d4-a716-446655440001","status":"SIGNED","expired":false,"createdTs":"2025-12-11T12:20:00.000000Z","createdBy":"43XSYHc0h4aU5cxMkqhIQn","modifiedTs":"2025-12-11T12:20:00.000000Z","modifiedBy":"43XSYHc0h4aU5cxMkqhIQn","userSignature":"John Doe","subscriptionType":"STANDARD_MSA","documentVersion":"1.0"}}}},"400":{"description":"Bad Request (validation failed or invalid payload). Body: `errors` array; each item has `code`, `message`, optional `field`.\n\n**Sign agreement — error codes:**\n\n| Code | Meaning |\n|------|---------|\n| ACCOUNT_ID_REQUIRED | Account identifier is required. |\n| TRANSACTION_ID_REQUIRED | Transaction ID is required. |\n| USER_SIGNATURE_REQUIRED | User signature (full name) is required. |\n| USER_SIGNATURE_CANNOT_BE_BLANK | User signature cannot be blank. |\n| VERSION_REQUIRED | MSA version is required. |\n| VERSION_CANNOT_BE_BLANK | MSA version cannot be blank. |\n| ASSET_NOT_RELATED_TO_INVESTMENT | Asset is not related to the investment (path assetId mismatch). |\n| SIGNATURE_NAME_MISMATCH | Signature name must match the account holder's name. |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"signatureMismatch":{"summary":"Signature name mismatch","value":{"errors":[{"code":"SIGNATURE_NAME_MISMATCH","message":"Signature name must match the account holder's name.","field":"userSignature"}]}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found (account or primary user)"},"500":{"description":"Internal Server Error"}}}},"/auth/v1/api/token":{"post":{"tags":["Authorization"],"summary":"Get Bearer token","operationId":"loginUsingPOST","security":[{"x-api-key":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"},"example":{"accessToken":"Bearer eyJraWQiOiJhdXRoLWpYzEtZWEIjoiM0xDYjVuWG1s...","expiresIn":3600,"refreshToken":"2368f1ba-5670-4095-b2bc-89745f5a1234"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenRequest"},"example":{"clientId":"some-client-id","clientSecret":"some-strong-secret"}}}}}},"/auth/v1/api/refresh":{"post":{"tags":["Authorization"],"summary":"Refresh Token","operationId":"refreshTokenUsingPOST","security":[{"x-api-key":[],"bearerAuth":[],"refreshToken":[]}],"parameters":[{"name":"refreshToken","in":"header","required":true,"schema":{"type":"string"},"description":"refreshToken"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Message"},{"$ref":"#/components/schemas/TokenResponse"}]}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}}}},"/pi/v1/docs/assets/{assetId}/accounts/{accountId}/wire-instructions":{"get":{"tags":["Documents"],"summary":"Download wire instructions.","description":"Wire instructions to fund an account for a specific investment in an asset.\nThe query parameter `investmentId` is required.\n","operationId":"getWireInstructions","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"assetId","in":"path","required":true,"description":"Asset identifier.","schema":{"type":"string","example":"39737"}},{"name":"accountId","in":"path","required":true,"description":"Account identifier.","schema":{"type":"string","example":"PR-1234-5678"}},{"name":"investmentId","in":"query","required":true,"description":"Investment identifier.","schema":{"type":"string","example":"U7F7D95Y"}}],"responses":{"200":{"description":"Wire instructions document successfully retrieved.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid request parameters"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Wire instructions not found"},"500":{"description":"Internal Server Error"}}}},"/markets/v1/schedules":{"get":{"tags":["Markets"],"summary":"Get market schedules","description":"Returns pre-market, market, and post-market hours for the tZERO broker.\n\nThe `type` query parameter selects which schedule variant is returned:\n- `TRADING` — hours during which trades can be executed.\n- `ORDERS` — hours during which orders can be submitted.\n","operationId":"getMarketSchedules","security":[{"x-api-key":[]}],"parameters":[{"name":"type","in":"query","required":true,"description":"Schedule variant to return.","schema":{"type":"string","enum":["TRADING","ORDERS"],"default":"TRADING"}},{"name":"start","in":"query","required":false,"description":"Date in `yyyy-MM-dd` or ISO-8601 format before which schedules should not be returned. If not provided a default is used.\n","schema":{"type":"string"},"example":"2026-04-13"},{"name":"stop","in":"query","required":false,"description":"Date in `yyyy-MM-dd` or ISO-8601 format after which schedules should not be returned. If not provided a default is used.\n","schema":{"type":"string"},"example":"2026-04-20"},{"name":"zoneid","in":"query","required":false,"description":"ISO-8601 zone ID in which returned hours should be messaged (e.g. `America/New_York`, `America/Los_Angeles`, `Europe/Paris`). If not provided a default is used.\n","schema":{"type":"string"},"example":"America/New_York"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"},"examples":{"success":{"summary":"Example response","value":{"dto":[{"date":"2026-04-13","zoneId":"America/New_York","description":"Regular trading day","preMarketHours":{"open":"2026-04-13T07:00:00-04:00","close":"2026-04-13T09:30:00-04:00"},"marketHours":{"open":"2026-04-13T09:30:00-04:00","close":"2026-04-13T16:00:00-04:00"},"postMarketHours":{"open":"2026-04-13T16:00:00-04:00","close":"2026-04-13T20:00:00-04:00"}}],"errors":null}}}}}},"400":{"description":"Bad Request — `type` query parameter is missing or not one of the supported values (`SCHEDULE_TYPE_INVALID`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduleResponse"},"examples":{"invalidType":{"summary":"Invalid schedule type","value":{"dto":null,"errors":[{"code":"SCHEDULE_TYPE_INVALID","message":"Unsupported schedule type 'FOO'. Expected one of: TRADING, ORDERS."}]}}}}}},"500":{"description":"Internal Server Error"}}}},"/markets/v1/mdt/public-pricehistory/{symbol}":{"get":{"tags":["Markets"],"summary":"Get Price History for a Symbol","description":"Returns pricehistory for the requested Symbol","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"symbol","in":"path","required":true,"description":"Symbol that will be used to retrieve the price history\"","schema":{"type":"string"},"example":"TZROP"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"priceHistories":{"type":"array","items":{"$ref":"#/components/schemas/PriceHistory"}}}}}}}}}},"/markets/v1/mdt/public-snapshots/{symbol}":{"get":{"tags":["Markets"],"summary":"Get marketdata snapshot for a symbol","description":"Returns Market snapshot for a requested symbol in the path","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"symbol","in":"path","required":true,"description":"Symbol that will be used to retrieve the market snapshot\"","schema":{"type":"string"},"example":"TZROP"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SymbolData"},"examples":{"TZROP":{"summary":"TZROP Snapshot","value":{"symbol":"TZROP","high":1,"low":1,"open":1,"volume":30,"lastPrice":1,"lastQuantity":10,"prevClosePx":3.5,"bidPrice":3.92,"bidPriceRate":null,"bidQuantity":5000,"bidQtyBookTotal":5167,"askPrice":3.52,"askPriceRate":null,"askQuantity":75,"askQtyBookTotal":3105,"timestamp":"2026-01-30T14:11:47.969023549-05:00"}}}}}}}}},"/trading/v1/fee":{"get":{"tags":["Trading"],"summary":"Calculates an estimated fee for the trade.","description":"Calculates anticipated order fees prior to actually submitting order changes and incurring the fees.\n","operationId":"getOrderFee","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"price","in":"query","required":true,"schema":{"type":"string"},"description":"Price (in USD) of a single unit of the item intended to be traded."},{"name":"assetId","in":"query","required":true,"schema":{"type":"string"}},{"name":"quantity","in":"query","required":true,"schema":{"type":"string"},"description":"The total quantity of the item intended to be traded."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeeResponse"}}}},"400":{"description":"The request is invalid. The provided data must be changed."},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"}}}},"/trading/v1/accounts/{accountId}/orders":{"post":{"tags":["Trading"],"summary":"Creates an order for an Account","description":"Creates an order for the Account Id in the URL\n","operationId":"createOrder","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string"},"description":"Account identifier."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderRequest"},"example":{"symbol":"tZERO","assetId":"39737","side":"BUY","timeInForce":"DAY","expireDate":"2026-12-31","type":"LIMIT","quantity":100,"limitPrice":10,"transactionId":"TRAN-123"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrderResponse"},"example":{"transactionId":"TRAN-123","id":"ORDER-123456","status":"SUBMITTED","symbol":"tZERO","assetId":"39737","side":"BUY","timeInForce":"DAY","type":"LIMIT","quantity":100,"limitPrice":10,"expireTs":"2026-04-29T23:34:59.000000-04:00","createdTs":"2026-04-20T23:34:59.000000-04:00","fee":1.23}}}},"400":{"description":"Bad Request (validation failed or invalid payload). Body: `errors` array; each item has `code`, `message`, optional `field`.\n\n**Submit trade order — example error codes (non-exhaustive):**\n\n| Code | Meaning |\n|------|---------|\n| TRANSACTION_ID_REQUIRED | transactionId is required. |\n| INVALID_TIME_IN_FORCE | timeInForce value is not recognized. Valid: DAY, GTC, GTD. |\n| EXPIRE_DATE_REQUIRED | expireDate is required when timeInForce is GOOD_TIL_DATE. |\n| EXPIRE_DATE_NOT_ALLOWED | expireDate must be null when timeInForce is DAY. |\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"},"503":{"description":"Service Unavailable"}}},"get":{"tags":["Trading"],"summary":"Gets All orders placed for an Account.","description":"Retrieve a list of orders for the given account, filtered by query parameters when supplied.\n","operationId":"getOrders","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string"},"description":"Account identifier."},{"name":"symbol","in":"query","required":false,"schema":{"type":"string"}},{"name":"assetId","in":"query","required":false,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string"},"description":"Start of time range filter (ISO-8601)."},{"name":"to","in":"query","required":false,"schema":{"type":"string"},"description":"End of time range filter (ISO-8601)."},{"name":"zone","in":"query","required":false,"schema":{"type":"string"},"description":"Time zone identifier(America/New_York, America/Los_Angeles) for interpreting `from`/`to`."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersListResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error"}}}},"/trading/v1/accounts/{accountId}/orders/{orderId}":{"get":{"tags":["Trading"],"summary":"Retrieve a single order for the given Order Id","description":"Retrieve a single trade order by ID for the given account.\n","operationId":"getOrder","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string"},"description":"Account identifier."},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"},"description":"Order identifier."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResponse"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Order not found"},"500":{"description":"Internal Server Error"}}},"delete":{"tags":["Trading"],"summary":"Attempts to a Cancel a OPEN Order","description":"Attempts to Cance a OPEN order associated to the Account Id and Order Id in the URL.\n","operationId":"cancelOrder","security":[{"x-api-key":[],"bearerAuth":[]}],"parameters":[{"name":"accountId","in":"path","required":true,"schema":{"type":"string"},"description":"Account identifier."},{"name":"orderId","in":"path","required":true,"schema":{"type":"string"},"description":"Order identifier."}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderResponse"}}}},"400":{"description":"Bad Request (e.g. missing orderId or transactionId)."},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Order not found"},"422":{"description":"Order cannot be cancelled"},"500":{"description":"Internal Server Error"},"503":{"description":"Service Unavailable"}}}}},"components":{"securitySchemes":{"x-api-key":{"type":"apiKey","in":"header","name":"x-apikey"},"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"refreshToken":{"type":"refreshToken","in":"header","name":"refreshToken"}},"schemas":{"ErrorResponse":{"type":"object","description":"Error response body for validation and business-rule failures. Contains a list of errors; each item has code, message, and optional field (JSON path).","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorItem"}}}},"ErrorItem":{"type":"object","properties":{"code":{"type":"string","description":"Error/validation code (e.g. DATE_OF_BIRTH_IN_FUTURE, JURISDICTION_COUNTRY_NOT_ALLOWED). See x-businessValidationErrorCodes for business logic codes."},"message":{"type":"string","description":"Human-readable message."},"field":{"type":"string","nullable":true,"description":"Request field path when applicable (e.g. investor.dateOfBirth, investor.physicalAddress.country)."},"details":{"type":"object","nullable":true,"additionalProperties":true,"description":"Optional object that will be sent for certain error `code` and documented in the endpoint's error table.\n"}}},"Message":{"type":"object","required":["code","data","message"],"properties":{"code":{"type":"string"},"data":{"type":"object","additionalProperties":true},"message":{"type":"string"}},"title":"Message"},"TokenRequest":{"type":"object","required":["clientId","clientSecret"],"properties":{"clientId":{"type":"string"},"clientSecret":{"type":"string"}},"title":"TokenRequest"},"TokenResponse":{"type":"object","required":["accessToken","expiresIn"],"properties":{"accessToken":{"type":"string"},"expiresIn":{"type":"number"},"refreshToken":{"type":"string"}},"title":"TokenResponse"},"CreateIndividualAccountRequest":{"type":"object","required":["transactionId","investor"],"properties":{"transactionId":{"type":"string","description":"Mandatory string for auditing and troubleshooting; echoed back in the response.","example":"a0000000-0000-0000-0000-000000000001"},"investor":{"$ref":"#/components/schemas/InvestorRequest"},"optOutOfTrustedContact":{"type":"boolean","description":"Account owner intending to not add a trusted contact to the account.If the owner agrees to add trusted contact then the trustedContact is required while creating an account."},"investmentProfile":{"allOf":[{"$ref":"#/components/schemas/InvestmentProfile"}],"nullable":true},"trustedContact":{"allOf":[{"$ref":"#/components/schemas/AccountTrustedContact"}],"nullable":true}}},"InvestmentProfile":{"type":"object","required":["investmentObjective","tradeIlliquidSecurities"],"properties":{"investmentObjective":{"$ref":"#/components/schemas/InvestmentObjective"},"tradeIlliquidSecurities":{"type":"boolean","description":"Acknowledgement that user is willing to trade low volume securities."}}},"TermsAcceptRequest":{"type":"object","required":["acceptedAccountsTermsAndCondition","eSignatureFullName"],"properties":{"acceptedAccountsTermsAndCondition":{"type":"boolean","description":"Must be true to accept account terms and conditions."},"termsAcceptedAt":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp when terms were accepted (ISO-8601); if null, current time is used."},"eSignatureFullName":{"type":"string","minLength":1,"maxLength":300,"description":"E-signature (full name including middle name when present); must match investor's full name."}}},"InvestmentObjective":{"type":"string","enum":["CAPITAL_APPRECIATION","SPECULATION","TRADING_PROFITS"],"description":"Case-insensitive when deserializing."},"EmploymentStatus":{"type":"string","enum":["FULL_TIME_EMPLOYED","PART_TIME_EMPLOYED","UNEMPLOYED","RETIRED","STUDENT"],"description":"Case-insensitive when deserializing."},"EmploymentRequest":{"type":"object","required":["employmentStatus"],"properties":{"employmentStatus":{"$ref":"#/components/schemas/EmploymentStatus"},"employerName":{"type":"string","nullable":true,"maxLength":100,"description":"Required when employmentStatus is FULL_TIME_EMPLOYED or PART_TIME_EMPLOYED."},"occupation":{"type":"string","nullable":true,"maxLength":100,"description":"Required when employmentStatus is FULL_TIME_EMPLOYED or PART_TIME_EMPLOYED."}}},"InvestorRequest":{"type":"object","required":["agreement","email","firstName","lastName","physicalAddress","dateOfBirth"],"properties":{"agreement":{"$ref":"#/components/schemas/TermsAcceptRequest","description":"Terms and conditions acceptance; required."},"email":{"type":"string","format":"email","example":"john.doe@example.com"},"firstName":{"type":"string","minLength":1,"maxLength":100,"example":"John"},"middleName":{"type":"string","nullable":true,"example":"M"},"lastName":{"type":"string","minLength":1,"maxLength":100,"example":"Doe"},"citizenshipCountry":{"type":"string","nullable":true,"description":"ISO 3166-1 alpha-2 country code (two uppercase letters).","example":"US"},"taxCountry":{"type":"string","nullable":true,"description":"ISO 3166-1 alpha-2 country code (two uppercase letters).","example":"US"},"dateOfBirth":{"type":"string","description":"ISO date YYYY-MM-DD required.","example":"1990-01-31"},"employment":{"$ref":"#/components/schemas/EmploymentRequest","nullable":true},"physicalAddress":{"$ref":"#/components/schemas/AddressRequest"},"mailingAddress":{"allOf":[{"$ref":"#/components/schemas/AddressRequest"}],"nullable":true},"phoneNumbers":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumberRequest"}},"governmentIdentifiers":{"type":"array","items":{"$ref":"#/components/schemas/GovernmentIdentifierRequest"}}}},"AddressRequest":{"type":"object","required":["street","city","stateOrProvince","postalCode","country"],"properties":{"street":{"type":"string","example":"1122 King Road"},"street2":{"type":"string","nullable":true,"example":"Apt 12"},"street3":{"type":"string","nullable":true},"street4":{"type":"string","nullable":true},"street5":{"type":"string","nullable":true},"unit":{"type":"string","nullable":true,"example":"Unit 5B"},"city":{"type":"string","example":"New York"},"stateOrProvince":{"type":"string","description":"State or province (required for address).","example":"NY"},"postalCode":{"type":"string","example":"10001"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code (two uppercase letters).","example":"US"}}},"PhoneNumberRequest":{"type":"object","properties":{"countryCode":{"type":"string","nullable":true,"example":"1"},"countryCodeAlpha":{"type":"string","nullable":true,"description":"ISO 3166-1 alpha-2 country code (two uppercase letters).","example":"US"},"nationalNumber":{"type":"string","nullable":true,"example":"2125550123"},"ext":{"type":"string","nullable":true,"example":"123"},"type":{"$ref":"#/components/schemas/PhoneNumberType"}}},"PhoneNumberType":{"type":"string","enum":["PRIMARY","ALTERNATE"],"example":"PRIMARY"},"GovernmentIdentifierRequest":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/GovernmentIdentifierType"},"country":{"type":"string","nullable":true,"description":"ISO 3166-1 alpha-2 country code (two uppercase letters).","example":"US"},"identifier":{"type":"string","nullable":true,"example":"123456789"}}},"GovernmentIdentifierType":{"type":"string","enum":["TIN","INTERNATIONAL_TIN","PASSPORT","EIN"],"example":"TIN"},"AccountTrustedContact":{"type":"object","required":["email","firstName","lastName","physicalAddress","phoneNumber"],"properties":{"email":{"type":"string","format":"email"},"firstName":{"type":"string","minLength":1,"maxLength":100},"middleName":{"type":"string","nullable":true},"lastName":{"type":"string","minLength":1,"maxLength":100},"physicalAddress":{"$ref":"#/components/schemas/TrustedContactAddress"},"phoneNumber":{"type":"string"}}},"TrustedContactRequest":{"type":"object","required":["transactionId","email","firstName","lastName","physicalAddress"],"properties":{"transactionId":{"type":"string","description":"Mandatory string for auditing and troubleshooting; echoed back in the response.","example":"a0000000-0000-0000-0000-000000000001"},"email":{"type":"string","format":"email"},"firstName":{"type":"string","minLength":1,"maxLength":100},"middleName":{"type":"string","nullable":true},"lastName":{"type":"string","minLength":1,"maxLength":100},"physicalAddress":{"$ref":"#/components/schemas/TrustedContactAddress"},"phoneNumber":{"type":"string"}}},"TrustedContactResponse":{"type":"object","properties":{"trustedContact":{"$ref":"#/components/schemas/TrustedContactDetails","description":"The created trusted contact."},"transactionId":{"type":"string","nullable":true,"description":"Echoed from the request."}}},"PatchFinancialInfoRequest":{"type":"object","description":"All fields optional except transactionId; only provided fields are updated.","required":["transactionId"],"properties":{"transactionId":{"type":"string","description":"Mandatory string for auditing and troubleshooting; echoed back in the response.","example":"a0000000-0000-0000-0000-000000000001"},"netWorth":{"type":"number","format":"decimal","minimum":0,"nullable":true,"description":"Net worth; when provided, updates primary user's net worth."},"annualIncome":{"type":"number","format":"decimal","minimum":0,"nullable":true,"description":"Annual income; when provided, updates primary user's annual income."}}},"FinancialInfoResponse":{"type":"object","properties":{"accountId":{"type":"string","description":"Account identifier."},"netWorth":{"type":"number","format":"decimal","nullable":true},"annualIncome":{"type":"number","format":"decimal","nullable":true},"annualIncomeLastChangedTs":{"type":"string","format":"date-time","nullable":true},"transactionId":{"type":"string","nullable":true,"description":"Echoed from request on PATCH; null on GET."}}},"TriggerKycRequest":{"type":"object","required":["transactionId"],"properties":{"transactionId":{"type":"string","description":"Mandatory string for auditing and troubleshooting; echoed back in the response.","example":"a0000000-0000-0000-0000-000000000001"}}},"KycResponse":{"type":"object","properties":{"status":{"type":"string","nullable":true,"description":"KYC status. Values: PENDING (submitted, awaiting review or DocV), APPROVED (verified), NOT_APPROVED (denied, non-retryable), NOT_APPROVED_RETRYABLE (denied, may retry), VENDOR_ERROR, CANNOT_PROCESS.\nWhen PENDING and DocV is required, docUrl and qrMessage may be present for the user to complete document verification.\n"},"id":{"type":"string","format":"uuid","nullable":true,"description":"KYC record ID."},"createdTs":{"type":"string","format":"date-time","nullable":true},"modifiedTs":{"type":"string","format":"date-time","nullable":true},"docUrl":{"type":"string","nullable":true,"description":"Present when status is PENDING and document verification (DocV) is required and the link is valid. URL for the user to upload their ID document. Omit or null when DocV is not required or link has expired.\n"},"qrMessage":{"type":"string","nullable":true,"description":"Present when status is PENDING and DocV is required and the link is valid. Base64 or image data for a QR code that points to the same document-upload flow as docUrl. Use when showing the user a QR code instead of a link. Omit or null when DocV is not required or link has expired.\n"},"docStatus":{"type":"string","nullable":true,"description":"Document verification (DocV) status. Null when no DocV request exists. Values: USER_ACTION_REQUIRED (user must complete DocV; docUrl/qrMessage are present when valid), PROCESSING (document received, verification in progress), COMPLETED (DocV succeeded), EXPIRED (link or session expired), FAILED (verification failed).\n"}}},"PostKycResponse":{"type":"object","properties":{"userId":{"type":"string"},"kycResult":{"$ref":"#/components/schemas/KycResponse"},"transactionId":{"type":"string","nullable":true,"description":"Echoed from the request."}}},"AccountResponse":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"createdTs":{"type":"string","format":"date-time"},"investors":{"type":"array","description":"Investors associated to the account.","items":{"$ref":"#/components/schemas/InvestorResponse"}},"optOutOfTrustedContact":{"type":"boolean","description":"Captured Account owner response regarding addition of Trusted contact to the account."},"trustedContact":{"allOf":[{"$ref":"#/components/schemas/TrustedContactDetails"}],"nullable":true,"description":"Account's trusted contact when set; null otherwise (trusted contact is not an investor).","example":{"id":"7e8f9a0b-1c2d-3e4f-5a6b-777777777777","email":"trusted.contact@example.com","firstName":"Jane","lastName":"Contact","physicalAddress":{"street":"456 Oak Avenue","city":"New York","stateOrProvince":"NY","postalCode":"10001","country":"US"},"phoneNumbers":"+12125550456"}},"transactionId":{"type":"string","nullable":true,"description":"Echoed from the request on POST/PUT; null on GET."}}},"EmploymentResponse":{"type":"object","properties":{"employmentStatus":{"$ref":"#/components/schemas/EmploymentStatus","nullable":true},"employerName":{"type":"string","nullable":true},"occupation":{"type":"string","nullable":true}}},"InvestorUpdateResponse":{"type":"object","description":"Updated investor.","properties":{"investor":{"$ref":"#/components/schemas/InvestorResponse"},"transactionId":{"type":"string","nullable":true,"description":"Echoed from the request on PUT."}}},"InvestorResponse":{"type":"object","properties":{"type":{"type":"string","nullable":true},"id":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"firstName":{"type":"string","nullable":true},"middleName":{"type":"string","nullable":true},"lastName":{"type":"string","nullable":true},"citizenshipCountry":{"type":"string","nullable":true},"dateOfBirth":{"type":"string","nullable":true},"employment":{"allOf":[{"$ref":"#/components/schemas/EmploymentResponse"}],"nullable":true},"physicalAddress":{"allOf":[{"$ref":"#/components/schemas/AddressResponse"}],"nullable":true},"mailingAddress":{"allOf":[{"$ref":"#/components/schemas/AddressResponse"}],"nullable":true},"phoneNumbers":{"type":"array","items":{"$ref":"#/components/schemas/PhoneNumberResponse"}},"governmentIdentifiers":{"type":"array","items":{"$ref":"#/components/schemas/GovernmentIdentifierResponse"}}}},"TrustedContactDetails":{"type":"object","description":"Trusted contact.","properties":{"id":{"type":"string","nullable":true},"email":{"type":"string"},"firstName":{"type":"string"},"middleName":{"type":"string","nullable":true},"lastName":{"type":"string"},"physicalAddress":{"allOf":[{"$ref":"#/components/schemas/TrustedContactAddress"}]},"phoneNumber":{"type":"string"}}},"TrustedContactAddress":{"type":"object","properties":{"street":{"type":"string"},"street2":{"type":"string","nullable":true},"city":{"type":"string"},"stateOrProvince":{"type":"string","description":"State or province."},"postalCode":{"type":"string"},"country":{"type":"string"}}},"AddressResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"example":"2f3b2c1a-4c1b-4b1b-9d1a-111111111111"},"street":{"type":"string","nullable":true},"street2":{"type":"string","nullable":true},"street3":{"type":"string","nullable":true},"street4":{"type":"string","nullable":true},"street5":{"type":"string","nullable":true},"unit":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"stateOrProvince":{"type":"string","nullable":true,"description":"State or province."},"postalCode":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"createdTs":{"type":"string","format":"date-time","nullable":true},"modifiedTs":{"type":"string","format":"date-time","nullable":true}}},"PhoneNumberResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"example":"4c2d3e4f-5a6b-7c8d-9e0f-222222222222"},"countryCode":{"type":"string","nullable":true},"countryCodeAlpha":{"type":"string","nullable":true},"nationalNumber":{"type":"string","nullable":true},"ext":{"type":"string","nullable":true},"type":{"$ref":"#/components/schemas/PhoneNumberType"},"createdTs":{"type":"string","format":"date-time","nullable":true},"modifiedTs":{"type":"string","format":"date-time","nullable":true}}},"GovernmentIdentifierResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid","nullable":true,"example":"aaaaaaaa-bbbb-cccc-dddd-333333333333"},"type":{"$ref":"#/components/schemas/GovernmentIdentifierType"},"country":{"type":"string","example":"US"},"identifier":{"type":"string","nullable":true,"example":"123456789"},"createdTs":{"type":"string","format":"date-time","nullable":true},"modifiedTs":{"type":"string","format":"date-time","nullable":true}}},"UpdateInvestorRequest":{"type":"object","required":["transactionId","investor"],"properties":{"transactionId":{"type":"string","description":"Mandatory string for auditing and troubleshooting; echoed back in the response.","example":"a0000000-0000-0000-0000-000000000001"},"investor":{"$ref":"#/components/schemas/InvestorUpdateRequest"}}},"InvestorUpdateRequest":{"type":"object","description":"Investor update payload.\nNotes:\n- Email cannot be changed after account creation (if provided it may be rejected).\n- dateOfBirth is optional; when provided (YYYY-MM-DD), validated for format, not future, not older than 120y, min age 18.\n- firstName/lastName when provided must not be blank.\n- phoneNumbers uses replace semantics when provided (full desired set).\n- governmentIdentifiers supports replace semantics when provided.\n- Country/residence is derived from physicalAddress.country only.\n","properties":{"firstName":{"type":"string","nullable":true,"minLength":1,"maxLength":100,"example":"John"},"middleName":{"type":"string","nullable":true,"example":"M"},"lastName":{"type":"string","nullable":true,"minLength":1,"maxLength":100,"example":"Doe"},"citizenshipCountry":{"type":"string","nullable":true,"description":"ISO 3166-1 alpha-2 country code (two uppercase letters).","example":"US"},"taxCountry":{"type":"string","nullable":true,"description":"ISO 3166-1 alpha-2 country code (two uppercase letters).","example":"US"},"dateOfBirth":{"type":"string","nullable":true,"description":"Investor's date of birth; ISO date YYYY-MM-DD. Optional; when provided, same validation as create.","example":"1990-01-31"},"employment":{"$ref":"#/components/schemas/EmploymentRequest","nullable":true},"physicalAddress":{"allOf":[{"$ref":"#/components/schemas/AddressRequest"}],"nullable":true},"mailingAddress":{"allOf":[{"$ref":"#/components/schemas/AddressRequest"}],"nullable":true},"phoneNumbers":{"type":"array","nullable":true,"description":"Replace semantics when provided:\nthis list is the full desired set; omitted existing phones are deleted.\nWhen null/absent, phones are unchanged.\n","items":{"$ref":"#/components/schemas/PhoneNumberRequest"}},"governmentIdentifiers":{"type":"array","nullable":true,"description":"Replace semantics when provided: this list is the full desired set;\nomitted existing identifiers are deleted. At least one identifier must\nremain if the account has existing identifiers (cannot delete all).\nWhen null/absent, government identifiers are unchanged.\n","items":{"$ref":"#/components/schemas/GovernmentIdentifierRequest"}}}},"AssetsResponse":{"type":"object","required":["assets"],"properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/Asset"}}}},"Asset":{"type":"object","description":"Asset details.","properties":{"assetId":{"type":"string","description":"Asset identifier (can be numeric or alphanumeric).","example":"39737"},"symbol":{"type":"string","nullable":true,"example":"AF"},"assetName":{"type":"string","nullable":true,"example":"Abstract Face"},"assetDescription":{"type":"string","nullable":true,"example":""},"assetType":{"$ref":"#/components/schemas/CodeLabelDescription"},"requiresAccreditation":{"type":"boolean","nullable":true},"pricePerShare":{"type":"number","format":"double","nullable":true},"minimumInvestment":{"type":"number","format":"double","nullable":true},"maximumInvestment":{"type":"number","format":"double","nullable":true},"status":{"type":"string","nullable":true,"example":"OPEN"},"offeringCloseDate":{"type":"string","format":"date-time","nullable":true},"offering":{"$ref":"#/components/schemas/CodeLabelDescription"},"countries":{"type":"array","items":{"type":"string"}},"paymentTypes":{"type":"array","items":{"$ref":"#/components/schemas/CodeLabelDescription"}}}},"CodeLabelDescription":{"type":"object","properties":{"code":{"type":"string","example":"COMMON_STOCK"},"label":{"type":"string","example":"Common Stock"},"description":{"type":"string","nullable":true,"example":"Common Stock."}}},"AgreementDTO":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"userId":{"type":"string"},"assetId":{"type":"string"},"signedTs":{"type":"string","format":"date-time","nullable":true},"documentId":{"type":"string","format":"uuid"},"status":{"type":"string"},"expired":{"type":"boolean"},"createdTs":{"type":"string","format":"date-time","nullable":true},"createdBy":{"type":"string"},"modifiedTs":{"type":"string","format":"date-time","nullable":true},"modifiedBy":{"type":"string"},"userSignature":{"type":"string"},"subscriptionType":{"type":"string","enum":["STANDARD_MSA"]},"documentVersion":{"type":"string"}}},"CreateInvestmentRequest":{"type":"object","required":["accountId","transactionId","amount"],"properties":{"accountId":{"type":"string","description":"Account identifier."},"transactionId":{"type":"string","description":"Client-provided id for idempotency and auditing (required, non-blank).","example":"a0000000-0000-0000-0000-000000000001"},"amount":{"type":"number","format":"double","description":"Investment amount (positive)."},"numberOfShares":{"type":"number","format":"double","nullable":true,"description":"Number of shares (positive if provided). Optional value that gets computed from `amount` when ignored."},"regCFInvestmentTermsAccepted":{"type":"boolean","nullable":true,"description":"Required true for Reg CF assets; optional for others."}}},"UpdateInvestmentRequest":{"type":"object","description":"Request body for updating an investment (amount, payment details).","required":["accountId","investmentId","transactionId"],"properties":{"accountId":{"type":"string","description":"Account identifier."},"investmentId":{"type":"string","description":"Investment identifier to update."},"amount":{"type":"number","format":"double","nullable":true,"description":"Investment amount (positive if provided)"},"numberOfShares":{"type":"number","format":"double","nullable":true,"description":"Number of shares (positive if provided). Can be computed from `amount` when ignored."},"paymentType":{"type":"string","enum":["WIRE","ACH"],"nullable":true,"description":"Payment type. Only WIRE and ACH are supported."},"bankAccountId":{"type":"string","nullable":true,"description":"Bank account ID for ACH payments. Required when paymentType is ACH. Also accepts `achAccountId`."},"paymentId":{"type":"string","nullable":true,"description":"Payment identifier."},"transactionId":{"type":"string","description":"Client-provided id for auditing (required, non-blank).","example":"a0000000-0000-0000-0000-000000000001"},"selfAttestedAccreditationAnswer":{"type":"boolean","nullable":true,"description":"Self-attested accreditation answer."}}},"CreatePaymentRequest":{"type":"object","description":"Request body for updating payment details on an investment. Only WIRE and ACH payment types are supported.","required":["accountId","paymentType","transactionId"],"properties":{"accountId":{"type":"string","description":"Account identifier."},"paymentType":{"$ref":"#/components/schemas/PaymentTypeEnum"},"bankAccountId":{"type":"string","nullable":true,"description":"Linked bank account identifier. Required when paymentType is ACH."},"transactionId":{"type":"string","description":"Client-provided id for auditing (required, non-blank).","example":"a0000000-0000-0000-0000-000000000001"}}},"CreateBankAccountRequest":{"type":"object","description":"Request body for linking a new bank account.","required":["accountNumber","routingNumber","accountType","bankName","bankOwnerName","transactionId","partnerVerified"],"properties":{"accountNumber":{"type":"string","pattern":"^\\d{4,17}$","description":"Full bank account number (4-17 digits).","example":"123456789"},"routingNumber":{"type":"string","pattern":"^\\d{9}$","description":"Bank routing number — exactly 9 digits (ABA)."},"accountType":{"type":"string","enum":["CHECKING","SAVINGS"],"description":"Type of bank account."},"bankName":{"type":"string","description":"Name of the bank."},"bankOwnerName":{"type":"string","description":"Name of the bank account owner."},"transactionId":{"type":"string","description":"Client-provided id for auditing (required, non-blank).","example":"a0000000-0000-0000-0000-000000000010"},"partnerVerified":{"type":"boolean","description":"Attestation that the partner has verified the bank account details. Must be true to proceed.","example":true},"verificationResult":{"type":"string","nullable":true,"description":"Optional free-text field for audit trail describing how the bank details were verified.","example":"Verified via Plaid"}}},"BankAccountDetails":{"type":"object","properties":{"bankAccountId":{"type":"string","description":"Unique identifier for the linked bank account."},"bankName":{"type":"string"},"maskedAccountNumber":{"type":"string","nullable":true,"description":"Last 4 digits of the account number."},"accountType":{"type":"string","enum":["CHECKING","SAVINGS"],"description":"Type of bank account. May be empty if account type is unknown."},"status":{"type":"string","description":"Bank account status: APPROVED, PENDING, DECLINED, or CANCELED."},"transactionId":{"type":"string","nullable":true,"description":"Client-provided transaction ID (only present on link response)."}}},"CreateBankTransferRequest":{"type":"object","description":"Request body for initiating a bank transfer account.","required":["transactionId","amount","transactionType"],"properties":{"transactionId":{"type":"string","description":"Client-provided id for auditing (required, non-blank).","example":"a0000000-0000-0000-0000-000000000001"},"amount":{"type":"number","format":"double"},"transactionType":{"type":"string","enum":["DEPOSIT","WITHDRAWAL"],"description":"Bank transaction type associated to the request."},"currency":{"type":"string","enum":["USD"],"nullable":true,"example":"USD"}}},"CreateBankTransferResponse":{"type":"object","description":"Response object for bank transfer transaction.","required":["transactionId","transferId","amount","transactionType","bankAccountId"],"properties":{"transactionId":{"type":"string","description":"Client-provided id for auditing (required, non-blank).","example":"a0000000-0000-0000-0000-000000000001"},"transferId":{"type":"string","description":"transferId associated to a transaction provided in response.","example":"1234"},"amount":{"type":"number","format":"double"},"transactionType":{"type":"string","enum":["DEPOSIT","WITHDRAWAL"],"description":"Type of bank account."},"bankAccountId":{"type":"string","description":"Bank account linked to the transaction sent in the request."},"currency":{"type":"string","enum":["USD"],"nullable":true,"example":"USD"}}},"AccountBalanceResponse":{"type":"object","properties":{"accountBalances":{"$ref":"#/components/schemas/BalanceDetails"}}},"BalanceDetails":{"type":"object","properties":{"accountId":{"type":"string"},"fiat":{"type":"array","items":{"$ref":"#/components/schemas/FiatBalance"}},"positions":{"type":"array","items":{"$ref":"#/components/schemas/PositionBalance"}}}},"FiatBalance":{"type":"object","properties":{"currency":{"type":"string","example":"USD"},"totalAmount":{"type":"number","format":"double","description":"Cash amount representing the total buying power in the account. This includes amount that is unseasoned."},"availableWithdrawalAmount":{"type":"number","format":"double","description":"Seasoned fiat cash balance available for transfer to an external linked bank accounts."},"pendingDepositAmount":{"type":"number","format":"double","description":"Amount that represents a Pending Incoming Transfer from a Bank."},"pendingWithdrawalAmount":{"type":"number","format":"double","description":"Amount that representing a Pending Outgoing Transfer to a Bank. Subject to approval for processing the transfer."}}},"PositionBalance":{"type":"object","properties":{"symbol":{"type":"string","example":"TZROP"},"quantity":{"type":"number","format":"double","description":"Quantity of the asset held in the user's account"},"tradeable":{"type":"boolean","example":true,"description":"Indicates if the asset held can ne traded by ATS."},"costBasis":{"$ref":"#/components/schemas/CostBasis"}}},"SubmitInvestmentRequest":{"type":"object","required":["accountId","transactionId"],"properties":{"accountId":{"type":"string"},"transactionId":{"type":"string","description":"Client-provided id for auditing (required, non-blank).","example":"a0000000-0000-0000-0000-000000000001"}}},"CancelInvestmentRequest":{"type":"object","required":["accountId","transactionId"],"properties":{"accountId":{"type":"string"},"transactionId":{"type":"string","description":"Client-provided id for auditing (required, non-blank).","example":"a0000000-0000-0000-0000-000000000001"}}},"InvestmentSignatureRequest":{"type":"object","required":["accountId","transactionId","userSignature","version"],"properties":{"accountId":{"type":"string"},"transactionId":{"type":"string","description":"Client-provided id for auditing (required, non-blank).","example":"a0000000-0000-0000-0000-000000000001"},"userSignature":{"type":"string","description":"Full name of signer (must match account holder)."},"version":{"type":"string","description":"MSA document version."}}},"InvestmentDetails":{"type":"object","properties":{"investmentId":{"type":"string"},"amount":{"type":"number","format":"double"},"numberOfShares":{"type":"number","format":"double","nullable":true},"costBasis":{"type":"number","format":"double","nullable":true},"fundedAmount":{"type":"number","format":"double","nullable":true},"status":{"$ref":"#/components/schemas/InvestmentStatusEnum"},"assetId":{"type":"string"},"transactionId":{"type":"string","nullable":true},"paymentType":{"allOf":[{"$ref":"#/components/schemas/PaymentTypeEnum"}],"nullable":true},"createdTs":{"type":"string","format":"date-time","nullable":true},"modifiedTs":{"type":"string","format":"date-time","nullable":true}}},"InvestmentDTO":{"description":"Investment object returned in list; same shape as InvestmentDetails.","allOf":[{"$ref":"#/components/schemas/InvestmentDetails"}]},"InvestmentStatusEnum":{"type":"string","enum":["CREATED","SIGNED","SUBMITTED","COMPLETED","CANCELLED","COUNTRY_MISMATCH","APPROVED"]},"PaymentTypeEnum":{"type":"string","description":"Supported payment types. Only WIRE and ACH are allowed.","enum":["WIRE","ACH"]},"ScheduleResponse":{"type":"object","description":"Wrapper response for market schedule queries. Contains either a list of schedules in `dto` or a list of `errors`.","properties":{"dto":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/MarketSchedule"}},"errors":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/ScheduleError"}}}},"MarketSchedule":{"type":"object","description":"Pre-market, market, and post-market hours for a single trading day.","required":["date","zoneId"],"properties":{"date":{"type":"string","format":"date","description":"Date in `yyyy-MM-dd` format that the trading hours apply to."},"zoneId":{"type":"string","description":"ISO-8601 zone ID that all open and close times are messaged in (e.g. `America/New_York`)."},"description":{"type":"string","nullable":true,"description":"Optional text roughly describing the date as a whole. Format may change without notice."},"preMarketHours":{"allOf":[{"$ref":"#/components/schemas/SubSchedule"}],"nullable":true,"description":"Trading activity schedule that occurs before regular market hours. Null if pre-market trading is not available this day."},"marketHours":{"allOf":[{"$ref":"#/components/schemas/SubSchedule"}],"nullable":true,"description":"Regular business day trading hours. Null if not allowed this day."},"postMarketHours":{"allOf":[{"$ref":"#/components/schemas/SubSchedule"}],"nullable":true,"description":"Trading activity schedule that occurs after regular market hours. Null if post-market trading is not available this day."}}},"SubSchedule":{"type":"object","description":"A portion of a single day defining open and close times for a trading session.","required":["open","close"],"properties":{"open":{"type":"string","format":"date-time","description":"ISO-8601 date and time when orders are first accepted and trades can be made (inclusive)."},"close":{"type":"string","format":"date-time","description":"ISO-8601 date and time after which orders are no longer accepted and trades will not be made (exclusive)."}}},"ScheduleError":{"type":"object","description":"Error item returned by the schedule endpoints.","properties":{"code":{"type":"string","description":"Error code (e.g. `SCHEDULE_TYPE_INVALID`)."},"message":{"type":"string","description":"Human-readable error message."}}},"SymbolData":{"type":"object","description":"Represents market data for a symbol.","properties":{"symbol":{"type":"string"},"high":{"type":"number"},"low":{"type":"number"},"open":{"type":"number"},"volume":{"type":"integer"},"lastPrice":{"type":"number"},"lastQuantity":{"type":"number"},"prevClosePx":{"type":"number"},"bidPrice":{"type":"number"},"bidPriceRate":{"type":"number"},"bidQuantity":{"type":"number"},"bidQtyBookTotal":{"type":"number"},"askPrice":{"type":"number"},"askPriceRate":{"type":"number"},"askQuantity":{"type":"number"},"askQtyBookTotal":{"type":"number"},"timestamp":{"type":"string"}}},"PriceHistory":{"type":"object","description":"Represents Price History data for a symbol.","properties":{"symbol":{"type":"string"},"date":{"type":"string"},"open":{"type":"number"},"high":{"type":"number"},"low":{"type":"number"},"close":{"type":"number"},"volume":{"type":"integer"}}},"CreateOrderRequest":{"type":"object","required":["transactionId","symbol","assetId","side","timeInForce","type","quantity","limitPrice"],"properties":{"symbol":{"type":"string"},"assetId":{"type":"string"},"side":{"type":"string","description":"BUY or SELL","enum":["BUY","SELL"]},"timeInForce":{"type":"string","enum":["DAY","GTD","GTC"],"description":"Time in Force. Accepts (DAY, GTC, GTD)\n"},"expireDate":{"type":"string","nullable":true,"description":"Expiration date (yyyy-MM-dd). Required only when timeInForce is GOOD_TIL_DATE; must be null for DAY/GTC."},"type":{"type":"string","enum":["LIMIT"]},"quantity":{"type":"number","format":"double"},"limitPrice":{"type":"number","format":"double"},"transactionId":{"type":"string","description":"Client-provided transaction identifier for idempotency and tracing."}}},"CreateOrderResponse":{"type":"object","properties":{"transactionId":{"type":"string"},"id":{"type":"string"},"accountId":{"type":"string"},"symbol":{"type":"string"},"assetId":{"type":"string"},"side":{"type":"string","enum":["BUY","SELL"]},"quantity":{"type":"number","format":"double"},"type":{"type":"string","enum":["LIMIT"]},"limitPrice":{"type":"number","format":"double"},"timeInForce":{"type":"string","enum":["DAY","GTD","GTC"],"description":"Time the order is valid for (DAY, GTC, GTD)\n"},"status":{"type":"string","enum":["SUBMITTED"]},"expireTs":{"type":"string","format":"date-time","nullable":true},"createdTs":{"type":"string","format":"date-time","nullable":true},"modifiedTs":{"type":"string","format":"date-time","nullable":true},"fee":{"type":"number","format":"double","nullable":true}}},"CancelOrderResponse":{"type":"object","required":["transactionId","status","id"],"properties":{"transactionId":{"type":"string"},"id":{"type":"string"},"status":{"type":"string","enum":["CANCEL_REQUESTED"]}}},"OrdersListResponse":{"type":"object","required":["orders"],"properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/OrderResponse"}}}},"OrderResponse":{"type":"object","required":["accountId","id","symbol","side","type","limitPrice","quantity","filledQuantity","leavesQuantity","averagePrice","timeInForce","estimatedFee","estimatedSubTotal","estimatedGrandTotal","assetClass","status"],"properties":{"accountId":{"type":"string"},"id":{"type":"string"},"symbol":{"type":"string"},"side":{"type":"string","enum":["BUY","SELL"]},"type":{"type":"string","enum":["LIMIT"]},"limitPrice":{"type":"number","format":"double"},"quantity":{"type":"number","format":"double"},"filledQuantity":{"type":"number","format":"double"},"leavesQuantity":{"type":"number","format":"double"},"averagePrice":{"type":"number","format":"double","nullable":true},"timeInForce":{"type":"string","enum":["DAY","GTD","GTC"],"description":"Time until the order is valid for (DAY, GTC, GTD)\n"},"expireTs":{"type":"string","format":"date-time","nullable":true,"description":"Optional expiration time for the order when applicable."},"estimatedFee":{"type":"number","format":"double","description":"Estimated fee that will be charged if the entire order is executed for exactly the requested limitPrice. This value will become more accurate as more and more quantity are executed and we know actual amounts billed, as opposed to what is listed in limitPrice."},"estimatedSubtotal":{"type":"number","format":"double","description":"The total amount a customer will pay for just the securities e.g. (limitPrice * quantity). This does not include the fee.This value will become more accurate as more and more quantity are executed and we know actual amounts billed, as opposed to what is listed in limitPrice."},"estimatedGrandTotal":{"type":"number","format":"double","description":"The total amount a customer will be expected to pay ((limitPrice * quantity) + estimatedFee). This value will become more accurate as more and more quantity are executed and we know actual amounts billed, as opposed to what is listed in limitPrice."},"cumulativeFee":{"type":"number","format":"double","nullable":true,"description":"The total amount charged to facilitate the trade so far. If the order is only partially filled then it is expected this balance will grow with each additional partial fill, or fill."},"cumulativeSubtotal":{"type":"number","format":"double","nullable":true,"description":"The amount (in USD) paid so far for all fills in the order. If order was placed at a limit price of $10 for 100 units, but was able to get 10 units for $10 each, 10 units for $9, and 10 units for $8 each then the cumulative would be $170. When the remaining 70 units are filled then this balance is expected to grow. This does not include any fees charged by a broker dealer to facilitate the trade."},"cumulativeGrandTotal":{"type":"number","format":"double","nullable":true,"description":"The total amount (in USD) paid so far, for both the executed trsdes as well as the fee(s) charged for facilitating the exchange. This balance is expected to grow if the order is unfilled or only partially filled."},"status":{"type":"string","enum":["SUBMITTED","OPEN","PARTIALLY_FILLED","FILLED","CANCEL_REQUESTED","PENDING_CANCEL","CANCEL_REJECTED","CANCELED","DONE_FOR_DAY","EXPIRED","REJECTED","STOPPED"]},"createdTs":{"type":"string","format":"date-time","nullable":true},"modifiedTs":{"type":"string","format":"date-time","nullable":true},"assetClass":{"type":"string"},"executionHistory":{"type":"array","items":{"$ref":"#/components/schemas/OrderExecution"},"description":"Execution history for an order."}}},"OrderExecution":{"type":"object","required":["executionTs","cumulativeQuantity","leavesQuantity","averagePrice","executionResult"],"properties":{"executionTs":{"type":"string","description":"ISO-8601 timestamp of the execution."},"affectedQuantity":{"type":"number","format":"double","nullable":true,"description":"Quantity affected by this execution (fills and cancels)."},"fillQuantity":{"type":"number","format":"double","nullable":true,"description":"Quantity filled on this execution."},"fillPrice":{"type":"number","format":"double","nullable":true,"description":"Price per share on this fill."},"cumulativeQuantity":{"type":"number","format":"double","description":"Total filled quantity across all executions so far."},"executionResult":{"type":"string","nullable":true,"enum":["OPEN","PARTIALLY_FILLED","FILLED","CANCELED","REJECTED","CANCEL_REJECTED","EXPIRED","STOPPED","DONE_FOR_DAY"],"description":"Execution result."},"leavesQuantity":{"type":"number","format":"double","description":"Remaining unfilled quantity."},"averagePrice":{"type":"number","format":"double","description":"Average price across all fills."},"text":{"type":"string","nullable":true,"description":"Execution context text."},"fee":{"type":"number","format":"double","nullable":true,"description":"Fee charged for this execution (in USD)."},"subtotal":{"type":"number","format":"double","nullable":true,"description":"Execution subtotal before fees (in USD)."},"grandTotal":{"type":"number","format":"double","nullable":true,"description":"Execution total including fees (in USD)."}}},"FeeResponse":{"type":"object","required":["fee","status","feeFormatted"],"properties":{"fee":{"type":"number","format":"double","description":"The amount in USD which will be charged if the previously proposed trade is completed."},"feeFormatted":{"type":"string","description":"A formatted string representing the amount in USD which will be charged if the previously proposed trade is completed"},"status":{"type":"string","description":"DEPRECATED. Text description roughly equivalent to a HTTP status code"}}},"CostBasis":{"type":"object","required":["currency","totalQuantity","totalCost","averageCost"],"properties":{"currency":{"type":"string","example":"USD","description":"Represents currency for this cost basis calculation."},"totalQuantity":{"type":"number","format":"double","description":"Quantity of the asset taken in to account for the cost basis."},"totalCost":{"type":"number","format":"double","description":"Total cost incurred while trading the Quantity of the asset."},"averageCost":{"type":"number","format":"double","description":"Average cost incurred for the asset."}}}},"x-businessValidationErrorCodes":{"description":"Selected business-logic validation codes. Not an exhaustive list; see code/message in error response.","dateOfBirth":{"DATE_OF_BIRTH_REQUIRED":"Date of birth is required","DATE_OF_BIRTH_INVALID":"Date of birth is invalid","DATE_OF_BIRTH_IN_FUTURE":"Date of birth cannot be in the future","DOB_NOT_ALLOWED":"Date of birth not allowed; date cannot be more than 120 years in the past.","INVESTOR_AGE_INSUFFICIENT":"Investor must be at least 18 years old to create an account"},"internationalAndGovernmentIdentifier":{"TAX_COUNTRY_MUST_BE_US":"Tax country must be US when physical address is US or citizenship country is US","GOVERNMENT_IDENTIFIER_TYPE_REQUIRED":"Government identifier type is required","GOVERNMENT_IDENTIFIER_COUNTRY_REQUIRED":"Government identifier country is required","GOVERNMENT_IDENTIFIER_COUNTRY_INVALID":"Government identifier country must be a two-letter ISO code","GOVERNMENT_IDENTIFIER_IDENTIFIER_REQUIRED":"Government identifier value is required","GOVERNMENT_IDENTIFIER_VALUE_REQUIRED":"Government identifier value is required","GOVERNMENT_IDENTIFIER_TYPE_INVALID":"Government identifier type is not allowed for this tax/country combination","PASSPORT_REQUIRED_FOR_NON_US":"A passport number is required when physical address is not in the US","GOVERNMENT_IDENTIFIER_COUNTRY_MISMATCH":"Government identifier country must match user, citizenship, or address country","GOVERNMENT_IDENTIFIER_LENGTH_INVALID":"Government identifier length is invalid","GOVERNMENT_IDENTIFIER_AT_LEAST_ONE_REQUIRED":"At least one government identifier must be retained; cannot delete all existing identifiers"},"jurisdiction":{"JURISDICTION_VALIDATION_UNAVAILABLE":"Unable to validate jurisdiction: registration options unavailable","JURISDICTION_COUNTRY_NOT_ALLOWED":"Country is not in the allowed list for account applications (422)","JURISDICTION_STATE_REQUIRED_FOR_US":"State (region) is required when country is US","JURISDICTION_STATE_FORMAT_INVALID":"State (region) must be a two-character code when country is US","JURISDICTION_STATE_NOT_ALLOWED":"State is not in the allowed list for account applications"},"investmentsCreate":{"ACCOUNT_ID_REQUIRED":"Account identifier is required","TRANSACTION_ID_REQUIRED":"Transaction ID is required","AMOUNT_REQUIRED":"Amount is required","AMOUNT_INVALID":"Amount must be positive","NUMBER_OF_SHARES_INVALID":"Number of shares must be positive when provided","ASSET_NOT_OPEN":"Asset is not open for investment","REG_CF_TERMS_NOT_ACCEPTED":"Reg CF investment terms must be accepted (Reg CF assets)","REG_CF_TERMS_ONLY_APPLICABLE_TO_REG_CF":"Reg CF terms acceptance is only applicable to Reg CF assets","ANNUAL_INCOME_REQUIRED":"Annual income is required for Reg A and Reg CF investments","NET_WORTH_REQUIRED":"Net worth is required for Reg A and Reg CF investments","INVESTMENT_CREATE_ERROR":"Investment could not be created"},"investmentsUpdate":{"ACCOUNT_ID_REQUIRED":"Account identifier is required","TRANSACTION_ID_REQUIRED":"Transaction ID is required","AMOUNT_INVALID":"Amount must be positive when provided","NUMBER_OF_SHARES_INVALID":"Number of shares must be positive when provided","PAYMENT_TYPE_NOT_SUPPORTED":"Only WIRE payment type is supported","INVESTMENT_UPDATE_NOT_ALLOWED":"Investment update not allowed","INVESTMENT_STATUS_NOT_ALLOWED_TO_UPDATE":"Investment not allowed to be updated in current status","ASSET_NOT_RELATED_TO_INVESTMENT":"Asset is not related to the investment (path assetId mismatch)"},"investmentsSubmit":{"ACCOUNT_ID_REQUIRED":"Account identifier is required","TRANSACTION_ID_REQUIRED":"Transaction ID is required","COUNTRY_MISMATCH":"Jurisdiction is not supported; cannot proceed with payment or submission","PAYMENT_SUBMISSION_FAILED":"Payment could not be submitted","PAYMENT_SUBMIT_ERROR":"Payment submission error","INVESTMENT_NOT_FOUND":"Investment not found or can no longer be submitted"},"investmentsCancel":{"ACCOUNT_ID_REQUIRED":"Account identifier is required","TRANSACTION_ID_REQUIRED":"Transaction ID is required","INVESTMENT_CANNOT_BE_CANCELLED":"This investment can no longer be canceled"},"investmentsAgreement":{"ACCOUNT_ID_REQUIRED":"Account identifier is required","TRANSACTION_ID_REQUIRED":"Transaction ID is required","USER_SIGNATURE_REQUIRED":"User signature (full name) is required","USER_SIGNATURE_CANNOT_BE_BLANK":"User signature cannot be blank","VERSION_REQUIRED":"MSA version is required","VERSION_CANNOT_BE_BLANK":"MSA version cannot be blank","ASSET_NOT_RELATED_TO_INVESTMENT":"Asset is not related to the investment (path assetId mismatch)","SIGNATURE_NAME_MISMATCH":"Signature name must match the account holder's name"}}}}