crypticorn 2.4.0__tar.gz → 2.4.2__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.4.0 → crypticorn-2.4.2}/PKG-INFO +16 -7
- {crypticorn-2.4.0 → crypticorn-2.4.2}/README.md +15 -6
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/create_api_key_request.py +7 -2
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/get_api_keys200_response_inner.py +7 -2
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/cli/__init__.py +1 -1
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/cli/__main__.py +3 -1
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/cli/init.py +32 -12
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/cli/templates/auth.py +7 -3
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/common/enums.py +8 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/common/errors.py +112 -7
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/common/scopes.py +13 -3
- crypticorn-2.4.2/crypticorn/common/utils.py +50 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/api_error_identifier.py +1 -1
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn.egg-info/PKG-INFO +16 -7
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn.egg-info/SOURCES.txt +1 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/pyproject.toml +1 -1
- {crypticorn-2.4.0 → crypticorn-2.4.2}/tests/test_enums.py +18 -16
- {crypticorn-2.4.0 → crypticorn-2.4.2}/tests/test_errors.py +5 -5
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/api/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/api/admin_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/api/auth_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/api/service_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/api/user_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/api/wallet_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/api_client.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/api_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/configuration.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/exceptions.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/add_wallet200_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/add_wallet_request.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/authorize_user200_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/authorize_user200_response_auth.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/authorize_user_request.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/create_api_key200_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/create_user_request.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/list_wallets200_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/list_wallets200_response_data_inner.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/list_wallets200_response_user_value.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/logout_default_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/logout_default_response_issues_inner.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/oauth_callback200_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/oauth_callback200_response_user.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/refresh_token_info200_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/resend_verification_email_request.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/revoke_user_tokens_request.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/rotate_tokens200_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/token_info200_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/unlink_wallet_request.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/update_user_request.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/user_reset_password_request.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/user_set_password_request.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/verify200_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/verify_email200_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/verify_email200_response_auth.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/verify_email200_response_auth_auth.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/verify_email_request.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/verify_wallet_request.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/wallet_verified200_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/whoami200_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/py.typed +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/rest.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/main.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/cli/templates/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/client.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/common/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/common/auth.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/common/pydantic.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/common/sorter.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/common/urls.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/api/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/api/data_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/api/models_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/api/status_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/api_client.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/api_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/configuration.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/exceptions.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/coins.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/data_download_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/data_info.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/data_value_value_value_inner.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/data_version.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/download_links.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/evaluation.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/evaluation_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/feature_size.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/http_validation_error.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/model.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/model_create.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/model_status.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/model_update.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/target.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/target_type.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/validation_error.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/models/validation_error_loc_inner.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/py.typed +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/client/rest.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/hive/main.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/api/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/api/funding_rates_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/api/health_check_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/api/ohlcv_data_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/api/symbols_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/api/udf_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/api_client.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/api_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/configuration.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/exceptions.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/base_response_health_check_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/base_response_list_funding_rate_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/base_response_list_str.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/base_response_ohlcv_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/error_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/exchange.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/funding_rate_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/health_check_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/history_error_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/history_no_data_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/history_success_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/http_validation_error.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/market.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/ohlcv_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/resolution.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/response_get_history_udf_history_get.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/search_symbol_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/sort_direction.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/symbol_group_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/symbol_info_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/symbol_type.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/timeframe.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/udf_config_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/validation_error.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/models/validation_error_loc_inner.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/py.typed +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/client/rest.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/klines/main.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/api/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/api/exchanges_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/api/health_check_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/api/indicators_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/api/logs_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/api/marketcap_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/api/markets_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/api/tokens_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/api_client.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/api_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/configuration.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/exceptions.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/models/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/models/base_response_dict.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/models/base_response_health_check_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/models/base_response_list_dict.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/models/base_response_list_exchange_mapping.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/models/base_response_list_str.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/models/error_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/models/exchange_mapping.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/models/health_check_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/models/http_validation_error.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/models/market.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/models/severity.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/models/validation_error.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/models/validation_error_loc_inner.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/py.typed +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/client/rest.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/metrics/main.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/api/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/api/now_payments_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/api/payments_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/api/products_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/api/status_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/api_client.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/api_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/configuration.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/exceptions.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/api_status_res.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/body_create_now_invoice.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/body_create_product.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/body_get_products.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/body_handle_now_webhook.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/body_update_product.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/combined_payment_history.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/create_invoice_req.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/create_invoice_res.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/currency.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/estimate_price_req.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/estimate_price_res.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/get_currencies_res.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/get_payment_status_res.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/get_payments_list_res.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/http_validation_error.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/min_amount_req.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/min_amount_res.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/now_api_status_res.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/now_create_invoice_req.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/now_create_invoice_res.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/now_fee_structure.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/now_payment_model.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/now_payment_status.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/now_webhook_payload.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/partial_product_update_model.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/payment.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/payment_status.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/product.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/product_model.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/product_subs_model.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/product_update_model.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/scope.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/services.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/unified_payment_model.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/validation_error.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/models/validation_error_loc_inner.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/py.typed +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/client/rest.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/pay/main.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/api/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/api/api_keys_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/api/bots_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/api/exchanges_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/api/futures_trading_panel_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/api/notifications_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/api/orders_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/api/status_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/api/strategies_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/api/trading_actions_api.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/api_client.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/api_response.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/configuration.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/exceptions.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/__init__.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/action_model.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/api_error_level.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/api_error_type.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/api_key_model.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/bot_model.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/bot_status.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/exchange.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/exchange_key_model.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/execution_ids.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/futures_balance.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/futures_trading_action.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/http_validation_error.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/margin_mode.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/market_type.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/notification_model.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/order_model.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/order_status.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/post_futures_action.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/strategy_exchange_info.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/strategy_model_input.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/strategy_model_output.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/tpsl.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/trading_action_type.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/validation_error.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/validation_error_loc_inner.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/py.typed +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/rest.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/main.py +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn.egg-info/dependency_links.txt +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn.egg-info/entry_points.txt +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn.egg-info/requires.txt +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn.egg-info/top_level.txt +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/requirements/dev.txt +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/requirements/main.txt +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/requirements/test.txt +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/setup.cfg +0 -0
- {crypticorn-2.4.0 → crypticorn-2.4.2}/tests/test_auth_client.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: crypticorn
|
3
|
-
Version: 2.4.
|
3
|
+
Version: 2.4.2
|
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
|
@@ -56,11 +56,6 @@ You can install the latest stable version from PyPi:
|
|
56
56
|
pip install crypticorn
|
57
57
|
```
|
58
58
|
|
59
|
-
If you want a specific version, run:
|
60
|
-
```bash
|
61
|
-
pip install crypticorn==2.0.0
|
62
|
-
```
|
63
|
-
|
64
59
|
If you want the latest version, which could be a pre release, run:
|
65
60
|
```bash
|
66
61
|
pip install --pre crypticorn
|
@@ -72,6 +67,20 @@ Our API is available as an asynchronous Python SDK. The main entry point you nee
|
|
72
67
|
```python
|
73
68
|
from crypticorn import ApiClient
|
74
69
|
```
|
70
|
+
The ApiClient serves as the central interface for API operations. It instantiates multiple API wrappers corresponding to our microservices.
|
71
|
+
|
72
|
+
Specific imports, such as request models, should be accessed through the appropriate submodules.
|
73
|
+
|
74
|
+
Note: All symbols are re-exported at the first submodule layer for convenience.
|
75
|
+
|
76
|
+
```python
|
77
|
+
from crypticorn.trade import BotStatus
|
78
|
+
```
|
79
|
+
|
80
|
+
The `common` submodule contains shared classes not bound to a specific API.
|
81
|
+
```python
|
82
|
+
from crypticorn.common import Scope, Exchange
|
83
|
+
```
|
75
84
|
|
76
85
|
## Usage
|
77
86
|
|
@@ -122,7 +131,7 @@ On top of that you get some information about the request:
|
|
122
131
|
print(res.status_code)
|
123
132
|
print(res.raw_data)
|
124
133
|
print(res.headers)
|
125
|
-
|
134
|
+
```
|
126
135
|
|
127
136
|
### JSON Response
|
128
137
|
You can receive a classical JSON response by suffixing the function name with `_without_preload_content`
|
@@ -17,11 +17,6 @@ You can install the latest stable version from PyPi:
|
|
17
17
|
pip install crypticorn
|
18
18
|
```
|
19
19
|
|
20
|
-
If you want a specific version, run:
|
21
|
-
```bash
|
22
|
-
pip install crypticorn==2.0.0
|
23
|
-
```
|
24
|
-
|
25
20
|
If you want the latest version, which could be a pre release, run:
|
26
21
|
```bash
|
27
22
|
pip install --pre crypticorn
|
@@ -33,6 +28,20 @@ Our API is available as an asynchronous Python SDK. The main entry point you nee
|
|
33
28
|
```python
|
34
29
|
from crypticorn import ApiClient
|
35
30
|
```
|
31
|
+
The ApiClient serves as the central interface for API operations. It instantiates multiple API wrappers corresponding to our microservices.
|
32
|
+
|
33
|
+
Specific imports, such as request models, should be accessed through the appropriate submodules.
|
34
|
+
|
35
|
+
Note: All symbols are re-exported at the first submodule layer for convenience.
|
36
|
+
|
37
|
+
```python
|
38
|
+
from crypticorn.trade import BotStatus
|
39
|
+
```
|
40
|
+
|
41
|
+
The `common` submodule contains shared classes not bound to a specific API.
|
42
|
+
```python
|
43
|
+
from crypticorn.common import Scope, Exchange
|
44
|
+
```
|
36
45
|
|
37
46
|
## Usage
|
38
47
|
|
@@ -83,7 +92,7 @@ On top of that you get some information about the request:
|
|
83
92
|
print(res.status_code)
|
84
93
|
print(res.raw_data)
|
85
94
|
print(res.headers)
|
86
|
-
|
95
|
+
```
|
87
96
|
|
88
97
|
### JSON Response
|
89
98
|
You can receive a classical JSON response by suffixing the function name with `_without_preload_content`
|
{crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/auth/client/models/create_api_key_request.py
RENAMED
@@ -49,6 +49,7 @@ class CreateApiKeyRequest(BaseModel):
|
|
49
49
|
for i in value:
|
50
50
|
if i not in set(
|
51
51
|
[
|
52
|
+
"read:predictions",
|
52
53
|
"read:hive:model",
|
53
54
|
"read:hive:data",
|
54
55
|
"write:hive:model",
|
@@ -71,11 +72,15 @@ class CreateApiKeyRequest(BaseModel):
|
|
71
72
|
"write:pay:products",
|
72
73
|
"read:pay:now",
|
73
74
|
"write:pay:now",
|
74
|
-
"read:
|
75
|
+
"read:metrics:marketcap",
|
76
|
+
"read:metrics:indicators",
|
77
|
+
"read:metrics:exchanges",
|
78
|
+
"read:metrics:tokens",
|
79
|
+
"read:metrics:markets",
|
75
80
|
]
|
76
81
|
):
|
77
82
|
raise ValueError(
|
78
|
-
"each list item must be one of ('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:
|
83
|
+
"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')"
|
79
84
|
)
|
80
85
|
return value
|
81
86
|
|
@@ -57,6 +57,7 @@ class GetApiKeys200ResponseInner(BaseModel):
|
|
57
57
|
for i in value:
|
58
58
|
if i not in set(
|
59
59
|
[
|
60
|
+
"read:predictions",
|
60
61
|
"read:hive:model",
|
61
62
|
"read:hive:data",
|
62
63
|
"write:hive:model",
|
@@ -79,11 +80,15 @@ class GetApiKeys200ResponseInner(BaseModel):
|
|
79
80
|
"write:pay:products",
|
80
81
|
"read:pay:now",
|
81
82
|
"write:pay:now",
|
82
|
-
"read:
|
83
|
+
"read:metrics:marketcap",
|
84
|
+
"read:metrics:indicators",
|
85
|
+
"read:metrics:exchanges",
|
86
|
+
"read:metrics:tokens",
|
87
|
+
"read:metrics:markets",
|
83
88
|
]
|
84
89
|
):
|
85
90
|
raise ValueError(
|
86
|
-
"each list item must be one of ('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:
|
91
|
+
"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')"
|
87
92
|
)
|
88
93
|
return value
|
89
94
|
|
@@ -3,12 +3,14 @@
|
|
3
3
|
import click
|
4
4
|
from crypticorn.cli import init_group
|
5
5
|
|
6
|
+
|
6
7
|
@click.group()
|
7
8
|
def cli():
|
8
9
|
"""🧙 Crypticorn CLI — magic for our microservices."""
|
9
10
|
pass
|
10
11
|
|
12
|
+
|
11
13
|
cli.add_command(init_group, name="init")
|
12
14
|
|
13
15
|
if __name__ == "__main__":
|
14
|
-
cli()
|
16
|
+
cli()
|
@@ -4,16 +4,24 @@ import subprocess
|
|
4
4
|
import importlib.resources as pkg_resources
|
5
5
|
import crypticorn.cli.templates as templates
|
6
6
|
|
7
|
+
|
7
8
|
def get_git_root() -> Path:
|
8
|
-
|
9
|
+
"""Get the root directory of the git repository."""
|
9
10
|
try:
|
10
|
-
return Path(
|
11
|
+
return Path(
|
12
|
+
subprocess.check_output(
|
13
|
+
["git", "rev-parse", "--show-toplevel"], text=True
|
14
|
+
).strip()
|
15
|
+
)
|
11
16
|
except Exception:
|
12
17
|
return Path.cwd()
|
13
18
|
|
19
|
+
|
14
20
|
def copy_template(template_name: str, target_path: Path):
|
15
|
-
|
16
|
-
with pkg_resources.files(templates).joinpath(template_name).open(
|
21
|
+
"""Copy a template file to the target path."""
|
22
|
+
with pkg_resources.files(templates).joinpath(template_name).open(
|
23
|
+
"r"
|
24
|
+
) as template_file:
|
17
25
|
content = template_file.read()
|
18
26
|
|
19
27
|
target_path.parent.mkdir(parents=True, exist_ok=True)
|
@@ -22,13 +30,15 @@ def copy_template(template_name: str, target_path: Path):
|
|
22
30
|
|
23
31
|
click.secho(f"✅ Created: {target_path}", fg="green")
|
24
32
|
|
33
|
+
|
25
34
|
@click.group()
|
26
35
|
def init_group():
|
27
36
|
"""Initialize files like CI configs, linters, etc."""
|
28
37
|
pass
|
29
38
|
|
39
|
+
|
30
40
|
@init_group.command("ruff")
|
31
|
-
@click.option(
|
41
|
+
@click.option("-f", "--force", is_flag=True, help="Force overwrite the ruff.yml")
|
32
42
|
def init_ruff(force):
|
33
43
|
"""Add .github/workflows/ruff.yml"""
|
34
44
|
root = get_git_root()
|
@@ -38,9 +48,12 @@ def init_ruff(force):
|
|
38
48
|
return
|
39
49
|
copy_template("ruff.yml", target)
|
40
50
|
|
51
|
+
|
41
52
|
@init_group.command("docker")
|
42
|
-
@click.option(
|
43
|
-
|
53
|
+
@click.option(
|
54
|
+
"-o", "--output", type=click.Path(), help="Custom output path for the Dockerfile"
|
55
|
+
)
|
56
|
+
@click.option("-f", "--force", is_flag=True, help="Force overwrite the Dockerfile")
|
44
57
|
def init_docker(output, force):
|
45
58
|
"""Add Dockerfile"""
|
46
59
|
root = get_git_root()
|
@@ -51,9 +64,12 @@ def init_docker(output, force):
|
|
51
64
|
copy_template("Dockerfile", target)
|
52
65
|
click.secho("Make sure to update the Dockerfile", fg="yellow")
|
53
66
|
|
67
|
+
|
54
68
|
@init_group.command("auth")
|
55
|
-
@click.option(
|
56
|
-
|
69
|
+
@click.option(
|
70
|
+
"-o", "--output", type=click.Path(), help="Custom output path for the auth handler"
|
71
|
+
)
|
72
|
+
@click.option("-f", "--force", is_flag=True, help="Force overwrite the auth handler")
|
57
73
|
def init_auth(output, force):
|
58
74
|
"""Add auth.py with auth handler. Everything you need to start using the auth service."""
|
59
75
|
root = get_git_root()
|
@@ -65,17 +81,21 @@ def init_auth(output, force):
|
|
65
81
|
click.secho("File already exists, use --force / -f to overwrite", fg="red")
|
66
82
|
return
|
67
83
|
copy_template("auth.py", target)
|
68
|
-
click.secho(
|
84
|
+
click.secho(
|
85
|
+
"""
|
69
86
|
Make sure to update the .env file with:
|
70
87
|
IS_DOCKER=0
|
71
88
|
API_ENV=local
|
72
89
|
and the docker-compose.yml file with:
|
73
90
|
environment:
|
74
91
|
- IS_DOCKER=1
|
75
|
-
|
92
|
+
""",
|
93
|
+
fg="yellow",
|
94
|
+
)
|
95
|
+
|
76
96
|
|
77
97
|
@init_group.command("dependabot")
|
78
|
-
@click.option(
|
98
|
+
@click.option("-f", "--force", is_flag=True, help="Force overwrite the dependabot.yml")
|
79
99
|
def init_dependabot(force):
|
80
100
|
"""Add dependabot.yml"""
|
81
101
|
root = get_git_root()
|
@@ -18,10 +18,14 @@ DOCKER_ENV = os.getenv("IS_DOCKER")
|
|
18
18
|
API_ENV = os.getenv("API_ENV")
|
19
19
|
|
20
20
|
if not DOCKER_ENV:
|
21
|
-
raise ValueError(
|
21
|
+
raise ValueError(
|
22
|
+
"IS_DOCKER is not set. Please set it to '0' in .env and '1' in the docker-compose.yml file."
|
23
|
+
)
|
22
24
|
|
23
25
|
if not API_ENV:
|
24
|
-
raise ValueError(
|
26
|
+
raise ValueError(
|
27
|
+
"API_ENV is not set. Please set it to 'prod', 'dev' or 'local' in .env (of type ApiEnv)."
|
28
|
+
)
|
25
29
|
|
26
30
|
if DOCKER_ENV == "0":
|
27
31
|
logger.info(f"Using {API_ENV} environment")
|
@@ -31,4 +35,4 @@ else:
|
|
31
35
|
logger.info("Using docker environment")
|
32
36
|
|
33
37
|
auth_handler = AuthHandler(base_url=base_url)
|
34
|
-
logger.info(f"Auth URL: {auth_handler.client.config.host}")
|
38
|
+
logger.info(f"Auth URL: {auth_handler.client.config.host}")
|
@@ -1,5 +1,6 @@
|
|
1
1
|
from enum import StrEnum
|
2
2
|
|
3
|
+
|
3
4
|
class ValidateEnumMixin:
|
4
5
|
"""
|
5
6
|
Mixin for validating enum values manually.
|
@@ -18,6 +19,7 @@ class ValidateEnumMixin:
|
|
18
19
|
|
19
20
|
Order of inheritance matters — the mixin must come first.
|
20
21
|
"""
|
22
|
+
|
21
23
|
@classmethod
|
22
24
|
def validate(cls, value) -> bool:
|
23
25
|
try:
|
@@ -26,13 +28,17 @@ class ValidateEnumMixin:
|
|
26
28
|
except ValueError:
|
27
29
|
return False
|
28
30
|
|
31
|
+
|
29
32
|
class Exchange(ValidateEnumMixin, StrEnum):
|
30
33
|
"""Supported exchanges for trading"""
|
34
|
+
|
31
35
|
KUCOIN = "kucoin"
|
32
36
|
BINGX = "bingx"
|
33
37
|
|
38
|
+
|
34
39
|
class InternalExchange(ValidateEnumMixin, StrEnum):
|
35
40
|
"""All exchanges we are using, including public (Exchange)"""
|
41
|
+
|
36
42
|
KUCOIN = "kucoin"
|
37
43
|
BINGX = "bingx"
|
38
44
|
BINANCE = "binance"
|
@@ -40,9 +46,11 @@ class InternalExchange(ValidateEnumMixin, StrEnum):
|
|
40
46
|
HYPERLIQUID = "hyperliquid"
|
41
47
|
BITGET = "bitget"
|
42
48
|
|
49
|
+
|
43
50
|
class MarketType(ValidateEnumMixin, StrEnum):
|
44
51
|
"""
|
45
52
|
Market types
|
46
53
|
"""
|
54
|
+
|
47
55
|
SPOT = "spot"
|
48
56
|
FUTURES = "futures"
|
@@ -1,5 +1,6 @@
|
|
1
1
|
from enum import Enum, EnumMeta
|
2
2
|
import logging
|
3
|
+
from fastapi import status
|
3
4
|
|
4
5
|
logger = logging.getLogger(__name__)
|
5
6
|
|
@@ -58,7 +59,7 @@ class ApiErrorIdentifier(str, Enum):
|
|
58
59
|
INSUFFICIENT_SCOPES = "insufficient_scopes"
|
59
60
|
INVALID_API_KEY = "invalid_api_key"
|
60
61
|
INVALID_BEARER = "invalid_bearer"
|
61
|
-
|
62
|
+
INVALID_EXCHANGE_KEY = "invalid_exchange_key"
|
62
63
|
INVALID_MARGIN_MODE = "invalid_margin_mode"
|
63
64
|
INVALID_PARAMETER = "invalid_parameter_provided"
|
64
65
|
JWT_EXPIRED = "jwt_expired"
|
@@ -67,6 +68,7 @@ class ApiErrorIdentifier(str, Enum):
|
|
67
68
|
NO_CREDENTIALS = "no_credentials"
|
68
69
|
NOW_API_DOWN = "now_api_down"
|
69
70
|
OBJECT_NOT_FOUND = "object_not_found"
|
71
|
+
OBJECT_ALREADY_EXISTS = "object_already_exists"
|
70
72
|
ORDER_ALREADY_FILLED = "order_is_already_filled"
|
71
73
|
ORDER_IN_PROCESS = "order_is_being_processed"
|
72
74
|
ORDER_LIMIT_EXCEEDED = "order_quantity_limit_exceeded"
|
@@ -105,7 +107,7 @@ class ApiErrorLevel(str, Enum):
|
|
105
107
|
|
106
108
|
|
107
109
|
class ApiError(Enum, metaclass=Fallback):
|
108
|
-
"""API error codes"""
|
110
|
+
"""API error codes. Fallback to UNKNOWN_ERROR for error codes not yet published to PyPI."""
|
109
111
|
|
110
112
|
ALLOCATION_BELOW_EXPOSURE = (
|
111
113
|
ApiErrorIdentifier.ALLOCATION_BELOW_EXPOSURE,
|
@@ -252,8 +254,8 @@ class ApiError(Enum, metaclass=Fallback):
|
|
252
254
|
ApiErrorType.USER_ERROR,
|
253
255
|
ApiErrorLevel.ERROR,
|
254
256
|
)
|
255
|
-
|
256
|
-
ApiErrorIdentifier.
|
257
|
+
INVALID_EXCHANGE_KEY = (
|
258
|
+
ApiErrorIdentifier.INVALID_EXCHANGE_KEY,
|
257
259
|
ApiErrorType.SERVER_ERROR,
|
258
260
|
ApiErrorLevel.ERROR,
|
259
261
|
)
|
@@ -297,6 +299,11 @@ class ApiError(Enum, metaclass=Fallback):
|
|
297
299
|
ApiErrorType.SERVER_ERROR,
|
298
300
|
ApiErrorLevel.ERROR,
|
299
301
|
)
|
302
|
+
OBJECT_ALREADY_EXISTS = (
|
303
|
+
ApiErrorIdentifier.OBJECT_ALREADY_EXISTS,
|
304
|
+
ApiErrorType.SERVER_ERROR,
|
305
|
+
ApiErrorLevel.ERROR,
|
306
|
+
)
|
300
307
|
ORDER_ALREADY_FILLED = (
|
301
308
|
ApiErrorIdentifier.ORDER_ALREADY_FILLED,
|
302
309
|
ApiErrorType.SERVER_ERROR,
|
@@ -426,17 +433,115 @@ class ApiError(Enum, metaclass=Fallback):
|
|
426
433
|
|
427
434
|
@property
|
428
435
|
def identifier(self) -> str:
|
436
|
+
"""Identifier of the error."""
|
429
437
|
return self.value[0]
|
430
438
|
|
431
439
|
@property
|
432
440
|
def type(self) -> ApiErrorType:
|
441
|
+
"""Type of the error."""
|
433
442
|
return self.value[1]
|
434
443
|
|
435
444
|
@property
|
436
445
|
def level(self) -> ApiErrorLevel:
|
446
|
+
"""Level of the error."""
|
437
447
|
return self.value[2]
|
448
|
+
|
449
|
+
@property
|
450
|
+
def status_code(self) -> int:
|
451
|
+
"""HTTP status code for the error."""
|
452
|
+
return HttpStatusMapper.get_status_code(self)
|
453
|
+
|
454
|
+
|
455
|
+
class HttpStatusMapper:
|
456
|
+
"""Map API errors to HTTP status codes."""
|
457
|
+
# TODO: decide if we need all of these mappings, since most errors are not exposed to the client via HTTP
|
458
|
+
# in case we remove some, update the pytest length check
|
459
|
+
_mapping = {
|
460
|
+
# Authentication/Authorization
|
461
|
+
ApiError.JWT_EXPIRED: status.HTTP_401_UNAUTHORIZED,
|
462
|
+
ApiError.INVALID_BEARER: status.HTTP_401_UNAUTHORIZED,
|
463
|
+
ApiError.INVALID_API_KEY: status.HTTP_401_UNAUTHORIZED,
|
464
|
+
ApiError.NO_CREDENTIALS: status.HTTP_401_UNAUTHORIZED,
|
465
|
+
ApiError.INSUFFICIENT_SCOPES: status.HTTP_403_FORBIDDEN,
|
466
|
+
ApiError.EXCHANGE_PERMISSION_DENIED: status.HTTP_403_FORBIDDEN,
|
467
|
+
ApiError.EXCHANGE_USER_FROZEN: status.HTTP_403_FORBIDDEN,
|
468
|
+
ApiError.TRADING_LOCKED: status.HTTP_403_FORBIDDEN,
|
469
|
+
|
470
|
+
# Not Found
|
471
|
+
ApiError.URL_NOT_FOUND: status.HTTP_404_NOT_FOUND,
|
472
|
+
ApiError.OBJECT_NOT_FOUND: status.HTTP_404_NOT_FOUND,
|
473
|
+
ApiError.ORDER_NOT_FOUND: status.HTTP_404_NOT_FOUND,
|
474
|
+
ApiError.POSITION_NOT_FOUND: status.HTTP_404_NOT_FOUND,
|
475
|
+
ApiError.SYMBOL_NOT_FOUND: status.HTTP_404_NOT_FOUND,
|
476
|
+
|
477
|
+
# Conflicts/Duplicates
|
478
|
+
ApiError.CLIENT_ORDER_ID_REPEATED: status.HTTP_409_CONFLICT,
|
479
|
+
ApiError.OBJECT_ALREADY_EXISTS: status.HTTP_409_CONFLICT,
|
480
|
+
ApiError.EXCHANGE_KEY_ALREADY_EXISTS: status.HTTP_409_CONFLICT,
|
481
|
+
ApiError.BOT_ALREADY_DELETED: status.HTTP_409_CONFLICT,
|
482
|
+
|
483
|
+
# Invalid Content
|
484
|
+
ApiError.CONTENT_TYPE_ERROR: status.HTTP_415_UNSUPPORTED_MEDIA_TYPE,
|
485
|
+
|
486
|
+
# Rate Limits
|
487
|
+
ApiError.EXCHANGE_RATE_LIMIT: status.HTTP_429_TOO_MANY_REQUESTS,
|
488
|
+
ApiError.REQUEST_SCOPE_EXCEEDED: status.HTTP_429_TOO_MANY_REQUESTS,
|
489
|
+
|
490
|
+
# Server Errors
|
491
|
+
ApiError.UNKNOWN_ERROR: status.HTTP_500_INTERNAL_SERVER_ERROR,
|
492
|
+
ApiError.EXCHANGE_SYSTEM_ERROR: status.HTTP_500_INTERNAL_SERVER_ERROR,
|
493
|
+
ApiError.NOW_API_DOWN: status.HTTP_500_INTERNAL_SERVER_ERROR,
|
494
|
+
ApiError.RPC_TIMEOUT: status.HTTP_500_INTERNAL_SERVER_ERROR,
|
495
|
+
|
496
|
+
# Service Unavailable
|
497
|
+
ApiError.EXCHANGE_SERVICE_UNAVAILABLE: status.HTTP_503_SERVICE_UNAVAILABLE,
|
498
|
+
ApiError.EXCHANGE_MAINTENANCE: status.HTTP_503_SERVICE_UNAVAILABLE,
|
499
|
+
ApiError.EXCHANGE_SYSTEM_BUSY: status.HTTP_503_SERVICE_UNAVAILABLE,
|
500
|
+
ApiError.SETTLEMENT_IN_PROGRESS: status.HTTP_503_SERVICE_UNAVAILABLE,
|
501
|
+
ApiError.POSITION_SUSPENDED: status.HTTP_503_SERVICE_UNAVAILABLE,
|
502
|
+
ApiError.TRADING_SUSPENDED: status.HTTP_503_SERVICE_UNAVAILABLE,
|
503
|
+
|
504
|
+
# Bad Requests (400) - Invalid parameters or states
|
505
|
+
ApiError.ALLOCATION_BELOW_EXPOSURE: status.HTTP_400_BAD_REQUEST,
|
506
|
+
ApiError.ALLOCATION_BELOW_MINIMUM: status.HTTP_400_BAD_REQUEST,
|
507
|
+
ApiError.BLACK_SWAN: status.HTTP_400_BAD_REQUEST,
|
508
|
+
ApiError.BOT_DISABLED: status.HTTP_400_BAD_REQUEST,
|
509
|
+
ApiError.DELETE_BOT_ERROR: status.HTTP_400_BAD_REQUEST,
|
510
|
+
ApiError.EXCHANGE_INVALID_SIGNATURE: status.HTTP_400_BAD_REQUEST,
|
511
|
+
ApiError.EXCHANGE_INVALID_TIMESTAMP: status.HTTP_400_BAD_REQUEST,
|
512
|
+
ApiError.EXCHANGE_IP_RESTRICTED: status.HTTP_400_BAD_REQUEST,
|
513
|
+
ApiError.EXCHANGE_KEY_IN_USE: status.HTTP_400_BAD_REQUEST,
|
514
|
+
ApiError.EXCHANGE_SYSTEM_CONFIG_ERROR: status.HTTP_400_BAD_REQUEST,
|
515
|
+
ApiError.HEDGE_MODE_NOT_ACTIVE: status.HTTP_400_BAD_REQUEST,
|
516
|
+
ApiError.HTTP_ERROR: status.HTTP_400_BAD_REQUEST,
|
517
|
+
ApiError.INSUFFICIENT_BALANCE: status.HTTP_400_BAD_REQUEST,
|
518
|
+
ApiError.INSUFFICIENT_MARGIN: status.HTTP_400_BAD_REQUEST,
|
519
|
+
ApiError.INVALID_EXCHANGE_KEY: status.HTTP_400_BAD_REQUEST,
|
520
|
+
ApiError.INVALID_MARGIN_MODE: status.HTTP_400_BAD_REQUEST,
|
521
|
+
ApiError.INVALID_PARAMETER: status.HTTP_400_BAD_REQUEST,
|
522
|
+
ApiError.LEVERAGE_EXCEEDED: status.HTTP_400_BAD_REQUEST,
|
523
|
+
ApiError.LIQUIDATION_PRICE_VIOLATION: status.HTTP_400_BAD_REQUEST,
|
524
|
+
ApiError.ORDER_ALREADY_FILLED: status.HTTP_400_BAD_REQUEST,
|
525
|
+
ApiError.ORDER_IN_PROCESS: status.HTTP_400_BAD_REQUEST,
|
526
|
+
ApiError.ORDER_LIMIT_EXCEEDED: status.HTTP_400_BAD_REQUEST,
|
527
|
+
ApiError.ORDER_PRICE_INVALID: status.HTTP_400_BAD_REQUEST,
|
528
|
+
ApiError.ORDER_SIZE_TOO_LARGE: status.HTTP_400_BAD_REQUEST,
|
529
|
+
ApiError.ORDER_SIZE_TOO_SMALL: status.HTTP_400_BAD_REQUEST,
|
530
|
+
ApiError.POSITION_LIMIT_EXCEEDED: status.HTTP_400_BAD_REQUEST,
|
531
|
+
ApiError.POST_ONLY_REJECTED: status.HTTP_400_BAD_REQUEST,
|
532
|
+
ApiError.RISK_LIMIT_EXCEEDED: status.HTTP_400_BAD_REQUEST,
|
533
|
+
ApiError.STRATEGY_DISABLED: status.HTTP_400_BAD_REQUEST,
|
534
|
+
ApiError.STRATEGY_LEVERAGE_MISMATCH: status.HTTP_400_BAD_REQUEST,
|
535
|
+
ApiError.STRATEGY_NOT_SUPPORTING_EXCHANGE: status.HTTP_400_BAD_REQUEST,
|
536
|
+
ApiError.TRADING_ACTION_EXPIRED: status.HTTP_400_BAD_REQUEST,
|
537
|
+
ApiError.TRADING_ACTION_SKIPPED: status.HTTP_400_BAD_REQUEST,
|
438
538
|
|
539
|
+
# Success cases
|
540
|
+
ApiError.SUCCESS: status.HTTP_200_OK,
|
541
|
+
ApiError.BOT_STOPPING_COMPLETED: status.HTTP_200_OK,
|
542
|
+
}
|
439
543
|
|
440
|
-
|
441
|
-
|
442
|
-
|
544
|
+
@classmethod
|
545
|
+
def get_status_code(cls, error: ApiError) -> int:
|
546
|
+
"""Get the HTTP status code for the error. If the error is not in the mapping, return 500."""
|
547
|
+
return cls._mapping.get(error, status.HTTP_500_INTERNAL_SERVER_ERROR)
|
@@ -1,16 +1,19 @@
|
|
1
1
|
from enum import StrEnum, EnumMeta
|
2
2
|
import logging
|
3
3
|
|
4
|
-
logger = logging.getLogger(
|
4
|
+
logger = logging.getLogger("uvicorn")
|
5
|
+
|
5
6
|
|
6
7
|
class Fallback(EnumMeta):
|
7
8
|
"""Fallback to no scope for unknown scopes."""
|
9
|
+
|
8
10
|
def __getattr__(cls, name):
|
9
11
|
logger.warning(
|
10
12
|
f"Unknown scope '{name}' - falling back to no scope - update crypticorn package or check for typos"
|
11
13
|
)
|
12
14
|
return None
|
13
15
|
|
16
|
+
|
14
17
|
class Scope(StrEnum, metaclass=Fallback):
|
15
18
|
"""
|
16
19
|
The permission scopes for the API.
|
@@ -22,6 +25,9 @@ class Scope(StrEnum, metaclass=Fallback):
|
|
22
25
|
def from_str(cls, value: str) -> "Scope":
|
23
26
|
return cls(value)
|
24
27
|
|
28
|
+
# Scopes that can be purchased - these actually exist in the jwt token
|
29
|
+
READ_PREDICTIONS = "read:predictions"
|
30
|
+
|
25
31
|
# Hive scopes
|
26
32
|
READ_HIVE_MODEL = "read:hive:model"
|
27
33
|
READ_HIVE_DATA = "read:hive:data"
|
@@ -50,5 +56,9 @@ class Scope(StrEnum, metaclass=Fallback):
|
|
50
56
|
READ_PAY_NOW = "read:pay:now"
|
51
57
|
WRITE_PAY_NOW = "write:pay:now"
|
52
58
|
|
53
|
-
#
|
54
|
-
|
59
|
+
# Metrics scopes
|
60
|
+
READ_METRICS_MARKETCAP = "read:metrics:marketcap"
|
61
|
+
READ_METRICS_INDICATORS = "read:metrics:indicators"
|
62
|
+
READ_METRICS_EXCHANGES = "read:metrics:exchanges"
|
63
|
+
READ_METRICS_TOKENS = "read:metrics:tokens"
|
64
|
+
READ_METRICS_MARKETS = "read:metrics:markets"
|
@@ -0,0 +1,50 @@
|
|
1
|
+
from typing import Any
|
2
|
+
from decimal import Decimal
|
3
|
+
import string
|
4
|
+
import random
|
5
|
+
|
6
|
+
from fastapi import HTTPException
|
7
|
+
from fastapi import status
|
8
|
+
|
9
|
+
from crypticorn.common import ApiError
|
10
|
+
|
11
|
+
|
12
|
+
def throw_if_none(value: Any, message: ApiError) -> None:
|
13
|
+
"""Throws an FastAPI HTTPException if the value is None."""
|
14
|
+
if value is None:
|
15
|
+
raise HTTPException(
|
16
|
+
status_code=status.HTTP_404_NOT_FOUND, detail=message.identifier
|
17
|
+
)
|
18
|
+
|
19
|
+
def throw_if_falsy(value: Any, message: ApiError) -> None:
|
20
|
+
"""Throws an FastAPI HTTPException if the value is False."""
|
21
|
+
if not value:
|
22
|
+
raise HTTPException(
|
23
|
+
status_code=status.HTTP_400_BAD_REQUEST, detail=message.identifier
|
24
|
+
)
|
25
|
+
|
26
|
+
def gen_random_id(length: int = 20) -> str:
|
27
|
+
"""Generate a random base62 string (a-zA-Z0-9) of specified length.
|
28
|
+
Kucoin max 40, bingx max 40"""
|
29
|
+
charset = string.ascii_letters + string.digits
|
30
|
+
return "".join(random.choice(charset) for _ in range(length))
|
31
|
+
|
32
|
+
|
33
|
+
def is_equal(
|
34
|
+
a: float | Decimal,
|
35
|
+
b: float | Decimal,
|
36
|
+
rel_tol: float = 1e-9,
|
37
|
+
abs_tol: float = 0.0,
|
38
|
+
) -> bool:
|
39
|
+
"""
|
40
|
+
Compare two Decimal numbers for approximate equality.
|
41
|
+
"""
|
42
|
+
if not isinstance(a, Decimal):
|
43
|
+
a = Decimal(str(a))
|
44
|
+
if not isinstance(b, Decimal):
|
45
|
+
b = Decimal(str(b))
|
46
|
+
|
47
|
+
# Convert tolerances to Decimal
|
48
|
+
return Decimal(abs(a - b)) <= max(
|
49
|
+
Decimal(str(rel_tol)) * max(abs(a), abs(b)), Decimal(str(abs_tol))
|
50
|
+
)
|
{crypticorn-2.4.0 → crypticorn-2.4.2}/crypticorn/trade/client/models/api_error_identifier.py
RENAMED
@@ -59,7 +59,7 @@ class ApiErrorIdentifier(str, Enum):
|
|
59
59
|
INSUFFICIENT_SCOPES = "insufficient_scopes"
|
60
60
|
INVALID_API_KEY = "invalid_api_key"
|
61
61
|
INVALID_BEARER = "invalid_bearer"
|
62
|
-
|
62
|
+
INVALID_EXCHANGE_KEY = "invalid_exchange_api_key"
|
63
63
|
INVALID_MARGIN_MODE = "invalid_margin_mode"
|
64
64
|
INVALID_PARAMETER_PROVIDED = "invalid_parameter_provided"
|
65
65
|
JWT_EXPIRED = "jwt_expired"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: crypticorn
|
3
|
-
Version: 2.4.
|
3
|
+
Version: 2.4.2
|
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
|
@@ -56,11 +56,6 @@ You can install the latest stable version from PyPi:
|
|
56
56
|
pip install crypticorn
|
57
57
|
```
|
58
58
|
|
59
|
-
If you want a specific version, run:
|
60
|
-
```bash
|
61
|
-
pip install crypticorn==2.0.0
|
62
|
-
```
|
63
|
-
|
64
59
|
If you want the latest version, which could be a pre release, run:
|
65
60
|
```bash
|
66
61
|
pip install --pre crypticorn
|
@@ -72,6 +67,20 @@ Our API is available as an asynchronous Python SDK. The main entry point you nee
|
|
72
67
|
```python
|
73
68
|
from crypticorn import ApiClient
|
74
69
|
```
|
70
|
+
The ApiClient serves as the central interface for API operations. It instantiates multiple API wrappers corresponding to our microservices.
|
71
|
+
|
72
|
+
Specific imports, such as request models, should be accessed through the appropriate submodules.
|
73
|
+
|
74
|
+
Note: All symbols are re-exported at the first submodule layer for convenience.
|
75
|
+
|
76
|
+
```python
|
77
|
+
from crypticorn.trade import BotStatus
|
78
|
+
```
|
79
|
+
|
80
|
+
The `common` submodule contains shared classes not bound to a specific API.
|
81
|
+
```python
|
82
|
+
from crypticorn.common import Scope, Exchange
|
83
|
+
```
|
75
84
|
|
76
85
|
## Usage
|
77
86
|
|
@@ -122,7 +131,7 @@ On top of that you get some information about the request:
|
|
122
131
|
print(res.status_code)
|
123
132
|
print(res.raw_data)
|
124
133
|
print(res.headers)
|
125
|
-
|
134
|
+
```
|
126
135
|
|
127
136
|
### JSON Response
|
128
137
|
You can receive a classical JSON response by suffixing the function name with `_without_preload_content`
|