Basic API Usage
- User Management
- Customer Account Information
- Account Positions (View all Current Account Positions)
- Account Balances
- Watchlists
- Instruments
- Transaction History
User Management
Login
To create a session, hit the POST /sessions
endpoint.
POST /sessions Parameters
Key | Required or Optional | Notes |
---|---|---|
login | Required | can be username or email |
password | Required | password set on user creation |
remember-me | Optional | generates a remember token |
curl -X POST https://api.cert.tastyworks.com/sessions
-d '{ "login": "myusername", "password": "mypassword", "remember-me": true }'
-H 'Content-Type: application/json'
$response = Invoke-WebRequest -Uri "https://api.cert.tastyworks.com/sessions" `
-Method Post `
-ContentType "application/json" `
-Body "{ `"login`": `"myusername`", `"password`": `"mypassword`", `"remember-me`": true }"
{
"data": {
"user": {
"email": "johndoe@tastytrade.com",
"username": "johndoe",
"external-id": "U0000085345"
},
"session-token": "YkF_8uB6tiiGKF2hNRZ4QVs6gLr-d6DMn-Hovg9FrU9-8pCJLCnu8A+C",
"remember-token": "j69DQ_4p75bzWGYPl_utuxfIbVy1auCj8M8AEYL4BddVO3Pp3sDakA"
},
"context": "/sessions"
}
Customer Account Information
For simplicity as well as security, we don't expose a customer's internal identifier via the API. You can use me
in place of the customer_id
path parameter for all customer endpoints.
GET /customers/me/accounts
After a successful authentication request, the first thing a client application should do is to retrieve the list of accounts that this customer has access to. This endpoint returns a list of such accounts for the customer (user) identified by the supplied session token.
Every customer has an authority_level
over their associated accounts. Authority levels are as follows:
owner
has full privileges over the accounttrade-only
can submit and manage trades, cannot do things like deposit/withdraw cashread-only
can hit allGET
endpoints
{
"data": {
"items": [
{
"account": {
"account-number": "5WT0001",
"external-id": "A0000196557",
"opened-at": "2019-03-14T15:39:31.265+00:00",
"nickname": "Individual",
"account-type-name": "Individual",
"day-trader-status": false,
"is-firm-error": false,
"is-firm-proprietary": false,
"is-test-drive": true,
"margin-or-cash": "Cash",
"is-foreign": false,
"funding-date": "2019-03-15"
},
"authority-level": "owner"
},
{
"account": {
"account-number": "5WT0002",
"external-id": "A0000085347",
"opened-at": "2017-03-16T18:35:43.649+00:00",
"nickname": "Individual",
"account-type-name": "Individual",
"day-trader-status": false,
"is-firm-error": true,
"is-firm-proprietary": false,
"is-test-drive": false,
"margin-or-cash": "Margin",
"is-foreign": false,
"funding-date": "2017-04-26",
"investment-objective": "SPECULATION"
},
"authority-level": "owner"
}
]
},
"context": "/customers/me/accounts"
}
Account Positions
GET /accounts/:account-number/positions
{
"data": {
"items": [
{
"account-number": "5WT00000",
"symbol": "AAPL",
"instrument-type": "Equity",
"underlying-symbol": "AAPL",
"quantity": "100",
"quantity-direction": "Long",
"close-price": "282.48",
"average-open-price": "288.7",
"average-yearly-market-close-price": "123.18",
"average-daily-market-close-price": "282.48",
"multiplier": 1,
"cost-effect": "Credit",
"is-suppressed": false,
"is-frozen": false,
"restricted-quantity": "0.0",
"realized-day-gain": "0.0",
"realized-day-gain-effect": "None",
"realized-day-gain-date": "2022-11-01",
"realized-today": "0.0",
"realized-today-effect": "None",
"realized-today-date": "2022-11-01",
"created-at": "2022-08-22T17:56:51.872+00:00",
"updated-at": "2022-11-01T21:49:54.095+00:00"
}
]
},
"context": "/accounts/5WT00000/positions"
}
A position with a quantity of 0 is considered closed. We purge these positions overnight.
Equity option positions will also include an expires-at
timestamp.
For P/L calculations, you should rely on the live quote data as much as possible to ensure up-to-date calculations (see Streaming Market Data). mark
and mark-price
above are deprecated and should not be used in profit/loss calculations. Instead, you can use price
from the DXLink Trade
market event, or bidPrice
& askPrice
from the DXLink Quote
market event.
Account Balances
GET /accounts/:account-number/balances
{
"data": {
"account-number": "5WT00000",
"cash-balance": "7218.937",
"long-equity-value": "23772.539",
"short-equity-value": "0.0",
"long-derivative-value": "0.0",
"short-derivative-value": "0.0",
"long-futures-value": "0.0",
"short-futures-value": "0.0",
"long-futures-derivative-value": "0.0",
"short-futures-derivative-value": "0.0",
"long-margineable-value": "0.0",
"short-margineable-value": "0.0",
"margin-equity": "31685.535",
"equity-buying-power": "44771.52",
"derivative-buying-power": "22385.76",
"day-trading-buying-power": "0.0",
"futures-margin-requirement": "0.0",
"available-trading-funds": "0.0",
"maintenance-requirement": "9304.696",
"maintenance-call-value": "0.0",
"reg-t-call-value": "0.0",
"day-trading-call-value": "0.0",
"day-equity-call-value": "0.0",
"net-liquidating-value": "31685.535",
"cash-available-to-withdraw": "22604.62",
"day-trade-excess": "22604.62",
"pending-cash": "0.0",
"pending-cash-effect": "None",
"long-cryptocurrency-value": "694.059",
"short-cryptocurrency-value": "0.0",
"cryptocurrency-margin-requirement": "693.63817061",
"unsettled-cryptocurrency-fiat-amount": "0.0",
"unsettled-cryptocurrency-fiat-effect": "None",
"closed-loop-available-balance": "22604.62",
"equity-offering-margin-requirement": "0.0",
"long-bond-value": "0.0",
"bond-margin-requirement": "0.0",
"used-derivative-buying-power": "9304.696",
"snapshot-date": "2023-07-06",
"reg-t-margin-requirement": "9304.69568225",
"futures-overnight-margin-requirement": "0.0",
"futures-intraday-margin-requirement": "0.0",
"maintenance-excess": "22385.76004674",
"pending-margin-interest": "0.0",
"effective-cryptocurrency-buying-power": "22385.76",
"updated-at": "2023-07-06T19:32:04.765+00:00"
},
"context": "/accounts/5WT00000/balances"
}
Watchlists
Public Watchlists
GET /public-watchlists
Returns a list of public watchlists
{
"data": {
"items": [
{
"name": "Upcoming Earnings",
"watchlist-entries": [
{
"symbol": "STZ",
"instrument-type": "Equity"
},
{
"symbol": "MKC",
"instrument-type": "Equity"
}
],
},
{
"name": "Liquid ETFs",
"watchlist-entries": [
{
"symbol": "DIA",
"instrument-type": "Equity"
},
{
"symbol": "EEM",
"instrument-type": "Equity"
}
],
}
]
},
"api-version": "v1",
"context": "/public-watchlists"
}
Instruments
The term "Instruments" refers to anything you can trade: Equities, Equity Options, Futures, Future Options, and Cryptocurrencies.
Equity Options
Equity option chains are retrieved via GET /option-chains/{underlying_symbol}/nested
. This returns a list of underlyings with their expirations and strikes nested inside:
{
"data": {
"items": [
{
"underlying-symbol": "SPY",
"root-symbol": "SPY",
"option-chain-type": "Standard",
"shares-per-contract": 100,
"expirations": [
{
"expiration-type": "Regular",
"expiration-date": "2022-09-16",
"days-to-expiration": 2,
"settlement-type": "PM",
"strikes": [
{
"strike-price": "370.0",
"call": "SPY 230706C00370000",
"call-streamer-symbol": ".SPY230706C370",
"put": "SPY 230706P00370000",
"put-streamer-symbol": ".SPY230706P370"
}
]
}
]
}
]
}
}
The call
and put
values are the instrument's symbol that you will use in the order-leg
when submitting orders.
There are other endpoints related to option chains that include more or less data, depending on your need. GET /option-chains/{underlying_symbol}
returns a list of detailed data for each tradeable instrument:
{
"data": {
"items": [
{
"symbol": "AAPL 220916C00040000",
"instrument-type": "Equity Option",
"active": true,
"strike-price": "40.0",
"root-symbol": "AAPL",
"underlying-symbol": "AAPL",
"expiration-date": "2022-09-16",
"exercise-style": "American",
"shares-per-contract": 100,
"option-type": "C",
"option-chain-type": "Standard",
"expiration-type": "Regular",
"settlement-type": "PM",
"stops-trading-at": "2022-09-16T20:00:00.000+00:00",
"market-time-instrument-collection": "Equity Option",
"days-to-expiration": 2,
"expires-at": "2022-09-16T20:00:00.000+00:00",
"is-closing-only": false
}
]
}
}
GET /option-chains/{underlying_symbol}/compact
concatenates all strike symbols across all expirations into a single array.
Futures
To get a list of all of the active futures contracts that tastytrade currently offers, hit the GET /instruments/futures
endpoint. Each future returned includes its corresponding future product info.
{
"data": {
"items": [
{
"symbol": "/ESU3",
"product-code": "ES",
"contract-size": "50.0",
"tick-size": "0.25",
"notional-multiplier": "50.0",
"main-fraction": "0.0",
"sub-fraction": "0.0",
"display-factor": "0.01",
"last-trade-date": "2023-09-15",
"expiration-date": "2023-09-15",
"closing-only-date": "2023-09-15",
"active": true,
"active-month": true,
"next-active-month": false,
"is-closing-only": false,
"stops-trading-at": "2023-09-15T13:30:00.000+00:00",
"expires-at": "2023-09-15T13:30:00.000+00:00",
"product-group": "CME_ES",
"exchange": "CME",
"roll-target-symbol": "/ESZ3",
"streamer-exchange-code": "XCME",
"streamer-symbol": "/ESU23:XCME",
"back-month-first-calendar-symbol": true,
"is-tradeable": true,
"future-etf-equivalent": {
"symbol": "SPY",
"share-quantity": 506
},
"future-product": {
"root-symbol": "/ES",
"code": "ES",
"description": "E Mini S&P",
"clearing-code": "ES",
"clearing-exchange-code": "16",
"clearport-code": "ES",
"legacy-code": "ES",
"exchange": "CME",
"legacy-exchange-code": "CME",
"product-type": "Financial",
"listed-months": [
"H",
"M",
"U",
"Z"
],
"active-months": [
"H",
"M",
"U",
"Z"
],
"notional-multiplier": "50.0",
"tick-size": "0.25",
"display-factor": "0.01",
"streamer-exchange-code": "XCME",
"small-notional": false,
"back-month-first-calendar-symbol": true,
"first-notice": false,
"cash-settled": true,
"security-group": "ES",
"market-sector": "Equity Index",
"roll": {
"name": "equity_index",
"active-count": 3,
"cash-settled": true,
"business-days-offset": 4,
"first-notice": false
}
},
"tick-sizes": [
{
"value": "0.25"
}
],
"option-tick-sizes": [
{
"value": "0.05",
"threshold": "5.0"
},
{
"value": "0.25"
}
],
"spread-tick-sizes": [
{
"value": "0.05",
"symbol": "/ESH4"
},
{
"value": "0.05",
"symbol": "/ESZ3"
}
]
}
]
}
}
To get a list of the future products and future option products that tastytrade supports, hit GET /instruments/future-products
or GET /instruments/future-option-products
. These endpoints return product details, not tradeable instruments.
{
"data": {
"items": [
{
"root-symbol": "/ES",
"code": "ES",
"description": "E Mini S&P",
"clearing-code": "ES",
"clearing-exchange-code": "16",
"clearport-code": "ES",
"legacy-code": "ES",
"exchange": "CME",
"legacy-exchange-code": "CME",
"product-type": "Financial",
"listed-months": [
"H",
"M",
"U",
"Z"
],
"active-months": [
"H",
"M",
"U",
"Z"
],
"notional-multiplier": "50.0",
"tick-size": "0.25",
"display-factor": "0.01",
"streamer-exchange-code": "XCME",
"small-notional": false,
"back-month-first-calendar-symbol": true,
"first-notice": false,
"cash-settled": true,
"security-group": "ES",
"market-sector": "Equity Index",
"option-products": [
{
"root-symbol": "E1B",
"cash-settled": false,
"code": "E1B",
"legacy-code": "E1B",
"clearport-code": "E1B",
"clearing-code": "ER",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "E2B",
"cash-settled": false,
"code": "E2B",
"legacy-code": "E2B",
"clearport-code": "E2B",
"clearing-code": "ES",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "E3B",
"cash-settled": false,
"code": "E3B",
"legacy-code": "E3B",
"clearport-code": "E3B",
"clearing-code": "EU",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "E4B",
"cash-settled": false,
"code": "E4B",
"legacy-code": "E4B",
"clearport-code": "E4B",
"clearing-code": "EV",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": true,
"market-sector": "Equity Index"
},
{
"root-symbol": "E5B",
"cash-settled": false,
"code": "E5B",
"legacy-code": "E5B",
"clearport-code": "E5B",
"clearing-code": "EW",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": true,
"market-sector": "Equity Index"
},
{
"root-symbol": "E1D",
"cash-settled": false,
"code": "E1D",
"legacy-code": "E1D",
"clearport-code": "E1D",
"clearing-code": "EX",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "E3C",
"cash-settled": false,
"code": "E3C",
"legacy-code": "E3C",
"clearport-code": "E3C",
"clearing-code": "Z3",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "ES",
"cash-settled": false,
"code": "ES",
"legacy-code": "ES",
"clearport-code": "ES",
"clearing-code": "ES",
"clearing-exchange-code": "16",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Regular",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "EW1",
"cash-settled": false,
"code": "EW1",
"legacy-code": "EW1",
"clearport-code": "EW1",
"clearing-code": "W1",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "EW2",
"cash-settled": false,
"code": "EW2",
"legacy-code": "EW2",
"clearport-code": "EW2",
"clearing-code": "W2",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "EW3",
"cash-settled": false,
"code": "EW3",
"legacy-code": "EW3",
"clearport-code": "EW3",
"clearing-code": "W3",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "EW4",
"cash-settled": false,
"code": "EW4",
"legacy-code": "EW4",
"clearport-code": "EW4",
"clearing-code": "W4",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": true,
"market-sector": "Equity Index"
},
{
"root-symbol": "EW",
"cash-settled": false,
"code": "EW",
"legacy-code": "EW",
"clearport-code": "EW",
"clearing-code": "EW",
"clearing-exchange-code": "16",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "End-Of-Month",
"settlement-delay-days": 0,
"is-rollover": true,
"market-sector": "Equity Index"
},
{
"root-symbol": "E1A",
"cash-settled": false,
"code": "E1A",
"legacy-code": "E1A",
"clearport-code": "E1A",
"clearing-code": "A4",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "E2A",
"cash-settled": false,
"code": "E2A",
"legacy-code": "E2A",
"clearport-code": "E2A",
"clearing-code": "A5",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "E3A",
"cash-settled": false,
"code": "E3A",
"legacy-code": "E3A",
"clearport-code": "E3A",
"clearing-code": "A6",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "E4A",
"cash-settled": false,
"code": "E4A",
"legacy-code": "E4A",
"clearport-code": "E4A",
"clearing-code": "A7",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": true,
"market-sector": "Equity Index"
},
{
"root-symbol": "E5A",
"cash-settled": false,
"code": "E5A",
"legacy-code": "E5A",
"clearport-code": "E5A",
"clearing-code": "A8",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": true,
"market-sector": "Equity Index"
},
{
"root-symbol": "E1C",
"cash-settled": false,
"code": "E1C",
"legacy-code": "E1C",
"clearport-code": "E1C",
"clearing-code": "Z1",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "E2C",
"cash-settled": false,
"code": "E2C",
"legacy-code": "E2C",
"clearport-code": "E2C",
"clearing-code": "Z2",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "E4C",
"cash-settled": false,
"code": "E4C",
"legacy-code": "E4C",
"clearport-code": "E4C",
"clearing-code": "Z4",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": true,
"market-sector": "Equity Index"
},
{
"root-symbol": "E5C",
"cash-settled": false,
"code": "E5C",
"legacy-code": "E5C",
"clearport-code": "E5C",
"clearing-code": "Z5",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": true,
"market-sector": "Equity Index"
},
{
"root-symbol": "E2D",
"cash-settled": false,
"code": "E2D",
"legacy-code": "E2D",
"clearport-code": "E2D",
"clearing-code": "EY",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "E3D",
"cash-settled": false,
"code": "E3D",
"legacy-code": "E3D",
"clearport-code": "E3D",
"clearing-code": "EZ",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": false,
"market-sector": "Equity Index"
},
{
"root-symbol": "E4D",
"cash-settled": false,
"code": "E4D",
"legacy-code": "E4D",
"clearport-code": "E4D",
"clearing-code": "E1",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": true,
"market-sector": "Equity Index"
},
{
"root-symbol": "E5D",
"cash-settled": false,
"code": "E5D",
"legacy-code": "E5D",
"clearport-code": "E5D",
"clearing-code": "E2",
"clearing-exchange-code": "9C",
"clearing-price-multiplier": "1.0",
"display-factor": "0.01",
"exchange": "CME",
"product-type": "Physical",
"expiration-type": "Weekly",
"settlement-delay-days": 0,
"is-rollover": true,
"market-sector": "Equity Index"
}
],
"roll": {
"name": "equity_index",
"active-count": 3,
"cash-settled": true,
"business-days-offset": 4,
"first-notice": false
}
},
]
},
"context": "/instruments/future-products"
}
Future Options
There are separate option chain endpoints for futures option chains: GET /futures-option-chains/{product_code}/nested
where product_code
is the underlying future product's code
. For example: to fetch the option chain for all /ES
options, hit GET /instruments/future-option-chains/ES/nested
.
The easiest way to obtain an underlying product code is to fetch all active futures. The product-code
property can then be used to fetch all of a future contract's options.
{
"data": {
"futures": [
{
"symbol": "/ESU3",
"root-symbol": "/ES",
"expiration-date": "2023-09-15",
"days-to-expiration": 71,
"active-month": true,
"next-active-month": false,
"stops-trading-at": "2023-09-15T13:30:00.000+00:00",
"expires-at": "2023-09-15T13:30:00.000+00:00"
}
],
"option-chains": [
{
"underlying-symbol": "/ES",
"root-symbol": "/ES",
"exercise-style": "American",
"expirations": [
{
"underlying-symbol": "/ESU3",
"root-symbol": "/ES",
"option-root-symbol": "E3A",
"option-contract-symbol": "E3AN3",
"asset": "E3A",
"expiration-date": "2023-07-17",
"days-to-expiration": 11,
"expiration-type": "Weekly",
"settlement-type": "PM",
"notional-value": "0.5",
"display-factor": "0.01",
"strike-factor": "1.0",
"stops-trading-at": "2023-07-17T20:00:00.000+00:00",
"expires-at": "2023-07-17T20:00:00.000+00:00",
"tick-sizes": [
{
"value": "0.05",
"threshold": "5.0"
},
{
"value": "0.25"
}
],
"strikes": [
{
"strike-price": "5600.0",
"call": "./ESU3 E3AN3 230717C5600",
"call-streamer-symbol": "./E3AN23C5600:XCME",
"put": "./ESU3 E3AN3 230717P5600",
"put-streamer-symbol": "./E3AN23P5600:XCME"
},
{
"strike-price": "4825.0",
"call": "./ESU3 E3AN3 230717C4825",
"call-streamer-symbol": "./E3AN23C4825:XCME",
"put": "./ESU3 E3AN3 230717P4825",
"put-streamer-symbol": "./E3AN23P4825:XCME"
}
]
},
]
}
]
},
"context": "/futures-option-chains/ES/nested"
}
Transaction History
All transactions impacting an accounts balances or positions are available at this endpoint. Filtering and sorting are available.
GET /accounts/:account-number/transactions
{
"data": {
"items": [
{
"id": 85942,
"account-number": "5WT0001",
"executed-at": "2019-09-16T14:23:11.549+00:00",
"transaction-date": "2019-09-16",
"transaction-type": "Trade",
"transaction-sub-type": "Buy to Open",
"description": "Bought 2 A @ 1.00",
"value": "2.0",
"value-effect": "Debit",
"regulatory-fees": "0.0",
"regulatory-fees-effect": "Debit",
"clearing-fees": "0.002",
"clearing-fees-effect": "Debit",
"net-value": "7.002",
"net-value-effect": "Debit",
"underlying-symbol": "A",
"instrument-type": "Equity",
"symbol": "A",
"action": "Buy to Open",
"commission": "5.0",
"commission-effect": "Debit",
"quantity": "2.0",
"price": "1.0",
"proprietary-index-option-fees": "0.0",
"proprietary-index-option-fees-effect": "Debit",
"is-estimated-fee": true,
"order-id": 759362,
// other attributes omitted
},
{
"id": 85941,
"account-number": "5WT0001",
"executed-at": "2019-09-16T14:22:43.451+00:00",
"transaction-date": "2019-09-16",
"transaction-type": "Trade",
"transaction-sub-type": "Buy to Open",
"description": "Bought 5 QQQ @ 2.00",
"value": "10.0",
"value-effect": "Debit",
"regulatory-fees": "0.0",
"regulatory-fees-effect": "Debit",
"clearing-fees": "0.004",
"clearing-fees-effect": "Debit",
"net-value": "15.004",
"net-value-effect": "Debit",
"underlying-symbol": "QQQ",
"instrument-type": "Equity",
"symbol": "QQQ",
"action": "Buy to Open",
"commission": "5.0",
"commission-effect": "Debit",
"quantity": "5.0",
"price": "2.0",
"proprietary-index-option-fees": "0.0",
"proprietary-index-option-fees-effect": "Debit",
"is-estimated-fee": true,
"order-id": 759361,
// other attributes omitted
},
{
"id": 62887,
"account-number": "5WT0001",
"executed-at": "2018-11-19T19:54:12.758+00:00",
"transaction-date": "2018-11-19",
"transaction-type": "Trade",
"transaction-sub-type": "Buy to Close",
"description": "Bought 1 /CLF9 LOF9 12/14/18 Put 56.50 @ 2.41",
"value": "2410.0",
"value-effect": "Debit",
"regulatory-fees": "1.52",
"regulatory-fees-effect": "Debit",
"clearing-fees": "0.3",
"clearing-fees-effect": "Debit",
"net-value": "2411.82",
"net-value-effect": "Debit",
"underlying-symbol": "/CLF9",
"instrument-type": "Future Option",
"symbol": "./CLF9 LOF9 181214P56.5",
"action": "Buy to Close",
"commission": "0.0",
"commission-effect": "Debit",
"quantity": "1.0",
"price": "2.41",
"proprietary-index-option-fees": "0.0",
"proprietary-index-option-fees-effect": "Debit",
"is-estimated-fee": true,
"order-id": 493987,
// other attributes omitted
}
]
},
"api-version": "v1",
"context": "/accounts/5WT0001/transactions",
"pagination": {
"per-page": 250,
"page-offset": 0,
"item-offset": 0,
"total-items": 1622,
"total-pages": 7,
"current-item-count": 250,
"previous-link": null,
"next-link": null,
"paging-link-template": null
}
}