-
Notifications
You must be signed in to change notification settings - Fork 0
/
binanceLiquidity.py
38 lines (22 loc) · 952 Bytes
/
binanceLiquidity.py
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
from binance.spot import Spot
from chooseCoin import *
from lastWithdrawals import *
from tickers import *
from uniswap import Uniswap
def seeBinanceLiquidity():
client = Spot(key='<your spot key>', secret='<your secret key>')
bids = (client.depth("BTCUSDT")['bids'])
minimumBid = float(bids[99][0])
maximumBid = float(bids[0][0])
difference = float(maximumBid - minimumBid)
print("\nTotal difference = ", minimumBid - maximumBid)
totalBids = float(0)
count = 0
while (count < 100):
totalBids = float(totalBids) + float(bids[count][1])
count = count + 1
print("\nTotal BTC =", totalBids)
print("\n")
print("Dumping", int(totalBids), "BTC would lead to the price decline of", int(difference), "USD")
#z = Uniswap.estimate_price_impact("Uniswap", "0x0000000000000000000000000000000000000000", "0x6B175474E89094C44Da98b954EedeAC495271d0F", "200")
#print("\n", z)