Get Transaction By ID
getAccountsAccountNumberTransactionsId/accounts/{account_number}/transactions/{id}Base URL: https://api.cert.tastyworks.com (Sandbox) · https://api.tastyworks.com (Production)
Retrieves a single transaction on the account by its numeric transaction `id`. Use this to fetch the full detail of one ledger event after locating it in the list endpoint.
Code samples
curl -X GET 'https://api.cert.tastyworks.com/accounts/5WX01234/transactions/1' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'User-Agent: tastytrade-docs-example/1.0'import requests
url = "https://api.cert.tastyworks.com/accounts/5WX01234/transactions/1"
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/accounts/5WX01234/transactions/1", {
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/accounts/5WX01234/transactions/1", 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/accounts/5WX01234/transactions/1"))
.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 |
|---|---|---|---|
| account_number* | path | string | e.g. "5WX01234" |
| id* | path | integer | e.g. 1 |
Responses
Example response
{
"data": {
"id": 252640963,
"account-number": "5WX01234",
"action": "Buy to Open",
"agency-price": "100.00",
"clearing-fees": "0.02",
"clearing-fees-effect": "Debit",
"commission": "1.0",
"commission-effect": "Debit",
"lots": {
"id": "abc123",
"executed-at": "2024-01-15T14:30:00.000Z",
"price": "100.00",
"quantity": "1",
"quantity-direction": "1",
"transaction-date": "2024-01-15",
"transaction-id": 1
},
"cost-basis-reconciliation-date": "2024-01-15",
"created-at": "2024-01-12T21:00:01.000+00:00",
"currency": "USD",
"currency-conversion-fees": "USD",
"currency-conversion-fees-effect": "USD",
"description": "Received 1.68074 Long KBWD via Dividend",
"destination-venue": "TEST_A",
"exchange": "CBOE",
"exchange-affiliation-identifier": "string",
"exec-id": "abc123",
"executed-at": "2024-01-12T21:00:00.000+00:00",
"ext-exchange-order-number": "string",
"ext-exec-id": "abc123",
"ext-global-order-number": 0,
"ext-group-fill-id": "abc123",
"ext-group-id": "abc123",
"instrument-type": "Equity",
"is-estimated-fee": true,
"leg-count": 1,
"net-value": "27.74",
"net-value-effect": "Credit",
"order-id": 987654321,
"other-charge": "string",
"other-charge-description": "string",
"other-charge-effect": "string",
"price": "16.46",
"principal-price": "100.00",
"proprietary-index-option-fees": "string",
"proprietary-index-option-fees-effect": "string",
"quantity": "1.68074",
"regulatory-fees": "0.03",
"regulatory-fees-effect": "Debit",
"reverses-id": 1,
"symbol": "AAPL",
"transaction-date": "2024-01-12",
"transaction-sub-type": "Dividend",
"transaction-type": "Trade",
"underlying-symbol": "AAPL",
"value": "27.74",
"value-effect": "Credit"
},
"context": "/accounts/{account_number}/transactions/{id}"
}Schema
datarequiredobject (Transaction)A single event in an account's history that changed its balances or positions — for example a trade fill, cash deposit or withdrawal, position transfer, dividend, or interest credit. Monetary amounts are returned as string decimals paired with a separate `*-effect` field indicating Debit, Credit, or None.
idinteger <int32>Unique numeric identifier of the transaction within tastytrade.
example:
252640963account-numberstringThe account number the transaction belongs to.
example:
"5WX01234"actionstringThe trade action, when applicable. One of `Allocate`, `Buy`, `Buy to Close`, `Buy to Open`, `Sell`, `Sell to Close`, or `Sell to Open`.
example:
"Buy to Open"agency-pricestring <decimal>Decimal value serialized as a JSON string (e.g. "150.25").
clearing-feesstring <decimal>Clearing fees charged on the transaction. Decimal value serialized as a JSON string (e.g. "150.25").
example:
"0.02"clearing-fees-effectstringThe direction of `clearing-fees`: `Credit`, `Debit`, or `None`.
example:
"Debit"commissionstring <decimal>Commission charged on the transaction. Decimal value serialized as a JSON string (e.g. "150.25").
example:
"1.0"commission-effectstringThe direction of `commission`: `Credit`, `Debit`, or `None`.
example:
"Debit"lotsobject{7 fields}Cost-basis lot detail associated with the transaction, when available.
cost-basis-reconciliation-datestring <date>created-atstring <date-time>The full date-time at which the transaction record was created (ISO-8601).
example:
"2024-01-12T21:00:01.000+00:00"currencystringThe currency of the transaction's monetary amounts.
example:
"USD"currency-conversion-feesstring <decimal>Decimal value serialized as a JSON string (e.g. "150.25").
currency-conversion-fees-effectstringdescriptionstringHuman-readable description of the transaction.
example:
"Received 1.68074 Long KBWD via Dividend"destination-venuestringThe venue to which the order was routed.
example:
"TEST_A"exchangestringThe exchange on which the trade executed.
example:
"CBOE"exchange-affiliation-identifierstringexec-idstringexecuted-atstring <date-time>The full date-time at which the transaction executed (ISO-8601).
example:
"2024-01-12T21:00:00.000+00:00"ext-exchange-order-numberstringext-exec-idstringext-global-order-numberinteger <int32>ext-group-fill-idstringext-group-idstringinstrument-typestringThe instrument type, such as `Bond`, `Cryptocurrency`, `Equity`, `Equity Offering`, `Equity Option`, `Future`, `Future Option`, `Index`, `Unknown`, or `Warrant`.
example:
"Equity"is-estimated-feebooleanWhether the fees on this transaction are estimated rather than final.
example:
trueleg-countinteger <int32>The number of legs in the originating order, when the transaction stems from a trade.
example:
1net-valuestring <decimal>The net monetary value of the transaction after fees and commissions, returned as a string decimal. Decimal value serialized as a JSON string (e.g. "150.25").
example:
"27.74"net-value-effectstringThe direction of `net-value`: `Credit`, `Debit`, or `None`.
example:
"Credit"order-idinteger <int32>The identifier of the order that produced this transaction, when applicable.
example:
987654321other-chargestring <decimal>Decimal value serialized as a JSON string (e.g. "150.25").
other-charge-descriptionstringother-charge-effectstringpricestring <decimal>The per-unit price of the instrument for this transaction. Decimal value serialized as a JSON string (e.g. "150.25").
example:
"16.46"principal-pricestring <decimal>Decimal value serialized as a JSON string (e.g. "150.25").
proprietary-index-option-feesstring <decimal>Decimal value serialized as a JSON string (e.g. "150.25").
proprietary-index-option-fees-effectstringquantitystring <decimal>The quantity of the instrument involved in the transaction. Decimal value serialized as a JSON string (e.g. "150.25").
example:
"1.68074"regulatory-feesstring <decimal>Regulatory fees charged on the transaction. Decimal value serialized as a JSON string (e.g. "150.25").
example:
"0.03"regulatory-fees-effectstringThe direction of `regulatory-fees`: `Credit`, `Debit`, or `None`.
example:
"Debit"reverses-idinteger <int32>symbolstringThe instrument symbol associated with the transaction (e.g. equity ticker, OCC option symbol, or future/future-option symbol).
example:
"AAPL"transaction-datestring <date>The ledger date of the transaction (ISO-8601 date).
example:
"2024-01-12"transaction-sub-typestringThe finer-grained sub-type, such as `Dividend`, `Deposit`, `Withdrawal`, `Credit Interest`, `Debit Interest`, `Assignment`, `Exercise`, `Expiration`, `Fee`, or `Transfer`.
example:
"Dividend"transaction-typestringThe high-level category of the transaction: `Administrative Transfer`, `Money Movement`, `Receive Deliver`, or `Trade`.
example:
"Trade"underlying-symbolstringThe underlying symbol for the transaction's instrument — the ticker for equities/options, or the future contract code for futures.
example:
"AAPL"valuestring <decimal>The gross monetary value of the transaction before fees and commissions, returned as a string decimal. Decimal value serialized as a JSON string (e.g. "150.25").
example:
"27.74"value-effectstringThe direction of `value`: `Credit`, `Debit`, or `None`.
example:
"Credit"
contextrequiredstringexample:
"/accounts/{account_number}/transactions/{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": "not_permitted",
"message": "User not permitted access"
}
}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.