Skip to content
Advertisement

Python Binance multiple kline time intervals

I’m writing a program that collects cryptocurrency price information and I want to perform technical analysis on two different kline time intervals. I’ve been struggling to achieve this as I’m new to programming and even newer to Python specifically.

Below is the code I’m currently trying to get two different kline streams in at the same time.

JavaScript

Unfortunately I’m getting these errors:

JavaScript

I don’t feel like I’m passing 4 arguments, but apperently I am. What am I doing wrong here? Any help would be greatly appreciated!

Skurring

Advertisement

Answer

Using double asterisks will make res a dictionary of all the four arguments:

JavaScript

Thread arguments should be sent with kwargs instead of args (this will pack arguments into a dictionary):

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement