translate_token#
API documentation for tradeexecutor.strategy.trading_strategy_universe.translate_token Python function.
- translate_token(token, require_decimals=True, underlying=None, type=AssetType.token, liquidation_threshold=None)[source]#
Translate Trading Strategy token data definition to trade executor.
Trading Strategy client uses compressed columnar data for pairs and tokens.
Creates AssetIdentifier based on data coming from Trading Strategy
tradingstrategy.pair.PandasPairUniverse
.- Parameters:
underlying (tradeexecutor.state.identifier.AssetIdentifier | None) – Underlying asset for dynamic lending tokens.
require_decimals – Most tokens / trading pairs are non-functional without decimals information. Assume decimals is in place. If not then raise AssertionError. This check allows some early error catching on bad data.
type (tradeexecutor.state.identifier.AssetType | None) – What kind of asset this is.
liquidation_theshold – Aave liquidation threhold for this asset, only collateral type asset can have this.
token (Token) –
liquidation_threshold (float | None) –
- Return type: