Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Balance and diff chains #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 45 additions & 23 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,70 @@
from termcolor import cprint
import random

API_KEY = ""
API_SECRET = ""

def binance_withdraw(address, amount_to_withdrawal, symbolWithdraw, network, API_KEY, API_SECRET):

account_binance = ccxt.binance({
'apiKey': API_KEY,
'secret': API_SECRET,
'enableRateLimit': True,
'options': {
'defaultType': 'spot'
}
})
def binance_withdraw(address, amount_to_withdrawal, symbolWithdraw, network, API_KEY, API_SECRET):

try:
account_binance.withdraw(
code = symbolWithdraw,
amount = amount_to_withdrawal,
address = address,
tag = None,
params = {
code=symbolWithdraw,
amount=amount_to_withdrawal,
address=address,
tag=None,
params={
"network": network
}
)
cprint(f">>> Успешно | {address} | {amount_to_withdrawal}", "green")
except Exception as error:
cprint(f">>> Неудачно | {address} | ошибка : {error}", "red")


if __name__ == "__main__":

with open("wallets.txt", "r") as f:
wallets_list = [row.strip() for row in f]

account_binance = ccxt.binance({
'apiKey': API_KEY,
'secret': API_SECRET,
'enableRateLimit': True,
'options': {
'defaultType': 'spot'
}
})

balances = account_binance.fetch_balance()['info']['balances']
for i in balances:
if i['asset'] == 'ETH':
balance = i['free']
print(f'Your ETH balance is {balance}')
break

symbolWithdraw = 'ETH'
network = 'Arbitrum'
network = ''

network_input = int(
input('Select Chain (min amount): \n 1. ETH 0.0098 \n 2. ARB 0.0008 \n 3. OP 0.001 \n 4. BSC 0.00011 \n '))

# api_keys of binance
API_KEY = "your_api_key"
API_SECRET = "your_api_secret"
match (network_input):
case (1):
network = 'ETH'
case (2):
network = 'Arbitrum'
case (3):
network = 'Optimism'
case (4):
network = 'BSC'

amount_input = float(input('Input amount of ETH: '))

cprint('\a\n/// start withdrawing...', 'white')
for wallet in wallets_list:
amount_to_withdrawal = round(random.uniform(0.001, 0.002), 6) # amount from ... to ...
binance_withdraw(wallet, amount_to_withdrawal, symbolWithdraw, network, API_KEY, API_SECRET)
# amount from ... to ...
amount_to_withdrawal = amount_input
binance_withdraw(wallet, amount_to_withdrawal,
symbolWithdraw, network, API_KEY, API_SECRET)
time.sleep(random.randint(10, 30))