{ "info": { "title": "Accounts and Customers", "version": "10.25.1" }, "swagger": "2.0", "produces": [ "application/json" ], "host": "api.tastyworks.com", "tags": [ { "name": "api-quote-tokens", "description": "Operations about api-quote-tokens" }, { "name": "customers", "description": "Operations about customers" } ], "paths": { "/api-quote-tokens": { "get": { "description": "Returns the appropriate API quote streamer endpoint, level and identification token \\\n for the current customer to receive market data.", "produces": [ "application/json" ], "responses": { "200": { "description": "Returns the appropriate API quote streamer endpoint, level and identification token \\\n for the current customer to receive market data.", "schema": { "$ref": "#/definitions/QuoteStreamerTokenAuthResult" } } }, "tags": [ "api-quote-tokens" ], "operationId": "getApiQuoteTokens" } }, "/customers/{customer_id}": { "get": { "description": "Get a full customer resource.", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "customer_id", "type": "integer", "format": "int32", "required": true }, { "in": "query", "name": "allow-missing", "description": "Does not raise a 404 if customer is missing", "type": "boolean", "default": false, "required": false } ], "responses": { "200": { "description": "Get a full customer resource.", "schema": { "$ref": "#/definitions/Customer" } } }, "tags": [ "customers" ], "operationId": "getCustomersCustomerId" } }, "/customers/{customer_id}/accounts": { "get": { "description": "Get a list of all the customer account resources attached to the current customer.", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "customer_id", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "Get a list of all the customer account resources attached to the current customer.", "schema": { "type": "array", "items": { "$ref": "#/definitions/AccountAuthorityDecorator" } } } }, "tags": [ "customers" ], "operationId": "getCustomersCustomerIdAccounts" } }, "/customers/{customer_id}/accounts/{account_number}": { "get": { "description": "Get a full customer account resource.", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "customer_id", "type": "integer", "format": "int32", "required": true }, { "in": "path", "name": "account_number", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "Get a full customer account resource.", "schema": { "$ref": "#/definitions/Account" } } }, "tags": [ "customers" ], "operationId": "getCustomersCustomerIdAccountsAccountNumber" } } }, "definitions": { "QuoteStreamerTokenAuthResult": { "type": "object", "properties": { "dxlink-url": { "description": "", "type": "string" }, "expires-at": { "description": "", "type": "string", "format": "date-time" }, "issued-at": { "description": "", "type": "string", "format": "date-time" }, "level": { "description": "", "type": "string" }, "token": { "description": "", "type": "string" }, "websocket-url": { "description": "", "type": "string" } }, "description": "QuoteStreamerTokenAuthResult model" }, "AccountAuthorityDecorator": { "type": "object", "properties": { "account": { "type": "object", "properties": { "account-number": { "description": "", "type": "string" }, "account-type-name": { "description": "", "type": "string" }, "closed-at": { "description": "", "type": "string", "format": "date-time" }, "created-at": { "description": "", "type": "string", "format": "date-time" }, "day-trader-status": { "description": "", "type": "string" }, "ext-account-id": { "description": "", "type": "string" }, "ext-crm-id": { "description": "", "type": "string" }, "external-accounts": { "description": "", "type": "string" }, "external-fdid": { "description": "", "type": "string" }, "external-id": { "description": "", "type": "string" }, "funding-date": { "description": "", "type": "string", "format": "date" }, "futures-account-purpose": { "description": "", "type": "string" }, "investment-objective": { "description": "", "type": "string" }, "investment-time-horizon": { "description": "", "type": "string" }, "is-closed": { "description": "", "type": "boolean" }, "is-firm-error": { "description": "", "type": "boolean" }, "is-firm-proprietary": { "description": "", "type": "boolean" }, "is-foreign": { "description": "", "type": "string" }, "is-futures-approved": { "description": "", "type": "boolean" }, "liquidity-needs": { "description": "", "type": "string" }, "margin-or-cash": { "description": "", "type": "string" }, "nickname": { "description": "", "type": "string" }, "opened-at": { "description": "", "type": "string", "format": "date-time" }, "regulatory-domain": { "description": "", "type": "string" }, "risk-tolerance": { "description": "", "type": "string" }, "submitting-user-id": { "description": "", "type": "string" }, "suitable-options-level": { "description": "", "type": "string" } }, "description": "" }, "authority-level": { "description": "", "type": "string" } }, "description": "AccountAuthorityDecorator model" }, "Account": { "type": "object", "properties": { "account-number": { "description": "", "type": "string" }, "account-type-name": { "description": "", "type": "string" }, "closed-at": { "description": "", "type": "string", "format": "date-time" }, "created-at": { "description": "", "type": "string", "format": "date-time" }, "day-trader-status": { "description": "", "type": "string" }, "ext-account-id": { "description": "", "type": "string" }, "ext-crm-id": { "description": "", "type": "string" }, "external-accounts": { "description": "", "type": "string" }, "external-fdid": { "description": "", "type": "string" }, "external-id": { "description": "", "type": "string" }, "funding-date": { "description": "", "type": "string", "format": "date" }, "futures-account-purpose": { "description": "", "type": "string" }, "investment-objective": { "description": "", "type": "string" }, "investment-time-horizon": { "description": "", "type": "string" }, "is-closed": { "description": "", "type": "boolean" }, "is-firm-error": { "description": "", "type": "boolean" }, "is-firm-proprietary": { "description": "", "type": "boolean" }, "is-foreign": { "description": "", "type": "string" }, "is-futures-approved": { "description": "", "type": "boolean" }, "liquidity-needs": { "description": "", "type": "string" }, "margin-or-cash": { "description": "", "type": "string" }, "nickname": { "description": "", "type": "string" }, "opened-at": { "description": "", "type": "string", "format": "date-time" }, "regulatory-domain": { "description": "", "type": "string" }, "risk-tolerance": { "description": "", "type": "string" }, "submitting-user-id": { "description": "", "type": "string" }, "suitable-options-level": { "description": "", "type": "string" } }, "description": "Account model" }, "Customer": { "type": "object", "properties": { "id": { "description": "", "type": "string" }, "first-name": { "description": "", "type": "string" }, "first-surname": { "description": "", "type": "string" }, "last-name": { "description": "", "type": "string" }, "middle-name": { "description": "", "type": "string" }, "prefix-name": { "description": "", "type": "string" }, "second-surname": { "description": "", "type": "string" }, "suffix-name": { "description": "", "type": "string" }, "address": { "type": "object", "properties": { "city": { "description": "", "type": "string" }, "country": { "description": "", "type": "string" }, "is-domestic": { "description": "", "type": "string" }, "is-foreign": { "description": "", "type": "string" }, "postal-code": { "description": "", "type": "string" }, "state-region": { "description": "", "type": "string" }, "street-one": { "description": "", "type": "string" }, "street-three": { "description": "", "type": "string" }, "street-two": { "description": "", "type": "string" } }, "description": "" }, "customer-suitability": { "type": "object", "properties": { "id": { "description": "", "type": "string" }, "annual-net-income": { "description": "", "type": "integer", "format": "int32" }, "covered-options-trading-experience": { "description": "", "type": "string" }, "customer-id": { "description": "", "type": "integer", "format": "int32" }, "employer-name": { "description": "", "type": "string" }, "employment-status": { "description": "", "type": "string" }, "futures-trading-experience": { "description": "", "type": "string" }, "job-title": { "description": "", "type": "string" }, "liquid-net-worth": { "description": "", "type": "integer", "format": "int32" }, "marital-status": { "description": "", "type": "string" }, "net-worth": { "description": "", "type": "integer", "format": "int32" }, "number-of-dependents": { "description": "", "type": "integer", "format": "int32" }, "occupation": { "description": "", "type": "string" }, "stock-trading-experience": { "description": "", "type": "string" }, "tax-bracket": { "description": "", "type": "string" }, "uncovered-options-trading-experience": { "description": "", "type": "string" } }, "description": "" }, "mailing-address": { "type": "object", "properties": { "city": { "description": "", "type": "string" }, "country": { "description": "", "type": "string" }, "is-domestic": { "description": "", "type": "string" }, "is-foreign": { "description": "", "type": "string" }, "postal-code": { "description": "", "type": "string" }, "state-region": { "description": "", "type": "string" }, "street-one": { "description": "", "type": "string" }, "street-three": { "description": "", "type": "string" }, "street-two": { "description": "", "type": "string" } }, "description": "" }, "is-foreign": { "description": "", "type": "string" }, "regulatory-domain": { "description": "", "type": "string" }, "usa-citizenship-type": { "description": "", "type": "string" }, "home-phone-number": { "description": "", "type": "string" }, "home-phone-number-details": { "description": "", "type": "string" }, "mobile-phone-number": { "description": "", "type": "string" }, "mobile-phone-number-details": { "description": "", "type": "string" }, "work-phone-number": { "description": "", "type": "string" }, "work-phone-number-details": { "description": "", "type": "string" }, "birth-date": { "description": "", "type": "string" }, "email": { "description": "", "type": "string" }, "external-id": { "description": "", "type": "string" }, "foreign-tax-number": { "description": "", "type": "string" }, "tax-number": { "description": "", "type": "string" }, "tax-number-type": { "description": "", "type": "string" }, "birth-country": { "description": "", "type": "string" }, "citizenship-country": { "description": "", "type": "string" }, "visa-expiration-date": { "description": "", "type": "string" }, "visa-type": { "description": "", "type": "string" }, "agreed-to-margining": { "description": "", "type": "boolean" }, "subject-to-tax-withholding": { "description": "", "type": "boolean" }, "agreed-to-terms": { "description": "", "type": "boolean" }, "signature-of-agreement": { "description": "", "type": "boolean" }, "desk-customer-id": { "description": "", "type": "string" }, "ext-crm-id": { "description": "", "type": "string" }, "family-member-names": { "description": "", "type": "string" }, "gender": { "description": "", "type": "string" }, "has-industry-affiliation": { "description": "", "type": "boolean" }, "has-institutional-assets": { "description": "", "type": "string" }, "has-listed-affiliation": { "description": "", "type": "boolean" }, "has-political-affiliation": { "description": "", "type": "boolean" }, "industry-affiliation-firm": { "description": "", "type": "string" }, "is-investment-adviser": { "description": "", "type": "string" }, "listed-affiliation-symbol": { "description": "", "type": "string" }, "political-organization": { "description": "", "type": "string" }, "user-id": { "description": "", "type": "string" }, "has-delayed-quotes": { "description": "", "type": "boolean" }, "has-pending-or-approved-application": { "description": "", "type": "string" }, "is-professional": { "description": "", "type": "boolean" }, "permitted-account-types": { "description": "", "type": "string" }, "created-at": { "description": "", "type": "string", "format": "date-time" }, "entity": { "type": "object", "properties": { "id": { "description": "", "type": "string" }, "address": { "type": "object", "properties": { "city": { "description": "", "type": "string" }, "country": { "description": "", "type": "string" }, "is-domestic": { "description": "", "type": "string" }, "is-foreign": { "description": "", "type": "string" }, "postal-code": { "description": "", "type": "string" }, "state-region": { "description": "", "type": "string" }, "street-one": { "description": "", "type": "string" }, "street-three": { "description": "", "type": "string" }, "street-two": { "description": "", "type": "string" } }, "description": "" }, "business-nature": { "description": "", "type": "string" }, "date-of-trust-creation": { "description": "", "type": "string" }, "email": { "description": "", "type": "string" }, "entity-officers": { "type": "array", "items": { "type": "object", "properties": { "id": { "description": "", "type": "string" }, "external-id": { "description": "", "type": "string" }, "first-name": { "description": "", "type": "string" }, "last-name": { "description": "", "type": "string" }, "middle-name": { "description": "", "type": "string" }, "prefix-name": { "description": "", "type": "string" }, "suffix-name": { "description": "", "type": "string" }, "address": { "type": "object", "properties": { "city": { "description": "", "type": "string" }, "country": { "description": "", "type": "string" }, "is-domestic": { "description": "", "type": "string" }, "is-foreign": { "description": "", "type": "string" }, "postal-code": { "description": "", "type": "string" }, "state-region": { "description": "", "type": "string" }, "street-one": { "description": "", "type": "string" }, "street-three": { "description": "", "type": "string" }, "street-two": { "description": "", "type": "string" } }, "description": "" }, "birth-country": { "description": "", "type": "string" }, "birth-date": { "description": "", "type": "string", "format": "date" }, "citizenship-country": { "description": "", "type": "string" }, "email": { "description": "", "type": "string" }, "employer-name": { "description": "", "type": "string" }, "employment-status": { "description": "", "type": "string" }, "home-phone-number": { "description": "", "type": "string" }, "is-foreign": { "description": "", "type": "string" }, "job-title": { "description": "", "type": "string" }, "marital-status": { "description": "", "type": "string" }, "mobile-phone-number": { "description": "", "type": "string" }, "number-of-dependents": { "description": "", "type": "string" }, "occupation": { "description": "", "type": "string" }, "owner-of-record": { "description": "", "type": "boolean" }, "relationship-to-entity": { "description": "", "type": "string" }, "tax-number": { "description": "", "type": "string" }, "tax-number-type": { "description": "", "type": "string" }, "usa-citizenship-type": { "description": "", "type": "string" }, "visa-expiration-date": { "description": "", "type": "string", "format": "date" }, "visa-type": { "description": "", "type": "string" }, "work-phone-number": { "description": "", "type": "string" } }, "description": "" } }, "entity-suitability": { "type": "object", "properties": { "id": { "description": "", "type": "string" }, "annual-net-income": { "description": "", "type": "integer", "format": "int32" }, "covered-options-trading-experience": { "description": "", "type": "string" }, "entity-id": { "description": "", "type": "integer", "format": "int32" }, "futures-trading-experience": { "description": "", "type": "string" }, "liquid-net-worth": { "description": "", "type": "integer", "format": "int32" }, "net-worth": { "description": "", "type": "integer", "format": "int32" }, "stock-trading-experience": { "description": "", "type": "string" }, "tax-bracket": { "description": "", "type": "string" }, "uncovered-options-trading-experience": { "description": "", "type": "string" } }, "description": "" }, "entity-type": { "description": "", "type": "string" }, "foreign-institution": { "description": "", "type": "string" }, "grantor-birth-date": { "description": "", "type": "string" }, "grantor-email": { "description": "", "type": "string" }, "grantor-first-name": { "description": "", "type": "string" }, "grantor-last-name": { "description": "", "type": "string" }, "grantor-middle-name": { "description": "", "type": "string" }, "grantor-tax-number": { "description": "", "type": "string" }, "has-foreign-bank-affiliation": { "description": "", "type": "string" }, "has-foreign-institution-affiliation": { "description": "", "type": "string" }, "is-domestic": { "description": "", "type": "string" }, "legal-name": { "description": "", "type": "string" }, "mailing-address": { "type": "object", "properties": { "city": { "description": "", "type": "string" }, "country": { "description": "", "type": "string" }, "is-domestic": { "description": "", "type": "string" }, "is-foreign": { "description": "", "type": "string" }, "postal-code": { "description": "", "type": "string" }, "state-region": { "description": "", "type": "string" }, "street-one": { "description": "", "type": "string" }, "street-three": { "description": "", "type": "string" }, "street-two": { "description": "", "type": "string" } }, "description": "" }, "phone-number": { "description": "", "type": "string" }, "secretary-name": { "description": "", "type": "string" }, "tax-election": { "description": "", "type": "string" }, "tax-number": { "description": "", "type": "string" } }, "description": "" }, "identifiable-type": { "description": "", "type": "string" }, "person": { "type": "object", "properties": { "external-id": { "description": "", "type": "string" }, "first-name": { "description": "", "type": "string" }, "last-name": { "description": "", "type": "string" }, "middle-name": { "description": "", "type": "string" }, "prefix-name": { "description": "", "type": "string" }, "suffix-name": { "description": "", "type": "string" }, "birth-country": { "description": "", "type": "string" }, "birth-date": { "description": "", "type": "string", "format": "date" }, "citizenship-country": { "description": "", "type": "string" }, "usa-citizenship-type": { "description": "", "type": "string" }, "visa-expiration-date": { "description": "", "type": "string", "format": "date" }, "visa-type": { "description": "", "type": "string" }, "employer-name": { "description": "", "type": "string" }, "employment-status": { "description": "", "type": "string" }, "job-title": { "description": "", "type": "string" }, "marital-status": { "description": "", "type": "string" }, "number-of-dependents": { "description": "", "type": "string" }, "occupation": { "description": "", "type": "string" } }, "description": "" } }, "description": "Customer model" } } }