-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpumpfun_bot_python.py
More file actions
70 lines (55 loc) · 2.4 KB
/
pumpfun_bot_python.py
File metadata and controls
70 lines (55 loc) · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# GET FULL COMPLETE CODE HERE:
# https://cryptobots.dev/
# https://t.me/cryptobots_dev
# see it in action: https://www.youtube.com/watch?v=3AzbVknX1qU
# Automated PUMP FUN trading bot that does immediate swaps with about 80% win rate
# All you need is RPC, WSS address and a BOT wallet (anything on solana)
# You can change any parameter you wish
# to get the full code, contact admin at https://t.me/cryptobots_dev
from solana.rpc.types import TokenAccountOpts, TxOpts
from solana.rpc.commitment import Processed, Confirmed
from solana.rpc.api import Client
from solders.compute_budget import set_compute_unit_limit, set_compute_unit_price
from solders.pubkey import Pubkey
from construct import Struct, Padding, Int64ul, Flag, Bytes
from datetime import datetime, timedelta
import threading
import os
##############################################################################################################
# ------------------ SET UP ALL THE REQUIRED PARAMETERS HERE BEFORE PROCEEDING: -----------------------------#
##############################################################################################################
PRIV_KEY = ""
WSS = ""
RPC = ""
sol_in = 0.1 # default BUY amount in SOLANA for all trades (0.005 SOL)
slippage = 20 # default slippage (20%)
percentage = 100 # default token amount to sell (100%)
max_threads = 20
print(f"{green}\n[ the PUMP.FUN auto trading bot ] [ Cryptobots.DEV ] [ v1.0 ] {reset}")
##############################################################################################################
# END OF PARAMETERS SETUP, NEXT IS THE BOT LOGIC FUNTIONS AND MAIN PROCESSING #
##############################################################################################################
# CONNECT TO THE RPC
client = Client(RPC)
payer_keypair = Keypair.from_base58_string(PRIV_KEY)
# RESTRICTIONS FOR API/RPC LIMITS
active_threads = 0
total_profits = 0
total_trades = 1
profitable_trades = loss_trades = 0
open_positions = []
active_threads_lock = threading.Lock()
def buy_and_sell():
# contact ttps://t.me/cryptobots_dev
def trigger():
# contact ttps://t.me/cryptobots_dev
def start():
# contact ttps://t.me/cryptobots_dev
if __name__ == "__main__":
try:
start()
except Exception as e:
print(f"Unexpected error in main event loop: {e}")
# GET FULL COMPLETE CODE HERE:
# https://cryptobots.dev/
# https://t.me/cryptobots_dev