crypticorn 2.7.5__tar.gz → 2.8.0__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.
- {crypticorn-2.7.5 → crypticorn-2.8.0}/CHANGELOG.md +86 -0
- {crypticorn-2.7.5/crypticorn.egg-info → crypticorn-2.8.0}/PKG-INFO +46 -21
- {crypticorn-2.7.5 → crypticorn-2.8.0}/README.md +34 -18
- crypticorn-2.8.0/crypticorn/__init__.py +15 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/create_api_key_request.py +3 -1
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/get_api_keys200_response_inner.py +3 -1
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/client.py +34 -16
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/common/__init__.py +5 -1
- crypticorn-2.8.0/crypticorn/common/ansi_colors.py +37 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/common/auth.py +3 -1
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/common/exceptions.py +29 -17
- crypticorn-2.8.0/crypticorn/common/logging.py +126 -0
- crypticorn-2.8.0/crypticorn/common/middleware.py +27 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/common/mixins.py +2 -1
- crypticorn-2.8.0/crypticorn/common/router/admin_router.py +100 -0
- crypticorn-2.8.0/crypticorn/common/router/status_router.py +24 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/common/scopes.py +5 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/__init__.py +6 -3
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/api/__init__.py +1 -0
- crypticorn-2.8.0/crypticorn/hive/client/api/admin_api.py +1452 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/api/models_api.py +7 -7
- crypticorn-2.8.0/crypticorn/hive/client/api/status_api.py +508 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/__init__.py +5 -3
- crypticorn-2.8.0/crypticorn/hive/client/models/api_error_identifier.py +115 -0
- crypticorn-2.8.0/crypticorn/hive/client/models/api_error_level.py +37 -0
- crypticorn-2.8.0/crypticorn/hive/client/models/api_error_type.py +37 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/data_info.py +27 -5
- crypticorn-2.8.0/crypticorn/hive/client/models/data_options.py +92 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/exception_detail.py +6 -3
- crypticorn-2.8.0/crypticorn/hive/client/models/log_level.py +38 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/model.py +3 -3
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/main.py +22 -3
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/utils.py +1 -2
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/__init__.py +11 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/api/__init__.py +2 -0
- crypticorn-2.8.0/crypticorn/metrics/client/api/admin_api.py +1452 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/api/exchanges_api.py +51 -40
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/api/indicators_api.py +49 -32
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/api/logs_api.py +7 -7
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/api/marketcap_api.py +28 -25
- crypticorn-2.8.0/crypticorn/metrics/client/api/markets_api.py +374 -0
- crypticorn-2.7.5/crypticorn/metrics/client/api/tokens_api.py → crypticorn-2.8.0/crypticorn/metrics/client/api/quote_currencies_api.py +43 -40
- crypticorn-2.8.0/crypticorn/metrics/client/api/status_api.py +508 -0
- crypticorn-2.7.5/crypticorn/metrics/client/api/markets_api.py → crypticorn-2.8.0/crypticorn/metrics/client/api/tokens_api.py +46 -158
- crypticorn-2.8.0/crypticorn/metrics/client/models/__init__.py +29 -0
- crypticorn-2.8.0/crypticorn/metrics/client/models/api_error_identifier.py +115 -0
- crypticorn-2.8.0/crypticorn/metrics/client/models/api_error_level.py +37 -0
- crypticorn-2.8.0/crypticorn/metrics/client/models/api_error_type.py +37 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/models/exception_detail.py +6 -3
- crypticorn-2.8.0/crypticorn/metrics/client/models/exchange_mapping.py +121 -0
- crypticorn-2.8.0/crypticorn/metrics/client/models/internal_exchange.py +39 -0
- crypticorn-2.8.0/crypticorn/metrics/client/models/log_level.py +38 -0
- crypticorn-2.8.0/crypticorn/metrics/client/models/market_type.py +35 -0
- crypticorn-2.8.0/crypticorn/metrics/client/models/marketcap_ranking.py +87 -0
- crypticorn-2.8.0/crypticorn/metrics/client/models/ohlcv.py +113 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/main.py +14 -2
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/__init__.py +3 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/api/__init__.py +1 -0
- crypticorn-2.8.0/crypticorn/pay/client/api/admin_api.py +1453 -0
- crypticorn-2.8.0/crypticorn/pay/client/api/status_api.py +508 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/models/__init__.py +2 -0
- crypticorn-2.8.0/crypticorn/pay/client/models/log_level.py +38 -0
- crypticorn-2.7.5/crypticorn/hive/client/models/data_value_value_value_inner.py → crypticorn-2.8.0/crypticorn/pay/client/models/response_getuptime.py +36 -31
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/models/scope.py +2 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/main.py +2 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0/crypticorn.egg-info}/PKG-INFO +46 -21
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn.egg-info/SOURCES.txt +25 -2
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn.egg-info/requires.txt +3 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/pyproject.toml +9 -3
- {crypticorn-2.7.5 → crypticorn-2.8.0}/requirements/dev.txt +1 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/requirements/main.txt +2 -0
- crypticorn-2.7.5/crypticorn/__init__.py +0 -8
- crypticorn-2.7.5/crypticorn/common/status_router.py +0 -44
- crypticorn-2.7.5/crypticorn/hive/client/api/status_api.py +0 -735
- crypticorn-2.7.5/crypticorn/metrics/client/api/status_api.py +0 -735
- crypticorn-2.7.5/crypticorn/metrics/client/models/__init__.py +0 -20
- crypticorn-2.7.5/crypticorn/pay/client/api/status_api.py +0 -735
- {crypticorn-2.7.5 → crypticorn-2.8.0}/MANIFEST.in +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/api/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/api/admin_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/api/auth_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/api/service_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/api/user_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/api/wallet_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/api_client.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/api_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/configuration.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/exceptions.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/add_wallet200_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/add_wallet_request.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/authorize_user200_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/authorize_user200_response_auth.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/authorize_user_request.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/create_api_key200_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/create_user_request.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/list_wallets200_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/list_wallets200_response_data_inner.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/list_wallets200_response_user_value.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/logout_default_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/logout_default_response_issues_inner.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/oauth_callback200_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/oauth_callback200_response_user.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/refresh_token_info200_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/resend_verification_email_request.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/revoke_user_tokens_request.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/rotate_tokens200_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/token_info200_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/unlink_wallet_request.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/update_user_request.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/user_by_username200_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/user_reset_password_request.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/user_set_password_request.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/verify200_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/verify_email200_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/verify_email200_response_auth.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/verify_email200_response_auth_auth.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/verify_email_request.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/verify_wallet_request.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/wallet_verified200_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/whoami200_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/py.typed +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/rest.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/main.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/cli/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/cli/__main__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/cli/init.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/cli/templates/Dockerfile +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/cli/templates/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/cli/templates/auth.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/cli/templates/dependabot.yml +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/cli/templates/ruff.yml +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/common/decorators.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/common/enums.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/common/errors.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/common/pagination.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/common/urls.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/common/utils.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/api/data_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/api_client.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/api_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/configuration.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/exceptions.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/coins.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/data_download_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/data_version.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/data_version_info.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/download_links.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/evaluation.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/evaluation_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/feature_size.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/model_create.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/model_status.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/model_update.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/target.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/target_info.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/models/target_type.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/py.typed +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/hive/client/rest.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/api/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/api/change_in_timeframe_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/api/funding_rates_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/api/ohlcv_data_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/api/status_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/api/symbols_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/api/udf_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/api_client.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/api_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/configuration.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/exceptions.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/models/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/models/change_in_timeframe.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/models/exception_detail.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/models/funding_rate.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/models/ohlcv_history.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/models/resolution.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/models/search_symbol.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/models/sort_direction.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/models/symbol_group.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/models/symbol_info.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/models/symbol_type.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/models/timeframe.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/models/udf_config.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/py.typed +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/client/rest.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/klines/main.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/api_client.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/api_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/configuration.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/exceptions.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/models/severity.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/models/time_interval.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/models/trading_status.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/py.typed +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/metrics/client/rest.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/api/now_payments_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/api/payments_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/api/products_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/api_client.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/api_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/configuration.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/exceptions.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/models/exception_detail.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/models/now_create_invoice_req.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/models/now_create_invoice_res.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/models/payment.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/models/payment_status.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/models/product_create.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/models/product_read.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/models/product_sub_read.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/models/product_update.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/models/provider.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/py.typed +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/pay/client/rest.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/api/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/api/api_keys_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/api/bots_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/api/exchanges_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/api/futures_trading_panel_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/api/notifications_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/api/orders_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/api/status_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/api/strategies_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/api/trading_actions_api.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/api_client.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/api_response.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/configuration.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/exceptions.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/__init__.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/action_model.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/bot_model.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/bot_status.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/exception_detail.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/exchange_key_model.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/execution_ids.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/futures_balance.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/futures_trading_action.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/margin_mode.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/notification_model.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/order_model.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/order_status.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/post_futures_action.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/spot_trading_action.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/strategy_exchange_info.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/strategy_model_input.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/strategy_model_output.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/tpsl.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/models/trading_action_type.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/py.typed +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/client/rest.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/trade/main.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn.egg-info/dependency_links.txt +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn.egg-info/entry_points.txt +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn.egg-info/top_level.txt +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/requirements/extra.txt +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/requirements/test.txt +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/setup.cfg +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/tests/test_auth_client.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/tests/test_config.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/tests/test_enums.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/tests/test_errors.py +0 -0
- {crypticorn-2.7.5 → crypticorn-2.8.0}/tests/test_pagination.py +0 -0
@@ -1,6 +1,92 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
3
|
|
4
|
+
## v2.8.0 (2025-05-07)
|
5
|
+
|
6
|
+
|
7
|
+
## v2.8.0-rc.8 (2025-05-07)
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
- Use root logger of the client with specific child logger as option
|
12
|
+
([`2f8cde2`](https://github.com/crypticorn-ai/api-client/commit/2f8cde2659f22704c5c4310f3ec9a07cbd1d4cef))
|
13
|
+
|
14
|
+
|
15
|
+
## v2.8.0-rc.7 (2025-05-07)
|
16
|
+
|
17
|
+
### Bug Fixes
|
18
|
+
|
19
|
+
- Pass args to the override function in hive data download
|
20
|
+
([`7bb3e29`](https://github.com/crypticorn-ai/api-client/commit/7bb3e2997f79da8e4e55b42a1a699a75fe1f985f))
|
21
|
+
|
22
|
+
|
23
|
+
## v2.8.0-rc.6 (2025-05-07)
|
24
|
+
|
25
|
+
### Bug Fixes
|
26
|
+
|
27
|
+
- Fixes logging file handler import error
|
28
|
+
([`0a9edb1`](https://github.com/crypticorn-ai/api-client/commit/0a9edb1ee3083ec98edc9529efa3158e69c4541c))
|
29
|
+
|
30
|
+
|
31
|
+
## v2.8.0-rc.5 (2025-05-07)
|
32
|
+
|
33
|
+
### Bug Fixes
|
34
|
+
|
35
|
+
- Fixes missing os import in logging
|
36
|
+
([`1670c9f`](https://github.com/crypticorn-ai/api-client/commit/1670c9f1afec1e772fdfaea0c6178c782c209889))
|
37
|
+
|
38
|
+
### Documentation
|
39
|
+
|
40
|
+
- Update documentation
|
41
|
+
([`0eba005`](https://github.com/crypticorn-ai/api-client/commit/0eba0058cf8cdd813d3b80eef8c72ca12a181399))
|
42
|
+
|
43
|
+
|
44
|
+
## v2.8.0-rc.4 (2025-05-05)
|
45
|
+
|
46
|
+
### Bug Fixes
|
47
|
+
|
48
|
+
- Remove @deprecated decorator from ExcludeEnumMixin to avoid enum inheritance error
|
49
|
+
([`3d8b63d`](https://github.com/crypticorn-ai/api-client/commit/3d8b63d638fa77045d2189fe099a6c2ca740c105))
|
50
|
+
|
51
|
+
|
52
|
+
## v2.8.0-rc.3 (2025-05-05)
|
53
|
+
|
54
|
+
### Bug Fixes
|
55
|
+
|
56
|
+
- Deprecate ExcludeEnumMixin
|
57
|
+
([`ae57fb2`](https://github.com/crypticorn-ai/api-client/commit/ae57fb22ff410432ce28a9c0af3a02fa9f51104f))
|
58
|
+
|
59
|
+
|
60
|
+
## v2.8.0-rc.2 (2025-05-05)
|
61
|
+
|
62
|
+
### Bug Fixes
|
63
|
+
|
64
|
+
- Add psutil as dependency
|
65
|
+
([`23cf77e`](https://github.com/crypticorn-ai/api-client/commit/23cf77ea002a2d6f8e31cd858a2dcc1890b8d8c1))
|
66
|
+
|
67
|
+
- Centralize cors middleware
|
68
|
+
([`e5aa2d6`](https://github.com/crypticorn-ai/api-client/commit/e5aa2d60254076848530a6d5b9a349058ee45ac7))
|
69
|
+
|
70
|
+
- Run logging configuration in init of the library
|
71
|
+
([`8b725e1`](https://github.com/crypticorn-ai/api-client/commit/8b725e18154d184c8593b8de086b0a789b6e180c))
|
72
|
+
|
73
|
+
### Features
|
74
|
+
|
75
|
+
- Provide lifespan event for fastapi apps to configure logging on startup
|
76
|
+
([`9a2e1c4`](https://github.com/crypticorn-ai/api-client/commit/9a2e1c45d87ad1581c0e1646689eba6ca0876564))
|
77
|
+
|
78
|
+
|
79
|
+
## v2.8.0-rc.1 (2025-05-04)
|
80
|
+
|
81
|
+
### Features
|
82
|
+
|
83
|
+
- Add router with admin endpoints
|
84
|
+
([`0d38178`](https://github.com/crypticorn-ai/api-client/commit/0d381784f91cab776ca1ee3b8407433dae4421c3))
|
85
|
+
|
86
|
+
- Configure formatted logging
|
87
|
+
([`f8c35e9`](https://github.com/crypticorn-ai/api-client/commit/f8c35e900bcf4a279cc8e046e58935ec5c5c62ee))
|
88
|
+
|
89
|
+
|
4
90
|
## v2.7.5 (2025-05-04)
|
5
91
|
|
6
92
|
### Bug Fixes
|
@@ -1,21 +1,29 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: crypticorn
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.8.0
|
4
4
|
Summary: Maximise Your Crypto Trading Profits with Machine Learning
|
5
5
|
Author-email: Crypticorn <timon@crypticorn.com>
|
6
6
|
License: MIT
|
7
7
|
Project-URL: Homepage, https://crypticorn.com
|
8
|
+
Project-URL: Documentation, https://docs.crypticorn.com
|
9
|
+
Project-URL: Dashboard, https://app.crypticorn.com
|
8
10
|
Keywords: machine learning,data science,crypto,modelling
|
9
11
|
Classifier: Topic :: Scientific/Engineering
|
10
12
|
Classifier: Development Status :: 4 - Beta
|
11
|
-
Classifier: Intended Audience ::
|
13
|
+
Classifier: Intended Audience :: Developers
|
12
14
|
Classifier: Operating System :: OS Independent
|
13
|
-
Classifier:
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
14
20
|
Classifier: Typing :: Typed
|
15
21
|
Requires-Python: >=3.10
|
16
22
|
Description-Content-Type: text/markdown
|
17
23
|
Requires-Dist: fastapi<1.0.0,>=0.115.0
|
18
24
|
Requires-Dist: click<9.0.0,>=8.0.0
|
25
|
+
Requires-Dist: psutil<8.0.0,>=7.0.0
|
26
|
+
Requires-Dist: setuptools<81.0.0,>=80.0.0
|
19
27
|
Requires-Dist: urllib3<3.0.0,>=1.25.3
|
20
28
|
Requires-Dist: python_dateutil<3.0.0,>=2.8.2
|
21
29
|
Requires-Dist: aiohttp<4.0.0,>=3.8.4
|
@@ -34,6 +42,7 @@ Requires-Dist: ruff; extra == "dev"
|
|
34
42
|
Requires-Dist: isort; extra == "dev"
|
35
43
|
Requires-Dist: mypy; extra == "dev"
|
36
44
|
Requires-Dist: openapi-generator-cli<8.0.0,>=7.12.0; extra == "dev"
|
45
|
+
Requires-Dist: pdoc==15.0.3; extra == "dev"
|
37
46
|
Provides-Extra: test
|
38
47
|
Requires-Dist: pytest==8.3.5; extra == "test"
|
39
48
|
Requires-Dist: pytest-asyncio==0.26.0; extra == "test"
|
@@ -52,9 +61,9 @@ crypto market - and programmatically interact with the entire Crypticorn ecosyst
|
|
52
61
|
|
53
62
|
## Installation
|
54
63
|
|
55
|
-
|
64
|
+
You need Python 3.10+ installed to be able to use this library.
|
56
65
|
|
57
|
-
You can install the latest stable version from PyPi:
|
66
|
+
You can install the latest stable version from [PyPi](https://pypi.org/project/crypticorn/):
|
58
67
|
```bash
|
59
68
|
pip install crypticorn
|
60
69
|
```
|
@@ -64,7 +73,7 @@ If you want the latest version, which could be a pre release, run:
|
|
64
73
|
pip install --pre crypticorn
|
65
74
|
```
|
66
75
|
|
67
|
-
You can install extra dependencies grouped in the extras `extra
|
76
|
+
You can install extra dependencies grouped in the extras `extra`, `dev` (development) and `test` (testing). The `extra` dependencies include heavy libraries like `pandas`, which is only used in a few custom API operations (see [data processing](#data-preprocessing)), which preprocess the response data as a pandas Dataframe for convenience.
|
68
77
|
|
69
78
|
## Structure
|
70
79
|
|
@@ -72,11 +81,13 @@ Our API is available as an asynchronous Python SDK. The main entry point you nee
|
|
72
81
|
```python
|
73
82
|
from crypticorn import ApiClient
|
74
83
|
```
|
75
|
-
The ApiClient serves as the central interface for API operations. It instantiates multiple API wrappers corresponding to our micro services.
|
84
|
+
The ApiClient serves as the central interface for API operations. It instantiates multiple API wrappers corresponding to our micro services. These are structured the following:
|
76
85
|
|
77
|
-
|
86
|
+
<img src="../static/pip-structure.svg" alt="pip package structure" />
|
78
87
|
|
79
|
-
|
88
|
+
You can either explore each API by clicking through the library or checkout the [API Documentation](https://docs.crypticorn.com/api).
|
89
|
+
|
90
|
+
Request and response models for API operations should be accessed through the sub package you are using for an operation. All symbols are re-exported at the sub package level for convenience.
|
80
91
|
|
81
92
|
```python
|
82
93
|
from crypticorn.trade import BotStatus
|
@@ -93,25 +104,27 @@ To get started, [create an API key in your dashboard](https://app.crypticorn.com
|
|
93
104
|
|
94
105
|
## Basic Usage
|
95
106
|
|
96
|
-
|
107
|
+
You can use the client with the async context protocol...
|
97
108
|
```python
|
98
|
-
async with ApiClient(
|
109
|
+
async with ApiClient(api_key="your-api-key") as client:
|
99
110
|
await client.pay.products.get_products()
|
100
111
|
```
|
101
|
-
|
102
|
-
### Without Async Context Protocol
|
103
|
-
Without the context you need to close the session manually.
|
112
|
+
...or without it like this...
|
104
113
|
```python
|
105
|
-
client = ApiClient(
|
114
|
+
client = ApiClient(api_key="your-api-key")
|
106
115
|
asyncio.run(client.pay.models.get_products())
|
107
116
|
asyncio.run(client.close())
|
108
117
|
```
|
109
|
-
...or
|
118
|
+
...or this.
|
119
|
+
```python
|
120
|
+
client = ApiClient(api_key="your-api-key")
|
121
|
+
|
110
122
|
async def main():
|
111
123
|
await client.pay.products.get_products()
|
112
124
|
|
113
125
|
asyncio.run(main())
|
114
126
|
asyncio.run(client.close())
|
127
|
+
```
|
115
128
|
|
116
129
|
## Response Types
|
117
130
|
|
@@ -120,8 +133,8 @@ There are three different available output formats you can choose from:
|
|
120
133
|
### Serialized Response
|
121
134
|
You can get fully serialized responses as pydantic models. Using this, you get the full benefits of pydantic's type checking.
|
122
135
|
```python
|
123
|
-
|
124
|
-
print(
|
136
|
+
res = await client.pay.products.get_products()
|
137
|
+
print(res)
|
125
138
|
```
|
126
139
|
The output would look like this:
|
127
140
|
```python
|
@@ -130,7 +143,7 @@ The output would look like this:
|
|
130
143
|
|
131
144
|
### Serialized Response with HTTP Info
|
132
145
|
```python
|
133
|
-
await client.pay.products.get_products_with_http_info()
|
146
|
+
res = await client.pay.products.get_products_with_http_info()
|
134
147
|
print(res)
|
135
148
|
```
|
136
149
|
The output would look like this:
|
@@ -159,15 +172,27 @@ The output would look like this:
|
|
159
172
|
[{'id': '67e8146e7bae32f3838fe36a', 'name': 'Awesome Product', 'price': 5.0, 'duration': 30, 'description': 'You need to buy this', 'is_active': True}]
|
160
173
|
```
|
161
174
|
|
175
|
+
## Wrapper Utilities
|
176
|
+
|
177
|
+
Our SDK provides a collection of wrapper utilities designed to make interacting with the API more efficient and user-friendly.
|
178
|
+
|
179
|
+
### Data Preprocessing
|
180
|
+
Some API operations allow to get the returned data formatted as a pandas Dataframe. These operations are suffixed with `_fmt` and take the same inputs as the non-formatted function. They live alongside the other functions with the default [response types](#response-types). To use this functionality you have to install `pandas`, which is available in the [`extra` dependency group](#installation).
|
181
|
+
|
182
|
+
### Data Downloads
|
183
|
+
This utility allows direct data streaming to your local disk, instead of only returning download links. It is being used in the following functions:
|
184
|
+
- `client.hive.data.download_data()` (overrides the [default response](https://docs.crypticorn.com/api/?api=hive-ai-api#tag/data/GET/data))
|
185
|
+
|
162
186
|
## Advanced Usage
|
163
187
|
|
164
188
|
You can override some configuration for specific services. If you just want to use the API as is, you don't need to configure anything.
|
165
189
|
This might be of use if you are testing a specific API locally.
|
166
190
|
|
167
|
-
To override e.g. the host for the Hive client to connect to
|
191
|
+
To override e.g. the host for the Hive client to connect to localhost:8000 instead of the default proxy, you would do:
|
168
192
|
```python
|
169
193
|
from crypticorn.hive import Configuration as Hiveconfig
|
170
194
|
from crypticorn.common import Service
|
171
|
-
|
195
|
+
|
196
|
+
async with ApiClient() as client:
|
172
197
|
client.configure(config=HiveConfig(host="http://localhost:8000"), client=Service.HIVE)
|
173
198
|
```
|
@@ -7,9 +7,9 @@ crypto market - and programmatically interact with the entire Crypticorn ecosyst
|
|
7
7
|
|
8
8
|
## Installation
|
9
9
|
|
10
|
-
|
10
|
+
You need Python 3.10+ installed to be able to use this library.
|
11
11
|
|
12
|
-
You can install the latest stable version from PyPi:
|
12
|
+
You can install the latest stable version from [PyPi](https://pypi.org/project/crypticorn/):
|
13
13
|
```bash
|
14
14
|
pip install crypticorn
|
15
15
|
```
|
@@ -19,7 +19,7 @@ If you want the latest version, which could be a pre release, run:
|
|
19
19
|
pip install --pre crypticorn
|
20
20
|
```
|
21
21
|
|
22
|
-
You can install extra dependencies grouped in the extras `extra
|
22
|
+
You can install extra dependencies grouped in the extras `extra`, `dev` (development) and `test` (testing). The `extra` dependencies include heavy libraries like `pandas`, which is only used in a few custom API operations (see [data processing](#data-preprocessing)), which preprocess the response data as a pandas Dataframe for convenience.
|
23
23
|
|
24
24
|
## Structure
|
25
25
|
|
@@ -27,11 +27,13 @@ Our API is available as an asynchronous Python SDK. The main entry point you nee
|
|
27
27
|
```python
|
28
28
|
from crypticorn import ApiClient
|
29
29
|
```
|
30
|
-
The ApiClient serves as the central interface for API operations. It instantiates multiple API wrappers corresponding to our micro services.
|
30
|
+
The ApiClient serves as the central interface for API operations. It instantiates multiple API wrappers corresponding to our micro services. These are structured the following:
|
31
31
|
|
32
|
-
|
32
|
+
<img src="../static/pip-structure.svg" alt="pip package structure" />
|
33
33
|
|
34
|
-
|
34
|
+
You can either explore each API by clicking through the library or checkout the [API Documentation](https://docs.crypticorn.com/api).
|
35
|
+
|
36
|
+
Request and response models for API operations should be accessed through the sub package you are using for an operation. All symbols are re-exported at the sub package level for convenience.
|
35
37
|
|
36
38
|
```python
|
37
39
|
from crypticorn.trade import BotStatus
|
@@ -48,25 +50,27 @@ To get started, [create an API key in your dashboard](https://app.crypticorn.com
|
|
48
50
|
|
49
51
|
## Basic Usage
|
50
52
|
|
51
|
-
|
53
|
+
You can use the client with the async context protocol...
|
52
54
|
```python
|
53
|
-
async with ApiClient(
|
55
|
+
async with ApiClient(api_key="your-api-key") as client:
|
54
56
|
await client.pay.products.get_products()
|
55
57
|
```
|
56
|
-
|
57
|
-
### Without Async Context Protocol
|
58
|
-
Without the context you need to close the session manually.
|
58
|
+
...or without it like this...
|
59
59
|
```python
|
60
|
-
client = ApiClient(
|
60
|
+
client = ApiClient(api_key="your-api-key")
|
61
61
|
asyncio.run(client.pay.models.get_products())
|
62
62
|
asyncio.run(client.close())
|
63
63
|
```
|
64
|
-
...or
|
64
|
+
...or this.
|
65
|
+
```python
|
66
|
+
client = ApiClient(api_key="your-api-key")
|
67
|
+
|
65
68
|
async def main():
|
66
69
|
await client.pay.products.get_products()
|
67
70
|
|
68
71
|
asyncio.run(main())
|
69
72
|
asyncio.run(client.close())
|
73
|
+
```
|
70
74
|
|
71
75
|
## Response Types
|
72
76
|
|
@@ -75,8 +79,8 @@ There are three different available output formats you can choose from:
|
|
75
79
|
### Serialized Response
|
76
80
|
You can get fully serialized responses as pydantic models. Using this, you get the full benefits of pydantic's type checking.
|
77
81
|
```python
|
78
|
-
|
79
|
-
print(
|
82
|
+
res = await client.pay.products.get_products()
|
83
|
+
print(res)
|
80
84
|
```
|
81
85
|
The output would look like this:
|
82
86
|
```python
|
@@ -85,7 +89,7 @@ The output would look like this:
|
|
85
89
|
|
86
90
|
### Serialized Response with HTTP Info
|
87
91
|
```python
|
88
|
-
await client.pay.products.get_products_with_http_info()
|
92
|
+
res = await client.pay.products.get_products_with_http_info()
|
89
93
|
print(res)
|
90
94
|
```
|
91
95
|
The output would look like this:
|
@@ -114,15 +118,27 @@ The output would look like this:
|
|
114
118
|
[{'id': '67e8146e7bae32f3838fe36a', 'name': 'Awesome Product', 'price': 5.0, 'duration': 30, 'description': 'You need to buy this', 'is_active': True}]
|
115
119
|
```
|
116
120
|
|
121
|
+
## Wrapper Utilities
|
122
|
+
|
123
|
+
Our SDK provides a collection of wrapper utilities designed to make interacting with the API more efficient and user-friendly.
|
124
|
+
|
125
|
+
### Data Preprocessing
|
126
|
+
Some API operations allow to get the returned data formatted as a pandas Dataframe. These operations are suffixed with `_fmt` and take the same inputs as the non-formatted function. They live alongside the other functions with the default [response types](#response-types). To use this functionality you have to install `pandas`, which is available in the [`extra` dependency group](#installation).
|
127
|
+
|
128
|
+
### Data Downloads
|
129
|
+
This utility allows direct data streaming to your local disk, instead of only returning download links. It is being used in the following functions:
|
130
|
+
- `client.hive.data.download_data()` (overrides the [default response](https://docs.crypticorn.com/api/?api=hive-ai-api#tag/data/GET/data))
|
131
|
+
|
117
132
|
## Advanced Usage
|
118
133
|
|
119
134
|
You can override some configuration for specific services. If you just want to use the API as is, you don't need to configure anything.
|
120
135
|
This might be of use if you are testing a specific API locally.
|
121
136
|
|
122
|
-
To override e.g. the host for the Hive client to connect to
|
137
|
+
To override e.g. the host for the Hive client to connect to localhost:8000 instead of the default proxy, you would do:
|
123
138
|
```python
|
124
139
|
from crypticorn.hive import Configuration as Hiveconfig
|
125
140
|
from crypticorn.common import Service
|
126
|
-
|
141
|
+
|
142
|
+
async with ApiClient() as client:
|
127
143
|
client.configure(config=HiveConfig(host="http://localhost:8000"), client=Service.HIVE)
|
128
144
|
```
|
@@ -0,0 +1,15 @@
|
|
1
|
+
"""
|
2
|
+
.. include:: ../README.md
|
3
|
+
|
4
|
+
## Versioning
|
5
|
+
We adhere to [Semantic Versioning](https://semver.org/).
|
6
|
+
You can find the full Changelog [below](#changelog).
|
7
|
+
"""
|
8
|
+
|
9
|
+
from crypticorn.common.logging import configure_logging
|
10
|
+
|
11
|
+
configure_logging()
|
12
|
+
|
13
|
+
from crypticorn.client import ApiClient
|
14
|
+
|
15
|
+
__all__ = ["ApiClient"]
|
{crypticorn-2.7.5 → crypticorn-2.8.0}/crypticorn/auth/client/models/create_api_key_request.py
RENAMED
@@ -78,10 +78,12 @@ class CreateApiKeyRequest(BaseModel):
|
|
78
78
|
"read:metrics:tokens",
|
79
79
|
"read:metrics:markets",
|
80
80
|
"read:sentiment",
|
81
|
+
"read:admin",
|
82
|
+
"write:admin",
|
81
83
|
]
|
82
84
|
):
|
83
85
|
raise ValueError(
|
84
|
-
"each list item must be one of ('read:predictions', 'read:hive:model', 'read:hive:data', 'write:hive:model', 'read:trade:bots', 'write:trade:bots', 'read:trade:exchangekeys', 'write:trade:exchangekeys', 'read:trade:orders', 'read:trade:actions', 'write:trade:actions', 'read:trade:exchanges', 'read:trade:futures', 'write:trade:futures', 'read:trade:notifications', 'write:trade:notifications', 'read:trade:strategies', 'write:trade:strategies', 'read:pay:payments', 'read:pay:products', 'write:pay:products', 'read:pay:now', 'write:pay:now', 'read:metrics:marketcap', 'read:metrics:indicators', 'read:metrics:exchanges', 'read:metrics:tokens', 'read:metrics:markets', 'read:sentiment')"
|
86
|
+
"each list item must be one of ('read:predictions', 'read:hive:model', 'read:hive:data', 'write:hive:model', 'read:trade:bots', 'write:trade:bots', 'read:trade:exchangekeys', 'write:trade:exchangekeys', 'read:trade:orders', 'read:trade:actions', 'write:trade:actions', 'read:trade:exchanges', 'read:trade:futures', 'write:trade:futures', 'read:trade:notifications', 'write:trade:notifications', 'read:trade:strategies', 'write:trade:strategies', 'read:pay:payments', 'read:pay:products', 'write:pay:products', 'read:pay:now', 'write:pay:now', 'read:metrics:marketcap', 'read:metrics:indicators', 'read:metrics:exchanges', 'read:metrics:tokens', 'read:metrics:markets', 'read:sentiment', 'read:admin', 'write:admin')"
|
85
87
|
)
|
86
88
|
return value
|
87
89
|
|
@@ -86,10 +86,12 @@ class GetApiKeys200ResponseInner(BaseModel):
|
|
86
86
|
"read:metrics:tokens",
|
87
87
|
"read:metrics:markets",
|
88
88
|
"read:sentiment",
|
89
|
+
"read:admin",
|
90
|
+
"write:admin",
|
89
91
|
]
|
90
92
|
):
|
91
93
|
raise ValueError(
|
92
|
-
"each list item must be one of ('read:predictions', 'read:hive:model', 'read:hive:data', 'write:hive:model', 'read:trade:bots', 'write:trade:bots', 'read:trade:exchangekeys', 'write:trade:exchangekeys', 'read:trade:orders', 'read:trade:actions', 'write:trade:actions', 'read:trade:exchanges', 'read:trade:futures', 'write:trade:futures', 'read:trade:notifications', 'write:trade:notifications', 'read:trade:strategies', 'write:trade:strategies', 'read:pay:payments', 'read:pay:products', 'write:pay:products', 'read:pay:now', 'write:pay:now', 'read:metrics:marketcap', 'read:metrics:indicators', 'read:metrics:exchanges', 'read:metrics:tokens', 'read:metrics:markets', 'read:sentiment')"
|
94
|
+
"each list item must be one of ('read:predictions', 'read:hive:model', 'read:hive:data', 'write:hive:model', 'read:trade:bots', 'write:trade:bots', 'read:trade:exchangekeys', 'write:trade:exchangekeys', 'read:trade:orders', 'read:trade:actions', 'write:trade:actions', 'read:trade:exchanges', 'read:trade:futures', 'write:trade:futures', 'read:trade:notifications', 'write:trade:notifications', 'read:trade:strategies', 'write:trade:strategies', 'read:pay:payments', 'read:pay:products', 'write:pay:products', 'read:pay:now', 'write:pay:now', 'read:metrics:marketcap', 'read:metrics:indicators', 'read:metrics:exchanges', 'read:metrics:tokens', 'read:metrics:markets', 'read:sentiment', 'read:admin', 'write:admin')"
|
93
95
|
)
|
94
96
|
return value
|
95
97
|
|
@@ -13,7 +13,7 @@ SubClient = TypeVar("SubClient")
|
|
13
13
|
|
14
14
|
class ApiClient:
|
15
15
|
"""
|
16
|
-
The official client for interacting with the Crypticorn API.
|
16
|
+
The official Python client for interacting with the Crypticorn API.
|
17
17
|
|
18
18
|
It is consisting of multiple microservices covering the whole stack of the Crypticorn project.
|
19
19
|
"""
|
@@ -27,11 +27,11 @@ class ApiClient:
|
|
27
27
|
self.base_url = base_url
|
28
28
|
"""The base URL the client will use to connect to the API."""
|
29
29
|
self.api_key = api_key
|
30
|
-
"""The API key to use for authentication."""
|
30
|
+
"""The API key to use for authentication (recommended)."""
|
31
31
|
self.jwt = jwt
|
32
|
-
"""The JWT to use for authentication."""
|
32
|
+
"""The JWT to use for authentication (not recommended)."""
|
33
33
|
|
34
|
-
self.
|
34
|
+
self._service_classes: dict[Service, type[SubClient]] = {
|
35
35
|
Service.HIVE: HiveClient,
|
36
36
|
Service.TRADE: TradeClient,
|
37
37
|
Service.KLINES: KlinesClient,
|
@@ -40,38 +40,56 @@ class ApiClient:
|
|
40
40
|
Service.AUTH: AuthClient,
|
41
41
|
}
|
42
42
|
|
43
|
-
self.
|
43
|
+
self._services: dict[Service, SubClient] = {
|
44
44
|
service: client_class(self._get_default_config(service))
|
45
|
-
for service, client_class in self.
|
45
|
+
for service, client_class in self._service_classes.items()
|
46
46
|
}
|
47
47
|
|
48
48
|
@property
|
49
49
|
def hive(self) -> HiveClient:
|
50
|
-
|
50
|
+
"""
|
51
|
+
Entry point for the Hive AI API ([Docs](https://docs.crypticorn.com/api/?api=hive-ai-api)).
|
52
|
+
"""
|
53
|
+
return self._services[Service.HIVE]
|
51
54
|
|
52
55
|
@property
|
53
56
|
def trade(self) -> TradeClient:
|
54
|
-
|
57
|
+
"""
|
58
|
+
Entry point for the Trading API ([Docs](https://docs.crypticorn.com/api/?api=trading-api)).
|
59
|
+
"""
|
60
|
+
return self._services[Service.TRADE]
|
55
61
|
|
56
62
|
@property
|
57
63
|
def klines(self) -> KlinesClient:
|
58
|
-
|
64
|
+
"""
|
65
|
+
Entry point for the Klines API ([Docs](https://docs.crypticorn.com/api/?api=klines-api)).
|
66
|
+
"""
|
67
|
+
return self._services[Service.KLINES]
|
59
68
|
|
60
69
|
@property
|
61
70
|
def metrics(self) -> MetricsClient:
|
62
|
-
|
71
|
+
"""
|
72
|
+
Entry point for the Metrics API ([Docs](https://docs.crypticorn.com/api/?api=metrics-api)).
|
73
|
+
"""
|
74
|
+
return self._services[Service.METRICS]
|
63
75
|
|
64
76
|
@property
|
65
77
|
def pay(self) -> PayClient:
|
66
|
-
|
78
|
+
"""
|
79
|
+
Entry point for the Payment API ([Docs](https://docs.crypticorn.com/api/?api=payment-api)).
|
80
|
+
"""
|
81
|
+
return self._services[Service.PAY]
|
67
82
|
|
68
83
|
@property
|
69
84
|
def auth(self) -> AuthClient:
|
70
|
-
|
85
|
+
"""
|
86
|
+
Entry point for the Auth API ([Docs](https://docs.crypticorn.com/api/?api=auth-api)).
|
87
|
+
"""
|
88
|
+
return self._services[Service.AUTH]
|
71
89
|
|
72
90
|
async def close(self):
|
73
91
|
"""Close all client sessions."""
|
74
|
-
for service in self.
|
92
|
+
for service in self._services.values():
|
75
93
|
if hasattr(service.base_client, "close"):
|
76
94
|
await service.base_client.close()
|
77
95
|
|
@@ -81,7 +99,7 @@ class ApiClient:
|
|
81
99
|
"""
|
82
100
|
Get the default configuration for a given service.
|
83
101
|
"""
|
84
|
-
config_class = self.
|
102
|
+
config_class = self._service_classes[service].config_class
|
85
103
|
return config_class(
|
86
104
|
host=f"{self.base_url}/{version}/{service}",
|
87
105
|
access_token=self.jwt,
|
@@ -105,7 +123,7 @@ class ApiClient:
|
|
105
123
|
>>> client.configure(config=HiveConfig(host="http://localhost:8000"), client=client.hive)
|
106
124
|
"""
|
107
125
|
assert Service.validate(service), f"Invalid service: {service}"
|
108
|
-
client = self.
|
126
|
+
client = self._services[service]
|
109
127
|
new_config = client.config
|
110
128
|
|
111
129
|
for attr in vars(config):
|
@@ -113,7 +131,7 @@ class ApiClient:
|
|
113
131
|
if new_value:
|
114
132
|
setattr(new_config, attr, new_value)
|
115
133
|
|
116
|
-
self.
|
134
|
+
self._services[service] = type(client)(new_config)
|
117
135
|
|
118
136
|
async def __aenter__(self):
|
119
137
|
return self
|
@@ -8,4 +8,8 @@ from crypticorn.common.enums import *
|
|
8
8
|
from crypticorn.common.utils import *
|
9
9
|
from crypticorn.common.exceptions import *
|
10
10
|
from crypticorn.common.pagination import *
|
11
|
-
from crypticorn.common.
|
11
|
+
from crypticorn.common.logging import *
|
12
|
+
from crypticorn.common.ansi_colors import *
|
13
|
+
from crypticorn.common.middleware import *
|
14
|
+
from crypticorn.common.router.status_router import router as status_router
|
15
|
+
from crypticorn.common.router.admin_router import router as admin_router
|
@@ -0,0 +1,37 @@
|
|
1
|
+
from enum import StrEnum
|
2
|
+
from typing import TYPE_CHECKING
|
3
|
+
|
4
|
+
|
5
|
+
class AnsiColors(StrEnum):
|
6
|
+
# Regular Text Colors
|
7
|
+
BLACK = "\033[30m" # black
|
8
|
+
RED = "\033[31m" # red
|
9
|
+
GREEN = "\033[32m" # green
|
10
|
+
YELLOW = "\033[33m" # yellow
|
11
|
+
BLUE = "\033[34m" # blue
|
12
|
+
MAGENTA = "\033[35m" # magenta
|
13
|
+
CYAN = "\033[36m" # cyan
|
14
|
+
WHITE = "\033[37m" # white
|
15
|
+
|
16
|
+
# Bright Text Colors
|
17
|
+
BLACK_BRIGHT = "\033[90m" # black_bright
|
18
|
+
RED_BRIGHT = "\033[91m" # red_bright
|
19
|
+
GREEN_BRIGHT = "\033[92m" # green_bright
|
20
|
+
YELLOW_BRIGHT = "\033[93m" # yellow_bright
|
21
|
+
BLUE_BRIGHT = "\033[94m" # blue_bright
|
22
|
+
MAGENTA_BRIGHT = "\033[95m" # magenta_bright
|
23
|
+
CYAN_BRIGHT = "\033[96m" # cyan_bright
|
24
|
+
WHITE_BRIGHT = "\033[97m" # white_bright
|
25
|
+
|
26
|
+
# Bold Text Colors
|
27
|
+
BLACK_BOLD = "\033[1;30m" # black_bold
|
28
|
+
RED_BOLD = "\033[1;31m" # red_bold
|
29
|
+
GREEN_BOLD = "\033[1;32m" # green_bold
|
30
|
+
YELLOW_BOLD = "\033[1;33m" # yellow_bold
|
31
|
+
BLUE_BOLD = "\033[1;34m" # blue_bold
|
32
|
+
MAGENTA_BOLD = "\033[1;35m" # magenta_bold
|
33
|
+
CYAN_BOLD = "\033[1;36m" # cyan_bold
|
34
|
+
WHITE_BOLD = "\033[1;37m" # white_bold
|
35
|
+
|
36
|
+
# Reset Color
|
37
|
+
RESET = "\033[0m"
|
@@ -75,7 +75,9 @@ class AuthHandler:
|
|
75
75
|
raise HTTPException(
|
76
76
|
content=ExceptionContent(
|
77
77
|
error=ApiError.INSUFFICIENT_SCOPES,
|
78
|
-
message="Insufficient scopes to access this resource"
|
78
|
+
message="Insufficient scopes to access this resource (required: "
|
79
|
+
+ ", ".join(api_scopes)
|
80
|
+
+ ")",
|
79
81
|
),
|
80
82
|
)
|
81
83
|
|