is_tradeable_token
Documentation for eth_defi.token_analysis.tokenrisk.is_tradeable_token function.
- is_tradeable_token(data, symbol=None, whitelist={'AAVE', 'DAI', 'ETH', 'FLOKI', 'MKR', 'NEXO', 'PEPE', 'SNX', 'SYN', 'USDC', 'USDS', 'USDT', 'WBNB', 'WBTC', 'WETH', 'cbBTC'}, risk_score_threshold=5, avoid_risks=['risk_balance_manipulation_in_non_standard_functions'])
Risk assessment for open-ended trade universe.
Based on Token Risk reply, determine if we want to trade this token or not
Note
This will alert for USDT/USDC, etc. so be careful.
- Parameters
symbol (str | None) – For manual whitelist check.
whitelist –
Always whitelist these if the token symbol matches.
E.g. WBTC needs to be whitelisted, as its risk score is 45.
avoid_risks (Collection[str]) – If any of these risk flags is set, short circuit to zero
risk_score_threshold –
If the risk score is below this, we do not want to trade.
Default is zero, so if the token has any risk flags set, we do not want to trade.
Between 0-100.
- Returns
True if we want to trade
- Return type