WatchlistMember table

Table Name: WatchlistMember
Supports: SELECT, INSERT, UPDATE, DELETE
Permissions: Zenith/Market

Provides access to the members of a Watchlist.

SELECT

Allows viewing the members of a Watchlist. Members are provided in the order specified by the Watchlist.

Columns

Name Type Allows Description
ID String IS, IN The unique identifier of this Watchlist.
Member String The combined Symbol and Exchange codes, eg: Symbol.Exchange.

Examples

Select the members of a single Watchlist:

SELECT SymbolCode FROM WatchlistMember WHERE ID = '123ABC'

Select the members of multiple Watchlists:

SELECT * FROM WatchlistMember WHERE ID IN ['123ABC', '456DEF']

INSERT/UPDATE/DELETE

Allows manipulation of the members of a Watchlist.

  • ID is required for all operations

Columns

Name Type Set Where Description
ID String I/U/D The unique identifier of this Watchlist.
Member String I/U U/D The combined Symbol and Exchange codes, eg: Symbol.Exchange.
Offset Integer U I/U/D The zero-based offset of the Members in the list.

Results

No Result Body

Examples

Appends a new member to the end of the Watchlist:

INSERT INTO WatchlistMember SET Member = 'BHP.ASX' WHERE ID = '123ABC'

Appends multiple members in-order to the end of the Watchlist:

INSERT INTO WatchlistMember SET Member = ['BHP.ASX', 'TLS'ASX'] WHERE ID = '123ABC'

Inserts multiple members in-order at an offset within the Watchlist:

INSERT INTO WatchlistMember SET Member = ['BHP.ASX', 'TLS'ASX'] WHERE ID = '123ABC' AND Offset = 2

Replace a member at a specific offset with a new value:

UPDATE WatchlistMember SET Member = 'CBA.ASX' WHERE ID = '123ABC' AND Offset = 0

Replace a specific member with a new value:

UPDATE WatchlistMember SET Member = 'CBA.ASX' WHERE ID = '123ABC' AND Member = 'BHP.ASX'

Replace all members of the Watchlist with a new set:

UPDATE WatchlistMember SET Member = ['BHP.ASX', 'TLS'ASX'] WHERE ID = '123ABC'

Replace a range of members within the Watchlist:

UPDATE WatchlistMember SET Member = ['BHP.ASX', 'TLS'ASX'] WHERE ID = '123ABC' AND Offset BETWEEN 1 AND 2

Move a member within the Watchlist:

UPDATE WatchlistMember SET Offset = 0 WHERE ID = '123ABC' AND Offset = 4

Move a specific member within the Watchlist:

UPDATE WatchlistMember SET Offset = 2 WHERE ID = '123ABC' AND Member = 'BHP.ASX'

Move a range of members within the Watchlist:

UPDATE WatchlistMember SET Offset = 2 WHERE ID = '123ABC' AND Offset BETWEEN 1 AND 4

Delete all members from the Watchlist:

DELETE FROM WatchlistMember WHERE ID = '123ABC'

Delete specific members from the Watchlist:

DELETE FROM WatchlistMember WHERE ID = '123ABC' AND Member IN ['BHP.ASX', 'TLS.ASX']

Delete the member at an offset from the Watchlist:

DELETE FROM WatchlistMember WHERE ID = '123ABC' AND Offset = 1

Delete the members within a range from the Watchlist:

DELETE FROM WatchlistMember WHERE ID = '123ABC' AND Offset BETWEEN 1 AND 4