mirror of
https://github.com/chainstacklabs/pumpfun-bonkfun-bot.git
synced 2026-07-27 23:37:45 +00:00
fix: remove coderabbit syntax bugs
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user