TopPairsReply#

API documentation for tradingstrategy.top.TopPairsReply Python class in Trading Strategy framework.

class TopPairsReply[source]#

Bases: object

/top endpoint reply.

  • Get a list of trading pairs, both included and excluded

__init__(included, excluded)#
Parameters:
Return type:

None

Methods

__init__(included, excluded)

as_token_address_map()

Make base token address lookupable data.

from_dict(kvs, *[, infer_missing])

from_json(s, *[, parse_float, parse_int, ...])

schema(*[, infer_missing, only, exclude, ...])

to_dict([encode_json])

to_json(*[, skipkeys, ensure_ascii, ...])

Attributes

included

The top list at the point of time the request was made

excluded

Tokens that were considered for top list, but excluded for some reason

included: list[tradingstrategy.top.TopPairData]#

The top list at the point of time the request was made

excluded: list[tradingstrategy.top.TopPairData]#

Tokens that were considered for top list, but excluded for some reason

They had enough liquidity, but they failed e.g. TokenSniffer scam check, or had a trading pair for the same base token with better fees, etc.

as_token_address_map()[source]#

Make base token address lookupable data.

Includes both excluded and included pairs. Included takes priority if multiple pairs.

Returns:

Map with all token addresses lowercase.

Return type:

dict[str, tradingstrategy.top.TopPairData]

__init__(included, excluded)#
Parameters:
Return type:

None