Skip to content

Commit

Permalink
🔧
Browse files Browse the repository at this point in the history
  • Loading branch information
mraniki committed Jul 9, 2024
1 parent 036a2c8 commit f8a4f4a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 42 deletions.
74 changes: 37 additions & 37 deletions findmyorder/default_settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,44 +19,44 @@
# Module Enable/Disable
findmyorder_enabled = true

[default.findmyorder.template]
parser_library = "standard"
enabled = true
# Keyword to be use to identify an order
action_identifier = "BUY SELL LONG SHORT"
# Keyword identifier for stoploss
stop_loss_identifier = "sl="
# Keyword identifier for take-profit
take_profit_identifier = 'tp='
# Keyword identifier for quantity
quantity_identifier = 'q='
# Keyword identifier for order type
order_type_identifier = "spot future margin"
# Keyword identifier for leverage
leverage_type_identifier = "cross isolated"
# Keyword identifier for comments
comment_identifier = "comment="
# Stoploss default value is none is provided
stop_loss = 1000
# Take-Profit default value is none is provided
take_profit = 1000
# Quantity default value is none is provided
quantity = 1
# Settings to enable or disable
# instrument mapping
instrument_mapping = true
# instrument mapping to use and alternative
# symbol when generating the order
mapping = [
{ id = "GOLD", alt = "XAUUSD" },
{ id = "SILVER", alt = "XAGUSD" },
{ id = "BTC", alt = "WBTC" },
{ id = "ETH", alt = "WETH" },
]
# [default.findmyorder.template]
# parser_library = "standard"
# enabled = true
# # Keyword to be use to identify an order
# action_identifier = "BUY SELL LONG SHORT"
# # Keyword identifier for stoploss
# stop_loss_identifier = "sl="
# # Keyword identifier for take-profit
# take_profit_identifier = 'tp='
# # Keyword identifier for quantity
# quantity_identifier = 'q='
# # Keyword identifier for order type
# order_type_identifier = "spot future margin"
# # Keyword identifier for leverage
# leverage_type_identifier = "cross isolated"
# # Keyword identifier for comments
# comment_identifier = "comment="
# # Stoploss default value is none is provided
# stop_loss = 1000
# # Take-Profit default value is none is provided
# take_profit = 1000
# # Quantity default value is none is provided
# quantity = 1
# # Settings to enable or disable
# # instrument mapping
# instrument_mapping = true
# # instrument mapping to use and alternative
# # symbol when generating the order
# mapping = [
# { id = "GOLD", alt = "XAUUSD" },
# { id = "SILVER", alt = "XAGUSD" },
# { id = "BTC", alt = "WBTC" },
# { id = "ETH", alt = "WETH" },
# ]

# Instrument to be ignored
# when generating an order
ignore_instrument = "US500 DOGE"
# # Instrument to be ignored
# # when generating an order
# ignore_instrument = "US500 DOGE"

########################################
### END OF DEFAULT SETTINGS ###
Expand Down
4 changes: 0 additions & 4 deletions findmyorder/handler/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@ async def search(self, message: str) -> bool:
"""
if message:
order_identifier = message.split()[0].lower()
# logger.debug("Order identifier: {}", order_identifier)
# logger.debug("Action identifiers: {}", self.action_identifiers)
if order_identifier in self.action_identifier:

# logger.debug("Order identifier found in {}", order_identifier)
return True

return False
Expand Down
2 changes: 1 addition & 1 deletion findmyorder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(
Returns:
None
"""
"""

self.enabled = settings.findmyorder_enabled
if not self.enabled:
Expand Down

0 comments on commit f8a4f4a

Please sign in to comment.