fix: remove coderabbit syntax bugs

This commit is contained in:
smypmsa
2025-06-15 20:12:54 +00:00
parent 2ad0f37912
commit 984f43b757
3 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ rpc_endpoint: "${SOLANA_NODE_RPC_ENDPOINT}"
wss_endpoint: "${SOLANA_NODE_WSS_ENDPOINT}" wss_endpoint: "${SOLANA_NODE_WSS_ENDPOINT}"
private_key: "${SOLANA_PRIVATE_KEY}" private_key: "${SOLANA_PRIVATE_KEY}"
enabled: true # You can turn off the bot w/o removing its config enabled: false # You can turn off the bot w/o removing its config
separate_process: true separate_process: true
# Geyser configuration (fastest method for getting updates) # Geyser configuration (fastest method for getting updates)
+7 -7
View File
@@ -8,7 +8,7 @@ rpc_endpoint: "${SOLANA_NODE_RPC_ENDPOINT}"
wss_endpoint: "${SOLANA_NODE_WSS_ENDPOINT}" wss_endpoint: "${SOLANA_NODE_WSS_ENDPOINT}"
private_key: "${SOLANA_PRIVATE_KEY}" private_key: "${SOLANA_PRIVATE_KEY}"
enabled: false # You can turn off the bot w/o removing its config enabled: true # You can turn off the bot w/o removing its config
separate_process: true separate_process: true
# Geyser configuration (fastest method for getting updates) # Geyser configuration (fastest method for getting updates)
@@ -21,15 +21,15 @@ geyser:
# Control trade execution: amount of SOL per trade and acceptable price deviation # Control trade execution: amount of SOL per trade and acceptable price deviation
trade: trade:
buy_amount: 0.0001 # Amount of SOL to spend when buying (in SOL) buy_amount: 0.0001 # Amount of SOL to spend when buying (in SOL)
buy_slippage: 0.3 # Maximum acceptable price deviation (0.3 = 30%) buy_slippage: 0.2 # Maximum acceptable price deviation (0.2 = 20%)
sell_slippage: 0.3 sell_slippage: 0.3
# Exit strategy configuration # Exit strategy configuration
exit_strategy: "time_based" # Options: "time_based", "tp_sl", "manual" exit_strategy: "tp_sl" # Options: "time_based", "tp_sl", "manual"
#take_profit_percentage: 0.1 # Take profit at 10% gain (0.1 = 10%) take_profit_percentage: 0.2 # Take profit at 20% gain (0.2 = 20%)
#stop_loss_percentage: 0.1 # Stop loss at 10% loss (0.1 = 10%) stop_loss_percentage: 0.2 # Stop loss at 20% loss (0.2 = 20%)
max_hold_time: 15 # Maximum hold time in seconds max_hold_time: 60 # Maximum hold time in seconds
#price_check_interval: 2 # Check price every 2 seconds price_check_interval: 2 # Check price every 2 seconds
# EXTREME FAST mode configuration # EXTREME FAST mode configuration
# When enabled, skips waiting for the bonding curve to stabilize and RPC price check. # When enabled, skips waiting for the bonding curve to stabilize and RPC price check.
+3 -3
View File
@@ -282,9 +282,9 @@ class TokenBuyer(Trader):
logger.warning(f"Failed to get actual execution price from bonding curve: {e}") logger.warning(f"Failed to get actual execution price from bonding curve: {e}")
# Fallback to EXTREME_FAST estimate # Fallback to EXTREME_FAST estimate
tokens_received = self.extreme_fast_token_amount if self.extreme_fast_mode else self.amount / await self.curve_manager.calculate_price(token_info.bonding_curve) tokens_received = self.extreme_fast_token_amount if self.extreme_fast_mode else self.amount / await self.curve_manager.calculate_price(token_info.bonding_curve)
+ if tokens_received == 0: if tokens_received == 0:
+ logger.error("Fallback failed unable to determine tokens received") logger.error("Fallback failed unable to determine tokens received")
+ return 0.0, 0.0 return 0.0, 0.0
return self.amount / tokens_received, tokens_received return self.amount / tokens_received, tokens_received