API Reference / Accounts and Customers
Get Customer
getCustomersCustomerId/customers/{customer_id}Base URL: https://api.cert.tastyworks.com (Sandbox) · https://api.tastyworks.com (Production)
Returns the full customer resource, including name, addresses, suitability profile, and personal or entity details. For simplicity and security the customer's internal identifier is not exposed: pass `me` as the `customer_id` to fetch the customer linked to the current access token. Set `allow-missing=true` to avoid a 404 when the customer does not exist.
Code samples
curl -X GET 'https://api.cert.tastyworks.com/customers/me?allow-missing=true' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'User-Agent: tastytrade-docs-example/1.0'import requests
url = "https://api.cert.tastyworks.com/customers/me?allow-missing=true"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"User-Agent": "tastytrade-docs-example/1.0",
}
resp = requests.get(url, headers=headers)
print(resp.status_code, resp.json())const resp = await fetch("https://api.cert.tastyworks.com/customers/me?allow-missing=true", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"User-Agent": "tastytrade-docs-example/1.0",
},
})
const data = await resp.json()
console.log(resp.status, data)package main
import (
"net/http"
"io"
"fmt"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.cert.tastyworks.com/customers/me?allow-missing=true", nil)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("User-Agent", "tastytrade-docs-example/1.0")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, string(out))
}import java.net.URI;
import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://api.cert.tastyworks.com/customers/me?allow-missing=true"))
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("User-Agent", "tastytrade-docs-example/1.0")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> resp = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(resp.statusCode() + " " + resp.body());Parameters
| Name | In | Type | Description |
|---|---|---|---|
| customer_id* | path | string | Only a value of `me` is allowed. The API does not expose customers' internal identifiers. e.g. "me" |
| allow-missing | query | boolean | Does not raise a 404 if customer is missing e.g. true |
Responses
Example response
{
"data": {
"id": "me",
"first-name": "John",
"first-surname": "string",
"last-name": "Doe",
"middle-name": "string",
"prefix-name": "string",
"second-surname": "string",
"suffix-name": "string",
"address": {
"city": "string",
"country": "string",
"is-domestic": "string",
"is-foreign": "string",
"postal-code": "string",
"state-region": "string",
"street-one": "string",
"street-three": "string",
"street-two": "string"
},
"customer-suitability": {
"id": "abc123",
"annual-net-income": 0,
"covered-options-trading-experience": "string",
"customer-id": 1,
"employer-name": "string",
"employment-status": "string",
"futures-trading-experience": "string",
"job-title": "string",
"liquid-net-worth": 1,
"marital-status": "string",
"net-worth": 0,
"number-of-dependents": 0,
"occupation": "string",
"stock-trading-experience": "string",
"tax-bracket": "string",
"uncovered-options-trading-experience": "string"
},
"mailing-address": {
"city": "string",
"country": "string",
"is-domestic": "string",
"is-foreign": "string",
"postal-code": "string",
"state-region": "string",
"street-one": "string",
"street-three": "string",
"street-two": "string"
},
"is-foreign": "string",
"regulatory-domain": "string",
"usa-citizenship-type": "Citizen",
"home-phone-number": "string",
"home-phone-number-details": "string",
"mobile-phone-number": "+11231234567",
"mobile-phone-number-details": "string",
"work-phone-number": "string",
"work-phone-number-details": "string",
"birth-date": "2000-01-01",
"email": "johndoe@nowhere.com",
"external-id": "C0000037211",
"foreign-tax-number": "string",
"tax-number": "*****1234",
"tax-number-type": "SSN",
"birth-country": "string",
"citizenship-country": "USA",
"visa-expiration-date": "2024-01-15",
"visa-type": "string",
"agreed-to-margining": true,
"subject-to-tax-withholding": true,
"agreed-to-terms": true,
"signature-of-agreement": true,
"desk-customer-id": "abc123",
"ext-crm-id": "abc123",
"family-member-names": "string",
"gender": "string",
"has-industry-affiliation": true,
"has-institutional-assets": "string",
"has-listed-affiliation": true,
"has-political-affiliation": true,
"industry-affiliation-firm": "string",
"is-investment-adviser": "string",
"listed-affiliation-symbol": "AAPL",
"political-organization": "string",
"user-id": "abc123",
"has-delayed-quotes": false,
"has-pending-or-approved-application": "string",
"is-professional": false,
"permitted-account-types": "string",
"created-at": "2024-01-15T14:30:00.000Z",
"entity": {
"id": "abc123",
"address": {
"city": "string",
"country": "string",
"is-domestic": "string",
"is-foreign": "string",
"postal-code": "string",
"state-region": "string",
"street-one": "string",
"street-three": "string",
"street-two": "string"
},
"business-nature": "string",
"date-of-trust-creation": "string",
"email": "string",
"entity-officers": [
{
"id": "abc123",
"external-id": "abc123",
"first-name": "string",
"last-name": "string",
"middle-name": "string",
"prefix-name": "string",
"suffix-name": "string",
"address": {
"city": "string",
"country": "string",
"is-domestic": "string",
"is-foreign": "string",
"postal-code": "string",
"state-region": "string",
"street-one": "string",
"street-three": "string",
"street-two": "string"
},
"birth-country": "string",
"birth-date": "2024-01-15",
"citizenship-country": "string",
"email": "string",
"employer-name": "string",
"employment-status": "string",
"home-phone-number": "string",
"is-foreign": "string",
"job-title": "string",
"marital-status": "string",
"mobile-phone-number": "string",
"number-of-dependents": "string",
"occupation": "string",
"owner-of-record": true,
"relationship-to-entity": "string",
"tax-number": "string",
"tax-number-type": "string",
"usa-citizenship-type": "string",
"visa-expiration-date": "2024-01-15",
"visa-type": "string",
"work-phone-number": "string"
}
],
"entity-suitability": {
"id": "abc123",
"annual-net-income": 0,
"covered-options-trading-experience": "string",
"entity-id": 1,
"futures-trading-experience": "string",
"liquid-net-worth": 1,
"net-worth": 0,
"stock-trading-experience": "string",
"tax-bracket": "string",
"uncovered-options-trading-experience": "string"
},
"entity-type": "string",
"foreign-institution": "string",
"grantor-birth-date": "2024-01-15",
"grantor-email": "string",
"grantor-first-name": "string",
"grantor-last-name": "string",
"grantor-middle-name": "string",
"grantor-tax-number": "string",
"has-foreign-bank-affiliation": "string",
"has-foreign-institution-affiliation": "string",
"is-domestic": "string",
"legal-name": "string",
"mailing-address": {
"city": "string",
"country": "string",
"is-domestic": "string",
"is-foreign": "string",
"postal-code": "string",
"state-region": "string",
"street-one": "string",
"street-three": "string",
"street-two": "string"
},
"phone-number": "string",
"secretary-name": "string",
"tax-election": "string",
"tax-number": "string"
},
"identifiable-type": "Person",
"person": {
"external-id": "abc123",
"first-name": "string",
"last-name": "string",
"middle-name": "string",
"prefix-name": "string",
"suffix-name": "string",
"birth-country": "string",
"birth-date": "2024-01-15",
"citizenship-country": "string",
"usa-citizenship-type": "string",
"visa-expiration-date": "2024-01-15",
"visa-type": "string",
"employer-name": "string",
"employment-status": "string",
"job-title": "string",
"marital-status": "string",
"number-of-dependents": "string",
"occupation": "string"
}
},
"context": "/customers/{customer_id}"
}Schema
datarequiredobject (Customer)A tastytrade customer, including name, residential and mailing addresses, suitability profile, and either personal or entity details. Fetched via GET /customers/{customer_id} using `me` as the identifier.
idstringCustomer identifier. The API returns `me` rather than the internal id.
example:
"me"first-namestringCustomer's first name.
example:
"John"first-surnamestringlast-namestringCustomer's last name.
example:
"Doe"middle-namestringprefix-namestringsecond-surnamestringsuffix-namestringaddressobject{9 fields}customer-suitabilityobject{16 fields}mailing-addressobject{9 fields}is-foreignstringWhether the customer is classified as foreign. Note: the wire value is a JSON boolean (e.g. false), although this schema declares a string.
regulatory-domainstringusa-citizenship-typestringU.S. citizenship classification, for example Citizen.
example:
"Citizen"home-phone-numberstringhome-phone-number-detailsstringmobile-phone-numberstringCustomer's mobile phone number, e.g. +11231234567.
example:
"+11231234567"mobile-phone-number-detailsstringwork-phone-numberstringwork-phone-number-detailsstringbirth-datestringCustomer's date of birth (YYYY-MM-DD).
example:
"2000-01-01"emailstringCustomer's email address.
example:
"johndoe@nowhere.com"external-idstringExternal customer identifier used by tastytrade's backoffice systems.
example:
"C0000037211"foreign-tax-numberstringtax-numberstringMasked tax identification number on file.
example:
"*****1234"tax-number-typestringType of tax identification number on file, for example SSN.
example:
"SSN"birth-countrystringcitizenship-countrystringCountry of citizenship.
example:
"USA"visa-expiration-datestringvisa-typestringagreed-to-marginingbooleanWhether the customer has agreed to margining.
example:
truesubject-to-tax-withholdingbooleanagreed-to-termsbooleanWhether the customer has agreed to the account terms.
example:
truesignature-of-agreementbooleandesk-customer-idstringext-crm-idstringfamily-member-namesstringgenderstringhas-industry-affiliationbooleanhas-institutional-assetsstringhas-listed-affiliationbooleanhas-political-affiliationbooleanindustry-affiliation-firmstringis-investment-adviserstringlisted-affiliation-symbolstringpolitical-organizationstringuser-idstringhas-delayed-quotesbooleanWhether the customer receives delayed market data quotes.
example:
falsehas-pending-or-approved-applicationstringis-professionalbooleanWhether the customer is classified as a professional for market-data purposes.
example:
falsepermitted-account-typesstringcreated-atstring <date-time>entityobject{24 fields}identifiable-typestringWhether the customer is identified as a Person or an Entity.
example:
"Person"personobject{18 fields}
contextrequiredstringexample:
"/customers/{customer_id}"
Example response
{
"error": {
"code": "unauthorized",
"message": "No valid access token was provided; access tokens expire after 15 minutes."
}
}Schema
errorrequiredobjectcoderequiredstringMachine-readable error code (see the Error reference).
messagerequiredstringHuman-readable explanation.
errorsarray<object>{3 fields}Present for multi-error / validation failures; one entry per problem.
Example response
{
"error": {
"code": "string",
"message": "string",
"errors": [
{
"code": "string",
"message": "string",
"domain": "string"
}
]
}
}Schema
errorrequiredobjectcoderequiredstringMachine-readable error code (see the Error reference).
messagerequiredstringHuman-readable explanation.
errorsarray<object>{3 fields}Present for multi-error / validation failures; one entry per problem.
Example response
{
"error": {
"code": "string",
"message": "string",
"errors": [
{
"code": "string",
"message": "string",
"domain": "string"
}
]
}
}Schema
errorrequiredobjectcoderequiredstringMachine-readable error code (see the Error reference).
messagerequiredstringHuman-readable explanation.
errorsarray<object>{3 fields}Present for multi-error / validation failures; one entry per problem.
Related
- Rate-limit class:
read· idempotent — Rate limits & backoff - Error reference — codes, causes, and fixes
Agents: this page is also Markdown (with the embedded OpenAPI definition) — append .md or send Accept: text/markdown. Index at /llms.txt.