77[ ![ Generic badge] ( https://img.shields.io/badge/python-3.7_|_3.8_|_3.9_|_3.10_|_3.11-blue.svg )] ( https://shields.io/ )
88[ ![ Downloads] ( https://static.pepy.tech/personalized-badge/python-kraken-sdk?period=total&units=abbreviation&left_color=grey&right_color=orange&left_text=downloads )] ( https://pepy.tech/project/python-kraken-sdk )
99
10+ [ ![ Ruff] ( https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json )] ( https://github.com/astral-sh/ruff )
1011[ ![ Typing] ( https://img.shields.io/badge/typing-mypy-informational )] ( https://mypy-lang.org/ )
1112[ ![ CodeQL] ( https://github.com/btschwertfeger/python-kraken-sdk/actions/workflows/codeql.yaml/badge.svg?branch=master )] ( https://github.com/btschwertfeger/python-kraken-sdk/actions/workflows/codeql.yaml )
1213[ ![ CI/CD] ( https://github.com/btschwertfeger/python-kraken-sdk/actions/workflows/cicd.yaml/badge.svg?branch=master )] ( https://github.com/btschwertfeger/python-kraken-sdk/actions/workflows/cicd.yaml )
@@ -90,13 +91,13 @@ release specific READMEs and changelogs.
9091
9192# 🛠 Installation and setup
9293
93- ### 1. Install the Python module:
94+ ### 1. Install the package into the desired environment
9495
9596``` bash
9697python3 -m pip install python-kraken-sdk
9798```
9899
99- ### 2. Register at Kraken and generate API Keys:
100+ ### 2. Register at [ Kraken] ( https://www.kraken.com ) and generate API keys
100101
101102- Spot Trading: https://www.kraken.com/u/security/api
102103- Futures Trading: https://futures.kraken.com/trade/settings/api (see _ [ help] ( https://docs.futures.kraken.com/#introduction-generate-api-keys ) _ )
@@ -146,12 +147,12 @@ def main():
146147 user = User(key = key, secret = secret)
147148 print (user.get_account_balance())
148149 print (user.get_open_orders())
149- # ...
150+ # …
150151
151152 # ____MARKET____
152153 market = Market()
153154 print (market.get_ticker(pair = " BTCUSD" ))
154- # ...
155+ # …
155156
156157 # ____TRADE_________________________
157158 trade = Trade(key = key, secret = secret)
@@ -162,7 +163,7 @@ def main():
162163 pair = " BTC/EUR" ,
163164 price = 20000
164165 ))
165- # ...
166+ # …
166167
167168 # ____FUNDING___________________________
168169 funding = Funding(key = key, secret = secret)
@@ -172,7 +173,7 @@ def main():
172173 )
173174 )
174175 print (funding.cancel_withdraw(asset = " DOT" , refid = " <some id>" ))
175- # ...
176+ # …
176177
177178 # ____STAKING___________________________
178179 staking = Staking(key = key, secret = secret)
@@ -182,7 +183,7 @@ def main():
182183 asset = " DOT" , amount = 20 , method = " polkadot-staked"
183184 )
184185 )
185- # ...
186+ # …
186187
187188if __name__ == " __main__" :
188189 main()
@@ -227,7 +228,7 @@ async def main():
227228
228229 print (message)
229230 # here we can access lots of methods, for example to create an order:
230- # if self._is_auth : # only if the client is authenticated …
231+ # if self.is_auth : # only if the client is authenticated …
231232 # await self.send_message(
232233 # message={
233234 # "method": "add_order",
@@ -242,7 +243,7 @@ async def main():
242243 # },
243244 # }
244245 # )
245- # ... it is also possible to call regular REST endpoints
246+ # … it is also possible to call regular REST endpoints
246247 # but using the websocket messages is more efficient.
247248 # You can also un-/subscribe here using self.subscribe/self.unsubscribe.
248249
@@ -255,13 +256,13 @@ async def main():
255256 await client.subscribe(
256257 params = {" channel" : " book" , " depth" : 25 , " symbol" : [" BTC/USD" ]}
257258 )
258- # wait because unsubscribing is faster than unsubscribing ... (just for that example)
259+ # wait because unsubscribing is faster than unsubscribing … (just for that example)
259260 await asyncio.sleep(3 )
260- # print(client.active_public_subscriptions) # … to list active subscriptions
261+ # print(client.active_public_subscriptions) # to list active subscriptions
261262 await client.unsubscribe(
262263 params = {" channel" : " ticker" , " symbol" : [" BTC/USD" , " DOT/USD" ]}
263264 )
264- # ...
265+ # …
265266
266267 # Per default, the authenticated client starts two websocket connections,
267268 # one for authenticated and one for public messages. If there is no need
@@ -325,7 +326,7 @@ def main():
325326 print (user.get_open_orders())
326327 print (user.get_open_positions())
327328 print (user.get_subaccounts())
328- # ...
329+ # …
329330
330331 # ____MARKET____
331332 market = Market()
@@ -334,7 +335,7 @@ def main():
334335 priv_market = Market(key = key, secret = secret)
335336 print (priv_market.get_fee_schedules_vol())
336337 print (priv_market.get_execution_events())
337- # ...
338+ # …
338339
339340 # ____TRADE_________________________
340341 trade = Trade(key = key, secret = secret)
@@ -376,11 +377,11 @@ def main():
376377 symbol = " pf_bchusd"
377378 )
378379 )
379- # ...
380+ # …
380381
381382 # ____FUNDING___________________________
382383 funding = Funding(key = key, secret = secret)
383- # ...
384+ # …
384385
385386if __name__ == " __main__" :
386387 main()
@@ -420,7 +421,7 @@ async def main():
420421 # subscribe to a public websocket feed
421422 await client.subscribe(feed = " ticker" , products = products)
422423 # await client.subscribe(feed="book", products=products)
423- # ...
424+ # …
424425
425426 # unsubscribe from a public websocket feed
426427 # await client.unsubscribe(feed="ticker", products=products)
@@ -433,7 +434,7 @@ async def main():
433434 await client_auth.subscribe(feed = " fills" )
434435 await client_auth.subscribe(feed = " open_positions" )
435436 await client_auth.subscribe(feed = " open_orders" )
436- # ...
437+ # …
437438
438439 # unsubscribe from a private/authenticated websocket feed
439440 await client_auth.unsubscribe(feed = " fills" )
@@ -445,7 +446,7 @@ if __name__ == "__main__":
445446 try :
446447 asyncio.run(main())
447448 except KeyboardInterrupt :
448- # do some exception handling ...
449+ # do some exception handling …
449450 pass
450451```
451452
0 commit comments