crypticorn 2.4.7__tar.gz → 2.5.0rc2__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 (316) hide show
  1. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/PKG-INFO +1 -1
  2. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/cli/init.py +7 -4
  3. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/common/__init__.py +1 -0
  4. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/common/auth.py +7 -3
  5. crypticorn-2.5.0rc2/crypticorn/common/exceptions.py +27 -0
  6. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/common/utils.py +7 -2
  7. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/__init__.py +10 -3
  8. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/api/__init__.py +1 -0
  9. crypticorn-2.5.0rc2/crypticorn/klines/client/api/change_in_timeframe_api.py +331 -0
  10. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/api/funding_rates_api.py +13 -13
  11. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/api/health_check_api.py +8 -8
  12. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/api/ohlcv_data_api.py +38 -26
  13. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/api/symbols_api.py +26 -20
  14. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/api/udf_api.py +229 -229
  15. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/api_client.py +8 -5
  16. crypticorn-2.5.0rc2/crypticorn/klines/client/configuration.py +620 -0
  17. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/__init__.py +9 -3
  18. crypticorn-2.5.0rc2/crypticorn/klines/client/models/base_response_list_change_in_timeframe_response.py +123 -0
  19. crypticorn-2.5.0rc2/crypticorn/klines/client/models/change_in_timeframe_response.py +86 -0
  20. crypticorn-2.5.0rc2/crypticorn/klines/client/models/market_type.py +35 -0
  21. crypticorn-2.5.0rc2/crypticorn/klines/client/models/response_get_udf_history.py +198 -0
  22. crypticorn-2.5.0rc2/crypticorn/klines/client/rest.py +198 -0
  23. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/main.py +1 -0
  24. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/__init__.py +0 -3
  25. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/api/now_payments_api.py +1 -53
  26. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/__init__.py +0 -3
  27. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/payment.py +3 -3
  28. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/scope.py +6 -1
  29. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/__init__.py +8 -6
  30. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/api/__init__.py +0 -1
  31. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/api/api_keys_api.py +167 -273
  32. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/api/bots_api.py +140 -226
  33. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/api/exchanges_api.py +31 -51
  34. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/api/futures_trading_panel_api.py +169 -272
  35. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/api/notifications_api.py +200 -323
  36. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/api/orders_api.py +40 -60
  37. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/api/status_api.py +31 -49
  38. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/api/strategies_api.py +137 -223
  39. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/api/trading_actions_api.py +106 -170
  40. crypticorn-2.5.0rc2/crypticorn/trade/client/api_client.py +758 -0
  41. crypticorn-2.5.0rc2/crypticorn/trade/client/api_response.py +20 -0
  42. crypticorn-2.5.0rc2/crypticorn/trade/client/configuration.py +620 -0
  43. crypticorn-2.5.0rc2/crypticorn/trade/client/exceptions.py +220 -0
  44. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/__init__.py +8 -6
  45. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/action_model.py +108 -54
  46. crypticorn-2.5.0rc2/crypticorn/trade/client/models/api_error_identifier.py +104 -0
  47. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/api_error_level.py +9 -11
  48. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/api_error_type.py +9 -11
  49. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/bot_model.py +57 -36
  50. crypticorn-2.5.0rc2/crypticorn/trade/client/models/bot_status.py +37 -0
  51. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/exchange.py +7 -9
  52. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/exchange_key_model.py +43 -32
  53. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/execution_ids.py +18 -18
  54. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/futures_balance.py +43 -27
  55. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/futures_trading_action.py +102 -50
  56. crypticorn-2.5.0rc2/crypticorn/trade/client/models/http_validation_error.py +99 -0
  57. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/margin_mode.py +7 -9
  58. crypticorn-2.5.0rc2/crypticorn/trade/client/models/market_type.py +35 -0
  59. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/notification_model.py +52 -32
  60. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/order_model.py +112 -72
  61. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/order_status.py +10 -12
  62. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/post_futures_action.py +20 -16
  63. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/strategy_exchange_info.py +15 -16
  64. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/strategy_model_input.py +61 -33
  65. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/strategy_model_output.py +61 -33
  66. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/tpsl.py +39 -25
  67. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/trading_action_type.py +9 -11
  68. crypticorn-2.5.0rc2/crypticorn/trade/client/models/validation_error.py +105 -0
  69. crypticorn-2.5.0rc2/crypticorn/trade/client/models/validation_error_loc_inner.py +159 -0
  70. crypticorn-2.5.0rc2/crypticorn/trade/client/rest.py +198 -0
  71. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn.egg-info/PKG-INFO +1 -1
  72. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn.egg-info/SOURCES.txt +6 -0
  73. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/pyproject.toml +6 -6
  74. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/tests/test_config.py +7 -6
  75. crypticorn-2.4.7/crypticorn/klines/client/configuration.py +0 -577
  76. crypticorn-2.4.7/crypticorn/klines/client/rest.py +0 -246
  77. crypticorn-2.4.7/crypticorn/trade/client/api_client.py +0 -800
  78. crypticorn-2.4.7/crypticorn/trade/client/api_response.py +0 -21
  79. crypticorn-2.4.7/crypticorn/trade/client/configuration.py +0 -607
  80. crypticorn-2.4.7/crypticorn/trade/client/exceptions.py +0 -216
  81. crypticorn-2.4.7/crypticorn/trade/client/models/api_error_identifier.py +0 -100
  82. crypticorn-2.4.7/crypticorn/trade/client/models/bot_status.py +0 -39
  83. crypticorn-2.4.7/crypticorn/trade/client/models/http_validation_error.py +0 -95
  84. crypticorn-2.4.7/crypticorn/trade/client/models/market_type.py +0 -37
  85. crypticorn-2.4.7/crypticorn/trade/client/models/validation_error.py +0 -99
  86. crypticorn-2.4.7/crypticorn/trade/client/models/validation_error_loc_inner.py +0 -138
  87. crypticorn-2.4.7/crypticorn/trade/client/rest.py +0 -213
  88. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/README.md +0 -0
  89. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/__init__.py +0 -0
  90. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/__init__.py +0 -0
  91. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/__init__.py +0 -0
  92. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/api/__init__.py +0 -0
  93. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/api/admin_api.py +0 -0
  94. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/api/auth_api.py +0 -0
  95. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/api/service_api.py +0 -0
  96. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/api/user_api.py +0 -0
  97. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/api/wallet_api.py +0 -0
  98. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/api_client.py +0 -0
  99. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/api_response.py +0 -0
  100. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/configuration.py +0 -0
  101. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/exceptions.py +0 -0
  102. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/__init__.py +0 -0
  103. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/add_wallet200_response.py +0 -0
  104. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/add_wallet_request.py +0 -0
  105. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/authorize_user200_response.py +0 -0
  106. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/authorize_user200_response_auth.py +0 -0
  107. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/authorize_user_request.py +0 -0
  108. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/create_api_key200_response.py +0 -0
  109. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/create_api_key_request.py +0 -0
  110. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/create_user_request.py +0 -0
  111. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/get_api_keys200_response_inner.py +0 -0
  112. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/list_wallets200_response.py +0 -0
  113. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +0 -0
  114. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +0 -0
  115. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +0 -0
  116. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +0 -0
  117. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/list_wallets200_response_data_inner.py +0 -0
  118. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/list_wallets200_response_user_value.py +0 -0
  119. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/logout_default_response.py +0 -0
  120. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/logout_default_response_issues_inner.py +0 -0
  121. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/oauth_callback200_response.py +0 -0
  122. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/oauth_callback200_response_user.py +0 -0
  123. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/refresh_token_info200_response.py +0 -0
  124. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +0 -0
  125. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/resend_verification_email_request.py +0 -0
  126. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/revoke_user_tokens_request.py +0 -0
  127. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/rotate_tokens200_response.py +0 -0
  128. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/token_info200_response.py +0 -0
  129. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/unlink_wallet_request.py +0 -0
  130. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/update_user_request.py +0 -0
  131. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/user_reset_password_request.py +0 -0
  132. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/user_set_password_request.py +0 -0
  133. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/verify200_response.py +0 -0
  134. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/verify_email200_response.py +0 -0
  135. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/verify_email200_response_auth.py +0 -0
  136. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/verify_email200_response_auth_auth.py +0 -0
  137. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/verify_email_request.py +0 -0
  138. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/verify_wallet_request.py +0 -0
  139. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/wallet_verified200_response.py +0 -0
  140. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/models/whoami200_response.py +0 -0
  141. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/py.typed +0 -0
  142. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/client/rest.py +0 -0
  143. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/auth/main.py +0 -0
  144. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/cli/__init__.py +0 -0
  145. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/cli/__main__.py +0 -0
  146. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/cli/templates/__init__.py +0 -0
  147. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/cli/templates/auth.py +0 -0
  148. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/client.py +0 -0
  149. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/common/enums.py +0 -0
  150. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/common/errors.py +0 -0
  151. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/common/pydantic.py +0 -0
  152. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/common/scopes.py +0 -0
  153. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/common/sorter.py +0 -0
  154. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/common/urls.py +0 -0
  155. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/__init__.py +0 -0
  156. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/__init__.py +0 -0
  157. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/api/__init__.py +0 -0
  158. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/api/data_api.py +0 -0
  159. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/api/models_api.py +0 -0
  160. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/api/status_api.py +0 -0
  161. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/api_client.py +0 -0
  162. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/api_response.py +0 -0
  163. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/configuration.py +0 -0
  164. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/exceptions.py +0 -0
  165. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/__init__.py +0 -0
  166. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/coins.py +0 -0
  167. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/data_download_response.py +0 -0
  168. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/data_info.py +0 -0
  169. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/data_value_value_value_inner.py +0 -0
  170. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/data_version.py +0 -0
  171. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/download_links.py +0 -0
  172. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/evaluation.py +0 -0
  173. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/evaluation_response.py +0 -0
  174. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/feature_size.py +0 -0
  175. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/http_validation_error.py +0 -0
  176. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/model.py +0 -0
  177. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/model_create.py +0 -0
  178. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/model_status.py +0 -0
  179. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/model_update.py +0 -0
  180. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/target.py +0 -0
  181. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/target_type.py +0 -0
  182. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/validation_error.py +0 -0
  183. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/models/validation_error_loc_inner.py +0 -0
  184. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/py.typed +0 -0
  185. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/client/rest.py +0 -0
  186. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/hive/main.py +0 -0
  187. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/__init__.py +0 -0
  188. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/api_response.py +0 -0
  189. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/exceptions.py +0 -0
  190. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/base_response_health_check_response.py +0 -0
  191. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/base_response_list_funding_rate_response.py +0 -0
  192. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/base_response_list_str.py +0 -0
  193. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/base_response_ohlcv_response.py +0 -0
  194. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/error_response.py +0 -0
  195. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/exchange.py +0 -0
  196. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/funding_rate_response.py +0 -0
  197. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/health_check_response.py +0 -0
  198. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/history_error_response.py +0 -0
  199. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/history_no_data_response.py +0 -0
  200. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/history_success_response.py +0 -0
  201. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/http_validation_error.py +0 -0
  202. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/market.py +0 -0
  203. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/ohlcv_response.py +0 -0
  204. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/resolution.py +0 -0
  205. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/response_get_history_udf_history_get.py +0 -0
  206. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/search_symbol_response.py +0 -0
  207. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/sort_direction.py +0 -0
  208. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/symbol_group_response.py +0 -0
  209. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/symbol_info_response.py +0 -0
  210. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/symbol_type.py +0 -0
  211. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/timeframe.py +0 -0
  212. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/udf_config_response.py +0 -0
  213. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/validation_error.py +0 -0
  214. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/models/validation_error_loc_inner.py +0 -0
  215. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/client/py.typed +0 -0
  216. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/klines/main.py +0 -0
  217. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/__init__.py +0 -0
  218. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/__init__.py +0 -0
  219. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/api/__init__.py +0 -0
  220. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/api/exchanges_api.py +0 -0
  221. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/api/health_check_api.py +0 -0
  222. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/api/indicators_api.py +0 -0
  223. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/api/logs_api.py +0 -0
  224. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/api/marketcap_api.py +0 -0
  225. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/api/markets_api.py +0 -0
  226. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/api/tokens_api.py +0 -0
  227. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/api_client.py +0 -0
  228. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/api_response.py +0 -0
  229. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/configuration.py +0 -0
  230. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/exceptions.py +0 -0
  231. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/__init__.py +0 -0
  232. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/base_response_dict.py +0 -0
  233. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/base_response_health_check_response.py +0 -0
  234. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/base_response_list_dict.py +0 -0
  235. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/base_response_list_exchange_mapping.py +0 -0
  236. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/base_response_list_str.py +0 -0
  237. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/error_response.py +0 -0
  238. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/exchange_mapping.py +0 -0
  239. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/health_check_response.py +0 -0
  240. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/http_validation_error.py +0 -0
  241. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/market.py +0 -0
  242. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/market_type.py +0 -0
  243. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/severity.py +0 -0
  244. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/time_interval.py +0 -0
  245. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/trading_status.py +0 -0
  246. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/validation_error.py +0 -0
  247. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/models/validation_error_loc_inner.py +0 -0
  248. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/py.typed +0 -0
  249. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/metrics/client/rest.py +0 -0
  250. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/__init__.py +0 -0
  251. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/api/__init__.py +0 -0
  252. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/api/payments_api.py +0 -0
  253. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/api/products_api.py +0 -0
  254. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/api/status_api.py +0 -0
  255. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/api_client.py +0 -0
  256. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/api_response.py +0 -0
  257. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/configuration.py +0 -0
  258. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/exceptions.py +0 -0
  259. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/api_status_res.py +0 -0
  260. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/body_create_now_invoice.py +0 -0
  261. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/body_create_product.py +0 -0
  262. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/body_get_products.py +0 -0
  263. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/body_handle_now_webhook.py +0 -0
  264. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/body_update_product.py +0 -0
  265. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/combined_payment_history.py +0 -0
  266. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/create_invoice_req.py +0 -0
  267. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/create_invoice_res.py +0 -0
  268. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/currency.py +0 -0
  269. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/estimate_price_req.py +0 -0
  270. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/estimate_price_res.py +0 -0
  271. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/get_currencies_res.py +0 -0
  272. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/get_payment_status_res.py +0 -0
  273. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/get_payments_list_res.py +0 -0
  274. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/http_validation_error.py +0 -0
  275. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/min_amount_req.py +0 -0
  276. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/min_amount_res.py +0 -0
  277. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/now_api_status_res.py +0 -0
  278. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/now_create_invoice_req.py +0 -0
  279. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/now_create_invoice_res.py +0 -0
  280. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/now_fee_structure.py +0 -0
  281. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/now_payment_model.py +0 -0
  282. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/now_payment_status.py +0 -0
  283. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/now_webhook_payload.py +0 -0
  284. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/partial_product_update_model.py +0 -0
  285. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/payment_status.py +0 -0
  286. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/product.py +0 -0
  287. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/product_create.py +0 -0
  288. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/product_model.py +0 -0
  289. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/product_read.py +0 -0
  290. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/product_sub_read.py +0 -0
  291. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/product_subs_model.py +0 -0
  292. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/product_update.py +0 -0
  293. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/product_update_model.py +0 -0
  294. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/services.py +0 -0
  295. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/unified_payment_model.py +0 -0
  296. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/validation_error.py +0 -0
  297. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/models/validation_error_loc_inner.py +0 -0
  298. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/py.typed +0 -0
  299. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/client/rest.py +0 -0
  300. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/pay/main.py +0 -0
  301. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/__init__.py +0 -0
  302. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/models/api_key_model.py +0 -0
  303. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/client/py.typed +0 -0
  304. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn/trade/main.py +0 -0
  305. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn.egg-info/dependency_links.txt +0 -0
  306. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn.egg-info/entry_points.txt +0 -0
  307. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn.egg-info/requires.txt +0 -0
  308. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/crypticorn.egg-info/top_level.txt +0 -0
  309. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/requirements/dev.txt +0 -0
  310. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/requirements/extra.txt +0 -0
  311. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/requirements/main.txt +0 -0
  312. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/requirements/test.txt +0 -0
  313. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/setup.cfg +0 -0
  314. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/tests/test_auth_client.py +0 -0
  315. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/tests/test_enums.py +0 -0
  316. {crypticorn-2.4.7 → crypticorn-2.5.0rc2}/tests/test_errors.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crypticorn
3
- Version: 2.4.7
3
+ Version: 2.5.0rc2
4
4
  Summary: Maximise Your Crypto Trading Profits with AI Predictions
5
5
  Author-email: Crypticorn <timon@crypticorn.com>
6
6
  Project-URL: Homepage, https://crypticorn.com
@@ -57,7 +57,10 @@ def init_ruff(force):
57
57
  def init_docker(output, force):
58
58
  """Add Dockerfile"""
59
59
  root = get_git_root()
60
- target = Path(output) if output else root / "Dockerfile"
60
+ if output and Path(output).is_file():
61
+ click.secho("Output path is a file, please provide a directory path", fg="red")
62
+ return
63
+ target = (Path(output) if output else root) / "Dockerfile"
61
64
  if target.exists() and not force:
62
65
  click.secho("File already exists, use --force / -f to overwrite", fg="red")
63
66
  return
@@ -73,10 +76,10 @@ def init_docker(output, force):
73
76
  def init_auth(output, force):
74
77
  """Add auth.py with auth handler. Everything you need to start using the auth service."""
75
78
  root = get_git_root()
76
- if Path(output).is_dir():
77
- click.secho("Output path is a directory, please provide a file path", fg="red")
79
+ if output and Path(output).is_file():
80
+ click.secho("Output path is a file, please provide a directory path", fg="red")
78
81
  return
79
- target = Path(output) if output else root / "src/auth.py"
82
+ target = (Path(output) if output else root) / "auth.py"
80
83
  if target.exists() and not force:
81
84
  click.secho("File already exists, use --force / -f to overwrite", fg="red")
82
85
  return
@@ -5,3 +5,4 @@ from crypticorn.common.pydantic import *
5
5
  from crypticorn.common.auth import *
6
6
  from crypticorn.common.enums import *
7
7
  from crypticorn.common.utils import *
8
+ from crypticorn.common.exceptions import *
@@ -211,7 +211,11 @@ class AuthHandler:
211
211
  if bearer
212
212
  else None
213
213
  )
214
- response = await self.combined_auth(bearer=credentials, api_key=api_key, sec=sec)
214
+ response = await self.combined_auth(
215
+ bearer=credentials, api_key=api_key, sec=sec
216
+ )
215
217
  if isinstance(response, HTTPException):
216
- raise WebSocketException(code=status.WS_1008_POLICY_VIOLATION, reason=response.detail)
217
- return response
218
+ raise WebSocketException(
219
+ code=status.WS_1008_POLICY_VIOLATION, reason=response.detail
220
+ )
221
+ return response
@@ -0,0 +1,27 @@
1
+ from typing import Optional, Dict
2
+ from pydantic import BaseModel, Field
3
+ from fastapi import HTTPException as FastAPIHTTPException
4
+ from crypticorn.common import ApiError
5
+
6
+
7
+ class ExceptionDetail(BaseModel):
8
+ message: Optional[str] = Field(None, description="An additional error message")
9
+ error: ApiError = Field(..., description="The unique error code")
10
+
11
+
12
+ class HTTPException(FastAPIHTTPException):
13
+ """A custom HTTP exception wrapper around FastAPI's HTTPException.
14
+ It allows for a more structured way to handle errors, with a message and an error code. The status code is being derived from the detail's error.
15
+ The ApiError class is the source of truth for everything. If the error is not yet implemented, there are fallbacks to avoid errors while testing.
16
+ """
17
+
18
+ def __init__(
19
+ self,
20
+ detail: ExceptionDetail,
21
+ headers: Optional[Dict[str, str]] = None,
22
+ ):
23
+ super().__init__(
24
+ status_code=detail.error.status_code,
25
+ detail=detail.model_dump(),
26
+ headers=headers,
27
+ )
@@ -5,6 +5,7 @@ import random
5
5
 
6
6
  from fastapi import HTTPException
7
7
  from fastapi import status
8
+ from typing_extensions import deprecated
8
9
 
9
10
  from crypticorn.common import ApiError
10
11
 
@@ -13,7 +14,8 @@ def throw_if_none(value: Any, message: Union[ApiError, str]) -> None:
13
14
  """Throws an FastAPI HTTPException if the value is None."""
14
15
  if value is None:
15
16
  raise HTTPException(
16
- status_code=status.HTTP_404_NOT_FOUND, detail=message.identifier if isinstance(message, ApiError) else message
17
+ status_code=status.HTTP_404_NOT_FOUND,
18
+ detail=message.identifier if isinstance(message, ApiError) else message,
17
19
  )
18
20
 
19
21
 
@@ -21,7 +23,8 @@ def throw_if_falsy(value: Any, message: Union[ApiError, str]) -> None:
21
23
  """Throws an FastAPI HTTPException if the value is False."""
22
24
  if not value:
23
25
  raise HTTPException(
24
- status_code=status.HTTP_400_BAD_REQUEST, detail=message.identifier if isinstance(message, ApiError) else message
26
+ status_code=status.HTTP_400_BAD_REQUEST,
27
+ detail=message.identifier if isinstance(message, ApiError) else message,
25
28
  )
26
29
 
27
30
 
@@ -32,6 +35,7 @@ def gen_random_id(length: int = 20) -> str:
32
35
  return "".join(random.choice(charset) for _ in range(length))
33
36
 
34
37
 
38
+ @deprecated(reason="Use math.isclose instead. Will be removed in a future version.")
35
39
  def is_equal(
36
40
  a: float | Decimal,
37
41
  b: float | Decimal,
@@ -51,6 +55,7 @@ def is_equal(
51
55
  Decimal(str(rel_tol)) * max(abs(a), abs(b)), Decimal(str(abs_tol))
52
56
  )
53
57
 
58
+
54
59
  def optional_import(module_name: str, extra_name: str):
55
60
  try:
56
61
  return __import__(module_name)
@@ -17,6 +17,7 @@ Do not edit the class manually.
17
17
  __version__ = "1.0.0"
18
18
 
19
19
  # import apis into sdk package
20
+ from crypticorn.klines.client.api.change_in_timeframe_api import ChangeInTimeframeApi
20
21
  from crypticorn.klines.client.api.funding_rates_api import FundingRatesApi
21
22
  from crypticorn.klines.client.api.health_check_api import HealthCheckApi
22
23
  from crypticorn.klines.client.api.ohlcv_data_api import OHLCVDataApi
@@ -38,6 +39,9 @@ from crypticorn.klines.client.exceptions import ApiException
38
39
  from crypticorn.klines.client.models.base_response_health_check_response import (
39
40
  BaseResponseHealthCheckResponse,
40
41
  )
42
+ from crypticorn.klines.client.models.base_response_list_change_in_timeframe_response import (
43
+ BaseResponseListChangeInTimeframeResponse,
44
+ )
41
45
  from crypticorn.klines.client.models.base_response_list_funding_rate_response import (
42
46
  BaseResponseListFundingRateResponse,
43
47
  )
@@ -45,6 +49,9 @@ from crypticorn.klines.client.models.base_response_list_str import BaseResponseL
45
49
  from crypticorn.klines.client.models.base_response_ohlcv_response import (
46
50
  BaseResponseOHLCVResponse,
47
51
  )
52
+ from crypticorn.klines.client.models.change_in_timeframe_response import (
53
+ ChangeInTimeframeResponse,
54
+ )
48
55
  from crypticorn.klines.client.models.error_response import ErrorResponse
49
56
  from crypticorn.klines.client.models.exchange import Exchange
50
57
  from crypticorn.klines.client.models.funding_rate_response import FundingRateResponse
@@ -57,11 +64,11 @@ from crypticorn.klines.client.models.history_no_data_response import (
57
64
  from crypticorn.klines.client.models.history_success_response import (
58
65
  HistorySuccessResponse,
59
66
  )
60
- from crypticorn.klines.client.models.market import Market
67
+ from crypticorn.klines.client.models.market_type import MarketType
61
68
  from crypticorn.klines.client.models.ohlcv_response import OHLCVResponse
62
69
  from crypticorn.klines.client.models.resolution import Resolution
63
- from crypticorn.klines.client.models.response_get_history_udf_history_get import (
64
- ResponseGetHistoryUdfHistoryGet,
70
+ from crypticorn.klines.client.models.response_get_udf_history import (
71
+ ResponseGetUdfHistory,
65
72
  )
66
73
  from crypticorn.klines.client.models.search_symbol_response import SearchSymbolResponse
67
74
  from crypticorn.klines.client.models.sort_direction import SortDirection
@@ -1,6 +1,7 @@
1
1
  # flake8: noqa
2
2
 
3
3
  # import apis into api package
4
+ from crypticorn.klines.client.api.change_in_timeframe_api import ChangeInTimeframeApi
4
5
  from crypticorn.klines.client.api.funding_rates_api import FundingRatesApi
5
6
  from crypticorn.klines.client.api.health_check_api import HealthCheckApi
6
7
  from crypticorn.klines.client.api.ohlcv_data_api import OHLCVDataApi
@@ -0,0 +1,331 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Klines Service API
5
+
6
+ API for retrieving OHLCV data, funding rates, and symbol information from Binance. ## WebSocket Support Connect to `/ws` to receive real-time OHLCV updates. Example subscription message: ```json { \"action\": \"subscribe\", \"market\": \"spot\", \"symbol\": \"BTCUSDT\", \"timeframe\": \"15m\" } ```
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from crypticorn.klines.client.models.base_response_list_change_in_timeframe_response import (
23
+ BaseResponseListChangeInTimeframeResponse,
24
+ )
25
+ from crypticorn.klines.client.models.market_type import MarketType
26
+ from crypticorn.klines.client.models.timeframe import Timeframe
27
+
28
+ from crypticorn.klines.client.api_client import ApiClient, RequestSerialized
29
+ from crypticorn.klines.client.api_response import ApiResponse
30
+ from crypticorn.klines.client.rest import RESTResponseType
31
+
32
+
33
+ class ChangeInTimeframeApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+ @validate_call
46
+ async def get_change_in_timeframe(
47
+ self,
48
+ market: Annotated[
49
+ Optional[MarketType], Field(description="Market type: 'spot' or 'futures'")
50
+ ] = None,
51
+ timeframe: Annotated[
52
+ Optional[Timeframe],
53
+ Field(description="Timeframe: '15m', '30m', '1h', '4h', '1d'"),
54
+ ] = None,
55
+ _request_timeout: Union[
56
+ None,
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Tuple[
59
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
60
+ ],
61
+ ] = None,
62
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
63
+ _content_type: Optional[StrictStr] = None,
64
+ _headers: Optional[Dict[StrictStr, Any]] = None,
65
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
66
+ ) -> BaseResponseListChangeInTimeframeResponse:
67
+ """Get Change In Timeframe
68
+
69
+ Retrieve price change percentage between last two completed timestamps for all pairs. Valid markets: spot, futures Valid timeframes: 15m, 30m, 1h, 4h, 1d
70
+
71
+ :param market: Market type: 'spot' or 'futures'
72
+ :type market: MarketType
73
+ :param timeframe: Timeframe: '15m', '30m', '1h', '4h', '1d'
74
+ :type timeframe: Timeframe
75
+ :param _request_timeout: timeout setting for this request. If one
76
+ number provided, it will be total request
77
+ timeout. It can also be a pair (tuple) of
78
+ (connection, read) timeouts.
79
+ :type _request_timeout: int, tuple(int, int), optional
80
+ :param _request_auth: set to override the auth_settings for an a single
81
+ request; this effectively ignores the
82
+ authentication in the spec for a single request.
83
+ :type _request_auth: dict, optional
84
+ :param _content_type: force content-type for the request.
85
+ :type _content_type: str, Optional
86
+ :param _headers: set to override the headers for a single
87
+ request; this effectively ignores the headers
88
+ in the spec for a single request.
89
+ :type _headers: dict, optional
90
+ :param _host_index: set to override the host_index for a single
91
+ request; this effectively ignores the host_index
92
+ in the spec for a single request.
93
+ :type _host_index: int, optional
94
+ :return: Returns the result object.
95
+ """ # noqa: E501
96
+
97
+ _param = self._get_change_in_timeframe_serialize(
98
+ market=market,
99
+ timeframe=timeframe,
100
+ _request_auth=_request_auth,
101
+ _content_type=_content_type,
102
+ _headers=_headers,
103
+ _host_index=_host_index,
104
+ )
105
+
106
+ _response_types_map: Dict[str, Optional[str]] = {
107
+ "200": "BaseResponseListChangeInTimeframeResponse",
108
+ "400": "ErrorResponse",
109
+ "404": "ErrorResponse",
110
+ "500": "ErrorResponse",
111
+ "422": "HTTPValidationError",
112
+ }
113
+ response_data = await self.api_client.call_api(
114
+ *_param, _request_timeout=_request_timeout
115
+ )
116
+ await response_data.read()
117
+ return self.api_client.response_deserialize(
118
+ response_data=response_data,
119
+ response_types_map=_response_types_map,
120
+ ).data
121
+
122
+ @validate_call
123
+ async def get_change_in_timeframe_with_http_info(
124
+ self,
125
+ market: Annotated[
126
+ Optional[MarketType], Field(description="Market type: 'spot' or 'futures'")
127
+ ] = None,
128
+ timeframe: Annotated[
129
+ Optional[Timeframe],
130
+ Field(description="Timeframe: '15m', '30m', '1h', '4h', '1d'"),
131
+ ] = None,
132
+ _request_timeout: Union[
133
+ None,
134
+ Annotated[StrictFloat, Field(gt=0)],
135
+ Tuple[
136
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
137
+ ],
138
+ ] = None,
139
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
140
+ _content_type: Optional[StrictStr] = None,
141
+ _headers: Optional[Dict[StrictStr, Any]] = None,
142
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
143
+ ) -> ApiResponse[BaseResponseListChangeInTimeframeResponse]:
144
+ """Get Change In Timeframe
145
+
146
+ Retrieve price change percentage between last two completed timestamps for all pairs. Valid markets: spot, futures Valid timeframes: 15m, 30m, 1h, 4h, 1d
147
+
148
+ :param market: Market type: 'spot' or 'futures'
149
+ :type market: MarketType
150
+ :param timeframe: Timeframe: '15m', '30m', '1h', '4h', '1d'
151
+ :type timeframe: Timeframe
152
+ :param _request_timeout: timeout setting for this request. If one
153
+ number provided, it will be total request
154
+ timeout. It can also be a pair (tuple) of
155
+ (connection, read) timeouts.
156
+ :type _request_timeout: int, tuple(int, int), optional
157
+ :param _request_auth: set to override the auth_settings for an a single
158
+ request; this effectively ignores the
159
+ authentication in the spec for a single request.
160
+ :type _request_auth: dict, optional
161
+ :param _content_type: force content-type for the request.
162
+ :type _content_type: str, Optional
163
+ :param _headers: set to override the headers for a single
164
+ request; this effectively ignores the headers
165
+ in the spec for a single request.
166
+ :type _headers: dict, optional
167
+ :param _host_index: set to override the host_index for a single
168
+ request; this effectively ignores the host_index
169
+ in the spec for a single request.
170
+ :type _host_index: int, optional
171
+ :return: Returns the result object.
172
+ """ # noqa: E501
173
+
174
+ _param = self._get_change_in_timeframe_serialize(
175
+ market=market,
176
+ timeframe=timeframe,
177
+ _request_auth=_request_auth,
178
+ _content_type=_content_type,
179
+ _headers=_headers,
180
+ _host_index=_host_index,
181
+ )
182
+
183
+ _response_types_map: Dict[str, Optional[str]] = {
184
+ "200": "BaseResponseListChangeInTimeframeResponse",
185
+ "400": "ErrorResponse",
186
+ "404": "ErrorResponse",
187
+ "500": "ErrorResponse",
188
+ "422": "HTTPValidationError",
189
+ }
190
+ response_data = await self.api_client.call_api(
191
+ *_param, _request_timeout=_request_timeout
192
+ )
193
+ await response_data.read()
194
+ return self.api_client.response_deserialize(
195
+ response_data=response_data,
196
+ response_types_map=_response_types_map,
197
+ )
198
+
199
+ @validate_call
200
+ async def get_change_in_timeframe_without_preload_content(
201
+ self,
202
+ market: Annotated[
203
+ Optional[MarketType], Field(description="Market type: 'spot' or 'futures'")
204
+ ] = None,
205
+ timeframe: Annotated[
206
+ Optional[Timeframe],
207
+ Field(description="Timeframe: '15m', '30m', '1h', '4h', '1d'"),
208
+ ] = None,
209
+ _request_timeout: Union[
210
+ None,
211
+ Annotated[StrictFloat, Field(gt=0)],
212
+ Tuple[
213
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
214
+ ],
215
+ ] = None,
216
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
217
+ _content_type: Optional[StrictStr] = None,
218
+ _headers: Optional[Dict[StrictStr, Any]] = None,
219
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
220
+ ) -> RESTResponseType:
221
+ """Get Change In Timeframe
222
+
223
+ Retrieve price change percentage between last two completed timestamps for all pairs. Valid markets: spot, futures Valid timeframes: 15m, 30m, 1h, 4h, 1d
224
+
225
+ :param market: Market type: 'spot' or 'futures'
226
+ :type market: MarketType
227
+ :param timeframe: Timeframe: '15m', '30m', '1h', '4h', '1d'
228
+ :type timeframe: Timeframe
229
+ :param _request_timeout: timeout setting for this request. If one
230
+ number provided, it will be total request
231
+ timeout. It can also be a pair (tuple) of
232
+ (connection, read) timeouts.
233
+ :type _request_timeout: int, tuple(int, int), optional
234
+ :param _request_auth: set to override the auth_settings for an a single
235
+ request; this effectively ignores the
236
+ authentication in the spec for a single request.
237
+ :type _request_auth: dict, optional
238
+ :param _content_type: force content-type for the request.
239
+ :type _content_type: str, Optional
240
+ :param _headers: set to override the headers for a single
241
+ request; this effectively ignores the headers
242
+ in the spec for a single request.
243
+ :type _headers: dict, optional
244
+ :param _host_index: set to override the host_index for a single
245
+ request; this effectively ignores the host_index
246
+ in the spec for a single request.
247
+ :type _host_index: int, optional
248
+ :return: Returns the result object.
249
+ """ # noqa: E501
250
+
251
+ _param = self._get_change_in_timeframe_serialize(
252
+ market=market,
253
+ timeframe=timeframe,
254
+ _request_auth=_request_auth,
255
+ _content_type=_content_type,
256
+ _headers=_headers,
257
+ _host_index=_host_index,
258
+ )
259
+
260
+ _response_types_map: Dict[str, Optional[str]] = {
261
+ "200": "BaseResponseListChangeInTimeframeResponse",
262
+ "400": "ErrorResponse",
263
+ "404": "ErrorResponse",
264
+ "500": "ErrorResponse",
265
+ "422": "HTTPValidationError",
266
+ }
267
+ response_data = await self.api_client.call_api(
268
+ *_param, _request_timeout=_request_timeout
269
+ )
270
+ return response_data.response
271
+
272
+ def _get_change_in_timeframe_serialize(
273
+ self,
274
+ market,
275
+ timeframe,
276
+ _request_auth,
277
+ _content_type,
278
+ _headers,
279
+ _host_index,
280
+ ) -> RequestSerialized:
281
+
282
+ _host = None
283
+
284
+ _collection_formats: Dict[str, str] = {}
285
+
286
+ _path_params: Dict[str, str] = {}
287
+ _query_params: List[Tuple[str, str]] = []
288
+ _header_params: Dict[str, Optional[str]] = _headers or {}
289
+ _form_params: List[Tuple[str, str]] = []
290
+ _files: Dict[
291
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
292
+ ] = {}
293
+ _body_params: Optional[bytes] = None
294
+
295
+ # process the path parameters
296
+ # process the query parameters
297
+ if market is not None:
298
+
299
+ _query_params.append(("market", market.value))
300
+
301
+ if timeframe is not None:
302
+
303
+ _query_params.append(("timeframe", timeframe.value))
304
+
305
+ # process the header parameters
306
+ # process the form parameters
307
+ # process the body parameter
308
+
309
+ # set the HTTP header `Accept`
310
+ if "Accept" not in _header_params:
311
+ _header_params["Accept"] = self.api_client.select_header_accept(
312
+ ["application/json"]
313
+ )
314
+
315
+ # authentication setting
316
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
317
+
318
+ return self.api_client.param_serialize(
319
+ method="GET",
320
+ resource_path="/change",
321
+ path_params=_path_params,
322
+ query_params=_query_params,
323
+ header_params=_header_params,
324
+ body=_body_params,
325
+ post_params=_form_params,
326
+ files=_files,
327
+ auth_settings=_auth_settings,
328
+ collection_formats=_collection_formats,
329
+ _host=_host,
330
+ _request_auth=_request_auth,
331
+ )
@@ -41,7 +41,7 @@ class FundingRatesApi:
41
41
  self.api_client = api_client
42
42
 
43
43
  @validate_call
44
- def funding_rate_funding_rates_symbol_get(
44
+ async def get_funding_rates(
45
45
  self,
46
46
  symbol: Annotated[
47
47
  StrictStr, Field(description="Trading pair symbol (e.g., BTCUSDT)")
@@ -102,7 +102,7 @@ class FundingRatesApi:
102
102
  :return: Returns the result object.
103
103
  """ # noqa: E501
104
104
 
105
- _param = self._funding_rate_funding_rates_symbol_get_serialize(
105
+ _param = self._get_funding_rates_serialize(
106
106
  symbol=symbol,
107
107
  start=start,
108
108
  end=end,
@@ -120,17 +120,17 @@ class FundingRatesApi:
120
120
  "500": "ErrorResponse",
121
121
  "422": "HTTPValidationError",
122
122
  }
123
- response_data = self.api_client.call_api(
123
+ response_data = await self.api_client.call_api(
124
124
  *_param, _request_timeout=_request_timeout
125
125
  )
126
- response_data.read()
126
+ await response_data.read()
127
127
  return self.api_client.response_deserialize(
128
128
  response_data=response_data,
129
129
  response_types_map=_response_types_map,
130
130
  ).data
131
131
 
132
132
  @validate_call
133
- def funding_rate_funding_rates_symbol_get_with_http_info(
133
+ async def get_funding_rates_with_http_info(
134
134
  self,
135
135
  symbol: Annotated[
136
136
  StrictStr, Field(description="Trading pair symbol (e.g., BTCUSDT)")
@@ -191,7 +191,7 @@ class FundingRatesApi:
191
191
  :return: Returns the result object.
192
192
  """ # noqa: E501
193
193
 
194
- _param = self._funding_rate_funding_rates_symbol_get_serialize(
194
+ _param = self._get_funding_rates_serialize(
195
195
  symbol=symbol,
196
196
  start=start,
197
197
  end=end,
@@ -209,17 +209,17 @@ class FundingRatesApi:
209
209
  "500": "ErrorResponse",
210
210
  "422": "HTTPValidationError",
211
211
  }
212
- response_data = self.api_client.call_api(
212
+ response_data = await self.api_client.call_api(
213
213
  *_param, _request_timeout=_request_timeout
214
214
  )
215
- response_data.read()
215
+ await response_data.read()
216
216
  return self.api_client.response_deserialize(
217
217
  response_data=response_data,
218
218
  response_types_map=_response_types_map,
219
219
  )
220
220
 
221
221
  @validate_call
222
- def funding_rate_funding_rates_symbol_get_without_preload_content(
222
+ async def get_funding_rates_without_preload_content(
223
223
  self,
224
224
  symbol: Annotated[
225
225
  StrictStr, Field(description="Trading pair symbol (e.g., BTCUSDT)")
@@ -280,7 +280,7 @@ class FundingRatesApi:
280
280
  :return: Returns the result object.
281
281
  """ # noqa: E501
282
282
 
283
- _param = self._funding_rate_funding_rates_symbol_get_serialize(
283
+ _param = self._get_funding_rates_serialize(
284
284
  symbol=symbol,
285
285
  start=start,
286
286
  end=end,
@@ -298,12 +298,12 @@ class FundingRatesApi:
298
298
  "500": "ErrorResponse",
299
299
  "422": "HTTPValidationError",
300
300
  }
301
- response_data = self.api_client.call_api(
301
+ response_data = await self.api_client.call_api(
302
302
  *_param, _request_timeout=_request_timeout
303
303
  )
304
304
  return response_data.response
305
305
 
306
- def _funding_rate_funding_rates_symbol_get_serialize(
306
+ def _get_funding_rates_serialize(
307
307
  self,
308
308
  symbol,
309
309
  start,
@@ -355,7 +355,7 @@ class FundingRatesApi:
355
355
  )
356
356
 
357
357
  # authentication setting
358
- _auth_settings: List[str] = []
358
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
359
359
 
360
360
  return self.api_client.param_serialize(
361
361
  method="GET",
@@ -38,7 +38,7 @@ class HealthCheckApi:
38
38
  self.api_client = api_client
39
39
 
40
40
  @validate_call
41
- def index_get(
41
+ async def index_get(
42
42
  self,
43
43
  _request_timeout: Union[
44
44
  None,
@@ -88,17 +88,17 @@ class HealthCheckApi:
88
88
  _response_types_map: Dict[str, Optional[str]] = {
89
89
  "200": "BaseResponseHealthCheckResponse",
90
90
  }
91
- response_data = self.api_client.call_api(
91
+ response_data = await self.api_client.call_api(
92
92
  *_param, _request_timeout=_request_timeout
93
93
  )
94
- response_data.read()
94
+ await response_data.read()
95
95
  return self.api_client.response_deserialize(
96
96
  response_data=response_data,
97
97
  response_types_map=_response_types_map,
98
98
  ).data
99
99
 
100
100
  @validate_call
101
- def index_get_with_http_info(
101
+ async def index_get_with_http_info(
102
102
  self,
103
103
  _request_timeout: Union[
104
104
  None,
@@ -148,17 +148,17 @@ class HealthCheckApi:
148
148
  _response_types_map: Dict[str, Optional[str]] = {
149
149
  "200": "BaseResponseHealthCheckResponse",
150
150
  }
151
- response_data = self.api_client.call_api(
151
+ response_data = await self.api_client.call_api(
152
152
  *_param, _request_timeout=_request_timeout
153
153
  )
154
- response_data.read()
154
+ await response_data.read()
155
155
  return self.api_client.response_deserialize(
156
156
  response_data=response_data,
157
157
  response_types_map=_response_types_map,
158
158
  )
159
159
 
160
160
  @validate_call
161
- def index_get_without_preload_content(
161
+ async def index_get_without_preload_content(
162
162
  self,
163
163
  _request_timeout: Union[
164
164
  None,
@@ -208,7 +208,7 @@ class HealthCheckApi:
208
208
  _response_types_map: Dict[str, Optional[str]] = {
209
209
  "200": "BaseResponseHealthCheckResponse",
210
210
  }
211
- response_data = self.api_client.call_api(
211
+ response_data = await self.api_client.call_api(
212
212
  *_param, _request_timeout=_request_timeout
213
213
  )
214
214
  return response_data.response