Binance Funds Parser in python, My All Binance Coins Portfolio, cointracking.info

in #bitcoin7 years ago

Did you every try and copy and paste the funds table in bianace.com? It turns out it is not a table but a set of nested divs in angular.js. I wrote a fast python parser to read that table and parse it into a set of structs. You just save your page as html with chrome and parse it with python.
The code is on (github gist)[~~~ embed:899edf52193dfa059e259abf31d98439] gist metadata:aDRjazNybTFrMy84OTllZGY1MjE5M2RmYTA1OWUyNTlhYmYzMWQ5ODQzOV0= ~~~

Here is my portfolio in binance, I purchased the minimum amount of all the currently tradeable coins on binance (LLT LLToken HCC HealthCare Chain BTM Bytom are supposedly the trading hours whatever that means, but hcc seems to be defunct)

coins.png

coinfullnametotal
ADACardano39.89700000 (moved most of my ada out already)
CNDCindicator24.98000000
SNGLSSingularDTV21.97800000
IOTAMIOTA18.58200000
IOSTIOStoken9.99000000
AMBAmber2.99700000
QSPQuantstamp2.00000000
MODModum1.99800000
WABIWaBi1.99800000
ASTAirSwap1.99800000
TNTTierion1.99800000
EOSEOS1.09890000
XVGVerge1.00000000
TNBTime New Bank1.00000000
OAXopenANX1.00000000
DNTdistrict0x1.00000000
ARNAeron1.00000000
CDTCoinDash1.00000000
RDNRaiden Network Token1.00000000
LENDEthLend1.00000000
WINGSWINGS1.00000000
LRCLoopring1.00000000
NULSNuls1.00000000
YOYOYOYOW1.00000000
TRXTRON1.00000000
CMTCyberMiles1.00000000
SNTStatus1.00000000
RCNRipio Credit Network1.00000000
KNCKyberNetwork1.00000000
SNMSONM1.00000000
FUNFunFair1.00000000
LINKChainLink1.00000000
APPCAppCoins1.00000000
POEPo.et1.00000000
BATBasic Attention Token1.00000000
MDAMoeda Loyalty Points1.00000000
BCPTBlockMason Credit Protocol1.00000000
SUBSubstratum1.00000000
ADXAdEx1.00000000
MANADecentraland1.00000000
MTHMonetha1.00000000
ENGEnigma1.00000000
BRDBread1.00000000
FUELEtherparty1.00000000
ELFaelf1.00000000
DLTAgrello1.00000000
REQRequest Network1.00000000
VIBViberate1.00000000
POWRPowerLedger1.00000000
BTSBitShares1.00000000
XRPRipple1.00000000
GTOGifto1.00000000
ENJEnjinCoin1.00000000
STORJStorj1.00000000
ICNICONOMI0.99900000
EVXEverex0.99900000
QTUMQtum0.99900000
XLMStellar Lumens0.99900000
ZRX0x0.99900000
CTRCentra0.99900000
OSTSimple Token0.99900000
VIBEVIBE0.99900000
INSINS Ecosystem0.99900000
VENVeChain0.99900000
BQXETHOS0.99800000
BNBBinance0.54817585
LSKLisk0.10990000
ARKArk0.10000000
MTLMetal0.10000000
GVTGenesis Vision0.09990000
ETHEthereum0.06130697
DGDDigixDAO0.04095900
XZCZCoin0.02000000
OMGOmiseGO0.01000000
BTGBitcoin Gold0.01000000
RLCiExecRLC0.01000000
BNTBancor0.01000000
ETCEthereum Classic0.01000000
SALTSalt0.01000000
PPTPopulous0.01000000
STRATStratis0.01000000
NEONEO0.01000000
WTCWalton0.01000000
XMRMonero0.01000000
MCOMONACO0.01000000
GXSGXShares0.01000000
TRIGTriggers0.01000000
WAVESWaves0.01000000
HSRHshare0.01000000
NAVNAV Coin0.01000000
ICXICON0.01000000
KMDKomodo0.01000000
EDOEidoo0.01000000
AIONAION0.01000000
LTCLitecoin0.01000000
NEBLNeblio0.01000000
GASNeoGas0.01000000
LUNLunyr0.01000000
PIVXPIVX0.00999000
BTCBitcoin0.00194738
BCDBitcoin Diamond0.00100000
DASHDash0.00100000
BCCBitcoin Cash0.00100000
ZECZcash0.00100000
ETFETF0.00000000 (no trading market)
BTMBytom0.00000000(outside trading hours)
USDTTetherUS0.00000000(no trading market)
HCCHealthCare Chain0.00000000 (defunct)
BCXBitcoinX0.00000000(no trading market)
LLTLLToken0.00000000(outside trading hours)
SBTCSuper Bitcoin0.00000000(no trading market)

Then I use https://cointracking.info/gains.php to track my gains and losses, it imports the binance data files.