2025-03-05 16:44:55 +00:00
|
|
|
"""
|
|
|
|
|
Configuration for the pump.fun trading bot.
|
|
|
|
|
"""
|
|
|
|
|
|
2024-09-09 09:04:23 +07:00
|
|
|
# Trading parameters
|
2025-03-06 16:14:17 +00:00
|
|
|
BUY_AMOUNT = 0.000001 # Amount of SOL to spend when buying
|
|
|
|
|
BUY_SLIPPAGE = 0.4 # 40% slippage tolerance for buying
|
|
|
|
|
SELL_SLIPPAGE = 0.4 # 40% slippage tolerance for selling
|
2025-03-06 13:52:40 +00:00
|
|
|
ENABLE_DYNAMIC_PRIORITY_FEE = True # TODO: not implemented. getRecentPriorityFee is used to get current priority fee
|
|
|
|
|
EXTRA_PRIORITY_FEE = 0.1 # TODO: not implemented. 10% increase in dynamic priority fee
|
2024-09-09 09:04:23 +07:00
|
|
|
|
2025-03-06 13:52:40 +00:00
|
|
|
# Retries and timeouts
|
2025-03-06 16:14:17 +00:00
|
|
|
MAX_RETRIES: int = 2
|
2025-03-06 22:26:01 +00:00
|
|
|
WAIT_TIME_AFTER_BUY: int = 15
|
|
|
|
|
WAIT_TIME_BEFORE_NEW_TOKEN: int = 30
|
|
|
|
|
WAIT_TIME_AFTER_CREATION: int = 15
|
2025-03-06 22:05:51 +00:00
|
|
|
|
|
|
|
|
# Maximum age (in seconds) for a token to be considered "fresh" and eligible for processing.
|
|
|
|
|
# This threshold is checked before processing starts - tokens older than this are skipped
|
|
|
|
|
# since they likely contain outdated information from the websocket stream
|
2025-03-06 22:19:40 +00:00
|
|
|
MAX_TOKEN_AGE: float = 0.1
|
2024-09-09 09:04:23 +07:00
|
|
|
|
2025-03-06 13:52:40 +00:00
|
|
|
# Node provier configuration
|
2025-03-05 16:44:55 +00:00
|
|
|
# You can also get a trader node https://docs.chainstack.com/docs/solana-trader-nodes
|
2025-03-06 13:52:40 +00:00
|
|
|
MAX_RPS = 25 # TODO: not implemented. Max RPS to avoid rate limit errors
|
2025-03-06 12:40:40 +00:00
|
|
|
PUBLIC_RPC_ENDPOINT = "https://api.mainnet-beta.solana.com"
|
|
|
|
|
PUBLIC_WSS_ENDPOINT = "wss://api.mainnet-beta.solana.com"
|