tastytrade.watchlists¶
- pydantic model tastytrade.watchlists.Pair(*, left_action: str, left_symbol: str, left_quantity: int, right_action: str, right_symbol: str, right_quantity: int)¶
Bases:
TastytradeDataDataclass that represents a specific pair in a pairs watchlist.
Show JSON schema
{ "title": "Pair", "description": "Dataclass that represents a specific pair in a pairs watchlist.", "type": "object", "properties": { "left-action": { "title": "Left-Action", "type": "string" }, "left-symbol": { "title": "Left-Symbol", "type": "string" }, "left-quantity": { "title": "Left-Quantity", "type": "integer" }, "right-action": { "title": "Right-Action", "type": "string" }, "right-symbol": { "title": "Right-Symbol", "type": "string" }, "right-quantity": { "title": "Right-Quantity", "type": "integer" } }, "required": [ "left-action", "left-symbol", "left-quantity", "right-action", "right-symbol", "right-quantity" ] }- Fields:¶
- pydantic model tastytrade.watchlists.PairsWatchlist(*, name: str, order_index: int, pairs_equations: list[Pair])¶
Bases:
TastytradeDataDataclass that represents a pairs watchlist object.
Show JSON schema
{ "title": "PairsWatchlist", "description": "Dataclass that represents a pairs watchlist object.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "order-index": { "title": "Order-Index", "type": "integer" }, "pairs-equations": { "items": { "$ref": "#/$defs/Pair" }, "title": "Pairs-Equations", "type": "array" } }, "$defs": { "Pair": { "description": "Dataclass that represents a specific pair in a pairs watchlist.", "properties": { "left-action": { "title": "Left-Action", "type": "string" }, "left-symbol": { "title": "Left-Symbol", "type": "string" }, "left-quantity": { "title": "Left-Quantity", "type": "integer" }, "right-action": { "title": "Right-Action", "type": "string" }, "right-symbol": { "title": "Right-Symbol", "type": "string" }, "right-quantity": { "title": "Right-Quantity", "type": "integer" } }, "required": [ "left-action", "left-symbol", "left-quantity", "right-action", "right-symbol", "right-quantity" ], "title": "Pair", "type": "object" } }, "required": [ "name", "order-index", "pairs-equations" ] }
-
pydantic model tastytrade.watchlists.PrivateWatchlist(*, name: str, watchlist_entries: list[dict[str, Any]] | None =
None, group_name: str ='default', order_index: int =9999)¶ Bases:
WatchlistDataclass that contains a private watchlist object, with functions to update, publish, modify and remove watchlists.
Show JSON schema
{ "title": "PrivateWatchlist", "description": "Dataclass that contains a private watchlist object, with functions to\nupdate, publish, modify and remove watchlists.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "watchlist-entries": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Watchlist-Entries" }, "group-name": { "default": "default", "title": "Group-Name", "type": "string" }, "order-index": { "default": 9999, "title": "Order-Index", "type": "integer" } }, "required": [ "name" ] }- Fields:¶
- async classmethod get(session: Session) list[Self]¶
- async classmethod get(session: Session, name: str) Self
Fetches the user’s private watchlists, or a specific one if a name is provided.
- add_symbol(symbol: str, instrument_type: InstrumentType) None¶
Adds a symbol to the watchlist.
- remove_symbol(symbol: str, instrument_type: InstrumentType) None¶
Removes a symbol from the watchlist.
-
pydantic model tastytrade.watchlists.PublicWatchlist(*, name: str, watchlist_entries: list[dict[str, Any]] | None =
None, group_name: str ='default', order_index: int =9999)¶ Bases:
WatchlistDataclass that contains symbols from a public watchlist.
Show JSON schema
{ "title": "PublicWatchlist", "description": "Dataclass that contains symbols from a public watchlist.", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "watchlist-entries": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Watchlist-Entries" }, "group-name": { "default": "default", "title": "Group-Name", "type": "string" }, "order-index": { "default": 9999, "title": "Order-Index", "type": "integer" } }, "required": [ "name" ] }- Fields:¶
-
pydantic model tastytrade.watchlists.Watchlist(*, name: str, watchlist_entries: list[dict[str, Any]] | None =
None, group_name: str ='default', order_index: int =9999)¶ Bases:
TastytradeDataShow JSON schema
{ "title": "Watchlist", "type": "object", "properties": { "name": { "title": "Name", "type": "string" }, "watchlist-entries": { "anyOf": [ { "items": { "additionalProperties": true, "type": "object" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Watchlist-Entries" }, "group-name": { "default": "default", "title": "Group-Name", "type": "string" }, "order-index": { "default": 9999, "title": "Order-Index", "type": "integer" } }, "required": [ "name" ] }- Fields:¶