crypticorn 2.4.5__tar.gz → 2.4.7__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 (300) hide show
  1. {crypticorn-2.4.5 → crypticorn-2.4.7}/PKG-INFO +13 -2
  2. {crypticorn-2.4.5 → crypticorn-2.4.7}/README.md +7 -0
  3. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/client.py +1 -1
  4. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/common/auth.py +7 -9
  5. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/common/errors.py +6 -1
  6. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/common/scopes.py +2 -1
  7. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/common/utils.py +15 -5
  8. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/main.py +10 -5
  9. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/exchange_mapping.py +4 -2
  10. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/trading_status.py +1 -0
  11. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/main.py +5 -4
  12. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/__init__.py +5 -4
  13. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/api/payments_api.py +17 -17
  14. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/api/products_api.py +49 -48
  15. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/__init__.py +5 -4
  16. crypticorn-2.4.7/crypticorn/pay/client/models/payment.py +112 -0
  17. crypticorn-2.4.7/crypticorn/pay/client/models/product_create.py +120 -0
  18. crypticorn-2.4.7/crypticorn/pay/client/models/product_read.py +123 -0
  19. crypticorn-2.4.7/crypticorn/pay/client/models/product_sub_read.py +103 -0
  20. crypticorn-2.4.7/crypticorn/pay/client/models/product_update.py +142 -0
  21. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/__init__.py +6 -8
  22. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/api/__init__.py +1 -0
  23. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/api/api_keys_api.py +273 -167
  24. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/api/bots_api.py +226 -140
  25. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/api/exchanges_api.py +51 -31
  26. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/api/futures_trading_panel_api.py +272 -169
  27. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/api/notifications_api.py +323 -200
  28. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/api/orders_api.py +60 -40
  29. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/api/status_api.py +49 -31
  30. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/api/strategies_api.py +223 -137
  31. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/api/trading_actions_api.py +170 -106
  32. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/api_client.py +153 -111
  33. crypticorn-2.4.7/crypticorn/trade/client/api_response.py +21 -0
  34. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/configuration.py +115 -128
  35. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/exceptions.py +21 -25
  36. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/__init__.py +6 -8
  37. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/action_model.py +54 -108
  38. crypticorn-2.4.7/crypticorn/trade/client/models/api_error_identifier.py +100 -0
  39. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/api_error_level.py +11 -9
  40. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/api_error_type.py +11 -9
  41. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/bot_model.py +36 -57
  42. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/bot_status.py +11 -9
  43. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/exchange.py +9 -7
  44. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/exchange_key_model.py +34 -44
  45. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/execution_ids.py +18 -18
  46. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/futures_balance.py +27 -43
  47. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/futures_trading_action.py +50 -102
  48. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/http_validation_error.py +15 -19
  49. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/margin_mode.py +9 -7
  50. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/market_type.py +9 -7
  51. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/notification_model.py +32 -52
  52. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/order_model.py +72 -112
  53. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/order_status.py +12 -10
  54. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/post_futures_action.py +16 -20
  55. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/strategy_exchange_info.py +16 -15
  56. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/strategy_model_input.py +33 -61
  57. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/strategy_model_output.py +33 -61
  58. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/tpsl.py +25 -39
  59. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/trading_action_type.py +11 -9
  60. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/validation_error.py +18 -24
  61. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/validation_error_loc_inner.py +16 -37
  62. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/rest.py +38 -23
  63. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn.egg-info/PKG-INFO +13 -2
  64. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn.egg-info/SOURCES.txt +6 -0
  65. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn.egg-info/requires.txt +6 -1
  66. {crypticorn-2.4.5 → crypticorn-2.4.7}/pyproject.toml +2 -1
  67. {crypticorn-2.4.5 → crypticorn-2.4.7}/requirements/dev.txt +3 -0
  68. crypticorn-2.4.7/requirements/extra.txt +2 -0
  69. {crypticorn-2.4.5 → crypticorn-2.4.7}/requirements/main.txt +0 -1
  70. {crypticorn-2.4.5 → crypticorn-2.4.7}/tests/test_auth_client.py +1 -13
  71. crypticorn-2.4.7/tests/test_config.py +20 -0
  72. crypticorn-2.4.5/crypticorn/pay/client/models/payment.py +0 -231
  73. crypticorn-2.4.5/crypticorn/trade/client/api_response.py +0 -20
  74. crypticorn-2.4.5/crypticorn/trade/client/models/api_error_identifier.py +0 -104
  75. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/__init__.py +0 -0
  76. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/__init__.py +0 -0
  77. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/__init__.py +0 -0
  78. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/api/__init__.py +0 -0
  79. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/api/admin_api.py +0 -0
  80. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/api/auth_api.py +0 -0
  81. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/api/service_api.py +0 -0
  82. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/api/user_api.py +0 -0
  83. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/api/wallet_api.py +0 -0
  84. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/api_client.py +0 -0
  85. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/api_response.py +0 -0
  86. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/configuration.py +0 -0
  87. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/exceptions.py +0 -0
  88. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/__init__.py +0 -0
  89. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/add_wallet200_response.py +0 -0
  90. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/add_wallet_request.py +0 -0
  91. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/authorize_user200_response.py +0 -0
  92. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/authorize_user200_response_auth.py +0 -0
  93. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/authorize_user_request.py +0 -0
  94. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/create_api_key200_response.py +0 -0
  95. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/create_api_key_request.py +0 -0
  96. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/create_user_request.py +0 -0
  97. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/get_api_keys200_response_inner.py +0 -0
  98. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/list_wallets200_response.py +0 -0
  99. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +0 -0
  100. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +0 -0
  101. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +0 -0
  102. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +0 -0
  103. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/list_wallets200_response_data_inner.py +0 -0
  104. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/list_wallets200_response_user_value.py +0 -0
  105. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/logout_default_response.py +0 -0
  106. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/logout_default_response_issues_inner.py +0 -0
  107. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/oauth_callback200_response.py +0 -0
  108. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/oauth_callback200_response_user.py +0 -0
  109. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/refresh_token_info200_response.py +0 -0
  110. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +0 -0
  111. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/resend_verification_email_request.py +0 -0
  112. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/revoke_user_tokens_request.py +0 -0
  113. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/rotate_tokens200_response.py +0 -0
  114. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/token_info200_response.py +0 -0
  115. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/unlink_wallet_request.py +0 -0
  116. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/update_user_request.py +0 -0
  117. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/user_reset_password_request.py +0 -0
  118. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/user_set_password_request.py +0 -0
  119. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/verify200_response.py +0 -0
  120. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/verify_email200_response.py +0 -0
  121. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/verify_email200_response_auth.py +0 -0
  122. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/verify_email200_response_auth_auth.py +0 -0
  123. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/verify_email_request.py +0 -0
  124. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/verify_wallet_request.py +0 -0
  125. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/wallet_verified200_response.py +0 -0
  126. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/models/whoami200_response.py +0 -0
  127. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/py.typed +0 -0
  128. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/client/rest.py +0 -0
  129. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/auth/main.py +0 -0
  130. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/cli/__init__.py +0 -0
  131. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/cli/__main__.py +0 -0
  132. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/cli/init.py +0 -0
  133. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/cli/templates/__init__.py +0 -0
  134. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/cli/templates/auth.py +0 -0
  135. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/common/__init__.py +0 -0
  136. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/common/enums.py +0 -0
  137. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/common/pydantic.py +0 -0
  138. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/common/sorter.py +0 -0
  139. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/common/urls.py +0 -0
  140. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/__init__.py +0 -0
  141. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/__init__.py +0 -0
  142. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/api/__init__.py +0 -0
  143. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/api/data_api.py +0 -0
  144. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/api/models_api.py +0 -0
  145. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/api/status_api.py +0 -0
  146. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/api_client.py +0 -0
  147. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/api_response.py +0 -0
  148. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/configuration.py +0 -0
  149. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/exceptions.py +0 -0
  150. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/__init__.py +0 -0
  151. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/coins.py +0 -0
  152. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/data_download_response.py +0 -0
  153. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/data_info.py +0 -0
  154. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/data_value_value_value_inner.py +0 -0
  155. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/data_version.py +0 -0
  156. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/download_links.py +0 -0
  157. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/evaluation.py +0 -0
  158. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/evaluation_response.py +0 -0
  159. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/feature_size.py +0 -0
  160. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/http_validation_error.py +0 -0
  161. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/model.py +0 -0
  162. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/model_create.py +0 -0
  163. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/model_status.py +0 -0
  164. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/model_update.py +0 -0
  165. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/target.py +0 -0
  166. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/target_type.py +0 -0
  167. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/validation_error.py +0 -0
  168. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/models/validation_error_loc_inner.py +0 -0
  169. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/py.typed +0 -0
  170. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/client/rest.py +0 -0
  171. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/hive/main.py +0 -0
  172. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/__init__.py +0 -0
  173. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/__init__.py +0 -0
  174. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/api/__init__.py +0 -0
  175. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/api/funding_rates_api.py +0 -0
  176. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/api/health_check_api.py +0 -0
  177. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/api/ohlcv_data_api.py +0 -0
  178. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/api/symbols_api.py +0 -0
  179. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/api/udf_api.py +0 -0
  180. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/api_client.py +0 -0
  181. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/api_response.py +0 -0
  182. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/configuration.py +0 -0
  183. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/exceptions.py +0 -0
  184. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/__init__.py +0 -0
  185. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/base_response_health_check_response.py +0 -0
  186. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/base_response_list_funding_rate_response.py +0 -0
  187. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/base_response_list_str.py +0 -0
  188. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/base_response_ohlcv_response.py +0 -0
  189. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/error_response.py +0 -0
  190. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/exchange.py +0 -0
  191. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/funding_rate_response.py +0 -0
  192. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/health_check_response.py +0 -0
  193. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/history_error_response.py +0 -0
  194. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/history_no_data_response.py +0 -0
  195. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/history_success_response.py +0 -0
  196. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/http_validation_error.py +0 -0
  197. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/market.py +0 -0
  198. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/ohlcv_response.py +0 -0
  199. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/resolution.py +0 -0
  200. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/response_get_history_udf_history_get.py +0 -0
  201. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/search_symbol_response.py +0 -0
  202. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/sort_direction.py +0 -0
  203. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/symbol_group_response.py +0 -0
  204. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/symbol_info_response.py +0 -0
  205. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/symbol_type.py +0 -0
  206. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/timeframe.py +0 -0
  207. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/udf_config_response.py +0 -0
  208. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/validation_error.py +0 -0
  209. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/models/validation_error_loc_inner.py +0 -0
  210. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/py.typed +0 -0
  211. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/klines/client/rest.py +0 -0
  212. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/__init__.py +0 -0
  213. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/__init__.py +0 -0
  214. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/api/__init__.py +0 -0
  215. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/api/exchanges_api.py +0 -0
  216. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/api/health_check_api.py +0 -0
  217. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/api/indicators_api.py +0 -0
  218. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/api/logs_api.py +0 -0
  219. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/api/marketcap_api.py +0 -0
  220. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/api/markets_api.py +0 -0
  221. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/api/tokens_api.py +0 -0
  222. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/api_client.py +0 -0
  223. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/api_response.py +0 -0
  224. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/configuration.py +0 -0
  225. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/exceptions.py +0 -0
  226. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/__init__.py +0 -0
  227. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/base_response_dict.py +0 -0
  228. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/base_response_health_check_response.py +0 -0
  229. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/base_response_list_dict.py +0 -0
  230. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/base_response_list_exchange_mapping.py +0 -0
  231. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/base_response_list_str.py +0 -0
  232. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/error_response.py +0 -0
  233. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/health_check_response.py +0 -0
  234. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/http_validation_error.py +0 -0
  235. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/market.py +0 -0
  236. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/market_type.py +0 -0
  237. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/severity.py +0 -0
  238. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/time_interval.py +0 -0
  239. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/validation_error.py +0 -0
  240. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/models/validation_error_loc_inner.py +0 -0
  241. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/py.typed +0 -0
  242. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/metrics/client/rest.py +0 -0
  243. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/__init__.py +0 -0
  244. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/api/__init__.py +0 -0
  245. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/api/now_payments_api.py +0 -0
  246. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/api/status_api.py +0 -0
  247. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/api_client.py +0 -0
  248. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/api_response.py +0 -0
  249. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/configuration.py +0 -0
  250. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/exceptions.py +0 -0
  251. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/api_status_res.py +0 -0
  252. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/body_create_now_invoice.py +0 -0
  253. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/body_create_product.py +0 -0
  254. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/body_get_products.py +0 -0
  255. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/body_handle_now_webhook.py +0 -0
  256. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/body_update_product.py +0 -0
  257. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/combined_payment_history.py +0 -0
  258. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/create_invoice_req.py +0 -0
  259. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/create_invoice_res.py +0 -0
  260. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/currency.py +0 -0
  261. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/estimate_price_req.py +0 -0
  262. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/estimate_price_res.py +0 -0
  263. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/get_currencies_res.py +0 -0
  264. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/get_payment_status_res.py +0 -0
  265. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/get_payments_list_res.py +0 -0
  266. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/http_validation_error.py +0 -0
  267. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/min_amount_req.py +0 -0
  268. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/min_amount_res.py +0 -0
  269. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/now_api_status_res.py +0 -0
  270. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/now_create_invoice_req.py +0 -0
  271. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/now_create_invoice_res.py +0 -0
  272. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/now_fee_structure.py +0 -0
  273. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/now_payment_model.py +0 -0
  274. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/now_payment_status.py +0 -0
  275. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/now_webhook_payload.py +0 -0
  276. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/partial_product_update_model.py +0 -0
  277. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/payment_status.py +0 -0
  278. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/product.py +0 -0
  279. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/product_model.py +0 -0
  280. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/product_subs_model.py +0 -0
  281. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/product_update_model.py +0 -0
  282. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/scope.py +0 -0
  283. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/services.py +0 -0
  284. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/unified_payment_model.py +0 -0
  285. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/validation_error.py +0 -0
  286. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/models/validation_error_loc_inner.py +0 -0
  287. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/py.typed +0 -0
  288. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/client/rest.py +0 -0
  289. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/pay/main.py +0 -0
  290. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/__init__.py +0 -0
  291. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/models/api_key_model.py +0 -0
  292. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/client/py.typed +0 -0
  293. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn/trade/main.py +0 -0
  294. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn.egg-info/dependency_links.txt +0 -0
  295. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn.egg-info/entry_points.txt +0 -0
  296. {crypticorn-2.4.5 → crypticorn-2.4.7}/crypticorn.egg-info/top_level.txt +0 -0
  297. {crypticorn-2.4.5 → crypticorn-2.4.7}/requirements/test.txt +0 -0
  298. {crypticorn-2.4.5 → crypticorn-2.4.7}/setup.cfg +0 -0
  299. {crypticorn-2.4.5 → crypticorn-2.4.7}/tests/test_enums.py +0 -0
  300. {crypticorn-2.4.5 → crypticorn-2.4.7}/tests/test_errors.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crypticorn
3
- Version: 2.4.5
3
+ Version: 2.4.7
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
@@ -21,19 +21,23 @@ Requires-Dist: aiohttp<4.0.0,>=3.8.4
21
21
  Requires-Dist: aiohttp-retry<3.0.0,>=2.8.3
22
22
  Requires-Dist: pydantic<3.0.0,>=2.0.0
23
23
  Requires-Dist: typing-extensions<5.0.0,>=4.7.1
24
- Requires-Dist: pandas<3.0.0,>=2.2.0
25
24
  Requires-Dist: requests<3.0.0,>=2.32.0
26
25
  Requires-Dist: tqdm<5.0.0,>=4.67.0
27
26
  Provides-Extra: dev
28
27
  Requires-Dist: streamlit; extra == "dev"
29
28
  Requires-Dist: httpx; extra == "dev"
30
29
  Requires-Dist: black; extra == "dev"
30
+ Requires-Dist: ruff; extra == "dev"
31
+ Requires-Dist: isort; extra == "dev"
32
+ Requires-Dist: mypy; extra == "dev"
31
33
  Requires-Dist: openapi-generator-cli<8.0.0,>=7.12.0; extra == "dev"
32
34
  Provides-Extra: test
33
35
  Requires-Dist: pytest==8.3.5; extra == "test"
34
36
  Requires-Dist: pytest-asyncio==0.26.0; extra == "test"
35
37
  Requires-Dist: pytest-cov==6.1.1; extra == "test"
36
38
  Requires-Dist: python-dotenv==1.0.1; extra == "test"
39
+ Provides-Extra: extra
40
+ Requires-Dist: pandas<3.0.0,>=2.2.0; extra == "extra"
37
41
 
38
42
  # What is Crypticorn?
39
43
 
@@ -49,6 +53,8 @@ cryptocurrency market.
49
53
 
50
54
  ## Installation
51
55
 
56
+ >Python 3.10+ required
57
+
52
58
  You can install the latest stable version from PyPi:
53
59
  ```bash
54
60
  pip install crypticorn
@@ -95,7 +101,12 @@ client = ApiClient(base_url=BaseUrl.Prod, api_key="your-api-key")
95
101
  asyncio.run(client.pay.models.get_products())
96
102
  asyncio.run(client.close())
97
103
  ```
104
+ ...or wrapped in a function
105
+ async def main():
106
+ await client.pay.products.get_products()
98
107
 
108
+ asyncio.run(main())
109
+ asyncio.run(client.close())
99
110
  ## Response Types
100
111
 
101
112
  There are three different available output formats you can choose from:
@@ -12,6 +12,8 @@ cryptocurrency market.
12
12
 
13
13
  ## Installation
14
14
 
15
+ >Python 3.10+ required
16
+
15
17
  You can install the latest stable version from PyPi:
16
18
  ```bash
17
19
  pip install crypticorn
@@ -58,7 +60,12 @@ client = ApiClient(base_url=BaseUrl.Prod, api_key="your-api-key")
58
60
  asyncio.run(client.pay.models.get_products())
59
61
  asyncio.run(client.close())
60
62
  ```
63
+ ...or wrapped in a function
64
+ async def main():
65
+ await client.pay.products.get_products()
61
66
 
67
+ asyncio.run(main())
68
+ asyncio.run(client.close())
62
69
  ## Response Types
63
70
 
64
71
  There are three different available output formats you can choose from:
@@ -106,7 +106,7 @@ class ApiClient:
106
106
  new_config = sub_client.config
107
107
  for attr in vars(config):
108
108
  new_value = getattr(config, attr)
109
- if new_value is not None:
109
+ if new_value:
110
110
  setattr(new_config, attr, new_value)
111
111
 
112
112
  if sub_client == self.hive:
@@ -9,7 +9,7 @@ from crypticorn.common import (
9
9
  Scope,
10
10
  Service,
11
11
  )
12
- from fastapi import Depends, HTTPException, Query, status
12
+ from fastapi import Depends, HTTPException, Query, status, WebSocketException
13
13
  from fastapi.security import (
14
14
  HTTPAuthorizationCredentials,
15
15
  SecurityScopes,
@@ -183,7 +183,7 @@ class AuthHandler:
183
183
  Verifies the API key and checks if the user scopes are a subset of the API scopes.
184
184
  Use this function if you only want to allow access via the API key.
185
185
  """
186
- return await self.api_key_auth(api_key=api_key, sec=sec)
186
+ return await self.ws_combined_auth(bearer=None, api_key=api_key, sec=sec)
187
187
 
188
188
  async def ws_bearer_auth(
189
189
  self,
@@ -194,12 +194,7 @@ class AuthHandler:
194
194
  Verifies the bearer token and checks if the user scopes are a subset of the API scopes.
195
195
  Use this function if you only want to allow access via the bearer token.
196
196
  """
197
- credentials = (
198
- HTTPAuthorizationCredentials(scheme="Bearer", credentials=bearer)
199
- if bearer
200
- else None
201
- )
202
- return await self.bearer_auth(bearer=credentials, sec=sec)
197
+ return await self.ws_combined_auth(bearer=bearer, api_key=None, sec=sec)
203
198
 
204
199
  async def ws_combined_auth(
205
200
  self,
@@ -216,4 +211,7 @@ class AuthHandler:
216
211
  if bearer
217
212
  else None
218
213
  )
219
- return await self.combined_auth(bearer=credentials, api_key=api_key, sec=sec)
214
+ response = await self.combined_auth(bearer=credentials, api_key=api_key, sec=sec)
215
+ if isinstance(response, HTTPException):
216
+ raise WebSocketException(code=status.WS_1008_POLICY_VIOLATION, reason=response.detail)
217
+ return response
@@ -7,7 +7,7 @@ logger = logging.getLogger(__name__)
7
7
 
8
8
  class Fallback(EnumMeta):
9
9
  """Fallback to UNKNOWN_ERROR for error codes not yet published to PyPI."""
10
-
10
+
11
11
  def __getattr__(cls, name):
12
12
  # Let Pydantic/internal stuff pass silently ! fragile
13
13
  if name.startswith("__"):
@@ -100,6 +100,11 @@ class ApiErrorIdentifier(StrEnum):
100
100
  UNKNOWN_ERROR = "unknown_error_occurred"
101
101
  URL_NOT_FOUND = "requested_resource_not_found"
102
102
 
103
+ @property
104
+ def get_error_code(self) -> str:
105
+ """Get the corresponding ApiError."""
106
+ return ApiError[self.value]
107
+
103
108
 
104
109
  class ApiErrorLevel(StrEnum):
105
110
  """API error levels"""
@@ -6,6 +6,7 @@ logger = logging.getLogger("uvicorn")
6
6
 
7
7
  class Fallback(EnumMeta):
8
8
  """Fallback to no scope for unknown scopes."""
9
+
9
10
  # Note: This is a workaround to avoid the AttributeError when an unknown scope is accessed.
10
11
  # As soon as we have stable scopes, we can remove this.
11
12
 
@@ -19,7 +20,7 @@ class Fallback(EnumMeta):
19
20
  return None
20
21
 
21
22
 
22
- class Scope(StrEnum, metaclass=Fallback):
23
+ class Scope(StrEnum):
23
24
  """
24
25
  The permission scopes for the API.
25
26
  """
@@ -1,4 +1,4 @@
1
- from typing import Any
1
+ from typing import Any, Union
2
2
  from decimal import Decimal
3
3
  import string
4
4
  import random
@@ -9,19 +9,19 @@ from fastapi import status
9
9
  from crypticorn.common import ApiError
10
10
 
11
11
 
12
- def throw_if_none(value: Any, message: ApiError) -> None:
12
+ def throw_if_none(value: Any, message: Union[ApiError, str]) -> None:
13
13
  """Throws an FastAPI HTTPException if the value is None."""
14
14
  if value is None:
15
15
  raise HTTPException(
16
- status_code=status.HTTP_404_NOT_FOUND, detail=message.identifier
16
+ status_code=status.HTTP_404_NOT_FOUND, detail=message.identifier if isinstance(message, ApiError) else message
17
17
  )
18
18
 
19
19
 
20
- def throw_if_falsy(value: Any, message: ApiError) -> None:
20
+ def throw_if_falsy(value: Any, message: Union[ApiError, str]) -> None:
21
21
  """Throws an FastAPI HTTPException if the value is False."""
22
22
  if not value:
23
23
  raise HTTPException(
24
- status_code=status.HTTP_400_BAD_REQUEST, detail=message.identifier
24
+ status_code=status.HTTP_400_BAD_REQUEST, detail=message.identifier if isinstance(message, ApiError) else message
25
25
  )
26
26
 
27
27
 
@@ -50,3 +50,13 @@ def is_equal(
50
50
  return Decimal(abs(a - b)) <= max(
51
51
  Decimal(str(rel_tol)) * max(abs(a), abs(b)), Decimal(str(abs_tol))
52
52
  )
53
+
54
+ def optional_import(module_name: str, extra_name: str):
55
+ try:
56
+ return __import__(module_name)
57
+ except ImportError as e:
58
+ extra = f"[{extra_name}]"
59
+ raise ImportError(
60
+ f"Optional dependency '{module_name}' is required for this feature. "
61
+ f"Install it with: pip install crypticorn{extra}"
62
+ ) from e
@@ -1,4 +1,4 @@
1
- import pandas as pd
1
+ from __future__ import annotations
2
2
  from crypticorn.klines import (
3
3
  ApiClient,
4
4
  Configuration,
@@ -8,6 +8,7 @@ from crypticorn.klines import (
8
8
  SymbolsApi,
9
9
  UDFApi,
10
10
  )
11
+ from crypticorn.common import optional_import
11
12
 
12
13
 
13
14
  class FundingRatesApiWrapper(FundingRatesApi):
@@ -15,7 +16,8 @@ class FundingRatesApiWrapper(FundingRatesApi):
15
16
  A wrapper for the FundingRatesApi class.
16
17
  """
17
18
 
18
- def get_funding_rates_fmt(self):
19
+ def get_funding_rates_fmt(self) -> pd.DataFrame:
20
+ pd = optional_import("pandas", "extra")
19
21
  response = self.funding_rate_funding_rates_symbol_get()
20
22
  return pd.DataFrame(response.json())
21
23
 
@@ -25,7 +27,8 @@ class OHLCVDataApiWrapper(OHLCVDataApi):
25
27
  A wrapper for the OHLCVDataApi class.
26
28
  """
27
29
 
28
- def get_ohlcv_data_fmt(self):
30
+ def get_ohlcv_data_fmt(self) -> pd.DataFrame:
31
+ pd = optional_import("pandas", "extra")
29
32
  response = self.get_ohlcv_market_timeframe_symbol_get()
30
33
  return pd.DataFrame(response.json())
31
34
 
@@ -35,7 +38,8 @@ class SymbolsApiWrapper(SymbolsApi):
35
38
  A wrapper for the SymbolsApi class.
36
39
  """
37
40
 
38
- def get_symbols_fmt(self):
41
+ def get_symbols_fmt(self) -> pd.DataFrame:
42
+ pd = optional_import("pandas", "extra")
39
43
  response = self.symbols_symbols_market_get()
40
44
  return pd.DataFrame(response.json())
41
45
 
@@ -45,7 +49,8 @@ class UDFApiWrapper(UDFApi):
45
49
  A wrapper for the UDFApi class.
46
50
  """
47
51
 
48
- def get_udf_fmt(self):
52
+ def get_udf_fmt(self) -> pd.DataFrame:
53
+ pd = optional_import("pandas", "extra")
49
54
  response = self.get_history_udf_history_get()
50
55
  return pd.DataFrame(response.json())
51
56
 
@@ -20,6 +20,8 @@ import json
20
20
  from datetime import datetime
21
21
  from pydantic import BaseModel, ConfigDict, StrictStr
22
22
  from typing import Any, ClassVar, Dict, List, Optional
23
+ from crypticorn.metrics.client.models.market_type import MarketType
24
+ from crypticorn.metrics.client.models.trading_status import TradingStatus
23
25
  from typing import Optional, Set
24
26
  from typing_extensions import Self
25
27
 
@@ -35,8 +37,8 @@ class ExchangeMapping(BaseModel):
35
37
  pair: StrictStr
36
38
  first_trade_timestamp: Optional[datetime]
37
39
  last_trade_timestamp: Optional[datetime]
38
- status: StrictStr
39
- market_type: Optional[StrictStr]
40
+ status: TradingStatus
41
+ market_type: Optional[MarketType]
40
42
  __properties: ClassVar[List[str]] = [
41
43
  "exchange_name",
42
44
  "symbol",
@@ -28,6 +28,7 @@ class TradingStatus(str, Enum):
28
28
  """
29
29
  ACTIVE = "ACTIVE"
30
30
  RETIRED = "RETIRED"
31
+ EXPIRED = "EXPIRED"
31
32
 
32
33
  @classmethod
33
34
  def from_json(cls, json_str: str) -> Self:
@@ -1,3 +1,4 @@
1
+ from __future__ import annotations
1
2
  from crypticorn.metrics import (
2
3
  ApiClient,
3
4
  Configuration,
@@ -10,13 +11,11 @@ from crypticorn.metrics import (
10
11
  TokensApi,
11
12
  MarketType,
12
13
  )
14
+ from crypticorn.common import optional_import
13
15
  from pydantic import StrictStr, StrictInt, Field
14
16
  from typing_extensions import Annotated
15
17
  from typing import Optional
16
18
 
17
- import pandas as pd
18
-
19
-
20
19
  class MetricsClient:
21
20
  """
22
21
  A client for interacting with the Crypticorn Metrics API.
@@ -67,7 +66,8 @@ class MarketcapApiWrapper(MarketcapApi):
67
66
  """
68
67
  Get the marketcap symbols in a pandas dataframe
69
68
  """
70
- response = await self.get_marketcap_symbols_without_preload_content(
69
+ pd = optional_import("pandas", "extra")
70
+ response = await self.get_marketcap_symbols(
71
71
  start_timestamp=start_timestamp,
72
72
  end_timestamp=end_timestamp,
73
73
  interval=interval,
@@ -96,6 +96,7 @@ class TokensApiWrapper(TokensApi):
96
96
  """
97
97
  Get the tokens in a pandas dataframe
98
98
  """
99
+ pd = optional_import("pandas", "extra")
99
100
  response = await self.get_stable_and_wrapped_tokens_without_preload_content(
100
101
  token_type=token_type
101
102
  )
@@ -41,13 +41,14 @@ from crypticorn.pay.client.models.now_create_invoice_res import NowCreateInvoice
41
41
  from crypticorn.pay.client.models.now_fee_structure import NowFeeStructure
42
42
  from crypticorn.pay.client.models.now_payment_status import NowPaymentStatus
43
43
  from crypticorn.pay.client.models.now_webhook_payload import NowWebhookPayload
44
+ from crypticorn.pay.client.models.payment import Payment
44
45
  from crypticorn.pay.client.models.payment_status import PaymentStatus
45
- from crypticorn.pay.client.models.product_model import ProductModel
46
- from crypticorn.pay.client.models.product_subs_model import ProductSubsModel
47
- from crypticorn.pay.client.models.product_update_model import ProductUpdateModel
46
+ from crypticorn.pay.client.models.product_create import ProductCreate
47
+ from crypticorn.pay.client.models.product_read import ProductRead
48
+ from crypticorn.pay.client.models.product_sub_read import ProductSubRead
49
+ from crypticorn.pay.client.models.product_update import ProductUpdate
48
50
  from crypticorn.pay.client.models.scope import Scope
49
51
  from crypticorn.pay.client.models.services import Services
50
- from crypticorn.pay.client.models.unified_payment_model import UnifiedPaymentModel
51
52
  from crypticorn.pay.client.models.validation_error import ValidationError
52
53
  from crypticorn.pay.client.models.validation_error_loc_inner import (
53
54
  ValidationErrorLocInner,
@@ -19,8 +19,8 @@ from typing_extensions import Annotated
19
19
  from pydantic import Field, StrictInt, StrictStr
20
20
  from typing import List, Optional
21
21
  from typing_extensions import Annotated
22
- from crypticorn.pay.client.models.product_subs_model import ProductSubsModel
23
- from crypticorn.pay.client.models.unified_payment_model import UnifiedPaymentModel
22
+ from crypticorn.pay.client.models.payment import Payment
23
+ from crypticorn.pay.client.models.product_sub_read import ProductSubRead
24
24
 
25
25
  from crypticorn.pay.client.api_client import ApiClient, RequestSerialized
26
26
  from crypticorn.pay.client.api_response import ApiResponse
@@ -57,7 +57,7 @@ class PaymentsApi:
57
57
  _content_type: Optional[StrictStr] = None,
58
58
  _headers: Optional[Dict[StrictStr, Any]] = None,
59
59
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
- ) -> UnifiedPaymentModel:
60
+ ) -> Payment:
61
61
  """Get Latest Payment From Invoice
62
62
 
63
63
  Get the latest payment by a user from an invoice
@@ -95,7 +95,7 @@ class PaymentsApi:
95
95
  )
96
96
 
97
97
  _response_types_map: Dict[str, Optional[str]] = {
98
- "200": "UnifiedPaymentModel",
98
+ "200": "Payment",
99
99
  "422": "HTTPValidationError",
100
100
  }
101
101
  response_data = await self.api_client.call_api(
@@ -125,7 +125,7 @@ class PaymentsApi:
125
125
  _content_type: Optional[StrictStr] = None,
126
126
  _headers: Optional[Dict[StrictStr, Any]] = None,
127
127
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
128
- ) -> ApiResponse[UnifiedPaymentModel]:
128
+ ) -> ApiResponse[Payment]:
129
129
  """Get Latest Payment From Invoice
130
130
 
131
131
  Get the latest payment by a user from an invoice
@@ -163,7 +163,7 @@ class PaymentsApi:
163
163
  )
164
164
 
165
165
  _response_types_map: Dict[str, Optional[str]] = {
166
- "200": "UnifiedPaymentModel",
166
+ "200": "Payment",
167
167
  "422": "HTTPValidationError",
168
168
  }
169
169
  response_data = await self.api_client.call_api(
@@ -231,7 +231,7 @@ class PaymentsApi:
231
231
  )
232
232
 
233
233
  _response_types_map: Dict[str, Optional[str]] = {
234
- "200": "UnifiedPaymentModel",
234
+ "200": "Payment",
235
235
  "422": "HTTPValidationError",
236
236
  }
237
237
  response_data = await self.api_client.call_api(
@@ -321,7 +321,7 @@ class PaymentsApi:
321
321
  _content_type: Optional[StrictStr] = None,
322
322
  _headers: Optional[Dict[StrictStr, Any]] = None,
323
323
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
324
- ) -> List[UnifiedPaymentModel]:
324
+ ) -> List[Payment]:
325
325
  """Get Payments
326
326
 
327
327
  Get the combined payment history for a user across all payment services.
@@ -362,7 +362,7 @@ class PaymentsApi:
362
362
  )
363
363
 
364
364
  _response_types_map: Dict[str, Optional[str]] = {
365
- "200": "List[UnifiedPaymentModel]",
365
+ "200": "List[Payment]",
366
366
  "422": "HTTPValidationError",
367
367
  }
368
368
  response_data = await self.api_client.call_api(
@@ -400,7 +400,7 @@ class PaymentsApi:
400
400
  _content_type: Optional[StrictStr] = None,
401
401
  _headers: Optional[Dict[StrictStr, Any]] = None,
402
402
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
403
- ) -> ApiResponse[List[UnifiedPaymentModel]]:
403
+ ) -> ApiResponse[List[Payment]]:
404
404
  """Get Payments
405
405
 
406
406
  Get the combined payment history for a user across all payment services.
@@ -441,7 +441,7 @@ class PaymentsApi:
441
441
  )
442
442
 
443
443
  _response_types_map: Dict[str, Optional[str]] = {
444
- "200": "List[UnifiedPaymentModel]",
444
+ "200": "List[Payment]",
445
445
  "422": "HTTPValidationError",
446
446
  }
447
447
  response_data = await self.api_client.call_api(
@@ -520,7 +520,7 @@ class PaymentsApi:
520
520
  )
521
521
 
522
522
  _response_types_map: Dict[str, Optional[str]] = {
523
- "200": "List[UnifiedPaymentModel]",
523
+ "200": "List[Payment]",
524
524
  "422": "HTTPValidationError",
525
525
  }
526
526
  response_data = await self.api_client.call_api(
@@ -609,7 +609,7 @@ class PaymentsApi:
609
609
  _content_type: Optional[StrictStr] = None,
610
610
  _headers: Optional[Dict[StrictStr, Any]] = None,
611
611
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
612
- ) -> List[ProductSubsModel]:
612
+ ) -> List[ProductSubRead]:
613
613
  """Get Subscriptions
614
614
 
615
615
  Get all subscriptions for a user. Subscriptions are the products a user has subscribed to. Returns both active and inactive subscriptions.
@@ -647,7 +647,7 @@ class PaymentsApi:
647
647
  )
648
648
 
649
649
  _response_types_map: Dict[str, Optional[str]] = {
650
- "200": "List[ProductSubsModel]",
650
+ "200": "List[ProductSubRead]",
651
651
  "422": "HTTPValidationError",
652
652
  }
653
653
  response_data = await self.api_client.call_api(
@@ -679,7 +679,7 @@ class PaymentsApi:
679
679
  _content_type: Optional[StrictStr] = None,
680
680
  _headers: Optional[Dict[StrictStr, Any]] = None,
681
681
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
682
- ) -> ApiResponse[List[ProductSubsModel]]:
682
+ ) -> ApiResponse[List[ProductSubRead]]:
683
683
  """Get Subscriptions
684
684
 
685
685
  Get all subscriptions for a user. Subscriptions are the products a user has subscribed to. Returns both active and inactive subscriptions.
@@ -717,7 +717,7 @@ class PaymentsApi:
717
717
  )
718
718
 
719
719
  _response_types_map: Dict[str, Optional[str]] = {
720
- "200": "List[ProductSubsModel]",
720
+ "200": "List[ProductSubRead]",
721
721
  "422": "HTTPValidationError",
722
722
  }
723
723
  response_data = await self.api_client.call_api(
@@ -787,7 +787,7 @@ class PaymentsApi:
787
787
  )
788
788
 
789
789
  _response_types_map: Dict[str, Optional[str]] = {
790
- "200": "List[ProductSubsModel]",
790
+ "200": "List[ProductSubRead]",
791
791
  "422": "HTTPValidationError",
792
792
  }
793
793
  response_data = await self.api_client.call_api(