crypticorn 2.6.0__tar.gz → 2.7.1__tar.gz

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 (243) hide show
  1. {crypticorn-2.6.0 → crypticorn-2.7.1}/PKG-INFO +2 -2
  2. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/common/errors.py +10 -0
  3. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/api/data_api.py +15 -12
  4. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/coins.py +1 -1
  5. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/data_download_response.py +6 -6
  6. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/data_info.py +20 -8
  7. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/data_version.py +1 -1
  8. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/download_links.py +8 -4
  9. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/feature_size.py +1 -1
  10. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/target.py +1 -1
  11. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/target_info.py +1 -1
  12. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/target_type.py +1 -1
  13. crypticorn-2.7.1/crypticorn/hive/main.py +75 -0
  14. crypticorn-2.7.1/crypticorn/hive/utils.py +67 -0
  15. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/main.py +42 -40
  16. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/main.py +8 -20
  17. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn.egg-info/PKG-INFO +2 -2
  18. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn.egg-info/SOURCES.txt +1 -0
  19. {crypticorn-2.6.0 → crypticorn-2.7.1}/pyproject.toml +2 -2
  20. crypticorn-2.6.0/crypticorn/hive/main.py +0 -28
  21. {crypticorn-2.6.0 → crypticorn-2.7.1}/README.md +0 -0
  22. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/__init__.py +0 -0
  23. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/__init__.py +0 -0
  24. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/__init__.py +0 -0
  25. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/api/__init__.py +0 -0
  26. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/api/admin_api.py +0 -0
  27. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/api/auth_api.py +0 -0
  28. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/api/service_api.py +0 -0
  29. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/api/user_api.py +0 -0
  30. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/api/wallet_api.py +0 -0
  31. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/api_client.py +0 -0
  32. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/api_response.py +0 -0
  33. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/configuration.py +0 -0
  34. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/exceptions.py +0 -0
  35. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/__init__.py +0 -0
  36. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/add_wallet200_response.py +0 -0
  37. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/add_wallet_request.py +0 -0
  38. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/authorize_user200_response.py +0 -0
  39. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/authorize_user200_response_auth.py +0 -0
  40. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/authorize_user_request.py +0 -0
  41. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/create_api_key200_response.py +0 -0
  42. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/create_api_key_request.py +0 -0
  43. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/create_user_request.py +0 -0
  44. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/get_api_keys200_response_inner.py +0 -0
  45. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/list_wallets200_response.py +0 -0
  46. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +0 -0
  47. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +0 -0
  48. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +0 -0
  49. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +0 -0
  50. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/list_wallets200_response_data_inner.py +0 -0
  51. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/list_wallets200_response_user_value.py +0 -0
  52. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/logout_default_response.py +0 -0
  53. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/logout_default_response_issues_inner.py +0 -0
  54. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/oauth_callback200_response.py +0 -0
  55. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/oauth_callback200_response_user.py +0 -0
  56. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/refresh_token_info200_response.py +0 -0
  57. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +0 -0
  58. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/resend_verification_email_request.py +0 -0
  59. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/revoke_user_tokens_request.py +0 -0
  60. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/rotate_tokens200_response.py +0 -0
  61. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/token_info200_response.py +0 -0
  62. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/unlink_wallet_request.py +0 -0
  63. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/update_user_request.py +0 -0
  64. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/user_by_username200_response.py +0 -0
  65. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/user_reset_password_request.py +0 -0
  66. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/user_set_password_request.py +0 -0
  67. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/verify200_response.py +0 -0
  68. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/verify_email200_response.py +0 -0
  69. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/verify_email200_response_auth.py +0 -0
  70. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/verify_email200_response_auth_auth.py +0 -0
  71. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/verify_email_request.py +0 -0
  72. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/verify_wallet_request.py +0 -0
  73. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/wallet_verified200_response.py +0 -0
  74. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/models/whoami200_response.py +0 -0
  75. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/py.typed +0 -0
  76. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/client/rest.py +0 -0
  77. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/auth/main.py +0 -0
  78. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/cli/__init__.py +0 -0
  79. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/cli/__main__.py +0 -0
  80. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/cli/init.py +0 -0
  81. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/cli/templates/__init__.py +0 -0
  82. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/cli/templates/auth.py +0 -0
  83. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/client.py +0 -0
  84. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/common/__init__.py +0 -0
  85. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/common/auth.py +0 -0
  86. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/common/decorators.py +0 -0
  87. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/common/enums.py +0 -0
  88. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/common/exceptions.py +0 -0
  89. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/common/mixins.py +0 -0
  90. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/common/pagination.py +0 -0
  91. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/common/scopes.py +0 -0
  92. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/common/status_router.py +0 -0
  93. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/common/urls.py +0 -0
  94. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/common/utils.py +0 -0
  95. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/__init__.py +0 -0
  96. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/__init__.py +0 -0
  97. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/api/__init__.py +0 -0
  98. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/api/models_api.py +0 -0
  99. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/api/status_api.py +0 -0
  100. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/api_client.py +0 -0
  101. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/api_response.py +0 -0
  102. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/configuration.py +0 -0
  103. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/exceptions.py +0 -0
  104. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/__init__.py +0 -0
  105. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/data_value_value_value_inner.py +0 -0
  106. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/data_version_info.py +0 -0
  107. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/evaluation.py +0 -0
  108. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/evaluation_response.py +0 -0
  109. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/exception_detail.py +0 -0
  110. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/model.py +0 -0
  111. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/model_create.py +0 -0
  112. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/model_status.py +0 -0
  113. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/models/model_update.py +0 -0
  114. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/py.typed +0 -0
  115. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/hive/client/rest.py +0 -0
  116. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/__init__.py +0 -0
  117. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/__init__.py +0 -0
  118. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/api/__init__.py +0 -0
  119. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/api/change_in_timeframe_api.py +0 -0
  120. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/api/funding_rates_api.py +0 -0
  121. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/api/ohlcv_data_api.py +0 -0
  122. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/api/status_api.py +0 -0
  123. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/api/symbols_api.py +0 -0
  124. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/api/udf_api.py +0 -0
  125. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/api_client.py +0 -0
  126. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/api_response.py +0 -0
  127. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/configuration.py +0 -0
  128. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/exceptions.py +0 -0
  129. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/models/__init__.py +0 -0
  130. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/models/change_in_timeframe.py +0 -0
  131. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/models/exception_detail.py +0 -0
  132. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/models/funding_rate.py +0 -0
  133. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/models/ohlcv_history.py +0 -0
  134. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/models/resolution.py +0 -0
  135. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/models/search_symbol.py +0 -0
  136. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/models/sort_direction.py +0 -0
  137. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/models/symbol_group.py +0 -0
  138. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/models/symbol_info.py +0 -0
  139. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/models/symbol_type.py +0 -0
  140. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/models/timeframe.py +0 -0
  141. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/models/udf_config.py +0 -0
  142. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/py.typed +0 -0
  143. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/klines/client/rest.py +0 -0
  144. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/__init__.py +0 -0
  145. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/__init__.py +0 -0
  146. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/api/__init__.py +0 -0
  147. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/api/exchanges_api.py +0 -0
  148. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/api/indicators_api.py +0 -0
  149. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/api/logs_api.py +0 -0
  150. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/api/marketcap_api.py +0 -0
  151. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/api/markets_api.py +0 -0
  152. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/api/status_api.py +0 -0
  153. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/api/tokens_api.py +0 -0
  154. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/api_client.py +0 -0
  155. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/api_response.py +0 -0
  156. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/configuration.py +0 -0
  157. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/exceptions.py +0 -0
  158. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/models/__init__.py +0 -0
  159. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/models/exception_detail.py +0 -0
  160. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/models/severity.py +0 -0
  161. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/models/time_interval.py +0 -0
  162. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/models/trading_status.py +0 -0
  163. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/py.typed +0 -0
  164. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/metrics/client/rest.py +0 -0
  165. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/__init__.py +0 -0
  166. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/__init__.py +0 -0
  167. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/api/__init__.py +0 -0
  168. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/api/now_payments_api.py +0 -0
  169. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/api/payments_api.py +0 -0
  170. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/api/products_api.py +0 -0
  171. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/api/status_api.py +0 -0
  172. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/api_client.py +0 -0
  173. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/api_response.py +0 -0
  174. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/configuration.py +0 -0
  175. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/exceptions.py +0 -0
  176. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/models/__init__.py +0 -0
  177. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/models/exception_detail.py +0 -0
  178. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/models/now_create_invoice_req.py +0 -0
  179. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/models/now_create_invoice_res.py +0 -0
  180. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/models/payment.py +0 -0
  181. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/models/payment_status.py +0 -0
  182. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/models/product_create.py +0 -0
  183. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/models/product_read.py +0 -0
  184. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/models/product_sub_read.py +0 -0
  185. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/models/product_update.py +0 -0
  186. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/models/scope.py +0 -0
  187. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/models/services.py +0 -0
  188. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/py.typed +0 -0
  189. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/client/rest.py +0 -0
  190. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/pay/main.py +0 -0
  191. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/__init__.py +0 -0
  192. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/__init__.py +0 -0
  193. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/api/__init__.py +0 -0
  194. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/api/api_keys_api.py +0 -0
  195. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/api/bots_api.py +0 -0
  196. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/api/exchanges_api.py +0 -0
  197. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/api/futures_trading_panel_api.py +0 -0
  198. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/api/notifications_api.py +0 -0
  199. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/api/orders_api.py +0 -0
  200. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/api/status_api.py +0 -0
  201. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/api/strategies_api.py +0 -0
  202. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/api/trading_actions_api.py +0 -0
  203. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/api_client.py +0 -0
  204. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/api_response.py +0 -0
  205. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/configuration.py +0 -0
  206. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/exceptions.py +0 -0
  207. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/__init__.py +0 -0
  208. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/action_model.py +0 -0
  209. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/bot_model.py +0 -0
  210. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/bot_status.py +0 -0
  211. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/exception_detail.py +0 -0
  212. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/exchange_key_model.py +0 -0
  213. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/execution_ids.py +0 -0
  214. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/futures_balance.py +0 -0
  215. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/futures_trading_action.py +0 -0
  216. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/margin_mode.py +0 -0
  217. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/notification_model.py +0 -0
  218. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/order_model.py +0 -0
  219. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/order_status.py +0 -0
  220. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/post_futures_action.py +0 -0
  221. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/spot_trading_action.py +0 -0
  222. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/strategy_exchange_info.py +0 -0
  223. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/strategy_model_input.py +0 -0
  224. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/strategy_model_output.py +0 -0
  225. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/tpsl.py +0 -0
  226. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/models/trading_action_type.py +0 -0
  227. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/py.typed +0 -0
  228. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/client/rest.py +0 -0
  229. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn/trade/main.py +0 -0
  230. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn.egg-info/dependency_links.txt +0 -0
  231. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn.egg-info/entry_points.txt +0 -0
  232. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn.egg-info/requires.txt +0 -0
  233. {crypticorn-2.6.0 → crypticorn-2.7.1}/crypticorn.egg-info/top_level.txt +0 -0
  234. {crypticorn-2.6.0 → crypticorn-2.7.1}/requirements/dev.txt +0 -0
  235. {crypticorn-2.6.0 → crypticorn-2.7.1}/requirements/extra.txt +0 -0
  236. {crypticorn-2.6.0 → crypticorn-2.7.1}/requirements/main.txt +0 -0
  237. {crypticorn-2.6.0 → crypticorn-2.7.1}/requirements/test.txt +0 -0
  238. {crypticorn-2.6.0 → crypticorn-2.7.1}/setup.cfg +0 -0
  239. {crypticorn-2.6.0 → crypticorn-2.7.1}/tests/test_auth_client.py +0 -0
  240. {crypticorn-2.6.0 → crypticorn-2.7.1}/tests/test_config.py +0 -0
  241. {crypticorn-2.6.0 → crypticorn-2.7.1}/tests/test_enums.py +0 -0
  242. {crypticorn-2.6.0 → crypticorn-2.7.1}/tests/test_errors.py +0 -0
  243. {crypticorn-2.6.0 → crypticorn-2.7.1}/tests/test_pagination.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crypticorn
3
- Version: 2.6.0
4
- Summary: Maximise Your Crypto Trading Profits with AI Predictions
3
+ Version: 2.7.1
4
+ Summary: Maximise Your Crypto Trading Profits with Machine Learning
5
5
  Author-email: Crypticorn <timon@crypticorn.com>
6
6
  Project-URL: Homepage, https://crypticorn.com
7
7
  Keywords: machine learning,data science,crypto,modelling
@@ -60,6 +60,7 @@ class ApiErrorIdentifier(ExcludeEnumMixin, StrEnum):
60
60
  INVALID_PARAMETER = "invalid_parameter_provided"
61
61
  LEVERAGE_EXCEEDED = "leverage_limit_exceeded"
62
62
  LIQUIDATION_PRICE_VIOLATION = "order_violates_liquidation_price_constraints"
63
+ MODEL_NAME_NOT_UNIQUE = "model_name_not_unique"
63
64
  NO_CREDENTIALS = "no_credentials"
64
65
  NOW_API_DOWN = "now_api_down"
65
66
  OBJECT_ALREADY_EXISTS = "object_already_exists"
@@ -318,6 +319,11 @@ class ApiError(ExcludeEnumMixin, Enum, metaclass=ApiErrorFallback):
318
319
  ApiErrorType.SERVER_ERROR,
319
320
  ApiErrorLevel.ERROR,
320
321
  )
322
+ MODEL_NAME_NOT_UNIQUE = (
323
+ ApiErrorIdentifier.MODEL_NAME_NOT_UNIQUE,
324
+ ApiErrorType.USER_ERROR,
325
+ ApiErrorLevel.ERROR,
326
+ )
321
327
  NO_CREDENTIALS = (
322
328
  ApiErrorIdentifier.NO_CREDENTIALS,
323
329
  ApiErrorType.USER_ERROR,
@@ -598,6 +604,10 @@ class StatusCodeMapper:
598
604
  status.HTTP_409_CONFLICT,
599
605
  status.WS_1008_POLICY_VIOLATION,
600
606
  ),
607
+ ApiError.MODEL_NAME_NOT_UNIQUE: (
608
+ status.HTTP_409_CONFLICT,
609
+ status.WS_1008_POLICY_VIOLATION,
610
+ ),
601
611
  # Invalid Content
602
612
  ApiError.CONTENT_TYPE_ERROR: (
603
613
  status.HTTP_415_UNSUPPORTED_MEDIA_TYPE,
@@ -48,9 +48,10 @@ class DataApi:
48
48
  version: Annotated[
49
49
  Optional[DataVersion],
50
50
  Field(description="Data version. Default is the latest public version."),
51
- ],
51
+ ] = None,
52
52
  feature_size: Annotated[
53
- Optional[FeatureSize], Field(description="Feature size")
53
+ Optional[FeatureSize],
54
+ Field(description="The number of features in the data. Default is LARGE."),
54
55
  ] = None,
55
56
  _request_timeout: Union[
56
57
  None,
@@ -70,9 +71,9 @@ class DataApi:
70
71
 
71
72
  :param model_id: Model ID (required)
72
73
  :type model_id: int
73
- :param version: Data version. Default is the latest public version. (required)
74
+ :param version: Data version. Default is the latest public version.
74
75
  :type version: DataVersion
75
- :param feature_size: Feature size
76
+ :param feature_size: The number of features in the data. Default is LARGE.
76
77
  :type feature_size: FeatureSize
77
78
  :param _request_timeout: timeout setting for this request. If one
78
79
  number provided, it will be total request
@@ -125,9 +126,10 @@ class DataApi:
125
126
  version: Annotated[
126
127
  Optional[DataVersion],
127
128
  Field(description="Data version. Default is the latest public version."),
128
- ],
129
+ ] = None,
129
130
  feature_size: Annotated[
130
- Optional[FeatureSize], Field(description="Feature size")
131
+ Optional[FeatureSize],
132
+ Field(description="The number of features in the data. Default is LARGE."),
131
133
  ] = None,
132
134
  _request_timeout: Union[
133
135
  None,
@@ -147,9 +149,9 @@ class DataApi:
147
149
 
148
150
  :param model_id: Model ID (required)
149
151
  :type model_id: int
150
- :param version: Data version. Default is the latest public version. (required)
152
+ :param version: Data version. Default is the latest public version.
151
153
  :type version: DataVersion
152
- :param feature_size: Feature size
154
+ :param feature_size: The number of features in the data. Default is LARGE.
153
155
  :type feature_size: FeatureSize
154
156
  :param _request_timeout: timeout setting for this request. If one
155
157
  number provided, it will be total request
@@ -202,9 +204,10 @@ class DataApi:
202
204
  version: Annotated[
203
205
  Optional[DataVersion],
204
206
  Field(description="Data version. Default is the latest public version."),
205
- ],
207
+ ] = None,
206
208
  feature_size: Annotated[
207
- Optional[FeatureSize], Field(description="Feature size")
209
+ Optional[FeatureSize],
210
+ Field(description="The number of features in the data. Default is LARGE."),
208
211
  ] = None,
209
212
  _request_timeout: Union[
210
213
  None,
@@ -224,9 +227,9 @@ class DataApi:
224
227
 
225
228
  :param model_id: Model ID (required)
226
229
  :type model_id: int
227
- :param version: Data version. Default is the latest public version. (required)
230
+ :param version: Data version. Default is the latest public version.
228
231
  :type version: DataVersion
229
- :param feature_size: Feature size
232
+ :param feature_size: The number of features in the data. Default is LARGE.
230
233
  :type feature_size: FeatureSize
231
234
  :param _request_timeout: timeout setting for this request. If one
232
235
  number provided, it will be total request
@@ -20,7 +20,7 @@ from typing_extensions import Self
20
20
 
21
21
  class Coins(str, Enum):
22
22
  """
23
- All ever existing coins
23
+ All existing coins. Some might no be available in the latest data version, but kept for older versions.
24
24
  """
25
25
 
26
26
  """
@@ -17,7 +17,7 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict
20
+ from pydantic import BaseModel, ConfigDict, Field
21
21
  from typing import Any, ClassVar, Dict, List
22
22
  from crypticorn.hive.client.models.coins import Coins
23
23
  from crypticorn.hive.client.models.data_version import DataVersion
@@ -30,13 +30,13 @@ from typing_extensions import Self
30
30
 
31
31
  class DataDownloadResponse(BaseModel):
32
32
  """
33
- DataDownloadResponse
33
+ The response for a data download request
34
34
  """ # noqa: E501
35
35
 
36
- coin: Coins
37
- feature_size: FeatureSize
38
- version: DataVersion
39
- target: Target
36
+ coin: Coins = Field(description="The coin the data is for")
37
+ feature_size: FeatureSize = Field(description="The feature size the data is for")
38
+ version: DataVersion = Field(description="The version of the data")
39
+ target: Target = Field(description="The target of the data")
40
40
  links: DownloadLinks
41
41
  __properties: ClassVar[List[str]] = [
42
42
  "coin",
@@ -17,7 +17,7 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict
20
+ from pydantic import BaseModel, ConfigDict, Field
21
21
  from typing import Any, ClassVar, Dict, List
22
22
  from crypticorn.hive.client.models.coins import Coins
23
23
  from crypticorn.hive.client.models.data_value_value_value_inner import (
@@ -32,15 +32,27 @@ from typing_extensions import Self
32
32
 
33
33
  class DataInfo(BaseModel):
34
34
  """
35
- DataInfo
35
+ The complete data information for all versions, coins, feature sizes and targets
36
36
  """ # noqa: E501
37
37
 
38
- data: Dict[str, Dict[str, Dict[str, List[DataValueValueValueInner]]]]
39
- coins: List[Coins]
40
- feature_sizes: List[FeatureSize]
41
- targets: List[TargetInfo]
42
- all_versions: List[DataVersionInfo]
43
- available_versions: List[DataVersionInfo]
38
+ data: Dict[str, Dict[str, Dict[str, List[DataValueValueValueInner]]]] = Field(
39
+ description="The complete data information for all versions, coins, feature sizes and targets."
40
+ )
41
+ coins: List[Coins] = Field(
42
+ description="The coins available on the latest data version."
43
+ )
44
+ feature_sizes: List[FeatureSize] = Field(
45
+ description="The feature sizes available on the latest data version."
46
+ )
47
+ targets: List[TargetInfo] = Field(
48
+ description="The targets available on the latest data version."
49
+ )
50
+ all_versions: List[DataVersionInfo] = Field(
51
+ description="All ever existing data versions. Some may not be publicly available yet."
52
+ )
53
+ available_versions: List[DataVersionInfo] = Field(
54
+ description="All publicly available data versions."
55
+ )
44
56
  __properties: ClassVar[List[str]] = [
45
57
  "data",
46
58
  "coins",
@@ -20,7 +20,7 @@ from typing_extensions import Self
20
20
 
21
21
  class DataVersion(str, Enum):
22
22
  """
23
- All ever existing data versions
23
+ All existing data versions
24
24
  """
25
25
 
26
26
  """
@@ -25,12 +25,16 @@ from typing_extensions import Self
25
25
 
26
26
  class DownloadLinks(BaseModel):
27
27
  """
28
- DownloadLinks
28
+ The download links for the data
29
29
  """ # noqa: E501
30
30
 
31
- y_train: StrictStr
32
- x_test: StrictStr = Field(alias="X_test")
33
- x_train: StrictStr = Field(alias="X_train")
31
+ y_train: StrictStr = Field(description="The download link for the y_train data")
32
+ x_test: StrictStr = Field(
33
+ description="The download link for the X_test data", alias="X_test"
34
+ )
35
+ x_train: StrictStr = Field(
36
+ description="The download link for the X_train data", alias="X_train"
37
+ )
34
38
  __properties: ClassVar[List[str]] = ["y_train", "X_test", "X_train"]
35
39
 
36
40
  model_config = ConfigDict(
@@ -20,7 +20,7 @@ from typing_extensions import Self
20
20
 
21
21
  class FeatureSize(str, Enum):
22
22
  """
23
- All ever existing feature sizes
23
+ All existing feature sizes. Some might no be available in the latest data version, but kept for older versions.
24
24
  """
25
25
 
26
26
  """
@@ -20,7 +20,7 @@ from typing_extensions import Self
20
20
 
21
21
  class Target(str, Enum):
22
22
  """
23
- All ever existing targets
23
+ All existing targets. Some might no be available in the latest data version, but kept for older versions.
24
24
  """
25
25
 
26
26
  """
@@ -28,7 +28,7 @@ from typing_extensions import Self
28
28
 
29
29
  class TargetInfo(BaseModel):
30
30
  """
31
- TargetInfo
31
+ Information about a target
32
32
  """ # noqa: E501
33
33
 
34
34
  name: Target = Field(description="Target name")
@@ -20,7 +20,7 @@ from typing_extensions import Self
20
20
 
21
21
  class TargetType(str, Enum):
22
22
  """
23
- TargetType
23
+ The type of the target
24
24
  """
25
25
 
26
26
  """
@@ -0,0 +1,75 @@
1
+ import asyncio
2
+ from pathlib import Path
3
+ import os
4
+ from crypticorn.hive import (
5
+ ApiClient,
6
+ Configuration,
7
+ ModelsApi,
8
+ DataApi,
9
+ StatusApi,
10
+ Configuration,
11
+ )
12
+ from crypticorn.hive.utils import download_file
13
+ import logging
14
+
15
+
16
+ class DataApiWrapper(DataApi):
17
+ """
18
+ A wrapper for the DataApi class.
19
+ """
20
+
21
+ async def download_data(self, folder: Path = "data", *args, **kwargs) -> list[Path]:
22
+ """
23
+ Download data for model training. All three files (y_train, x_test, x_train) are downloaded and saved under e.g. FOLDER/v1/coin_1/*.feather.
24
+ The folder will be created if it doesn't exist.
25
+
26
+ :param model_id: Model ID (required) (type: int)
27
+ :param version: Data version. Default is the latest public version. (optional) (type: DataVersion)
28
+ :param feature_size: The number of features in the data. Default is LARGE. (optional) (type: FeatureSize)
29
+ :return: A list of paths to the downloaded files.
30
+ """
31
+ response = await super().download_data(*args, **kwargs)
32
+ base_path = f"{folder}/v{response.version.value}/coin_{response.coin.value}/"
33
+ os.makedirs(base_path, exist_ok=True)
34
+
35
+ return await asyncio.gather(
36
+ *[
37
+ download_file(
38
+ url=response.links.y_train,
39
+ dest_path=base_path + "y_train_" + response.target + ".feather",
40
+ ),
41
+ download_file(
42
+ url=response.links.x_test,
43
+ dest_path=base_path
44
+ + "x_test_"
45
+ + response.feature_size
46
+ + ".feather",
47
+ ),
48
+ download_file(
49
+ url=response.links.x_train,
50
+ dest_path=base_path
51
+ + "x_train_"
52
+ + response.feature_size
53
+ + ".feather",
54
+ ),
55
+ ]
56
+ )
57
+
58
+
59
+ class HiveClient:
60
+ """
61
+ A client for interacting with the Crypticorn Hive API.
62
+ """
63
+
64
+ config_class = Configuration
65
+
66
+ def __init__(
67
+ self,
68
+ config: Configuration,
69
+ ):
70
+ self.config = config
71
+ self.base_client = ApiClient(configuration=self.config)
72
+ # Instantiate all the endpoint clients
73
+ self.models = ModelsApi(self.base_client)
74
+ self.data = DataApiWrapper(self.base_client)
75
+ self.status = StatusApi(self.base_client)
@@ -0,0 +1,67 @@
1
+ import requests
2
+ import os
3
+ import tqdm
4
+ import logging
5
+
6
+ logger = logging.getLogger(__name__)
7
+ logger.setLevel(logging.INFO)
8
+
9
+
10
+ async def download_file(
11
+ url: str, dest_path: str, show_progress_bars: bool = True
12
+ ) -> str:
13
+ """downloads a file and shows a progress bar. allow resuming a download"""
14
+ file_size = 0
15
+ req = requests.get(url, stream=True, timeout=600)
16
+ req.raise_for_status()
17
+
18
+ total_size = int(req.headers.get("content-length", 0))
19
+ temp_path = dest_path + ".temp"
20
+
21
+ if os.path.exists(dest_path):
22
+ logger.info(f" file already exists: {dest_path}")
23
+ file_size = os.stat(dest_path).st_size
24
+ if file_size == total_size:
25
+ return dest_path
26
+
27
+ if os.path.exists(temp_path):
28
+ file_size = os.stat(temp_path).st_size
29
+
30
+ if file_size < total_size:
31
+ # Download incomplete
32
+ logger.info(f" resuming download")
33
+ resume_header = {"Range": f"bytes={file_size}-"}
34
+ req = requests.get(
35
+ url,
36
+ headers=resume_header,
37
+ stream=True,
38
+ verify=False,
39
+ allow_redirects=True,
40
+ timeout=600,
41
+ )
42
+ else:
43
+ # Error, delete file and restart download
44
+ logger.error(f" deleting file {dest_path} and restarting")
45
+ os.remove(temp_path)
46
+ file_size = 0
47
+ else:
48
+ # File does not exist, starting download
49
+ logger.info(f" starting download")
50
+
51
+ # write dataset to file and show progress bar
52
+ pbar = tqdm.tqdm(
53
+ total=total_size,
54
+ unit="B",
55
+ unit_scale=True,
56
+ desc=dest_path,
57
+ disable=not show_progress_bars,
58
+ )
59
+ # Update progress bar to reflect how much of the file is already downloaded
60
+ pbar.update(file_size)
61
+ with open(temp_path, "ab") as dest_file:
62
+ for chunk in req.iter_content(1024):
63
+ dest_file.write(chunk)
64
+ pbar.update(1024)
65
+ # move temp file to target destination
66
+ os.replace(temp_path, dest_path)
67
+ return dest_path
@@ -10,6 +10,25 @@ from crypticorn.klines import (
10
10
  )
11
11
  from crypticorn.common import optional_import
12
12
 
13
+ class KlinesClient:
14
+ """
15
+ A client for interacting with the Crypticorn Klines API.
16
+ """
17
+
18
+ config_class = Configuration
19
+
20
+ def __init__(
21
+ self,
22
+ config: Configuration,
23
+ ):
24
+ self.config = config
25
+ self.base_client = ApiClient(configuration=self.config)
26
+ # Instantiate all the endpoint clients
27
+ self.funding = FundingRatesApiWrapper(self.base_client)
28
+ self.ohlcv = OHLCVDataApiWrapper(self.base_client)
29
+ self.symbols = SymbolsApiWrapper(self.base_client)
30
+ self.udf = UDFApi(self.base_client)
31
+ self.status = StatusApi(self.base_client)
13
32
 
14
33
  class FundingRatesApiWrapper(FundingRatesApi):
15
34
  """
@@ -21,11 +40,16 @@ class FundingRatesApiWrapper(FundingRatesApi):
21
40
  Get the funding rates in a pandas DataFrame.
22
41
  """
23
42
  pd = optional_import("pandas", "extra")
24
- response = await self.get_funding_rates_without_preload_content(*args, **kwargs)
25
- response.raise_for_status()
26
- json_data = await response.json()
27
- return pd.DataFrame(json_data)
28
-
43
+ response = await self.get_funding_rates(*args, **kwargs)
44
+ response = [
45
+ {
46
+ "timestamp": int(m.timestamp.timestamp()),
47
+ "symbol": m.symbol,
48
+ "funding_rate": m.funding_rate,
49
+ }
50
+ for m in response
51
+ ]
52
+ return pd.DataFrame(response)
29
53
 
30
54
  class OHLCVDataApiWrapper(OHLCVDataApi):
31
55
  """
@@ -37,19 +61,20 @@ class OHLCVDataApiWrapper(OHLCVDataApi):
37
61
  Get the OHLCV data in a pandas DataFrame.
38
62
  """
39
63
  pd = optional_import("pandas", "extra")
40
- response = await self.get_ohlcv_without_preload_content(*args, **kwargs)
41
- response.raise_for_status()
42
- json_data = await response.json()
43
- return pd.DataFrame(
64
+ response = await self.get_ohlcv(*args, **kwargs)
65
+ df = pd.DataFrame(
44
66
  {
45
- "timestamp": json_data["timestamp"],
46
- "open": json_data["open"],
47
- "high": json_data["high"],
48
- "low": json_data["low"],
49
- "close": json_data["close"],
50
- "volume": json_data["volume"],
67
+ "timestamp": [int(d.timestamp()) for d in response.timestamps],
68
+ "open": response.open,
69
+ "high": response.high,
70
+ "low": response.low,
71
+ "close": response.close,
72
+ "volume": response.volume,
51
73
  }
52
74
  )
75
+ df.sort_values(by="timestamp", ascending=False, inplace=True)
76
+ df.reset_index(drop=True, inplace=True)
77
+ return df
53
78
 
54
79
 
55
80
  class SymbolsApiWrapper(SymbolsApi):
@@ -62,30 +87,7 @@ class SymbolsApiWrapper(SymbolsApi):
62
87
  Get the symbols in a pandas DataFrame.
63
88
  """
64
89
  pd = optional_import("pandas", "extra")
65
- response = await self.get_klines_symbols_without_preload_content(
66
- *args, **kwargs
67
- )
68
- response.raise_for_status()
69
- json_data = await response.json()
70
- return pd.DataFrame(json_data["data"], columns=["symbol"])
90
+ response = await self.get_klines_symbols(*args, **kwargs)
91
+ return pd.DataFrame(response, columns=["symbol"])
71
92
 
72
93
 
73
- class KlinesClient:
74
- """
75
- A client for interacting with the Crypticorn Klines API.
76
- """
77
-
78
- config_class = Configuration
79
-
80
- def __init__(
81
- self,
82
- config: Configuration,
83
- ):
84
- self.config = config
85
- self.base_client = ApiClient(configuration=self.config)
86
- # Instantiate all the endpoint clients
87
- self.funding = FundingRatesApiWrapper(self.base_client)
88
- self.ohlcv = OHLCVDataApiWrapper(self.base_client)
89
- self.symbols = SymbolsApiWrapper(self.base_client)
90
- self.udf = UDFApi(self.base_client)
91
- self.status = StatusApi(self.base_client)
@@ -33,7 +33,7 @@ class MetricsClient:
33
33
  self.marketcap = MarketcapApiWrapper(self.base_client)
34
34
  self.markets = MarketsApi(self.base_client)
35
35
  self.tokens = TokensApiWrapper(self.base_client)
36
- self.exchanges = ExchangesApi(self.base_client)
36
+ self.exchanges = ExchangesApiWrapper(self.base_client)
37
37
 
38
38
 
39
39
  class MarketcapApiWrapper(MarketcapApi):
@@ -46,12 +46,8 @@ class MarketcapApiWrapper(MarketcapApi):
46
46
  Get the marketcap symbols in a pandas dataframe
47
47
  """
48
48
  pd = optional_import("pandas", "extra")
49
- response = await self.get_marketcap_symbols_without_preload_content(
50
- *args, **kwargs
51
- )
52
- response.raise_for_status()
53
- json_response = await response.json()
54
- df = pd.DataFrame(json_response["data"])
49
+ response = await self.get_marketcap_symbols(*args, **kwargs)
50
+ df = pd.DataFrame(response)
55
51
  df.rename(columns={df.columns[0]: "timestamp"}, inplace=True)
56
52
  return df
57
53
 
@@ -66,12 +62,8 @@ class TokensApiWrapper(TokensApi):
66
62
  Get the tokens in a pandas dataframe
67
63
  """
68
64
  pd = optional_import("pandas", "extra")
69
- response = await self.get_stable_and_wrapped_tokens_without_preload_content(
70
- *args, **kwargs
71
- )
72
- response.raise_for_status()
73
- json_data = await response.json()
74
- return pd.DataFrame(json_data)
65
+ response = await self.get_stable_and_wrapped_tokens(*args, **kwargs)
66
+ return pd.DataFrame(response)
75
67
 
76
68
 
77
69
  class ExchangesApiWrapper(ExchangesApi):
@@ -79,18 +71,14 @@ class ExchangesApiWrapper(ExchangesApi):
79
71
  A wrapper for the ExchangesApi class.
80
72
  """
81
73
 
82
- async def get_exchanges_fmt(self, *args, **kwargs) -> pd.DataFrame: # type: ignore
74
+ async def get_available_exchanges_fmt(self, *args, **kwargs) -> pd.DataFrame: # type: ignore
83
75
  """
84
76
  Get the exchanges in a pandas dataframe
85
77
  """
86
78
  pd = optional_import("pandas", "extra")
87
- response = await self.get_available_exchanges_without_preload_content(
88
- *args, **kwargs
89
- )
90
- response.raise_for_status()
91
- json_data = await response.json()
79
+ response = await self.get_available_exchanges(*args, **kwargs)
92
80
  processed_results = []
93
- for row in json_data:
81
+ for row in response:
94
82
  data = {"timestamp": row["timestamp"]}
95
83
  data.update(row["exchanges"])
96
84
  processed_results.append(data)
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crypticorn
3
- Version: 2.6.0
4
- Summary: Maximise Your Crypto Trading Profits with AI Predictions
3
+ Version: 2.7.1
4
+ Summary: Maximise Your Crypto Trading Profits with Machine Learning
5
5
  Author-email: Crypticorn <timon@crypticorn.com>
6
6
  Project-URL: Homepage, https://crypticorn.com
7
7
  Keywords: machine learning,data science,crypto,modelling
@@ -82,6 +82,7 @@ crypticorn/common/urls.py
82
82
  crypticorn/common/utils.py
83
83
  crypticorn/hive/__init__.py
84
84
  crypticorn/hive/main.py
85
+ crypticorn/hive/utils.py
85
86
  crypticorn/hive/client/__init__.py
86
87
  crypticorn/hive/client/api_client.py
87
88
  crypticorn/hive/client/api_response.py
@@ -1,10 +1,10 @@
1
1
  [project]
2
2
  name = "crypticorn"
3
- description = "Maximise Your Crypto Trading Profits with AI Predictions"
3
+ description = "Maximise Your Crypto Trading Profits with Machine Learning"
4
4
  readme = "README.md"
5
5
  requires-python = ">=3.10"
6
6
  authors = [{name = "Crypticorn", email = "timon@crypticorn.com"}]
7
- version = "2.6.0"
7
+ version = "2.7.1"
8
8
  keywords = ["machine learning", "data science", "crypto", "modelling"]
9
9
  dynamic = ["dependencies", "optional-dependencies"]
10
10
 
@@ -1,28 +0,0 @@
1
- from crypticorn.hive import (
2
- ApiClient,
3
- Configuration,
4
- ModelsApi,
5
- DataApi,
6
- StatusApi,
7
- Configuration,
8
- )
9
- from crypticorn.common import apikey_header as aph
10
-
11
-
12
- class HiveClient:
13
- """
14
- A client for interacting with the Crypticorn Hive API.
15
- """
16
-
17
- config_class = Configuration
18
-
19
- def __init__(
20
- self,
21
- config: Configuration,
22
- ):
23
- self.config = config
24
- self.base_client = ApiClient(configuration=self.config)
25
- # Instantiate all the endpoint clients
26
- self.models = ModelsApi(self.base_client)
27
- self.data = DataApi(self.base_client)
28
- self.status = StatusApi(self.base_client)
File without changes