API Reference / Accounts and Customers
Get Account
getCustomersCustomerIdAccountsAccountNumber/customers/{customer_id}/accounts/{account_number}Base URL: https://api.cert.tastyworks.com (Sandbox) · https://api.tastyworks.com (Production)
Returns a single account resource by account number for the given customer. Use the account numbers returned by the list-accounts endpoint. Pass `me` as the `customer_id` to scope the lookup to the current customer.
Code samples
curl -X GET 'https://api.cert.tastyworks.com/customers/me/accounts/5WX01234' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'User-Agent: tastytrade-docs-example/1.0'import requests
url = "https://api.cert.tastyworks.com/customers/me/accounts/5WX01234"
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/accounts/5WX01234", {
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/accounts/5WX01234", 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/accounts/5WX01234"))
.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" |
| account_number* | path | string | The account number of the account. e.g. "5WX01234" |
Responses
Example response
{
"data": {
"account-number": "5WT00001",
"account-type-name": "Individual",
"closed-at": "2024-12-31T23:59:59.000+00:00",
"created-at": "2019-03-14T15:39:31.265+00:00",
"day-trader-status": "string",
"ext-account-id": "abc123",
"ext-crm-id": "abc123",
"external-accounts": "string",
"external-fdid": "string",
"external-id": "A0000196557",
"funding-date": "2017-01-02",
"futures-account-purpose": "SPECULATING",
"investment-objective": "SPECULATION",
"investment-time-horizon": "string",
"is-closed": false,
"is-firm-error": false,
"is-firm-proprietary": false,
"is-foreign": "string",
"is-futures-approved": true,
"liquidity-needs": "string",
"margin-or-cash": "Margin",
"nickname": "Individual",
"opened-at": "2019-03-14T15:39:31.265+00:00",
"regulatory-domain": "string",
"risk-tolerance": "string",
"submitting-user-id": "abc123",
"suitable-options-level": "No Restrictions"
},
"context": "/customers/{customer_id}/accounts/{account_number}"
}Schema
datarequiredobject (Account)A tastytrade brokerage account, including its identifiers, type, status flags, and suitability attributes.
account-numberstringThe unique tastytrade account number. Use this in account-scoped endpoint paths.
example:
"5WT00001"account-type-namestringHuman-readable account type, for example Individual, Roth IRA, or Traditional IRA.
example:
"Individual"closed-atstring <date-time>ISO-8601 timestamp at which the account was closed, if applicable.
example:
"2024-12-31T23:59:59.000+00:00"created-atstring <date-time>ISO-8601 timestamp at which the account record was created.
example:
"2019-03-14T15:39:31.265+00:00"day-trader-statusstringWhether the account is flagged as a pattern day trader. Note: the wire value is a JSON boolean (e.g. false), although this schema declares a string.
ext-account-idstringext-crm-idstringexternal-accountsstringexternal-fdidstringexternal-idstringExternal account identifier used by tastytrade's backoffice systems.
example:
"A0000196557"funding-datestring <date>Date the account was first funded (YYYY-MM-DD).
example:
"2017-01-02"futures-account-purposestringStated purpose for futures trading on the account.
example:
"SPECULATING"investment-objectivestringThe account's stated investment objective.
example:
"SPECULATION"investment-time-horizonstringis-closedbooleanWhether the account is closed.
example:
falseis-firm-errorbooleanWhether the account is a firm error account.
example:
falseis-firm-proprietarybooleanWhether the account is a firm proprietary account.
example:
falseis-foreignstringWhether the account is associated with a foreign address. Note: the wire value is a JSON boolean (e.g. false), although this schema declares a string.
is-futures-approvedbooleanWhether the account is approved to trade futures.
example:
trueliquidity-needsstringmargin-or-cashstringWhether the account is a Margin or Cash account.
example:
"Margin"nicknamestringCustomer-assigned nickname for the account.
example:
"Individual"opened-atstring <date-time>ISO-8601 timestamp at which the account was opened.
example:
"2019-03-14T15:39:31.265+00:00"regulatory-domainstringrisk-tolerancestringsubmitting-user-idstringsuitable-options-levelstringThe options trading level the account is approved for.
example:
"No Restrictions"
contextrequiredstringexample:
"/customers/{customer_id}/accounts/{account_number}"
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.