Skip to content

Watchlist Operations

alienbrett edited this page Mar 28, 2020 · 1 revision

Create a Watchlist

Returns a list of all of the accounts' watchlists. Notice that symbols=[] is also valid, no symbols need to be added upon creation.

a.new_watchlist(
    name='test',
    symbols=['tsla','gld']
)
# outputs
[
    "test"
]

Add Symbols

Adds any number of symbols to an existing watchlist:

a.add_symbol(
    name='test',
    symbols=['spy','ko']
)
# outputs
[
    "test"
]

View Symbols

To view the symbols in an existing watchlist:

a.watchlist(
    name='test'
)
# outputs
[
    "GLD",
    "KO",
    "SPY",
    "TSLA"
]

Delete a Symbol

Delete a single symbol from an existing watchlist:

a.delete_symbol(
    name='test',
    symbol='ko'
)
# outputs
[
    "test"
]

Delete a Watchlist

Destroy an existing watchlist:

a.delete_watchlist(
    name='test'
)
# outputs
[]