btschwertfeger / python-kraken-sdk

Command-line tool and SDK to access the Kraken Cryptocurrency Exchange API (Spot, NFT & Futures, REST and Websocket API)
https://python-kraken-sdk.readthedocs.io/en/stable
Apache License 2.0
35 stars 15 forks source link

Add async REST API #228

Closed Trevypants closed 2 days ago

Trevypants commented 2 weeks ago

Describe the solution you'd like

First of all, thank you for making such a clean Kraken client library. It is really refreshing to see. However, when investigating your code, I noticed that you are using the standard requests library which only supports synchronous API calls. Since we are working with API calls that I/O bound, asynchronous API calls would really help speed up applications that need to make many API calls at once.

There are many asynchronous libraries out there that could replace requests. For example httpx offers both synchronous and asynchronous support. Or alternatively aiohttp which is found to be faster than httpx but only supports async.

Describe alternatives you've considered

Here is another Kraken Python client library that supports async: kraky.

btschwertfeger commented 2 weeks ago

Hey @Trevypants, great idea! I'll have a look into it.