ccxt 4.4.82__py2.py3-none-any.whl → 4.4.86__py2.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.
Files changed (121) hide show
  1. ccxt/__init__.py +3 -9
  2. ccxt/abstract/blofin.py +8 -0
  3. ccxt/abstract/btcbox.py +1 -0
  4. ccxt/abstract/myokx.py +2 -0
  5. ccxt/abstract/okx.py +2 -0
  6. ccxt/apex.py +2 -1
  7. ccxt/ascendex.py +187 -151
  8. ccxt/async_support/__init__.py +3 -9
  9. ccxt/async_support/apex.py +2 -1
  10. ccxt/async_support/ascendex.py +187 -151
  11. ccxt/async_support/base/exchange.py +51 -24
  12. ccxt/async_support/base/ws/cache.py +6 -1
  13. ccxt/async_support/bequant.py +1 -1
  14. ccxt/async_support/bitget.py +5 -6
  15. ccxt/async_support/bitmart.py +1 -1
  16. ccxt/async_support/bitrue.py +14 -32
  17. ccxt/async_support/bitso.py +33 -0
  18. ccxt/async_support/bitstamp.py +33 -0
  19. ccxt/async_support/{huobijp.py → bittrade.py} +11 -11
  20. ccxt/async_support/blofin.py +145 -14
  21. ccxt/async_support/btcbox.py +25 -5
  22. ccxt/async_support/bybit.py +16 -37
  23. ccxt/async_support/cex.py +2 -4
  24. ccxt/async_support/coinbase.py +58 -47
  25. ccxt/async_support/coinbaseexchange.py +141 -32
  26. ccxt/async_support/coincatch.py +14 -67
  27. ccxt/async_support/coinex.py +28 -29
  28. ccxt/async_support/coinlist.py +17 -16
  29. ccxt/async_support/coinmetro.py +20 -11
  30. ccxt/async_support/coinone.py +8 -10
  31. ccxt/async_support/coinsph.py +124 -2
  32. ccxt/async_support/cryptocom.py +109 -2
  33. ccxt/async_support/cryptomus.py +42 -80
  34. ccxt/async_support/delta.py +75 -36
  35. ccxt/async_support/deribit.py +4 -5
  36. ccxt/async_support/derive.py +46 -10
  37. ccxt/async_support/ellipx.py +175 -77
  38. ccxt/async_support/gate.py +1 -1
  39. ccxt/async_support/gemini.py +3 -4
  40. ccxt/async_support/hitbtc.py +56 -65
  41. ccxt/async_support/hollaex.py +106 -49
  42. ccxt/async_support/htx.py +20 -43
  43. ccxt/async_support/hyperliquid.py +6 -6
  44. ccxt/async_support/kraken.py +27 -23
  45. ccxt/async_support/kucoinfutures.py +5 -0
  46. ccxt/async_support/lbank.py +1 -1
  47. ccxt/async_support/mexc.py +2 -2
  48. ccxt/async_support/ndax.py +25 -24
  49. ccxt/async_support/okcoin.py +12 -29
  50. ccxt/async_support/okx.py +9 -0
  51. ccxt/async_support/onetrading.py +10 -7
  52. ccxt/async_support/oxfun.py +40 -110
  53. ccxt/async_support/paradex.py +123 -4
  54. ccxt/base/exchange.py +21 -2
  55. ccxt/base/types.py +3 -0
  56. ccxt/bequant.py +1 -1
  57. ccxt/bitget.py +5 -6
  58. ccxt/bitmart.py +1 -1
  59. ccxt/bitrue.py +14 -32
  60. ccxt/bitso.py +33 -0
  61. ccxt/bitstamp.py +33 -0
  62. ccxt/{huobijp.py → bittrade.py} +11 -11
  63. ccxt/blofin.py +145 -14
  64. ccxt/btcbox.py +24 -5
  65. ccxt/bybit.py +16 -37
  66. ccxt/cex.py +2 -4
  67. ccxt/coinbase.py +58 -47
  68. ccxt/coinbaseexchange.py +141 -32
  69. ccxt/coincatch.py +14 -67
  70. ccxt/coinex.py +28 -29
  71. ccxt/coinlist.py +17 -16
  72. ccxt/coinmetro.py +20 -11
  73. ccxt/coinone.py +8 -10
  74. ccxt/coinsph.py +124 -2
  75. ccxt/cryptocom.py +109 -2
  76. ccxt/cryptomus.py +42 -80
  77. ccxt/delta.py +75 -36
  78. ccxt/deribit.py +4 -5
  79. ccxt/derive.py +46 -10
  80. ccxt/ellipx.py +175 -77
  81. ccxt/gate.py +1 -1
  82. ccxt/gemini.py +3 -4
  83. ccxt/hitbtc.py +56 -65
  84. ccxt/hollaex.py +106 -49
  85. ccxt/htx.py +20 -43
  86. ccxt/hyperliquid.py +6 -6
  87. ccxt/kraken.py +27 -23
  88. ccxt/kucoinfutures.py +5 -0
  89. ccxt/lbank.py +1 -1
  90. ccxt/mexc.py +2 -2
  91. ccxt/ndax.py +25 -24
  92. ccxt/okcoin.py +12 -29
  93. ccxt/okx.py +9 -0
  94. ccxt/onetrading.py +10 -7
  95. ccxt/oxfun.py +40 -110
  96. ccxt/paradex.py +123 -4
  97. ccxt/pro/__init__.py +109 -5
  98. ccxt/pro/binance.py +32 -33
  99. ccxt/pro/bithumb.py +5 -3
  100. ccxt/pro/{huobijp.py → bittrade.py} +3 -3
  101. ccxt/pro/kraken.py +249 -79
  102. ccxt/pro/luno.py +6 -5
  103. ccxt/pro/mexc.py +254 -7
  104. ccxt/pro/poloniex.py +6 -2
  105. {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/METADATA +8 -11
  106. {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/RECORD +110 -121
  107. ccxt/abstract/bl3p.py +0 -19
  108. ccxt/abstract/idex.py +0 -26
  109. ccxt/abstract/kuna.py +0 -182
  110. ccxt/async_support/base/ws/fast_client.py +0 -97
  111. ccxt/async_support/bl3p.py +0 -543
  112. ccxt/async_support/idex.py +0 -1889
  113. ccxt/async_support/kuna.py +0 -1935
  114. ccxt/bl3p.py +0 -543
  115. ccxt/idex.py +0 -1889
  116. ccxt/kuna.py +0 -1935
  117. ccxt/pro/idex.py +0 -687
  118. /ccxt/abstract/{huobijp.py → bittrade.py} +0 -0
  119. {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/LICENSE.txt +0 -0
  120. {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/WHEEL +0 -0
  121. {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/top_level.txt +0 -0
ccxt/abstract/kuna.py DELETED
@@ -1,182 +0,0 @@
1
- from ccxt.base.types import Entry
2
-
3
-
4
- class ImplicitAPI:
5
- xreserve_get_nonce = xreserveGetNonce = Entry('nonce', 'xreserve', 'GET', {'cost': 1})
6
- xreserve_get_fee = xreserveGetFee = Entry('fee', 'xreserve', 'GET', {'cost': 1})
7
- xreserve_get_delegated_transactions = xreserveGetDelegatedTransactions = Entry('delegated-transactions', 'xreserve', 'GET', {'cost': 1})
8
- xreserve_post_delegate_transfer = xreservePostDelegateTransfer = Entry('delegate-transfer', 'xreserve', 'POST', {'cost': 1})
9
- v4_private_get_private_me = v4PrivateGetPrivateMe = Entry('private/me', ['v4', 'private'], 'GET', {'cost': 1})
10
- v4_private_get_private_getbalance = v4PrivateGetPrivateGetBalance = Entry('private/getBalance', ['v4', 'private'], 'GET', {'cost': 1})
11
- v4_private_get_order_private_active = v4PrivateGetOrderPrivateActive = Entry('order/private/active', ['v4', 'private'], 'GET', {'cost': 1})
12
- v4_private_get_order_private_history = v4PrivateGetOrderPrivateHistory = Entry('order/private/history', ['v4', 'private'], 'GET', {'cost': 1})
13
- v4_private_get_order_private_id_trades = v4PrivateGetOrderPrivateIdTrades = Entry('order/private/{id}/trades', ['v4', 'private'], 'GET', {'cost': 1})
14
- v4_private_get_order_private_details_id = v4PrivateGetOrderPrivateDetailsId = Entry('order/private/details/{id}', ['v4', 'private'], 'GET', {'cost': 1})
15
- v4_private_get_trade_private_history = v4PrivateGetTradePrivateHistory = Entry('trade/private/history', ['v4', 'private'], 'GET', {'cost': 1})
16
- v4_private_get_transaction_private_hash = v4PrivateGetTransactionPrivateHash = Entry('transaction/private/{hash}', ['v4', 'private'], 'GET', {'cost': 1})
17
- v4_private_get_deposit_private_prerequest = v4PrivateGetDepositPrivatePreRequest = Entry('deposit/private/preRequest', ['v4', 'private'], 'GET', {'cost': 1})
18
- v4_private_get_deposit_private_crypto_address = v4PrivateGetDepositPrivateCryptoAddress = Entry('deposit/private/crypto/address', ['v4', 'private'], 'GET', {'cost': 1})
19
- v4_private_get_deposit_private_crypto_getmerchantaddress = v4PrivateGetDepositPrivateCryptoGetMerchantAddress = Entry('deposit/private/crypto/getMerchantAddress', ['v4', 'private'], 'GET', {'cost': 1})
20
- v4_private_get_deposit_private_history = v4PrivateGetDepositPrivateHistory = Entry('deposit/private/history', ['v4', 'private'], 'GET', {'cost': 1})
21
- v4_private_get_deposit_private_details_depositid = v4PrivateGetDepositPrivateDetailsDepositId = Entry('deposit/private/details/{depositId}', ['v4', 'private'], 'GET', {'cost': 1})
22
- v4_private_get_withdraw_private_prerequest = v4PrivateGetWithdrawPrivatePreRequest = Entry('withdraw/private/preRequest', ['v4', 'private'], 'GET', {'cost': 1})
23
- v4_private_get_withdraw_private_history = v4PrivateGetWithdrawPrivateHistory = Entry('withdraw/private/history', ['v4', 'private'], 'GET', {'cost': 1})
24
- v4_private_get_withdraw_private_details_withdrawid = v4PrivateGetWithdrawPrivateDetailsWithdrawId = Entry('withdraw/private/details/{withdrawId}', ['v4', 'private'], 'GET', {'cost': 1})
25
- v4_private_get_kuna_code_id = v4PrivateGetKunaCodeId = Entry('kuna-code/{id}', ['v4', 'private'], 'GET', {'cost': 1})
26
- v4_private_get_kuna_code_code_check = v4PrivateGetKunaCodeCodeCheck = Entry('kuna-code/{code}/check', ['v4', 'private'], 'GET', {'cost': 1})
27
- v4_private_get_kuna_code_issued_by_me = v4PrivateGetKunaCodeIssuedByMe = Entry('kuna-code/issued-by-me', ['v4', 'private'], 'GET', {'cost': 1})
28
- v4_private_get_kuna_code_redeemed_by_me = v4PrivateGetKunaCodeRedeemedByMe = Entry('kuna-code/redeemed-by-me', ['v4', 'private'], 'GET', {'cost': 1})
29
- v4_private_post_order_private_create = v4PrivatePostOrderPrivateCreate = Entry('order/private/create', ['v4', 'private'], 'POST', {'cost': 1})
30
- v4_private_post_order_private_cancel = v4PrivatePostOrderPrivateCancel = Entry('order/private/cancel', ['v4', 'private'], 'POST', {'cost': 1})
31
- v4_private_post_order_private_cancel_multi = v4PrivatePostOrderPrivateCancelMulti = Entry('order/private/cancel/multi', ['v4', 'private'], 'POST', {'cost': 1})
32
- v4_private_post_deposit_private_crypto_generateaddress = v4PrivatePostDepositPrivateCryptoGenerateAddress = Entry('deposit/private/crypto/generateAddress', ['v4', 'private'], 'POST', {'cost': 1})
33
- v4_private_post_deposit_private_crypto_generatemerchantaddress = v4PrivatePostDepositPrivateCryptoGenerateMerchantAddress = Entry('deposit/private/crypto/generateMerchantAddress', ['v4', 'private'], 'POST', {'cost': 1})
34
- v4_private_post_withdraw_private_create = v4PrivatePostWithdrawPrivateCreate = Entry('withdraw/private/create', ['v4', 'private'], 'POST', {'cost': 1})
35
- v4_private_post_kuna_code = v4PrivatePostKunaCode = Entry('kuna-code', ['v4', 'private'], 'POST', {'cost': 1})
36
- v4_private_put_kuna_code_redeem = v4PrivatePutKunaCodeRedeem = Entry('kuna-code/redeem', ['v4', 'private'], 'PUT', {'cost': 1})
37
- v4_public_get_public_timestamp = v4PublicGetPublicTimestamp = Entry('public/timestamp', ['v4', 'public'], 'GET', {'cost': 1})
38
- v4_public_get_public_fees = v4PublicGetPublicFees = Entry('public/fees', ['v4', 'public'], 'GET', {'cost': 1})
39
- v4_public_get_public_currencies_type_type = v4PublicGetPublicCurrenciesTypeType = Entry('public/currencies?type={type}', ['v4', 'public'], 'GET', {'cost': 1})
40
- v4_public_get_public_currencies = v4PublicGetPublicCurrencies = Entry('public/currencies', ['v4', 'public'], 'GET', {'cost': 1})
41
- v4_public_get_markets_public_getall = v4PublicGetMarketsPublicGetAll = Entry('markets/public/getAll', ['v4', 'public'], 'GET', {'cost': 1})
42
- v4_public_get_markets_public_tickers_pairs_pairs = v4PublicGetMarketsPublicTickersPairsPairs = Entry('markets/public/tickers?pairs={pairs}', ['v4', 'public'], 'GET', {'cost': 1})
43
- v4_public_get_order_public_book_pairs = v4PublicGetOrderPublicBookPairs = Entry('order/public/book/{pairs}', ['v4', 'public'], 'GET', {'cost': 1})
44
- v4_public_get_trade_public_book_pairs = v4PublicGetTradePublicBookPairs = Entry('trade/public/book/{pairs}', ['v4', 'public'], 'GET', {'cost': 1})
45
- v3_public_get_timestamp = v3PublicGetTimestamp = Entry('timestamp', ['v3', 'public'], 'GET', {'cost': 1})
46
- v3_public_get_currencies = v3PublicGetCurrencies = Entry('currencies', ['v3', 'public'], 'GET', {'cost': 1})
47
- v3_public_get_markets = v3PublicGetMarkets = Entry('markets', ['v3', 'public'], 'GET', {'cost': 1})
48
- v3_public_get_tickers = v3PublicGetTickers = Entry('tickers', ['v3', 'public'], 'GET', {'cost': 1})
49
- v3_public_get_k = v3PublicGetK = Entry('k', ['v3', 'public'], 'GET', {'cost': 1})
50
- v3_public_get_trades_history = v3PublicGetTradesHistory = Entry('trades_history', ['v3', 'public'], 'GET', {'cost': 1})
51
- v3_public_get_fees = v3PublicGetFees = Entry('fees', ['v3', 'public'], 'GET', {'cost': 1})
52
- v3_public_get_exchange_rates = v3PublicGetExchangeRates = Entry('exchange-rates', ['v3', 'public'], 'GET', {'cost': 1})
53
- v3_public_get_exchange_rates_currency = v3PublicGetExchangeRatesCurrency = Entry('exchange-rates/currency', ['v3', 'public'], 'GET', {'cost': 1})
54
- v3_public_get_book_market = v3PublicGetBookMarket = Entry('book/market', ['v3', 'public'], 'GET', {'cost': 1})
55
- v3_public_get_kuna_codes_code_check = v3PublicGetKunaCodesCodeCheck = Entry('kuna_codes/code/check', ['v3', 'public'], 'GET', {'cost': 1})
56
- v3_public_get_landing_page_statistic = v3PublicGetLandingPageStatistic = Entry('landing_page_statistic', ['v3', 'public'], 'GET', {'cost': 1})
57
- v3_public_get_translations_locale = v3PublicGetTranslationsLocale = Entry('translations/locale', ['v3', 'public'], 'GET', {'cost': 1})
58
- v3_public_get_trades_market_hist = v3PublicGetTradesMarketHist = Entry('trades/market/hist', ['v3', 'public'], 'GET', {'cost': 1})
59
- v3_public_post_http_test = v3PublicPostHttpTest = Entry('http_test', ['v3', 'public'], 'POST', {'cost': 1})
60
- v3_public_post_deposit_channels = v3PublicPostDepositChannels = Entry('deposit_channels', ['v3', 'public'], 'POST', {'cost': 1})
61
- v3_public_post_withdraw_channels = v3PublicPostWithdrawChannels = Entry('withdraw_channels', ['v3', 'public'], 'POST', {'cost': 1})
62
- v3_public_post_subscription_plans = v3PublicPostSubscriptionPlans = Entry('subscription_plans', ['v3', 'public'], 'POST', {'cost': 1})
63
- v3_public_post_send_to = v3PublicPostSendTo = Entry('send_to', ['v3', 'public'], 'POST', {'cost': 1})
64
- v3_public_post_confirm_token = v3PublicPostConfirmToken = Entry('confirm_token', ['v3', 'public'], 'POST', {'cost': 1})
65
- v3_public_post_kunaid = v3PublicPostKunaid = Entry('kunaid', ['v3', 'public'], 'POST', {'cost': 1})
66
- v3_public_post_withdraw_prerequest = v3PublicPostWithdrawPrerequest = Entry('withdraw/prerequest', ['v3', 'public'], 'POST', {'cost': 1})
67
- v3_public_post_deposit_prerequest = v3PublicPostDepositPrerequest = Entry('deposit/prerequest', ['v3', 'public'], 'POST', {'cost': 1})
68
- v3_public_post_deposit_exchange_rates = v3PublicPostDepositExchangeRates = Entry('deposit/exchange-rates', ['v3', 'public'], 'POST', {'cost': 1})
69
- v3_sign_get_reset_password_token = v3SignGetResetPasswordToken = Entry('reset_password/token', ['v3', 'sign'], 'GET', {'cost': 1})
70
- v3_sign_post_signup_google = v3SignPostSignupGoogle = Entry('signup/google', ['v3', 'sign'], 'POST', {'cost': 1})
71
- v3_sign_post_signup_resend_confirmation = v3SignPostSignupResendConfirmation = Entry('signup/resend_confirmation', ['v3', 'sign'], 'POST', {'cost': 1})
72
- v3_sign_post_signup = v3SignPostSignup = Entry('signup', ['v3', 'sign'], 'POST', {'cost': 1})
73
- v3_sign_post_signin = v3SignPostSignin = Entry('signin', ['v3', 'sign'], 'POST', {'cost': 1})
74
- v3_sign_post_signin_two_factor = v3SignPostSigninTwoFactor = Entry('signin/two_factor', ['v3', 'sign'], 'POST', {'cost': 1})
75
- v3_sign_post_signin_resend_confirm_device = v3SignPostSigninResendConfirmDevice = Entry('signin/resend_confirm_device', ['v3', 'sign'], 'POST', {'cost': 1})
76
- v3_sign_post_signin_confirm_device = v3SignPostSigninConfirmDevice = Entry('signin/confirm_device', ['v3', 'sign'], 'POST', {'cost': 1})
77
- v3_sign_post_reset_password = v3SignPostResetPassword = Entry('reset_password', ['v3', 'sign'], 'POST', {'cost': 1})
78
- v3_sign_post_cool_signin = v3SignPostCoolSignin = Entry('cool-signin', ['v3', 'sign'], 'POST', {'cost': 1})
79
- v3_sign_put_reset_password_token = v3SignPutResetPasswordToken = Entry('reset_password/token', ['v3', 'sign'], 'PUT', {'cost': 1})
80
- v3_sign_put_signup_code_confirm = v3SignPutSignupCodeConfirm = Entry('signup/code/confirm', ['v3', 'sign'], 'PUT', {'cost': 1})
81
- v3_private_post_auth_w_order_submit = v3PrivatePostAuthWOrderSubmit = Entry('auth/w/order/submit', ['v3', 'private'], 'POST', {'cost': 1})
82
- v3_private_post_auth_r_orders = v3PrivatePostAuthROrders = Entry('auth/r/orders', ['v3', 'private'], 'POST', {'cost': 1})
83
- v3_private_post_auth_r_orders_market = v3PrivatePostAuthROrdersMarket = Entry('auth/r/orders/market', ['v3', 'private'], 'POST', {'cost': 1})
84
- v3_private_post_auth_r_orders_markets = v3PrivatePostAuthROrdersMarkets = Entry('auth/r/orders/markets', ['v3', 'private'], 'POST', {'cost': 1})
85
- v3_private_post_auth_api_tokens_delete = v3PrivatePostAuthApiTokensDelete = Entry('auth/api_tokens/delete', ['v3', 'private'], 'POST', {'cost': 1})
86
- v3_private_post_auth_api_tokens_create = v3PrivatePostAuthApiTokensCreate = Entry('auth/api_tokens/create', ['v3', 'private'], 'POST', {'cost': 1})
87
- v3_private_post_auth_api_tokens = v3PrivatePostAuthApiTokens = Entry('auth/api_tokens', ['v3', 'private'], 'POST', {'cost': 1})
88
- v3_private_post_auth_signin_history_uniq = v3PrivatePostAuthSigninHistoryUniq = Entry('auth/signin_history/uniq', ['v3', 'private'], 'POST', {'cost': 1})
89
- v3_private_post_auth_signin_history = v3PrivatePostAuthSigninHistory = Entry('auth/signin_history', ['v3', 'private'], 'POST', {'cost': 1})
90
- v3_private_post_auth_disable_withdraw_confirmation = v3PrivatePostAuthDisableWithdrawConfirmation = Entry('auth/disable_withdraw_confirmation', ['v3', 'private'], 'POST', {'cost': 1})
91
- v3_private_post_auth_change_password = v3PrivatePostAuthChangePassword = Entry('auth/change_password', ['v3', 'private'], 'POST', {'cost': 1})
92
- v3_private_post_auth_deposit_address = v3PrivatePostAuthDepositAddress = Entry('auth/deposit_address', ['v3', 'private'], 'POST', {'cost': 1})
93
- v3_private_post_auth_announcements_accept = v3PrivatePostAuthAnnouncementsAccept = Entry('auth/announcements/accept', ['v3', 'private'], 'POST', {'cost': 1})
94
- v3_private_post_auth_announcements_unaccepted = v3PrivatePostAuthAnnouncementsUnaccepted = Entry('auth/announcements/unaccepted', ['v3', 'private'], 'POST', {'cost': 1})
95
- v3_private_post_auth_otp_deactivate = v3PrivatePostAuthOtpDeactivate = Entry('auth/otp/deactivate', ['v3', 'private'], 'POST', {'cost': 1})
96
- v3_private_post_auth_otp_activate = v3PrivatePostAuthOtpActivate = Entry('auth/otp/activate', ['v3', 'private'], 'POST', {'cost': 1})
97
- v3_private_post_auth_otp_secret = v3PrivatePostAuthOtpSecret = Entry('auth/otp/secret', ['v3', 'private'], 'POST', {'cost': 1})
98
- v3_private_post_auth_r_order_market_order_id_trades = v3PrivatePostAuthROrderMarketOrderIdTrades = Entry('auth/r/order/market/:order_id/trades', ['v3', 'private'], 'POST', {'cost': 1})
99
- v3_private_post_auth_r_orders_market_hist = v3PrivatePostAuthROrdersMarketHist = Entry('auth/r/orders/market/hist', ['v3', 'private'], 'POST', {'cost': 1})
100
- v3_private_post_auth_r_orders_hist = v3PrivatePostAuthROrdersHist = Entry('auth/r/orders/hist', ['v3', 'private'], 'POST', {'cost': 1})
101
- v3_private_post_auth_r_orders_hist_markets = v3PrivatePostAuthROrdersHistMarkets = Entry('auth/r/orders/hist/markets', ['v3', 'private'], 'POST', {'cost': 1})
102
- v3_private_post_auth_r_orders_details = v3PrivatePostAuthROrdersDetails = Entry('auth/r/orders/details', ['v3', 'private'], 'POST', {'cost': 1})
103
- v3_private_post_auth_assets_history = v3PrivatePostAuthAssetsHistory = Entry('auth/assets-history', ['v3', 'private'], 'POST', {'cost': 1})
104
- v3_private_post_auth_assets_history_withdraws = v3PrivatePostAuthAssetsHistoryWithdraws = Entry('auth/assets-history/withdraws', ['v3', 'private'], 'POST', {'cost': 1})
105
- v3_private_post_auth_assets_history_deposits = v3PrivatePostAuthAssetsHistoryDeposits = Entry('auth/assets-history/deposits', ['v3', 'private'], 'POST', {'cost': 1})
106
- v3_private_post_auth_r_wallets = v3PrivatePostAuthRWallets = Entry('auth/r/wallets', ['v3', 'private'], 'POST', {'cost': 1})
107
- v3_private_post_auth_markets_favorites = v3PrivatePostAuthMarketsFavorites = Entry('auth/markets/favorites', ['v3', 'private'], 'POST', {'cost': 1})
108
- v3_private_post_auth_markets_favorites_list = v3PrivatePostAuthMarketsFavoritesList = Entry('auth/markets/favorites/list', ['v3', 'private'], 'POST', {'cost': 1})
109
- v3_private_post_auth_me_update = v3PrivatePostAuthMeUpdate = Entry('auth/me/update', ['v3', 'private'], 'POST', {'cost': 1})
110
- v3_private_post_auth_me = v3PrivatePostAuthMe = Entry('auth/me', ['v3', 'private'], 'POST', {'cost': 1})
111
- v3_private_post_auth_fund_sources = v3PrivatePostAuthFundSources = Entry('auth/fund_sources', ['v3', 'private'], 'POST', {'cost': 1})
112
- v3_private_post_auth_fund_sources_list = v3PrivatePostAuthFundSourcesList = Entry('auth/fund_sources/list', ['v3', 'private'], 'POST', {'cost': 1})
113
- v3_private_post_auth_withdraw_resend_confirmation = v3PrivatePostAuthWithdrawResendConfirmation = Entry('auth/withdraw/resend_confirmation', ['v3', 'private'], 'POST', {'cost': 1})
114
- v3_private_post_auth_withdraw = v3PrivatePostAuthWithdraw = Entry('auth/withdraw', ['v3', 'private'], 'POST', {'cost': 1})
115
- v3_private_post_auth_withdraw_details = v3PrivatePostAuthWithdrawDetails = Entry('auth/withdraw/details', ['v3', 'private'], 'POST', {'cost': 1})
116
- v3_private_post_auth_withdraw_info = v3PrivatePostAuthWithdrawInfo = Entry('auth/withdraw/info', ['v3', 'private'], 'POST', {'cost': 1})
117
- v3_private_post_auth_payment_addresses = v3PrivatePostAuthPaymentAddresses = Entry('auth/payment_addresses', ['v3', 'private'], 'POST', {'cost': 1})
118
- v3_private_post_auth_deposit_prerequest = v3PrivatePostAuthDepositPrerequest = Entry('auth/deposit/prerequest', ['v3', 'private'], 'POST', {'cost': 1})
119
- v3_private_post_auth_deposit_exchange_rates = v3PrivatePostAuthDepositExchangeRates = Entry('auth/deposit/exchange-rates', ['v3', 'private'], 'POST', {'cost': 1})
120
- v3_private_post_auth_deposit = v3PrivatePostAuthDeposit = Entry('auth/deposit', ['v3', 'private'], 'POST', {'cost': 1})
121
- v3_private_post_auth_deposit_details = v3PrivatePostAuthDepositDetails = Entry('auth/deposit/details', ['v3', 'private'], 'POST', {'cost': 1})
122
- v3_private_post_auth_deposit_info = v3PrivatePostAuthDepositInfo = Entry('auth/deposit/info', ['v3', 'private'], 'POST', {'cost': 1})
123
- v3_private_post_auth_kuna_codes_count = v3PrivatePostAuthKunaCodesCount = Entry('auth/kuna_codes/count', ['v3', 'private'], 'POST', {'cost': 1})
124
- v3_private_post_auth_kuna_codes_details = v3PrivatePostAuthKunaCodesDetails = Entry('auth/kuna_codes/details', ['v3', 'private'], 'POST', {'cost': 1})
125
- v3_private_post_auth_kuna_codes_edit = v3PrivatePostAuthKunaCodesEdit = Entry('auth/kuna_codes/edit', ['v3', 'private'], 'POST', {'cost': 1})
126
- v3_private_post_auth_kuna_codes_send_pdf = v3PrivatePostAuthKunaCodesSendPdf = Entry('auth/kuna_codes/send-pdf', ['v3', 'private'], 'POST', {'cost': 1})
127
- v3_private_post_auth_kuna_codes = v3PrivatePostAuthKunaCodes = Entry('auth/kuna_codes', ['v3', 'private'], 'POST', {'cost': 1})
128
- v3_private_post_auth_kuna_codes_redeemed_by_me = v3PrivatePostAuthKunaCodesRedeemedByMe = Entry('auth/kuna_codes/redeemed-by-me', ['v3', 'private'], 'POST', {'cost': 1})
129
- v3_private_post_auth_kuna_codes_issued_by_me = v3PrivatePostAuthKunaCodesIssuedByMe = Entry('auth/kuna_codes/issued-by-me', ['v3', 'private'], 'POST', {'cost': 1})
130
- v3_private_post_auth_payment_requests_invoice = v3PrivatePostAuthPaymentRequestsInvoice = Entry('auth/payment_requests/invoice', ['v3', 'private'], 'POST', {'cost': 1})
131
- v3_private_post_auth_payment_requests_type = v3PrivatePostAuthPaymentRequestsType = Entry('auth/payment_requests/type', ['v3', 'private'], 'POST', {'cost': 1})
132
- v3_private_post_auth_referral_program_weekly_earnings = v3PrivatePostAuthReferralProgramWeeklyEarnings = Entry('auth/referral_program/weekly_earnings', ['v3', 'private'], 'POST', {'cost': 1})
133
- v3_private_post_auth_referral_program_stats = v3PrivatePostAuthReferralProgramStats = Entry('auth/referral_program/stats', ['v3', 'private'], 'POST', {'cost': 1})
134
- v3_private_post_auth_merchant_payout_services = v3PrivatePostAuthMerchantPayoutServices = Entry('auth/merchant/payout_services', ['v3', 'private'], 'POST', {'cost': 1})
135
- v3_private_post_auth_merchant_withdraw = v3PrivatePostAuthMerchantWithdraw = Entry('auth/merchant/withdraw', ['v3', 'private'], 'POST', {'cost': 1})
136
- v3_private_post_auth_merchant_payment_services = v3PrivatePostAuthMerchantPaymentServices = Entry('auth/merchant/payment_services', ['v3', 'private'], 'POST', {'cost': 1})
137
- v3_private_post_auth_merchant_deposit = v3PrivatePostAuthMerchantDeposit = Entry('auth/merchant/deposit', ['v3', 'private'], 'POST', {'cost': 1})
138
- v3_private_post_auth_verification_auth_token = v3PrivatePostAuthVerificationAuthToken = Entry('auth/verification/auth_token', ['v3', 'private'], 'POST', {'cost': 1})
139
- v3_private_post_auth_kunaid_purchase_create = v3PrivatePostAuthKunaidPurchaseCreate = Entry('auth/kunaid_purchase/create', ['v3', 'private'], 'POST', {'cost': 1})
140
- v3_private_post_auth_devices_list = v3PrivatePostAuthDevicesList = Entry('auth/devices/list', ['v3', 'private'], 'POST', {'cost': 1})
141
- v3_private_post_auth_sessions_list = v3PrivatePostAuthSessionsList = Entry('auth/sessions/list', ['v3', 'private'], 'POST', {'cost': 1})
142
- v3_private_post_auth_subscriptions_reactivate = v3PrivatePostAuthSubscriptionsReactivate = Entry('auth/subscriptions/reactivate', ['v3', 'private'], 'POST', {'cost': 1})
143
- v3_private_post_auth_subscriptions_cancel = v3PrivatePostAuthSubscriptionsCancel = Entry('auth/subscriptions/cancel', ['v3', 'private'], 'POST', {'cost': 1})
144
- v3_private_post_auth_subscriptions_prolong = v3PrivatePostAuthSubscriptionsProlong = Entry('auth/subscriptions/prolong', ['v3', 'private'], 'POST', {'cost': 1})
145
- v3_private_post_auth_subscriptions_create = v3PrivatePostAuthSubscriptionsCreate = Entry('auth/subscriptions/create', ['v3', 'private'], 'POST', {'cost': 1})
146
- v3_private_post_auth_subscriptions_list = v3PrivatePostAuthSubscriptionsList = Entry('auth/subscriptions/list', ['v3', 'private'], 'POST', {'cost': 1})
147
- v3_private_post_auth_kuna_ids_list = v3PrivatePostAuthKunaIdsList = Entry('auth/kuna_ids/list', ['v3', 'private'], 'POST', {'cost': 1})
148
- v3_private_post_order_cancel_multi = v3PrivatePostOrderCancelMulti = Entry('order/cancel/multi', ['v3', 'private'], 'POST', {'cost': 1})
149
- v3_private_post_order_cancel = v3PrivatePostOrderCancel = Entry('order/cancel', ['v3', 'private'], 'POST', {'cost': 1})
150
- v3_private_put_auth_fund_sources_id = v3PrivatePutAuthFundSourcesId = Entry('auth/fund_sources/id', ['v3', 'private'], 'PUT', {'cost': 1})
151
- v3_private_put_auth_kuna_codes_redeem = v3PrivatePutAuthKunaCodesRedeem = Entry('auth/kuna_codes/redeem', ['v3', 'private'], 'PUT', {'cost': 1})
152
- v3_private_delete_auth_markets_favorites = v3PrivateDeleteAuthMarketsFavorites = Entry('auth/markets/favorites', ['v3', 'private'], 'DELETE', {'cost': 1})
153
- v3_private_delete_auth_fund_sources = v3PrivateDeleteAuthFundSources = Entry('auth/fund_sources', ['v3', 'private'], 'DELETE', {'cost': 1})
154
- v3_private_delete_auth_devices = v3PrivateDeleteAuthDevices = Entry('auth/devices', ['v3', 'private'], 'DELETE', {'cost': 1})
155
- v3_private_delete_auth_devices_list = v3PrivateDeleteAuthDevicesList = Entry('auth/devices/list', ['v3', 'private'], 'DELETE', {'cost': 1})
156
- v3_private_delete_auth_sessions_list = v3PrivateDeleteAuthSessionsList = Entry('auth/sessions/list', ['v3', 'private'], 'DELETE', {'cost': 1})
157
- v3_private_delete_auth_sessions = v3PrivateDeleteAuthSessions = Entry('auth/sessions', ['v3', 'private'], 'DELETE', {'cost': 1})
158
- public_get_depth = publicGetDepth = Entry('depth', 'public', 'GET', {})
159
- public_get_k_with_pending_trades = publicGetKWithPendingTrades = Entry('k_with_pending_trades', 'public', 'GET', {})
160
- public_get_k = publicGetK = Entry('k', 'public', 'GET', {})
161
- public_get_markets = publicGetMarkets = Entry('markets', 'public', 'GET', {})
162
- public_get_order_book = publicGetOrderBook = Entry('order_book', 'public', 'GET', {})
163
- public_get_order_book_market = publicGetOrderBookMarket = Entry('order_book/{market}', 'public', 'GET', {})
164
- public_get_tickers = publicGetTickers = Entry('tickers', 'public', 'GET', {})
165
- public_get_tickers_market = publicGetTickersMarket = Entry('tickers/{market}', 'public', 'GET', {})
166
- public_get_timestamp = publicGetTimestamp = Entry('timestamp', 'public', 'GET', {})
167
- public_get_trades = publicGetTrades = Entry('trades', 'public', 'GET', {})
168
- public_get_trades_market = publicGetTradesMarket = Entry('trades/{market}', 'public', 'GET', {})
169
- private_get_members_me = privateGetMembersMe = Entry('members/me', 'private', 'GET', {})
170
- private_get_deposits = privateGetDeposits = Entry('deposits', 'private', 'GET', {})
171
- private_get_deposit = privateGetDeposit = Entry('deposit', 'private', 'GET', {})
172
- private_get_deposit_address = privateGetDepositAddress = Entry('deposit_address', 'private', 'GET', {})
173
- private_get_orders = privateGetOrders = Entry('orders', 'private', 'GET', {})
174
- private_get_order = privateGetOrder = Entry('order', 'private', 'GET', {})
175
- private_get_trades_my = privateGetTradesMy = Entry('trades/my', 'private', 'GET', {})
176
- private_get_withdraws = privateGetWithdraws = Entry('withdraws', 'private', 'GET', {})
177
- private_get_withdraw = privateGetWithdraw = Entry('withdraw', 'private', 'GET', {})
178
- private_post_orders = privatePostOrders = Entry('orders', 'private', 'POST', {})
179
- private_post_orders_multi = privatePostOrdersMulti = Entry('orders/multi', 'private', 'POST', {})
180
- private_post_orders_clear = privatePostOrdersClear = Entry('orders/clear', 'private', 'POST', {})
181
- private_post_order_delete = privatePostOrderDelete = Entry('order/delete', 'private', 'POST', {})
182
- private_post_withdraw = privatePostWithdraw = Entry('withdraw', 'private', 'POST', {})
@@ -1,97 +0,0 @@
1
- """A faster version of aiohttp's websocket client that uses select and other optimizations"""
2
-
3
- import asyncio
4
- import socket
5
- import collections
6
- from ccxt.async_support.base.ws.aiohttp_client import AiohttpClient
7
- from ccxt.base.errors import NetworkError
8
-
9
-
10
- class FastClient(AiohttpClient):
11
- transport = None
12
-
13
- def __init__(self, url, on_message_callback, on_error_callback, on_close_callback, on_connected_callback, config={}):
14
- super(FastClient, self).__init__(url, on_message_callback, on_error_callback, on_close_callback, on_connected_callback, config)
15
- # instead of using the deque in aiohttp we implement our own for speed
16
- # https://github.com/aio-libs/aiohttp/blob/1d296d549050aa335ef542421b8b7dad788246d5/aiohttp/streams.py#L534
17
- self.stack = collections.deque()
18
- self.callback_scheduled = False
19
-
20
- def receive_loop(self):
21
- def handler():
22
- if not self.stack:
23
- self.callback_scheduled = False
24
- return
25
- message = self.stack.popleft()
26
- try:
27
- self.handle_message(message)
28
- except Exception as error:
29
- self.reject(error)
30
- self.asyncio_loop.call_soon(handler)
31
-
32
- def feed_data(message, size):
33
- if not self.callback_scheduled:
34
- self.callback_scheduled = True
35
- self.asyncio_loop.call_soon(handler)
36
- self.stack.append(message)
37
-
38
- def feed_eof():
39
- if self.connection._close_code == 1000: # OK close
40
- self.on_close(1000)
41
- else:
42
- self.on_error(NetworkError("Abnormal closure of client")) # ABNORMAL_CLOSURE
43
-
44
- def wrapper(func):
45
- def parse_frame(buf):
46
- while self.stack:
47
- self.handle_message(self.stack.popleft())
48
- return func(buf)
49
- return parse_frame
50
-
51
- async def close(code=1000, message=b''):
52
- # this is needed because our other wrappers break the closing process
53
- # we also don't wait for a response to the close message to speed it up
54
- # this code is adapted from aiohttp client_ws.py
55
- _self = self.connection
56
- if not _self._closed:
57
- _self._cancel_heartbeat()
58
- _self._closed = True
59
- try:
60
- await _self._writer.close(code, message)
61
- _self._response.close()
62
- _self._close_code = 1000
63
- except asyncio.CancelledError:
64
- _self._response.close()
65
- _self._close_code = 1006
66
- raise
67
- except Exception as exc:
68
- _self._close_code = 1006
69
- _self._exception = exc
70
- return True
71
-
72
- connection = self.connection._conn
73
- if connection.closed:
74
- # connection got terminated after the connection was made and before the receive loop ran
75
- self.on_close(1006)
76
- return
77
- self.transport = connection.transport
78
- # increase the RCVBUF so that the tcp window size can be larger
79
- sock = self.transport.get_extra_info('socket')
80
- current_size = sock.getsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF)
81
- # 2 mebibytes is a performance value
82
- new_size = max(current_size, 2097152)
83
- sock.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, new_size)
84
-
85
- ws_reader = connection.protocol._payload_parser
86
- ws_reader.parse_frame = wrapper(ws_reader.parse_frame)
87
- ws_reader.queue.feed_data = feed_data
88
- ws_reader.queue.feed_eof = feed_eof
89
- self.connection.close = close
90
- # return a future so super class won't complain
91
- return asyncio.sleep(0)
92
-
93
- def reset(self, error):
94
- super(FastClient, self).reset(error)
95
- self.stack.clear()
96
- if self.transport:
97
- self.transport.abort()