kucoin-api 0.0.19__py3-none-any.whl → 0.0.21__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,415 @@
1
+ Metadata-Version: 2.4
2
+ Name: kucoin-api
3
+ Version: 0.0.21
4
+ Summary: kucoin crypto exchange api client
5
+ Project-URL: Homepage, https://github.com/ccxt/ccxt
6
+ Project-URL: Issues, https://github.com/ccxt/ccxt
7
+ Author-email: CCXT <info@ccxt.trade>
8
+ License: MIT
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Intended Audience :: Financial and Insurance Industry
11
+ Classifier: Intended Audience :: Information Technology
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Office/Business :: Financial :: Investment
16
+ Classifier: Topic :: Software Development :: Build Tools
17
+ Requires-Python: >=3.8
18
+ Description-Content-Type: text/markdown
19
+
20
+ # kucoin-python
21
+ Python SDK (sync and async) for Kucoin cryptocurrency exchange with Rest and WS capabilities.
22
+
23
+ You can check the SDK docs here: [SDK](https://docs.ccxt.com/#/exchanges/kucoin)
24
+ You can check Kucoin's docs here: [Docs](https://ccxt.com)
25
+
26
+
27
+ ## Installation
28
+
29
+ ```
30
+ pip install kucoin-api
31
+ ```
32
+
33
+ ## Usage
34
+
35
+ ### Sync
36
+
37
+ ```Python
38
+ from kucoin import KucoinSync
39
+
40
+ def main():
41
+ instance = KucoinSync({})
42
+ ob = instance.fetch_order_book("BTC/USDC")
43
+ print(ob)
44
+ #
45
+ # balance = instance.fetch_balance()
46
+ # order = instance.create_order("BTC/USDC", "limit", "buy", 1, 100000)
47
+ ```
48
+
49
+ ### Async
50
+
51
+ ```Python
52
+ import asyncio
53
+ from kucoin import KucoinAsync
54
+
55
+ async def main():
56
+ instance = KucoinAsync({})
57
+ ob = await instance.fetch_order_book("BTC/USDC")
58
+ print(ob)
59
+ #
60
+ # balance = await instance.fetch_balance()
61
+ # order = await instance.create_order("BTC/USDC", "limit", "buy", 1, 100000)
62
+
63
+ asyncio.run(main())
64
+ ```
65
+
66
+
67
+
68
+ ### Websockets
69
+
70
+ ```Python
71
+ from kucoin import KucoinWs
72
+
73
+ async def main():
74
+ instance = KucoinWs({})
75
+ while True:
76
+ ob = await instance.watch_order_book("BTC/USDC")
77
+ print(ob)
78
+ # orders = await instance.watch_orders("BTC/USDC")
79
+ ```
80
+
81
+
82
+
83
+
84
+
85
+ #### Raw call
86
+
87
+ You can also construct custom requests to available "implicit" endpoints
88
+
89
+ ```Python
90
+ request = {
91
+ 'type': 'candleSnapshot',
92
+ 'req': {
93
+ 'coin': coin,
94
+ 'interval': tf,
95
+ 'startTime': since,
96
+ 'endTime': until,
97
+ },
98
+ }
99
+ response = await instance.public_post_info(request)
100
+ ```
101
+
102
+
103
+
104
+
105
+ ## Available methods
106
+
107
+ ### REST Unified
108
+
109
+ - `create_deposit_address(self, code: str, params={})`
110
+ - `create_market_buy_order_with_cost(self, symbol: str, cost: float, params={})`
111
+ - `create_market_order_with_cost(self, symbol: str, side: OrderSide, cost: float, params={})`
112
+ - `create_market_sell_order_with_cost(self, symbol: str, cost: float, params={})`
113
+ - `create_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={})`
114
+ - `create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={})`
115
+ - `create_orders(self, orders: List[OrderRequest], params={})`
116
+ - `fetch_accounts(self, params={})`
117
+ - `fetch_balance(self, params={})`
118
+ - `fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
119
+ - `fetch_borrow_rate_histories(self, codes=None, since: Int = None, limit: Int = None, params={})`
120
+ - `fetch_borrow_rate_history(self, code: str, since: Int = None, limit: Int = None, params={})`
121
+ - `fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
122
+ - `fetch_currencies(self, params={})`
123
+ - `fetch_deposit_address(self, code: str, params={})`
124
+ - `fetch_deposit_addresses_by_network(self, code: str, params={})`
125
+ - `fetch_deposit_withdraw_fee(self, code: str, params={})`
126
+ - `fetch_deposit_withdraw_fees(self, codes: Strings = None, params={})`
127
+ - `fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={})`
128
+ - `fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={})`
129
+ - `fetch_mark_price(self, symbol: str, params={})`
130
+ - `fetch_mark_prices(self, symbols: Strings = None, params={})`
131
+ - `fetch_markets(self, params={})`
132
+ - `fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
133
+ - `fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={})`
134
+ - `fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
135
+ - `fetch_order_book(self, symbol: str, limit: Int = None, params={})`
136
+ - `fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
137
+ - `fetch_order(self, id: str, symbol: Str = None, params={})`
138
+ - `fetch_orders_by_status(self, status, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
139
+ - `fetch_status(self, params={})`
140
+ - `fetch_ticker(self, symbol: str, params={})`
141
+ - `fetch_tickers(self, symbols: Strings = None, params={})`
142
+ - `fetch_time(self, params={})`
143
+ - `fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={})`
144
+ - `fetch_trading_fee(self, symbol: str, params={})`
145
+ - `fetch_transaction_fee(self, code: str, params={})`
146
+ - `fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={})`
147
+ - `borrow_cross_margin(self, code: str, amount: float, params={})`
148
+ - `borrow_isolated_margin(self, symbol: str, code: str, amount: float, params={})`
149
+ - `calculate_rate_limiter_cost(self, api, method, path, params, config={})`
150
+ - `cancel_all_orders(self, symbol: Str = None, params={})`
151
+ - `cancel_order(self, id: str, symbol: Str = None, params={})`
152
+ - `describe(self)`
153
+ - `edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={})`
154
+ - `is_futures_method(self, methodName, params)`
155
+ - `market_order_amount_to_precision(self, symbol: str, amount)`
156
+ - `nonce(self)`
157
+ - `repay_cross_margin(self, code: str, amount, params={})`
158
+ - `repay_isolated_margin(self, symbol: str, code: str, amount, params={})`
159
+ - `set_leverage(self, leverage: Int, symbol: Str = None, params={})`
160
+ - `transfer(self, code: str, amount: float, fromAccount: str, toAccount: str, params={})`
161
+ - `withdraw(self, code: str, amount: float, address: str, tag=None, params={})`
162
+
163
+ ### REST Raw
164
+
165
+ - `public_get_currencies(request)`
166
+ - `public_get_currencies_currency(request)`
167
+ - `public_get_symbols(request)`
168
+ - `public_get_market_orderbook_level1(request)`
169
+ - `public_get_market_alltickers(request)`
170
+ - `public_get_market_stats(request)`
171
+ - `public_get_markets(request)`
172
+ - `public_get_market_orderbook_level_level_limit(request)`
173
+ - `public_get_market_orderbook_level2_20(request)`
174
+ - `public_get_market_orderbook_level2_100(request)`
175
+ - `public_get_market_histories(request)`
176
+ - `public_get_market_candles(request)`
177
+ - `public_get_prices(request)`
178
+ - `public_get_timestamp(request)`
179
+ - `public_get_status(request)`
180
+ - `public_get_mark_price_symbol_current(request)`
181
+ - `public_get_mark_price_all_symbols(request)`
182
+ - `public_get_margin_config(request)`
183
+ - `public_get_announcements(request)`
184
+ - `public_post_bullet_public(request)`
185
+ - `private_get_user_info(request)`
186
+ - `private_get_accounts(request)`
187
+ - `private_get_accounts_accountid(request)`
188
+ - `private_get_accounts_ledgers(request)`
189
+ - `private_get_hf_accounts_ledgers(request)`
190
+ - `private_get_hf_margin_account_ledgers(request)`
191
+ - `private_get_transaction_history(request)`
192
+ - `private_get_sub_user(request)`
193
+ - `private_get_sub_accounts_subuserid(request)`
194
+ - `private_get_sub_accounts(request)`
195
+ - `private_get_sub_api_key(request)`
196
+ - `private_get_margin_account(request)`
197
+ - `private_get_margin_accounts(request)`
198
+ - `private_get_isolated_accounts(request)`
199
+ - `private_get_deposit_addresses(request)`
200
+ - `private_get_deposits(request)`
201
+ - `private_get_hist_deposits(request)`
202
+ - `private_get_withdrawals(request)`
203
+ - `private_get_hist_withdrawals(request)`
204
+ - `private_get_withdrawals_quotas(request)`
205
+ - `private_get_accounts_transferable(request)`
206
+ - `private_get_transfer_list(request)`
207
+ - `private_get_base_fee(request)`
208
+ - `private_get_trade_fees(request)`
209
+ - `private_get_market_orderbook_level_level(request)`
210
+ - `private_get_market_orderbook_level2(request)`
211
+ - `private_get_market_orderbook_level3(request)`
212
+ - `private_get_hf_accounts_opened(request)`
213
+ - `private_get_hf_orders_active(request)`
214
+ - `private_get_hf_orders_active_symbols(request)`
215
+ - `private_get_hf_margin_order_active_symbols(request)`
216
+ - `private_get_hf_orders_done(request)`
217
+ - `private_get_hf_orders_orderid(request)`
218
+ - `private_get_hf_orders_client_order_clientoid(request)`
219
+ - `private_get_hf_orders_dead_cancel_all_query(request)`
220
+ - `private_get_hf_fills(request)`
221
+ - `private_get_orders(request)`
222
+ - `private_get_limit_orders(request)`
223
+ - `private_get_orders_orderid(request)`
224
+ - `private_get_order_client_order_clientoid(request)`
225
+ - `private_get_fills(request)`
226
+ - `private_get_limit_fills(request)`
227
+ - `private_get_stop_order(request)`
228
+ - `private_get_stop_order_orderid(request)`
229
+ - `private_get_stop_order_queryorderbyclientoid(request)`
230
+ - `private_get_oco_order_orderid(request)`
231
+ - `private_get_oco_order_details_orderid(request)`
232
+ - `private_get_oco_client_order_clientoid(request)`
233
+ - `private_get_oco_orders(request)`
234
+ - `private_get_hf_margin_orders_active(request)`
235
+ - `private_get_hf_margin_orders_done(request)`
236
+ - `private_get_hf_margin_orders_orderid(request)`
237
+ - `private_get_hf_margin_orders_client_order_clientoid(request)`
238
+ - `private_get_hf_margin_fills(request)`
239
+ - `private_get_etf_info(request)`
240
+ - `private_get_margin_currencies(request)`
241
+ - `private_get_risk_limit_strategy(request)`
242
+ - `private_get_isolated_symbols(request)`
243
+ - `private_get_margin_symbols(request)`
244
+ - `private_get_isolated_account_symbol(request)`
245
+ - `private_get_margin_borrow(request)`
246
+ - `private_get_margin_repay(request)`
247
+ - `private_get_margin_interest(request)`
248
+ - `private_get_project_list(request)`
249
+ - `private_get_project_marketinterestrate(request)`
250
+ - `private_get_redeem_orders(request)`
251
+ - `private_get_purchase_orders(request)`
252
+ - `private_get_broker_api_rebase_download(request)`
253
+ - `private_get_migrate_user_account_status(request)`
254
+ - `private_get_affiliate_inviter_statistics(request)`
255
+ - `private_post_sub_user_created(request)`
256
+ - `private_post_sub_api_key(request)`
257
+ - `private_post_sub_api_key_update(request)`
258
+ - `private_post_deposit_addresses(request)`
259
+ - `private_post_withdrawals(request)`
260
+ - `private_post_accounts_universal_transfer(request)`
261
+ - `private_post_accounts_sub_transfer(request)`
262
+ - `private_post_accounts_inner_transfer(request)`
263
+ - `private_post_transfer_out(request)`
264
+ - `private_post_transfer_in(request)`
265
+ - `private_post_hf_orders(request)`
266
+ - `private_post_hf_orders_test(request)`
267
+ - `private_post_hf_orders_sync(request)`
268
+ - `private_post_hf_orders_multi(request)`
269
+ - `private_post_hf_orders_multi_sync(request)`
270
+ - `private_post_hf_orders_alter(request)`
271
+ - `private_post_hf_orders_dead_cancel_all(request)`
272
+ - `private_post_orders(request)`
273
+ - `private_post_orders_test(request)`
274
+ - `private_post_orders_multi(request)`
275
+ - `private_post_stop_order(request)`
276
+ - `private_post_oco_order(request)`
277
+ - `private_post_hf_margin_order(request)`
278
+ - `private_post_hf_margin_order_test(request)`
279
+ - `private_post_margin_order(request)`
280
+ - `private_post_margin_order_test(request)`
281
+ - `private_post_margin_borrow(request)`
282
+ - `private_post_margin_repay(request)`
283
+ - `private_post_purchase(request)`
284
+ - `private_post_redeem(request)`
285
+ - `private_post_lend_purchase_update(request)`
286
+ - `private_post_bullet_private(request)`
287
+ - `private_post_position_update_user_leverage(request)`
288
+ - `private_post_deposit_address_create(request)`
289
+ - `private_delete_sub_api_key(request)`
290
+ - `private_delete_withdrawals_withdrawalid(request)`
291
+ - `private_delete_hf_orders_orderid(request)`
292
+ - `private_delete_hf_orders_sync_orderid(request)`
293
+ - `private_delete_hf_orders_client_order_clientoid(request)`
294
+ - `private_delete_hf_orders_sync_client_order_clientoid(request)`
295
+ - `private_delete_hf_orders_cancel_orderid(request)`
296
+ - `private_delete_hf_orders(request)`
297
+ - `private_delete_hf_orders_cancelall(request)`
298
+ - `private_delete_orders_orderid(request)`
299
+ - `private_delete_order_client_order_clientoid(request)`
300
+ - `private_delete_orders(request)`
301
+ - `private_delete_stop_order_orderid(request)`
302
+ - `private_delete_stop_order_cancelorderbyclientoid(request)`
303
+ - `private_delete_stop_order_cancel(request)`
304
+ - `private_delete_oco_order_orderid(request)`
305
+ - `private_delete_oco_client_order_clientoid(request)`
306
+ - `private_delete_oco_orders(request)`
307
+ - `private_delete_hf_margin_orders_orderid(request)`
308
+ - `private_delete_hf_margin_orders_client_order_clientoid(request)`
309
+ - `private_delete_hf_margin_orders(request)`
310
+ - `futurespublic_get_contracts_active(request)`
311
+ - `futurespublic_get_contracts_symbol(request)`
312
+ - `futurespublic_get_ticker(request)`
313
+ - `futurespublic_get_level2_snapshot(request)`
314
+ - `futurespublic_get_level2_depth20(request)`
315
+ - `futurespublic_get_level2_depth100(request)`
316
+ - `futurespublic_get_trade_history(request)`
317
+ - `futurespublic_get_kline_query(request)`
318
+ - `futurespublic_get_interest_query(request)`
319
+ - `futurespublic_get_index_query(request)`
320
+ - `futurespublic_get_mark_price_symbol_current(request)`
321
+ - `futurespublic_get_premium_query(request)`
322
+ - `futurespublic_get_trade_statistics(request)`
323
+ - `futurespublic_get_funding_rate_symbol_current(request)`
324
+ - `futurespublic_get_contract_funding_rates(request)`
325
+ - `futurespublic_get_timestamp(request)`
326
+ - `futurespublic_get_status(request)`
327
+ - `futurespublic_get_level2_message_query(request)`
328
+ - `futurespublic_post_bullet_public(request)`
329
+ - `futuresprivate_get_transaction_history(request)`
330
+ - `futuresprivate_get_account_overview(request)`
331
+ - `futuresprivate_get_account_overview_all(request)`
332
+ - `futuresprivate_get_transfer_list(request)`
333
+ - `futuresprivate_get_orders(request)`
334
+ - `futuresprivate_get_stoporders(request)`
335
+ - `futuresprivate_get_recentdoneorders(request)`
336
+ - `futuresprivate_get_orders_orderid(request)`
337
+ - `futuresprivate_get_orders_byclientoid(request)`
338
+ - `futuresprivate_get_fills(request)`
339
+ - `futuresprivate_get_recentfills(request)`
340
+ - `futuresprivate_get_openorderstatistics(request)`
341
+ - `futuresprivate_get_position(request)`
342
+ - `futuresprivate_get_positions(request)`
343
+ - `futuresprivate_get_margin_maxwithdrawmargin(request)`
344
+ - `futuresprivate_get_contracts_risk_limit_symbol(request)`
345
+ - `futuresprivate_get_funding_history(request)`
346
+ - `futuresprivate_post_transfer_out(request)`
347
+ - `futuresprivate_post_transfer_in(request)`
348
+ - `futuresprivate_post_orders(request)`
349
+ - `futuresprivate_post_orders_test(request)`
350
+ - `futuresprivate_post_orders_multi(request)`
351
+ - `futuresprivate_post_position_margin_auto_deposit_status(request)`
352
+ - `futuresprivate_post_margin_withdrawmargin(request)`
353
+ - `futuresprivate_post_position_margin_deposit_margin(request)`
354
+ - `futuresprivate_post_position_risk_limit_level_change(request)`
355
+ - `futuresprivate_post_bullet_private(request)`
356
+ - `futuresprivate_delete_orders_orderid(request)`
357
+ - `futuresprivate_delete_orders_client_order_clientoid(request)`
358
+ - `futuresprivate_delete_orders(request)`
359
+ - `futuresprivate_delete_stoporders(request)`
360
+ - `webexchange_get_currency_currency_chain_info(request)`
361
+ - `broker_get_broker_nd_info(request)`
362
+ - `broker_get_broker_nd_account(request)`
363
+ - `broker_get_broker_nd_account_apikey(request)`
364
+ - `broker_get_broker_nd_rebase_download(request)`
365
+ - `broker_get_asset_ndbroker_deposit_list(request)`
366
+ - `broker_get_broker_nd_transfer_detail(request)`
367
+ - `broker_get_broker_nd_deposit_detail(request)`
368
+ - `broker_get_broker_nd_withdraw_detail(request)`
369
+ - `broker_post_broker_nd_transfer(request)`
370
+ - `broker_post_broker_nd_account(request)`
371
+ - `broker_post_broker_nd_account_apikey(request)`
372
+ - `broker_post_broker_nd_account_update_apikey(request)`
373
+ - `broker_delete_broker_nd_account_apikey(request)`
374
+ - `earn_get_otc_loan_loan(request)`
375
+ - `earn_get_otc_loan_accounts(request)`
376
+ - `earn_get_earn_redeem_preview(request)`
377
+ - `earn_get_earn_saving_products(request)`
378
+ - `earn_get_earn_hold_assets(request)`
379
+ - `earn_get_earn_promotion_products(request)`
380
+ - `earn_get_earn_kcs_staking_products(request)`
381
+ - `earn_get_earn_staking_products(request)`
382
+ - `earn_get_earn_eth_staking_products(request)`
383
+ - `earn_post_earn_orders(request)`
384
+ - `earn_delete_earn_orders(request)`
385
+
386
+ ### WS Unified
387
+
388
+ - `describe(self)`
389
+ - `negotiate(self, privateChannel, params={})`
390
+ - `negotiate_helper(self, privateChannel, params={})`
391
+ - `subscribe(self, url, messageHash, subscriptionHash, params={}, subscription=None)`
392
+ - `subscribe_multiple(self, url, messageHashes, topic, subscriptionHashes, params={}, subscription=None)`
393
+ - `un_subscribe_multiple(self, url, messageHashes, topic, subscriptionHashes, params={}, subscription: dict = None)`
394
+ - `watch_ticker(self, symbol: str, params={})`
395
+ - `watch_tickers(self, symbols: Strings = None, params={})`
396
+ - `watch_bids_asks(self, symbols: Strings = None, params={})`
397
+ - `watch_multi_helper(self, methodName, channelName: str, symbols: Strings = None, params={})`
398
+ - `watch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={})`
399
+ - `watch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={})`
400
+ - `watch_trades_for_symbols(self, symbols: List[str], since: Int = None, limit: Int = None, params={})`
401
+ - `un_watch_trades_for_symbols(self, symbols: List[str], params={})`
402
+ - `un_watch_trades(self, symbol: str, params={})`
403
+ - `watch_order_book(self, symbol: str, limit: Int = None, params={})`
404
+ - `un_watch_order_book(self, symbol: str, params={})`
405
+ - `watch_order_book_for_symbols(self, symbols: List[str], limit: Int = None, params={})`
406
+ - `un_watch_order_book_for_symbols(self, symbols: List[str], params={})`
407
+ - `get_cache_index(self, orderbook, cache)`
408
+ - `watch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
409
+ - `watch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={})`
410
+ - `watch_balance(self, params={})`
411
+
412
+ ## Contribution
413
+ - Give us a star :star:
414
+ - Fork and Clone! Awesome
415
+ - Select existing issues or create a new issue.
@@ -283,6 +283,6 @@ kucoin/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWnX
283
283
  kucoin/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
284
284
  kucoin/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
285
285
  kucoin/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
286
- kucoin_api-0.0.19.dist-info/METADATA,sha256=xZ-z8zcYde_K5Kh7ynBovciejqSggx1QZMXasEkiWdQ,2096
287
- kucoin_api-0.0.19.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
288
- kucoin_api-0.0.19.dist-info/RECORD,,
286
+ kucoin_api-0.0.21.dist-info/METADATA,sha256=hJePmy6SuwoWAiOdaKCNRGpxOa27PsX3iOwQ74OsWm8,17933
287
+ kucoin_api-0.0.21.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
288
+ kucoin_api-0.0.21.dist-info/RECORD,,
@@ -1,79 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: kucoin-api
3
- Version: 0.0.19
4
- Summary: kucoin crypto exchange api client
5
- Project-URL: Homepage, https://github.com/ccxt/ccxt
6
- Project-URL: Issues, https://github.com/ccxt/ccxt
7
- Author-email: CCXT <info@ccxt.trade>
8
- License: MIT
9
- Classifier: Intended Audience :: Developers
10
- Classifier: Intended Audience :: Financial and Insurance Industry
11
- Classifier: Intended Audience :: Information Technology
12
- Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Operating System :: OS Independent
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Topic :: Office/Business :: Financial :: Investment
16
- Classifier: Topic :: Software Development :: Build Tools
17
- Requires-Python: >=3.8
18
- Description-Content-Type: text/markdown
19
-
20
- # kucoin-python
21
- Python SDK (sync and async) for Kucoin cryptocurrency exchange with Rest and WS capabilities.
22
-
23
- You can check the SDK docs here: [SDK](https://docs.ccxt.com/#/exchanges/kucoin)
24
- You can check Kucoin's docs here: [Docs](https://ccxt.com)
25
-
26
- *This package derives from CCXT and allows you to call pretty much every endpoint by either using the unified CCXT API or calling the endpoints directly*
27
-
28
- ## Installation
29
-
30
- ```
31
- pip install kucoin-api
32
- ```
33
-
34
- ## Usage
35
-
36
- ### Sync
37
-
38
- ```Python
39
- from kucoin import KucoinSync
40
-
41
- def main():
42
- instance = KucoinSync({})
43
- ob = instance.fetch_order_book("BTC/USDC")
44
- print(ob)
45
- #
46
- # balance = instance.fetch_balance()
47
- # order = instance.create_order("BTC/USDC", "limit", "buy", 1, 100000)
48
- ```
49
-
50
- ### Async
51
-
52
- ```Python
53
- import asyncio
54
- from kucoin import KucoinAsync
55
-
56
- async def main():
57
- instance = KucoinAsync({})
58
- ob = await instance.fetch_order_book("BTC/USDC")
59
- print(ob)
60
- #
61
- # balance = await instance.fetch_balance()
62
- # order = await instance.create_order("BTC/USDC", "limit", "buy", 1, 100000)
63
-
64
- asyncio.run(main())
65
- ```
66
-
67
- ### Websockets
68
-
69
- ```Python
70
- from kucoin import KucoinWs
71
-
72
- async def main():
73
- instance = KucoinWs({})
74
- while True:
75
- ob = await instance.watch_order_book("BTC/USDC")
76
- print(ob)
77
- # orders = await instance.watch_orders("BTC/USDC")
78
- ```
79
-