chain#

API documentation for tradingstrategy.chain Python module in Trading Strategy.

Module description#

Blockchain ids.

Data structures and information about EVM based blockchains. Because the same trading pair and smart contract can across multiple blockchains, we need to have a way to identify blockchains. See ChainId enum class for passing the identity of a blockchain around. This is based on the underlying web3.eth.chain_id attribute of a chain.

Trading Strategy package embeds the chain list data from chains repository as the submodule for the Python package. This data is used to populate some ChainId data.

Classes#

ChainId

Chain ids and chain metadata helper.