Whalepool / bitmex-wallet-parser

A simple script to parse over your bitmex wallet history file and give you an overview of your account.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bitmex Wallet Parser by @whalepoolbtc - https://whalepool.io

About

A simple script to parse over your bitmex wallet history file and give you an overview of your account.

Support

Please use the bitmex whalepool affiliate link or the deribit whalepool affiliate link to support @whalepool

Install / Setup Instructions

  • Install python-devel package on your machine
  • Install pip requirements:
    • Linux sudo pip install -r requirements.pip
    • Windows py pip install -r requirements.pip

Use via downloading your bitmex wallet history as .csv file

  • Go to https://www.bitmex.com/app/wallet and click the 'save as CSV' on the top right. - This will download 'Wallet History - YYYY-MM-DD.csv' file. Put this file in the same location as the python script.

Use via setting up api credentials for your bitmex account

You can save you api credentials to config.json if you want.
Warning, saving api details in an unencrypted format to a file could be a security risk.
You don't have to, there is a prompt for the details if you dont have config.json file setup.

# Setup your api credentials in config.json 
# api credentials can be generated here:  https://www.bitmex.com/app/apiKeys
cp config.sample.json config.json  
  
# Use the script with the --use-api flag
python bitmex-wallet-parser.py --with-api 

Run some commands

Script will output a chart for each time you run it. Share and enjoy !

# Simple trading returns, no balances present
python bitmex-wallet-parser.py
# Show balances
python bitmex-wallet-parser.py --showmoney

# Show your wallet aswell, so u can see deposit/withdrawals from your account
python bitmex-wallet-parser.py --show-wallet

# Show your affiliate balances
python bitmex-wallet-parser.py --show-affiliate

# Hide your trading performance
# Maybe just to show affiliate balances and nothing else ? 
python bitmex-wallet-parser.py --hide-trading 
python bitmex-wallet-parser.py --hide-trading  --show-affiliate
python bitmex-wallet-parser.py --hide-trading  --show-affiliate --showmoney

Arguments

Argument Description
-s start date, eg '2019-01-01 00:00'
-e end date, eg '2019-02-01 00:00'
--show-wallet show full wallet balance history including deposit/withdrawals
--show-affiliate show affiliate income
--hide-trading hide trading data
--showmoney add money values to the axis
--with-api get bitmex historical data via api

Sample output

python bitmex-wallet-parser.py --hide-trading  --show-affiliate -s '2018-01-01 00:00' -e '2019-01-01 00:00'

chart example 1


python bitmex-wallet-parser.py -s '2019-01-01 00:00' -e '2019-06-09 00:00'

chart example 1


TODO

cache/save/check cache/refresh latest data for trading history / candles

About

A simple script to parse over your bitmex wallet history file and give you an overview of your account.


Languages

Language:Python 100.0%