tastytradeDeveloper Docs
Legacy ↗

API Reference / Transactions

Get Total Fees For A Day

getAccountsAccountNumberTransactionsTotalFees
get/accounts/{account_number}/transactions/total-fees

Base URL: https://api.cert.tastyworks.com (Sandbox) · https://api.tastyworks.com (Production)

Returns the total fees charged on an account for a single day. Pass `date` to choose the day (defaults to today). The response reports the aggregated fee amount and its direction via `total-fees-effect`.

Code samples

curl -X GET 'https://api.cert.tastyworks.com/accounts/5WX01234/transactions/total-fees?date=2024-01-15' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'User-Agent: tastytrade-docs-example/1.0'

Parameters

NameInTypeDescription
account_number*pathstring
e.g. "5WX01234"
datequerystringThe date to get fees for, defaults to today
e.g. "2024-01-15"

Responses

200The aggregated fees for the requested day, wrapped in the standard envelope.application/json

Example response

{
  "data": {
    "total-fees": "100.0",
    "total-fees-effect": "Debit"
  },
  "context": "/accounts/{account_number}/transactions/total-fees"
}

Schema

  • datarequiredobject
    • total-feesstring <decimal>

      The total fees charged on the account for the requested day, returned as a string decimal.

      example: "100.0"

    • total-fees-effectstring

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

      example: "Debit"

  • contextrequiredstring

    example: "/accounts/{account_number}/transactions/total-fees"

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 fees.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 account matches the supplied `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.