<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Technopathy]]></title><description><![CDATA[Real-world insights on DevSecOps, Python, security, and AI-driven development — written by the creator of the UNICORN Binance Suite.]]></description><link>https://blog.technopathy.club</link><image><url>https://cdn.hashnode.com/uploads/logos/69d4b99a5da14bc70e00d4f6/2eaf7f26-8898-42fc-bf54-cc43ac0f272b.png</url><title>Technopathy</title><link>https://blog.technopathy.club</link></image><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 11:48:24 GMT</lastBuildDate><atom:link href="https://blog.technopathy.club/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Binance Websocket via SOCKS5]]></title><description><![CDATA[US servers unfortunately can no longer connect to binance.com (geoblocking).

HTTP 451 error “Service unavailable from a restricted location…”

This article is about the Binance Websocket API, if you ]]></description><link>https://blog.technopathy.club/binance-websocket-via-socks5</link><guid isPermaLink="true">https://blog.technopathy.club/binance-websocket-via-socks5</guid><dc:creator><![CDATA[Oliver Zehentleitner]]></dc:creator><pubDate>Fri, 10 Apr 2026 10:30:32 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/69d4b99a5da14bc70e00d4f6/a6608ac2-e339-430a-801e-d74e4f7e3a56.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em><strong>US servers unfortunately can no longer connect to</strong></em> <a href="https://www.binance.com"><em><strong>binance.com</strong></em></a> <em><strong>(geoblocking).</strong></em></p>
<blockquote>
<p><em><strong>HTTP 451 error “Service unavailable from a restricted location…”</strong></em></p>
</blockquote>
<p>This article is about the <strong>Binance Websocket API</strong>, if you want to <a href="https://technopathy.club/how-to-connect-to-binance-com-rest-api-using-python-via-a-socks5-proxy-638dbbecacfd">redirect a REST connection to Binance via a SOCKS5 proxy</a>, please <a href="https://technopathy.club/how-to-connect-to-binance-com-rest-api-using-python-via-a-socks5-proxy-638dbbecacfd">read this article</a>.</p>
<p>A SOCKS5 server is a type of proxy server that routes network traffic between a client and a server. It allows clients to bypass internet restrictions and access restricted content by using a different IP address.</p>
<p>I will explain in this article <strong>how to create a SOCKS5 proxy server using Linux and how to configure the websocket connection in Python to access the Binance API through the SOCKS5 proxy</strong>.</p>
<p>For this solution you need a simple virtual cloud Linux server such as a 4.51 EUR server with 20TB traffic volume included from <a href="https://www.hetzner.com">HETZNER CLOUD</a>, which supports the required traffic volume for the SOCKS5 proxy, and you need a working Python 3.8+ environment for the Python script!</p>
<blockquote>
<p>We would like to explicitly point out that in our opinion US citizens are exclusively authorized to trade on Binance.US and that this restriction must not be circumvented!</p>
</blockquote>
<blockquote>
<p>The purpose of supporting a SOCKS5 proxy in the <a href="https://github.com/oliver-zehentleitner/unicorn-binance-suite">UNICORN Binance Suite</a> and its modules is to allow non-US citizens to use US services. For example, Github actions with UBS will not work without a SOCKS5 proxy, as they will inevitably run on servers in the US and be blocked by Binance.com. Moreover, it also seems justified that traders, data scientists and companies from the US analyze binance.com market data — as long as they do not trade there.</p>
</blockquote>
<h3><strong>1. Step — Set up the</strong> SOCKS5 <strong>service</strong></h3>
<p>There are countless ways to create a SOCKS5 proxy:</p>
<ul>
<li><p><strong>danted SOCKS server</strong></p>
</li>
<li><p>tinyproxy</p>
</li>
<li><p>openssh</p>
</li>
<li><p>and many more …</p>
</li>
</ul>
<p>The <strong>following instructions are for Debian and Ubuntu</strong> — for <a href="https://technopathy.club/installation-and-configuration-of-socks-proxy-danted-on-redhat-centos-aws-ec2-from-soure-code-f643a183cccb">CentOS, RedHat, AWS EC2 and other Linux distributions that use <em>`yum`</em></a> as a package manager please <a href="https://technopathy.club/installation-and-configuration-of-socks-proxy-danted-on-redhat-centos-aws-ec2-from-soure-code-f643a183cccb">follow these instructions</a>.</p>
<h4>danted SOCKS server</h4>
<p>Project homepage: <a href="https://www.inet.no/dante/">https://www.inet.no/dante/</a></p>
<ul>
<li><p>Log into your Linux server where you want to install the SOCKS5 proxy and get root privileges:<br /><code>sudo -i</code></p>
</li>
<li><p>Install with <code>apt</code>:<br /><code>apt update</code><br /><code>apt install dante-server</code></p>
</li>
</ul>
<p><strong>Info</strong>: After the installation dante does not work and still throws errors because it has not been configured yet!</p>
<ul>
<li><p>Test the installation with:<br /><code>danted -v</code><br /><strong>Info</strong>: In Ubuntu and other distributions the <code>danted</code> can also be called <code>sockd</code>.</p>
</li>
<li><p>Now edit the configfile of danted with <code>nano</code> or <code>vi</code>:<br /><code>nano /etc/danted.conf</code><br />or<br /><code>vi /etc/danted.conf</code><br />and set the following configuration, replace the IP “<em>1.2.3.4</em>” with your client IP of the Python script or use “<em>0.0.0.0/0</em>" as wildcard (<strong>please consider your security concept!</strong>):</p>
</li>
</ul>
<pre><code class="language-plaintext">logoutput: stderr  
logoutput: /var/log/danted.log  
internal: eth0 port = 1080  
external: eth0  
socksmethod: username none #rfc931  
client pass {  
        from: 1.2.3.4/32 to: 0.0.0.0/0  
        log: connect disconnect error  
}  
socks pass {  
        from: 1.2.3.4/32 to: 0.0.0.0/0  
        log: connect disconnect error  
}
</code></pre>
<ul>
<li><p>Start danted:<br /><code>$ systemctl start danted</code></p>
</li>
<li><p>Check the status:<br /><code>systemctl status danted</code></p>
</li>
<li><p>If desired create an autostart for danted:<br /><code>systemctl enable danted</code></p>
</li>
</ul>
<p>If you have chosen a server from <a href="https://www.hetzner.com">HETZNER CLOUD</a>, here is a detailed <a href="https://community.hetzner.com/tutorials/install-and-configure-danted-proxy-socks5">step by step Dante SOCKS5 Proxy installation guide</a> tailored to Hetzner servers.</p>
<h3>2. Step — Test the SOCKS5 Proxy</h3>
<p>Before you start testing, open a stream of the logfile on your server console, so you can watch all of Dante’s actions:<br /><code>tail -f /var/log/danted.log</code></p>
<p>There are many ways to test the new SOCKS5 proxy:</p>
<p><strong>Firefox</strong>:<br />“<em>Settings</em>” -&gt; search for “<em>proxy</em>” -&gt; enter the SOCKS5 proxy address and port number. Open <a href="https://ipchicken.com">https://ipchicken.com</a> and check the IP address.</p>
<p><strong>Putty</strong>:<br />Open Putty and click on “<em>Connection</em>” -&gt; “<em>Proxy</em>” -&gt; enter the SOCKS5 proxy address and port number. Open a SSH connection.</p>
<p><strong>curl</strong>:<br />This should return your public IP address:<br /><code>curl -x socks5://&lt;your_ip_server&gt;:&lt;your_danted_port&gt; ifconfig.co</code></p>
<p>Or with the <a href="https://gist.github.com/oliver-zehentleitner/74f6c5a461b01b5249c44e335ccf4e88#file-ubwa_socks5_proxy-py"><strong>python script</strong></a> we create next.</p>
<h3>3. Step — The Python script</h3>
<p>For the websocket connection to the Binance API we use the <a href="https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api">UNICORN Binance Websocket API</a>. It directly allows the use of a SOCKS5 proxy and is configured via the parameters <code>socks5_proxy_server</code>, <code>socks5_proxy_user</code>, <code>socks5_proxy_pass</code> and <code>socks5_proxy_ssl_verification</code>.</p>
<blockquote>
<p><em><strong>Please note that the proxy support is only cleanly supported from unicorn-binance-websocket-api 2.0.0 and higher.</strong></em></p>
</blockquote>
<p>Install/upgrade the dependencies:<br /><code>$ python3 -m pip install unicorn_binance_websocket_api</code><br />Info: <a href="https://pypi.org/project/unicorn-binance-websocket-api/">https://pypi.org/project/unicorn-binance-websocket-api</a></p>
<p><a href="https://gist.github.com/oliver-zehentleitner/74f6c5a461b01b5249c44e335ccf4e88">Save or copy this script</a> to your system and replace “<em>1.2.3.4</em>” in <code>_socks5_proxy_</code> with the IP address of your Socks5 Proxy server.</p>
<p>Start the file:<br /><code>python3 ubwa\_socks5\_proxy.py</code></p>
<p>You can find the full <strong>documentation for unicorn-binance-websocket-api</strong> here: <a href="https://oliver-zehentleitner.github.io/unicorn-binance-websocket-api/">https://oliver-zehentleitner.github.io/unicorn-binance-websocket-api</a></p>
<hr />
<p>I hope you found this tutorial informative and enjoyable!</p>
<p>Thank you for reading, and happy coding!</p>
<p>Image source: <a href="https://pixabay.com">https://pixabay.com</a></p>
]]></content:encoded></item><item><title><![CDATA[How to Download Klines from Binance using Python?]]></title><description><![CDATA[If you’re looking to download data from Binance using Python (3.9+), there are two ways to do it: via REST API or via WebSocket API.
REST API is a simple and easy-to-use method that allows you to down]]></description><link>https://blog.technopathy.club/how-to-download-klines-from-binance-using-python</link><guid isPermaLink="true">https://blog.technopathy.club/how-to-download-klines-from-binance-using-python</guid><dc:creator><![CDATA[Oliver Zehentleitner]]></dc:creator><pubDate>Fri, 10 Apr 2026 10:06:37 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/69d4b99a5da14bc70e00d4f6/41cf0f0e-6103-4ef7-b39e-9fc6104c9e88.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you’re looking to download data from <a href="https://www.binance.com">Binance</a> using <a href="https://www.python.org">Python</a> (3.9+), there are two ways to do it: via REST API or via WebSocket API.</p>
<p>REST API is a simple and easy-to-use method that allows you to download historical data from <a href="https://www.binance.com">Binance</a>, but also to trigger functions such as creating a new order. You can use <a href="https://github.com/oliver-zehentleitner/unicorn-binance-rest-api">Unicorn Binance REST API</a>, a sub module of the <a href="https://github.com/oliver-zehentleitner/unicorn-binance-suite">Unicorn Binance Suite</a>, to make REST API calls and retrieve data in a JSON format.</p>
<p>WebSocket API, on the other hand, is a more advanced method that allows you to stream real-time data from Binance. You can use <a href="https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api">Unicorn Binance WebSocket API</a>, another sub module of the <a href="https://github.com/oliver-zehentleitner/unicorn-binance-suite">Unicorn Binance Suite</a>, to subscribe to WebSocket streams and retrieve data in a JSON format.</p>
<p><a href="https://github.com/oliver-zehentleitner/unicorn-binance-suite">Unicorn Binance Suite</a> is a comprehensive <a href="https://www.python.org">Python</a> library for interacting with the Binance API. It consists of several sub modules, including <a href="https://github.com/oliver-zehentleitner/unicorn-binance-rest-api">Unicorn Binance REST API</a> and <a href="https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api">Unicorn Binance WebSocket API</a>, as well as other sub modules for trading, order management, and more.</p>
<p>To get started with <a href="https://github.com/oliver-zehentleitner/unicorn-binance-suite">Unicorn Binance Suite</a>, you’ll need to install it using <a href="https://pypi.org/project/unicorn-binance-suite/">pip</a>:</p>
<p><code>$ pip install unicorn-binance-suite</code></p>
<p>Or with <a href="https://anaconda.org/conda-forge/unicorn-binance-suite">conda</a>:</p>
<p><code>$ conda install -c conda-forge unicorn-binance-suite</code></p>
<p>Once you have it installed, you can import the sub modules you need and start making API calls:</p>
<pre><code class="language-plaintext">from unicorn\_binance\_rest_api.manager import BinanceRestApiManager  
  
ubra = BinanceRestApiManager(exchange='binance.com')  
  
klines = ubra.get_klines(symbol='BTCUSDT', interval='1h')  
print(klines) 
</code></pre>
<p>This example uses the <a href="https://github.com/oliver-zehentleitner/unicorn-binance-rest-api">UNICORN Binance REST API</a> to download klines data for the BTCUSDT trading pair with a 1-hour interval.</p>
<p>Similarly, you can use the <a href="https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api">Unicorn Binance WebSocket API</a> to subscribe to WebSocket streams and retrieve real-time data:</p>
<pre><code class="language-plaintext">from unicorn_binance_websocket_api import BinanceWebSocketApiManager  
  
ubwa = BinanceWebSocketApiManager(exchange="binance.com")  
ubwa.create_stream(channels='kline_1h', markets='BTCUSDT')  
  
while True:  
    klines = ubwa.pop_stream_data_from_stream_buffer()  
    if klines:  
        print(klines)
</code></pre>
<p>This example creates a WebSocket stream for klines data with a 1-hour interval for the BTCUSDT trading pair.</p>
<p>When using the <a href="https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api">Unicorn Binance Websocket API</a> to download data from Binance, it’s important to keep in mind that the first data packet you receive will always be <code>{"result": null, "id": 1}</code>. This is Binance's way of acknowledging that your subscription request was successful. After that, you’ll start receiving the actual data packets that you subscribed to.</p>
<p>In summary, if you’re looking to download data from Binance using Python, you can use either the REST API or the WebSocket API. The <a href="https://github.com/oliver-zehentleitner/unicorn-binance-suite">Unicorn Binance Suite</a> provides a comprehensive Python library for interacting with the Binance API, with sub modules for both REST and WebSocket APIs, making it easy to get started with downloading data from Binance.</p>
<p>To connect to other Binance exchanges just change the <code>exchange</code> string:<br /><a href="https://www.binance.com">Binance</a>: <code>binance.com</code><br /><a href="https://testnet.binance.vision/">Binance Testnet</a>: <code>binance.com-testnet</code><br /><a href="https://www.binance.com">Binance Margin</a>: <code>binance.com-margin</code><br /><a href="https://testnet.binance.vision/">Binance Margin Testnet</a>: <code>binance.com-margin-testnet</code><br /><a href="https://www.binance.com">Binance Isolated Margin</a>: <code>binance.com-isolated_margin</code><br /><a href="https://testnet.binance.vision/">Binance Isolated Margin Testnet</a>: <code>binance.com-isolated_margin-testnet</code> 
<a href="https://www.binance.com">Binance USD-M Futures</a>: <code>binance.com-futures</code><br /><a href="https://testnet.binancefuture.com">Binance USD-M Futures Testnet</a>: <code>binance.com-futures-testnet</code><br /><a href="https://www.binance.com">Binance Coin-M Futures</a>: <code>binance.com-coin_futures</code><br /><a href="https://www.binance.us">Binance US</a>: <code>binance.us</code><br /><a href="https://www.trbinance.com">Binance TR</a>: <code>trbinance.com</code></p>
<p>You can find the documentations here:<br /><a href="https://oliver-zehentleitner.github.io/unicorn-binance-rest-api/">https://oliver-zehentleitner.github.io/unicorn-binance-rest-api/</a><br /><a href="https://oliver-zehentleitner.github.io/unicorn-binance-websocket-api/">https://oliver-zehentleitner.github.io/unicorn-binance-websocket-api/</a></p>
<p>I hope you found this tutorial informative and enjoyable! </p>
<p>Thank you for reading, and happy coding!</p>
<p>Image source: <a href="https://pixabay.com">https://pixabay.com</a></p>
]]></content:encoded></item><item><title><![CDATA[How to publish a PYPI package on CONDA-FORGE]]></title><description><![CDATA[I am maintainer of some PyPi libraries and had the wish to publish them also on CONDA-FORGE.
I won’t go into why CONDA-FORGE and what’s great about Anaconda and the alternative package manager.
There ]]></description><link>https://blog.technopathy.club/how-to-publish-a-pypi-package-on-conda-forge</link><guid isPermaLink="true">https://blog.technopathy.club/how-to-publish-a-pypi-package-on-conda-forge</guid><dc:creator><![CDATA[Oliver Zehentleitner]]></dc:creator><pubDate>Fri, 10 Apr 2026 09:37:37 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/69d4b99a5da14bc70e00d4f6/33f2e466-b8e3-44a0-ac5d-b279a25508da.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I am maintainer of some <a href="https://pypi.org/">PyPi</a> libraries and had the wish to publish them also on <a href="https://conda-forge.org">CONDA-FORGE</a>.</p>
<p>I won’t go into why CONDA-FORGE and what’s great about Anaconda and the alternative package manager.</p>
<p>There are several ways, here is described the easiest and most modern way with <code>grayskull</code> .</p>
<p>Basically publishing a package only takes about 15 minutes if you know how!</p>
<h4>First, some quick info:</h4>
<p>Anyone can publish a PyPi package on CONDA-FORGE, you don’t have to be connected in any way to the project you want to publish.</p>
<p>You need a <a href="https://github.com/">GitHub</a> account and an installed Python.</p>
<p>The PyPi package must be available as a source package (SDIST) and not as a wheel on PyPi.</p>
<img alt="" style="display:block;margin:0 auto" />

<h4>Here’s how:</h4>
<p>1. The goal is to create a recipe. This is a file (meta.yaml) that contains all the information for CONDA-FORGE to automatically build a package. This recipe can be created automatically by the tool <code>grayskull</code>. So we start with the installation of <code>grayskull</code> either with pip or conda as described here: <a href="https://github.com/conda-incubator/grayskull#installation">https://github.com/conda-incubator/grayskull#installation</a>.</p>
<p>2. Once <code>grayskull</code> is installed, the command <code>grayskull pypi &lt;pypi-package-name&gt;</code> creates a recipe from the PyPi package, which can be submitted to CONDA-FORGE.<br />If this command throws the error <code>AttributeError: Hash information for sdis was not found on PyPi metadata.</code>, then the PyPi package is not available as source distribution but probably only as wheel. A SDIST package can be created with the command <code>python3 setup.py sdist</code> and can be combined with the creation of a wheel: <code>python3 setup.py bdist_wheel sdist</code></p>
<p>3. Once the recipe (meta.yaml) is created, please open and check it:</p>
<p>The maintainer name must match your github username.</p>
<p>In the <code>about:</code>sector change the url in <code>home:</code> to the project website and add below:<br /><em>dev_url: <a href="https://github.com/you/repo">https://github.com/you/repo</a><br />doc_url: <a href="https://you.github.io/repo">https://you.github.io/repo</a></em></p>
<p>4. Create a fork of <a href="https://github.com/conda-forge/staged-recipes">https://github.com/conda-forge/staged-recipes</a></p>
<p>5. Create a separate branch of the <code>staged-recipes</code> repository on Github for each recipe you want to submit.</p>
<p>6. Add a folder with the name of your package to the respective branch in the folder <code>recipes</code> and add the created <code>meta.yaml</code>and start a pull request.<br />Read the comments for writing the pull request, check all the checkboxes and do what they ask for.</p>
<p>8. All CI checks of the PR should be successful. If so, create a new post with the content <code>@conda-forge/staged-recipes, ready for review</code> and <code>@conda-forge-admin, please ping team</code>. This triggers the editing process by the CONDA-FORGE team.</p>
<p>9. Wait for email messages and join the team on Github.</p>
<p>10. On each new PyPi release a bot opens a PR on the feedstock repository and you have to merge it manually to trigger the creation of a new package for conda. To make this automatically just add <code>@conda-forge-admin, please add bot automerge</code>.</p>
<p>Chat for support: <a href="https://gitter.im/conda-forge/conda-forge.github.io">https://gitter.im/conda-forge/conda-forge.github.io</a></p>
<hr />
<p>I hope you found this tutorial informative and enjoyable! Don’t forget to follow me on <a href="https://medium.com/@oliverzehentleitner/about">Medium</a>, <a href="https://twitter.com/unicorn_oz">Twitter</a>, <a href="https://github.com/oliver-zehentleitner">GitHub</a>, and <a href="https://www.linkedin.com/in/oliver-zehentleitner/">LinkedIn</a> to stay updated on my latest releases and insights. If you found this article helpful, please hit that applause 👏 button to show your support! Your constructive feedback is always appreciated as it helps me improve the quality of my content.</p>
<p>Thank you for reading, and happy coding!</p>
]]></content:encoded></item><item><title><![CDATA[
Technopathy is moving to Hashnode]]></title><description><![CDATA[After a few years on Medium, Technopathy is moving to Hashnode.
The main reason: Medium blocks AI crawlers by default — no opt-in, no opt-out, no per-author control. In 2026, AI assistants are becomin]]></description><link>https://blog.technopathy.club/technopathy-is-moving-to-hashnode</link><guid isPermaLink="true">https://blog.technopathy.club/technopathy-is-moving-to-hashnode</guid><dc:creator><![CDATA[Oliver Zehentleitner]]></dc:creator><pubDate>Tue, 07 Apr 2026 13:59:10 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/69d4b99a5da14bc70e00d4f6/548ca8d7-ed36-48c5-bf5b-7fa8e2360692.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>After a few years on Medium, Technopathy is moving to Hashnode.</p>
<p>The main reason: Medium blocks AI crawlers by default — no opt-in, no opt-out, no per-author control. In 2026, AI assistants are becoming a primary discovery channel for technical content. If Claude or ChatGPT can't read my articles, I'm invisible to a growing part of my potential audience. And that's a decision Medium made for me, not with me.</p>
<p>On Hashnode with my own domain, I control the robots.txt. My content can be indexed, read, and recommended by AI assistants. That's exactly what I want.</p>
<p>All existing articles will be migrated from Medium shortly. The new URL is <a href="https://blog.technopathy.club/">https://blog.technopathy.club/</a>.</p>
<p>If you've been following me on Medium — welcome to the new home.</p>
]]></content:encoded></item></channel></rss>