Local tracker of a binance account
Project description
Welcome to BinanceWatch v0.1.0
Note
This library is under development by EtWnn, feel free to drop your suggestions or remarks in the discussion tab of the git repo. You are also welcome to contribute by submitting PRs.
This is an unofficial tracker for binance accounts. I am in no way affiliated with Binance, use at your own risk.
Source Code: https://github.com/EtWnn/BinanceWatch
Features
If you used quite intensively Binance, it can take some time to retrieve everything that happened on your account. This library is made to save locally the events of your account so that you don't need to fetch your history from the beginning every time.
It currently supports:
-
Spot Trades
-
Spot Crypto Deposits
-
Spot Crypto Withdraws
-
Spot Dividends
-
Spot Dusts
-
Universal Transfers
-
Lending Purchases
-
Lending Interests
-
Lending Redemptions
-
Cross Margin Trades
-
Cross Margin Repayment
-
Cross Margin Loans
-
Cross Margin Interests
Quick Tour
Generate an API Key in your binance account. Only read permissions are needed.
Install this library with pip:
pip install BinanceWatch
from BinanceWatch.BinanceManager import BinanceManager
api_key = "<API_KEY>"
api_secret = "<API_SECRET>"
bm = BinanceManager(api_key, api_secret)
# fetch the latest spot trades from Binance
bm.update_all_spot_trades()
Out -> fetching BIFIBUSD: 100%|██████████████████████| 1349/1349 [06:24<00:00, 3.51it/s]
from datetime import datetime
from BinanceWatch.utils.time_utils import datetime_to_millistamp
start_time = datetime_to_millistamp(datetime(2018,1,1))
# get the locally saved spot trades made after 2018/01/01
spot_trades = bm.db.get_trades('spot', start_time=start_time)
You can also call update functions at an account-type level, and it will call every update methods related to this account-type:
bm.update_spot() # (trades, transfers, deposits ...)
bm.update_cross_margin() # (trades, loans, repays, interests...)
bm.update_lending() # (purchases, interests, redemptions..)
Donation
If this library has helped you in any way, feel free to donate:
- BTC: 14ou4fMYoMVYbWEKnhADPJUNVytWQWx9HG
- ETH: 0xfb0ebcf8224ce561bfb06a56c3b9a43e1a4d1be2
- LTC: LfHgc969RFUjnmyLn41SRDvmT146jUg9tE
- EGLD: erd1qk98xm2hgztvmq6s4jwtk06g6laattewp6vh20z393drzy5zzfrq0gaefh
Known Issues:
Some endpoints are not yet provided by Binance, so they can't be implemented in this library:
- Fiat withdraws and deposits
- Locked stacking interests
- Direct purchases with debit card
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file BinanceWatch-0.1.0.tar.gz
.
File metadata
- Download URL: BinanceWatch-0.1.0.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 764de60818ba3ce304056dee0c77b6c3fc21daaa49ce30c11d14abac6fe1e05b |
|
MD5 | 2409ef47ed4bbbe8fad855fd16742e4d |
|
BLAKE2b-256 | 38f904a91827a8edb370542a422aa998327888ec74f19bf30b04dd5ef12bac4e |