tastytradeDeveloper Docs
Legacy ↗

API Reference / Transactions

Get Transaction By ID

getAccountsAccountNumberTransactionsId
get/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'

Parameters

NameInTypeDescription
account_number*pathstring
e.g. "5WX01234"
id*pathinteger
e.g. 1

Responses

200The requested transaction, wrapped in the standard envelope.application/json

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: 252640963

    • account-numberstring

      The account number the transaction belongs to.

      example: "5WX01234"

    • actionstring

      The 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-effectstring

      The 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-effectstring

      The 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"

    • currencystring

      The 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-effectstring
    • descriptionstring

      Human-readable description of the transaction.

      example: "Received 1.68074 Long KBWD via Dividend"

    • destination-venuestring

      The venue to which the order was routed.

      example: "TEST_A"

    • exchangestring

      The exchange on which the trade executed.

      example: "CBOE"

    • exchange-affiliation-identifierstring
    • exec-idstring
    • executed-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-numberstring
    • ext-exec-idstring
    • ext-global-order-numberinteger <int32>
    • ext-group-fill-idstring
    • ext-group-idstring
    • instrument-typestring

      The instrument type, such as `Bond`, `Cryptocurrency`, `Equity`, `Equity Offering`, `Equity Option`, `Future`, `Future Option`, `Index`, `Unknown`, or `Warrant`.

      example: "Equity"

    • is-estimated-feeboolean

      Whether the fees on this transaction are estimated rather than final.

      example: true

    • leg-countinteger <int32>

      The number of legs in the originating order, when the transaction stems from a trade.

      example: 1

    • net-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-effectstring

      The 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: 987654321

    • other-chargestring <decimal>

      Decimal value serialized as a JSON string (e.g. "150.25").

    • other-charge-descriptionstring
    • other-charge-effectstring
    • pricestring <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-effectstring
    • quantitystring <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-effectstring

      The direction of `regulatory-fees`: `Credit`, `Debit`, or `None`.

      example: "Debit"

    • reverses-idinteger <int32>
    • symbolstring

      The 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-typestring

      The finer-grained sub-type, such as `Dividend`, `Deposit`, `Withdrawal`, `Credit Interest`, `Debit Interest`, `Assignment`, `Exercise`, `Expiration`, `Fee`, or `Transfer`.

      example: "Dividend"

    • transaction-typestring

      The high-level category of the transaction: `Administrative Transfer`, `Money Movement`, `Receive Deliver`, or `Trade`.

      example: "Trade"

    • underlying-symbolstring

      The 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-effectstring

      The direction of `value`: `Credit`, `Debit`, or `None`.

      example: "Credit"

  • contextrequiredstring

    example: "/accounts/{account_number}/transactions/{id}"

401Unauthorized — the `Authorization: Bearer <token>` header is missing, expired, or invalid, or the required `User-Agent: <product>/<version>` header is missing or malformed.application/json

Example response

{
  "error": {
    "code": "unauthorized",
    "message": "No valid access token was provided; access tokens expire after 15 minutes."
  }
}

Schema

  • errorrequiredobject
    • coderequiredstring

      Machine-readable error code (see the Error reference).

    • messagerequiredstring

      Human-readable explanation.

    • errorsarray<object>{3 fields}

      Present for multi-error / validation failures; one entry per problem.

403Forbidden — the token is valid but its scope or the account's authority level does not permit reading this account's transactions.application/json

Example response

{
  "error": {
    "code": "not_permitted",
    "message": "User not permitted access"
  }
}

Schema

  • errorrequiredobject
    • coderequiredstring

      Machine-readable error code (see the Error reference).

    • messagerequiredstring

      Human-readable explanation.

    • errorsarray<object>{3 fields}

      Present for multi-error / validation failures; one entry per problem.

404Not Found — no transaction matches the supplied `id` on this account, no account matches `account_number`, or the wrong environment is being used (sandbox vs production).application/json

Example response

{
  "error": {
    "code": "string",
    "message": "string",
    "errors": [
      {
        "code": "string",
        "message": "string",
        "domain": "string"
      }
    ]
  }
}

Schema

  • errorrequiredobject
    • coderequiredstring

      Machine-readable error code (see the Error reference).

    • messagerequiredstring

      Human-readable explanation.

    • errorsarray<object>{3 fields}

      Present for multi-error / validation failures; one entry per problem.

429Too Many Requests — the request rate exceeded the read rate limit. Back off exponentially before retrying.application/json

Example response

{
  "error": {
    "code": "string",
    "message": "string",
    "errors": [
      {
        "code": "string",
        "message": "string",
        "domain": "string"
      }
    ]
  }
}

Schema

  • errorrequiredobject
    • coderequiredstring

      Machine-readable error code (see the Error reference).

    • messagerequiredstring

      Human-readable explanation.

    • errorsarray<object>{3 fields}

      Present for multi-error / validation failures; one entry per problem.

Related

Agents: this page is also Markdown (with the embedded OpenAPI definition) — append .md or send Accept: text/markdown. Index at /llms.txt.