OctoBot icon indicating copy to clipboard operation
OctoBot copied to clipboard

normalize config and variables

Open IllestGekko opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. Yes, by default trading view alerts when the variable to define sell/buy signal defaults to using lowercase. The

class TradingViewSignalsTradingMode(trading_modes.AbstractTradingMode): SERVICE_FEED_CLASS = trading_view_service_feed.TradingViewServiceFeed EXCHANGE_KEY = "EXCHANGE" SYMBOL_KEY = "SYMBOL" SIGNAL_KEY = "SIGNAL" PRICE_KEY = "PRICE" VOLUME_KEY = "VOLUME" ORDER_TYPE_SIGNAL = "ORDER_TYPE" BUY_SIGNAL = "BUY" SELL_SIGNAL = "SELL" MARKET_SIGNAL = "MARKET" LIMIT_SIGNAL = "LIMIT"

looks for capitalization based on the above. Additionally, other trigger bots may use mixed case, like "Sell" or "Buy". I was thinking it was good to possibly change the octobot_commons.configuration class to normalize the parsed configuration values to the case. .upper() or .lower(). No need to change the KEY, but the value might be good.

Describe the solution you'd like ease integration by normalizing config and match data.

Describe alternatives you've considered none others really. Its just what I generally do to ensure consistency. Force parsed values to lowercase, it allows me to be more forgiving when I receive while still being strict while sending.

Additional context

  • Add any other context or screenshots about the feature request here.
  • You can link a github gist to explain the feature

IllestGekko avatar Feb 25 '22 19:02 IllestGekko

Hi @IllestGekko, what do you mean by "integration" in ease integration?

Herklos avatar Feb 25 '22 20:02 Herklos