<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lukas Eber</title>
    <description>The latest articles on DEV Community by Lukas Eber (@lukaseber).</description>
    <link>https://dev.to/lukaseber</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F852420%2Fe38188df-4141-4fc9-9a9c-a1a0f4acf781.png</url>
      <title>DEV Community: Lukas Eber</title>
      <link>https://dev.to/lukaseber</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lukaseber"/>
    <language>en</language>
    <item>
      <title>Very very basic python-binance ThreadedWebSocketManager example does not work... why?</title>
      <dc:creator>Lukas Eber</dc:creator>
      <pubDate>Sat, 25 May 2024 15:51:35 +0000</pubDate>
      <link>https://dev.to/lukaseber/very-very-basic-python-binance-threadedwebsocketmanager-example-does-not-work-why-2j0o</link>
      <guid>https://dev.to/lukaseber/very-very-basic-python-binance-threadedwebsocketmanager-example-does-not-work-why-2j0o</guid>
      <description>&lt;p&gt;I have an application that uses the binance api to trade and do some other stuff. The app worked fine for like 2 years, but one day it stopped working. So i decided to create a basic script to validate the core functionality of the api. I did everything exactly like its described in several offical docs and tutorials but its still not working as expected. Here is my code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from binance import Client, ThreadedWebsocketManager

api_key = 'my_key'
api_secret = 'my_secret'

client = Client(api_key, api_secret)

def process_message(msg):
    print("message type: {}".format(msg['e']))
    print(msg)

twm = ThreadedWebsocketManager(api_key=api_key, api_secret=api_secret)
twm.start()

ret = twm.start_kline_socket(callback=process_message, symbol='BTCEUR', interval='1m')
print(ret)

twm.join()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, what happens at all? The twm is created and my print statement returns: btceur@kline_1m&lt;br&gt;
thats all. I expected the script to call the process_message func every 1 minute, but it does not get called after a 1 min session has completed. I have seen some similar troubles with older versions, have tried all possible solutions but I wasn´t able to fix it. I am using the latest python-binance version, v1.0.19 - 2023-08-11 and python 3.12.3&lt;/p&gt;

</description>
      <category>python</category>
      <category>binance</category>
      <category>pythonbinance</category>
    </item>
  </channel>
</rss>
