This class is a simple wrapper for the python-binance package.
Assuming python is already installed.
git clone https://github.com/cyberpz/BinancePz.git
cd BinancePz
pip install -r requirements.txt
Ignore warnings, go for a ride.
- Rename the file
cretentials.template.json
intocredentials.json
and open it - Generate a telegram token for your notifier (from @botfather)
- Generate Binance API key
- Copy and paste all keys into
credentials.json
file - (Optional, but highly suggested) Enable IP filtering on the Binance API key, so you know that only you are using the keys.
Ok now you can create a little file:
from BinancePz import BinancePz
import json
config = json.load(open('credentials.json'))
pz = BinancePz('',
token=config['token'],
bnb_key=config['bnb_key'],
bnb_secret=config['bnb_secret'])
for coin in pz.get_wallet():
print(coin)
and lunch it:
python file.py
Good bye!!!
No Documentation, it's all up here, for ITALIAN version clikc here!
- get_wallet - Gathers all spot wallet
- get_asset - Gathers quantity of specified coin in spot wallet
- spot_balance - Returns total wallet value in USD
- current_btc_price - Returns current BTCUSDT value
- pretty - Return the right rounded number rispectively to the symbol (types: quotePrice, exitPrice, qty)
- transfer_dust - Transfer coins from Spot to Fundings
- funds_to_spot - Transfer coins from Fundings to Spot
- get_closest_ask_price - Usefull shortcut for trading operation
- get_closest_bid_price - Usefull shortcut for trading operation
- send_message - Sends message to telegram admins