create_spot_token_map_existing_positions#

API documentation for tradeexecutor.ethereum.token.create_spot_token_map_existing_positions Python function.

create_spot_token_map_existing_positions(portfolio, raise_on_unsupported=True)[source]#

Create a map of spot ERC-20 tokens in our portfolio.

Returns:

ERC-20 address -> position map for all open/frozen spot positions.

Parameters:

portfolio (Portfolio) –

Return type:

dict[str, tradeexecutor.state.position.TradingPosition]