Binance python code problem

So i’m trying to make a crypto trading bot in python when i want to get my closing/opening/highest price of that candle i run into a struggle

The code:

>client = Client(publickey, privatekey)
Klines = client.get_klines(symbol=’BNBBTC’, interval=Client.KLINE_INTERVAL_15MINUTE)
print(“The open price is”+str(Klines[1]))
print(“The close price is”+str(Klines[4]))
print(“The high price is”+str(Klines[2]))

What it prints:

The open price is[1536564600000, ‘0.00152440’, ‘0.00152620’, ‘0.00151410’, ‘0.00152180’, ‘8051.79000000’, 1536565499999, ‘12.23178749’, 523, ‘936.02000000’, ‘1.42199347’, ‘0’]

The close price is[1536567300000, ‘0.00152290’, ‘0.00152930’, ‘0.00151970’, ‘0.00152600’, ‘5551.95000000’, 1536568199999, ‘8.46415007’, 423, ‘3680.35000000’, ‘5.61203000’, ‘0’]

The high price is[1536565500000, ‘0.00152170’, ‘0.00152180’, ‘0.00151830’, ‘0.00152120’, ‘1201.71000000’, 1536566399999, ‘1.82703752’, 233, ‘723.15000000’, ‘1.09981454’, ‘0’]

​

The information i have from the api:

[https://python-binance.readthedocs.io/en/latest/binance.html#binance.client.Client.get_klines](https://python-binance.readthedocs.io/en/latest/binance.html#binance.client.Client.get_klines)

Short pic of explenation:

[https://gyazo.com/54602f1b6e4a8d5e087598f48a7e528d](https://gyazo.com/54602f1b6e4a8d5e087598f48a7e528d)

​

​



View Reddit by CryptoMuscaView Source

Related Posts

2 Comments

  1. WOLFGANGUPINTHISBITC
    September 15, 2018
  2. bitcoin_rev_newb
    September 15, 2018

Add Comment