crypticorn 2.1.5__tar.gz → 2.2.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.2.0/PKG-INFO +146 -0
- crypticorn-2.2.0/README.md +108 -0
- crypticorn-2.2.0/crypticorn/auth/main.py +28 -0
- crypticorn-2.2.0/crypticorn/client.py +107 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/common/__init__.py +1 -2
- crypticorn-2.1.5/crypticorn/common/auth_client.py → crypticorn-2.2.0/crypticorn/common/auth.py +35 -30
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/common/scopes.py +2 -2
- crypticorn-2.2.0/crypticorn/common/urls.py +37 -0
- crypticorn-2.2.0/crypticorn/hive/main.py +26 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/configuration.py +2 -2
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/main.py +2 -12
- crypticorn-2.2.0/crypticorn/metrics/__init__.py +4 -0
- crypticorn-2.2.0/crypticorn/metrics/client/__init__.py +60 -0
- crypticorn-2.2.0/crypticorn/metrics/client/api/__init__.py +10 -0
- crypticorn-2.2.0/crypticorn/metrics/client/api/exchanges_api.py +1003 -0
- crypticorn-2.2.0/crypticorn/metrics/client/api/health_check_api.py +265 -0
- crypticorn-2.2.0/crypticorn/metrics/client/api/indicators_api.py +680 -0
- crypticorn-2.2.0/crypticorn/metrics/client/api/logs_api.py +356 -0
- crypticorn-2.2.0/crypticorn/metrics/client/api/marketcap_api.py +1315 -0
- crypticorn-2.2.0/crypticorn/metrics/client/api/markets_api.py +618 -0
- crypticorn-2.2.0/crypticorn/metrics/client/api/tokens_api.py +300 -0
- crypticorn-2.2.0/crypticorn/metrics/client/api_client.py +758 -0
- crypticorn-2.2.0/crypticorn/metrics/client/configuration.py +575 -0
- crypticorn-2.2.0/crypticorn/metrics/client/exceptions.py +220 -0
- crypticorn-2.2.0/crypticorn/metrics/client/models/__init__.py +37 -0
- crypticorn-2.2.0/crypticorn/metrics/client/models/base_response_dict.py +106 -0
- crypticorn-2.2.0/crypticorn/metrics/client/models/base_response_health_check_response.py +114 -0
- crypticorn-2.2.0/crypticorn/metrics/client/models/base_response_list_dict.py +106 -0
- crypticorn-2.2.0/crypticorn/metrics/client/models/base_response_list_exchange_mapping.py +118 -0
- crypticorn-2.2.0/crypticorn/metrics/client/models/base_response_list_str.py +106 -0
- crypticorn-2.2.0/crypticorn/metrics/client/models/error_response.py +109 -0
- crypticorn-2.2.0/crypticorn/metrics/client/models/exchange_mapping.py +132 -0
- crypticorn-2.2.0/crypticorn/metrics/client/models/health_check_response.py +91 -0
- crypticorn-2.2.0/crypticorn/metrics/client/models/http_validation_error.py +99 -0
- crypticorn-2.2.0/crypticorn/metrics/client/models/market.py +35 -0
- crypticorn-2.2.0/crypticorn/metrics/client/models/severity.py +36 -0
- crypticorn-2.2.0/crypticorn/metrics/client/models/validation_error.py +105 -0
- crypticorn-2.2.0/crypticorn/metrics/client/models/validation_error_loc_inner.py +159 -0
- crypticorn-2.2.0/crypticorn/metrics/client/rest.py +195 -0
- crypticorn-2.2.0/crypticorn/metrics/main.py +102 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/main.py +2 -12
- crypticorn-2.2.0/crypticorn/trade/client/api_response.py +20 -0
- crypticorn-2.2.0/crypticorn/trade/client/py.typed +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/main.py +2 -12
- crypticorn-2.2.0/crypticorn.egg-info/PKG-INFO +146 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn.egg-info/SOURCES.txt +31 -1
- {crypticorn-2.1.5 → crypticorn-2.2.0}/pyproject.toml +1 -1
- {crypticorn-2.1.5 → crypticorn-2.2.0}/tests/test_auth_client.py +5 -8
- crypticorn-2.1.5/PKG-INFO +0 -92
- crypticorn-2.1.5/README.md +0 -54
- crypticorn-2.1.5/crypticorn/auth/main.py +0 -45
- crypticorn-2.1.5/crypticorn/client.py +0 -54
- crypticorn-2.1.5/crypticorn/common/auth.py +0 -14
- crypticorn-2.1.5/crypticorn/common/urls.py +0 -25
- crypticorn-2.1.5/crypticorn/hive/main.py +0 -34
- crypticorn-2.1.5/crypticorn.egg-info/PKG-INFO +0 -92
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/api/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/api/admin_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/api/auth_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/api/service_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/api/user_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/api/wallet_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/api_client.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/api_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/configuration.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/exceptions.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/add_wallet200_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/add_wallet_request.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/authorize_user200_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/authorize_user200_response_auth.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/authorize_user_request.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/create_api_key200_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/create_api_key_request.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/create_user_request.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/get_api_keys200_response_inner.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/list_wallets200_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/list_wallets200_response_data_inner.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/list_wallets200_response_user_value.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/logout_default_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/logout_default_response_issues_inner.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/oauth_callback200_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/oauth_callback200_response_user.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/refresh_token_info200_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/resend_verification_email_request.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/revoke_user_tokens_request.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/rotate_tokens200_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/token_info200_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/unlink_wallet_request.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/update_user_request.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/user_reset_password_request.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/user_set_password_request.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/verify200_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/verify_email200_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/verify_email200_response_auth.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/verify_email200_response_auth_auth.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/verify_email_request.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/verify_wallet_request.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/wallet_verified200_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/models/whoami200_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/py.typed +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/auth/client/rest.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/common/errors.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/common/sorter.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/api/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/api/data_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/api/models_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/api/status_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/api_client.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/api_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/configuration.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/exceptions.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/coins.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/data_download_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/data_info.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/data_value_value_value_inner.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/data_version.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/download_links.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/evaluation.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/evaluation_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/feature_size.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/http_validation_error.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/model.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/model_create.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/model_status.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/model_update.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/target.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/target_type.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/validation_error.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/models/validation_error_loc_inner.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/py.typed +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/hive/client/rest.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/api/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/api/funding_rates_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/api/health_check_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/api/ohlcv_data_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/api/symbols_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/api/udf_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/api_client.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/api_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/exceptions.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/base_response_health_check_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/base_response_list_funding_rate_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/base_response_list_str.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/base_response_ohlcv_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/error_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/exchange.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/funding_rate_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/health_check_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/history_error_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/history_no_data_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/history_success_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/http_validation_error.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/market.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/ohlcv_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/resolution.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/response_get_history_udf_history_get.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/search_symbol_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/sort_direction.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/symbol_group_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/symbol_info_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/symbol_type.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/timeframe.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/udf_config_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/validation_error.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/models/validation_error_loc_inner.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/py.typed +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/klines/client/rest.py +0 -0
- {crypticorn-2.1.5/crypticorn/pay → crypticorn-2.2.0/crypticorn/metrics}/client/api_response.py +0 -0
- {crypticorn-2.1.5/crypticorn/pay → crypticorn-2.2.0/crypticorn/metrics}/client/py.typed +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/api/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/api/now_payments_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/api/payments_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/api/products_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/api/status_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/api_client.py +0 -0
- {crypticorn-2.1.5/crypticorn/trade → crypticorn-2.2.0/crypticorn/pay}/client/api_response.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/configuration.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/exceptions.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/api_status_res.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/body_create_now_invoice.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/body_create_product.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/body_get_products.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/body_handle_now_webhook.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/body_update_product.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/combined_payment_history.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/create_invoice_req.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/create_invoice_res.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/currency.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/estimate_price_req.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/estimate_price_res.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/get_currencies_res.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/get_payment_status_res.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/get_payments_list_res.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/http_validation_error.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/min_amount_req.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/min_amount_res.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/now_api_status_res.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/now_create_invoice_req.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/now_create_invoice_res.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/now_fee_structure.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/now_payment_model.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/now_payment_status.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/now_webhook_payload.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/payment.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/payment_status.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/product.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/product_model.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/product_subs_model.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/scope.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/services.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/unified_payment_model.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/validation_error.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/models/validation_error_loc_inner.py +0 -0
- {crypticorn-2.1.5/crypticorn/trade → crypticorn-2.2.0/crypticorn/pay}/client/py.typed +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/pay/client/rest.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/api/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/api/api_keys_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/api/bots_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/api/exchanges_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/api/futures_trading_panel_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/api/notifications_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/api/orders_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/api/status_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/api/strategies_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/api/trading_actions_api.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/api_client.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/configuration.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/exceptions.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/__init__.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/action_model.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/api_error_identifier.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/api_error_level.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/api_error_type.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/api_key_model.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/bot_model.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/bot_status.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/exchange.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/execution_ids.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/futures_balance.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/futures_trading_action.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/http_validation_error.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/margin_mode.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/market_type.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/notification_model.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/order_model.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/order_status.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/post_futures_action.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/strategy_exchange_info.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/strategy_model_input.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/strategy_model_output.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/tpsl.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/trading_action_type.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/validation_error.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/models/validation_error_loc_inner.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn/trade/client/rest.py +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn.egg-info/dependency_links.txt +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn.egg-info/requires.txt +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/crypticorn.egg-info/top_level.txt +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/requirements/dev.txt +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/requirements/main.txt +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/requirements/test.txt +0 -0
- {crypticorn-2.1.5 → crypticorn-2.2.0}/setup.cfg +0 -0
@@ -0,0 +1,146 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: crypticorn
|
3
|
+
Version: 2.2.0
|
4
|
+
Summary: Maximise Your Crypto Trading Profits with AI Predictions
|
5
|
+
Author-email: Crypticorn <timon@crypticorn.com>
|
6
|
+
Project-URL: Homepage, https://crypticorn.com
|
7
|
+
Keywords: machine learning,data science,crypto,modelling
|
8
|
+
Classifier: Topic :: Scientific/Engineering
|
9
|
+
Classifier: Development Status :: 4 - Beta
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
11
|
+
Classifier: Operating System :: OS Independent
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
13
|
+
Classifier: Typing :: Typed
|
14
|
+
Requires-Python: >=3.10
|
15
|
+
Description-Content-Type: text/markdown
|
16
|
+
Requires-Dist: fastapi
|
17
|
+
Requires-Dist: urllib3<3.0.0,>=1.25.3
|
18
|
+
Requires-Dist: python_dateutil<3.0.0,>=2.8.2
|
19
|
+
Requires-Dist: aiohttp<4.0.0,>=3.8.4
|
20
|
+
Requires-Dist: aiohttp-retry<3.0.0,>=2.8.3
|
21
|
+
Requires-Dist: pydantic<3.0.0,>=2.0.0
|
22
|
+
Requires-Dist: typing-extensions<5.0.0,>=4.7.1
|
23
|
+
Requires-Dist: pandas<3.0.0,>=2.2.0
|
24
|
+
Requires-Dist: requests<3.0.0,>=2.32.0
|
25
|
+
Requires-Dist: tqdm<5.0.0,>=4.67.0
|
26
|
+
Provides-Extra: dev
|
27
|
+
Requires-Dist: streamlit; extra == "dev"
|
28
|
+
Requires-Dist: httpx; extra == "dev"
|
29
|
+
Requires-Dist: build; extra == "dev"
|
30
|
+
Requires-Dist: black; extra == "dev"
|
31
|
+
Requires-Dist: twine; extra == "dev"
|
32
|
+
Requires-Dist: pyflakes; extra == "dev"
|
33
|
+
Provides-Extra: test
|
34
|
+
Requires-Dist: pytest==8.3.5; extra == "test"
|
35
|
+
Requires-Dist: pytest-asyncio==0.26.0; extra == "test"
|
36
|
+
Requires-Dist: pytest-cov==6.1.1; extra == "test"
|
37
|
+
Requires-Dist: python-dotenv==1.0.1; extra == "test"
|
38
|
+
|
39
|
+
# What is Crypticorn?
|
40
|
+
|
41
|
+
Crypticorn is at the forefront of cutting-edge artificial intelligence cryptocurrency trading.
|
42
|
+
Crypticorn offers AI-based solutions for both active and passive investors, including:
|
43
|
+
- Prediction Dashboard with trading terminal,
|
44
|
+
- AI Agents with different strategies,
|
45
|
+
- DEX AI Signals for newly launched tokens,
|
46
|
+
- DEX AI Bots
|
47
|
+
|
48
|
+
Use this API Client to contribute to the so-called Hive AI, a community driven AI Meta Model for predicting the
|
49
|
+
cryptocurrency market.
|
50
|
+
|
51
|
+
## Installation
|
52
|
+
|
53
|
+
You can install the latest stable version from PyPi:
|
54
|
+
```bash
|
55
|
+
pip install crypticorn
|
56
|
+
```
|
57
|
+
|
58
|
+
If you want a specific version, run:
|
59
|
+
```bash
|
60
|
+
pip install crypticorn==2.0.0
|
61
|
+
```
|
62
|
+
|
63
|
+
If you want the latest version, which could be a pre release, run:
|
64
|
+
```bash
|
65
|
+
pip install --pre crypticorn
|
66
|
+
```
|
67
|
+
|
68
|
+
## Structure
|
69
|
+
|
70
|
+
Our API is available as an asynchronous Python SDK. The main entry point you need is the `ApiClient` class, which you would import like this:
|
71
|
+
```python
|
72
|
+
from crypticorn import ApiClient
|
73
|
+
```
|
74
|
+
|
75
|
+
## Usage
|
76
|
+
|
77
|
+
### With Async Context Protocol
|
78
|
+
```python
|
79
|
+
async with ApiClient(base_url=BaseUrl.Prod, api_key="your-api-key") as client:
|
80
|
+
await client.pay.products.get_products()
|
81
|
+
```
|
82
|
+
|
83
|
+
### Without Async Context Protocol
|
84
|
+
Without the context you need to close the session manually.
|
85
|
+
```python
|
86
|
+
client = ApiClient(base_url=BaseUrl.Prod, api_key="your-api-key")
|
87
|
+
asyncio.run(client.pay.models.get_products())
|
88
|
+
asyncio.run(client.close())
|
89
|
+
```
|
90
|
+
|
91
|
+
## Response Types
|
92
|
+
|
93
|
+
There are three different available output formats you can choose from:
|
94
|
+
|
95
|
+
### Serialized Response
|
96
|
+
You can get fully serialized responses as pydantic models. Using this, you get the full benefits of pydantic's type checking.
|
97
|
+
```python
|
98
|
+
response = await client.pay.products.get_products()
|
99
|
+
print(response)
|
100
|
+
```
|
101
|
+
The output would look like this:
|
102
|
+
```python
|
103
|
+
[ProductModel(id='67e8146e7bae32f3838fe36a', name='Awesome Product', price=5.0, scopes=None, duration=30, description='You need to buy this', is_active=True)]
|
104
|
+
```
|
105
|
+
|
106
|
+
### Serialized Response with HTTP Info
|
107
|
+
```python
|
108
|
+
await client.pay.products.get_products_with_http_info()
|
109
|
+
print(res)
|
110
|
+
```
|
111
|
+
The output would look like this:
|
112
|
+
```python
|
113
|
+
status_code=200 headers={'Date': 'Wed, 09 Apr 2025 19:15:19 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Alt-Svc': 'h3=":443"; ma=86400', 'Server': 'cloudflare', 'Cf-Cache-Status': 'DYNAMIC', 'Content-Encoding': 'gzip', 'CF-RAY': '92dc551a687bbe5e-ZRH'} data=[ProductModel(id='67e8146e7bae32f3838fe36a', name='Awesome Product', price=5.0, scopes=None, duration=30, description='You need to buy this', is_active=True)] raw_data=b'[{"id":"67e8146e7bae32f3838fe36a","name":"Awesome Product","price":5.0,"duration":30,"description":"You need to buy this","is_active":true}]'
|
114
|
+
```
|
115
|
+
You can then access the data of the response (as serialized output) with:
|
116
|
+
```python
|
117
|
+
print(res.data)
|
118
|
+
```
|
119
|
+
On top of that you get some information about the request:
|
120
|
+
```python
|
121
|
+
print(res.status_code)
|
122
|
+
print(res.raw_data)
|
123
|
+
print(res.headers)
|
124
|
+
|
125
|
+
|
126
|
+
### JSON Response
|
127
|
+
You can receive a classical JSON response by suffixing the function name with `_without_preload_content`
|
128
|
+
```python
|
129
|
+
response = await client.pay.products.get_products_without_preload_content()
|
130
|
+
print(await response.json())
|
131
|
+
```
|
132
|
+
The output would look like this:
|
133
|
+
```python
|
134
|
+
[{'id': '67e8146e7bae32f3838fe36a', 'name': 'Awesome Product', 'price': 5.0, 'duration': 30, 'description': 'You need to buy this', 'is_active': True}]
|
135
|
+
```
|
136
|
+
|
137
|
+
## Advanced Usage
|
138
|
+
|
139
|
+
You can override some configuration for specific sub clients. If just want to use the API as is you don't need to configure anything.
|
140
|
+
This might be of use if you are testing a specific API locally.
|
141
|
+
|
142
|
+
This will override the host for the Hive client to connect to http://localhost:8000 instead of the default caddy proxy:
|
143
|
+
```python
|
144
|
+
async with ApiClient(base_url=BaseUrl.DEV, jwt=jwt) as client:
|
145
|
+
client.configure(config=HiveConfig(host="http://localhost:8000"), sub_client=client.hive)
|
146
|
+
```
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# What is Crypticorn?
|
2
|
+
|
3
|
+
Crypticorn is at the forefront of cutting-edge artificial intelligence cryptocurrency trading.
|
4
|
+
Crypticorn offers AI-based solutions for both active and passive investors, including:
|
5
|
+
- Prediction Dashboard with trading terminal,
|
6
|
+
- AI Agents with different strategies,
|
7
|
+
- DEX AI Signals for newly launched tokens,
|
8
|
+
- DEX AI Bots
|
9
|
+
|
10
|
+
Use this API Client to contribute to the so-called Hive AI, a community driven AI Meta Model for predicting the
|
11
|
+
cryptocurrency market.
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
You can install the latest stable version from PyPi:
|
16
|
+
```bash
|
17
|
+
pip install crypticorn
|
18
|
+
```
|
19
|
+
|
20
|
+
If you want a specific version, run:
|
21
|
+
```bash
|
22
|
+
pip install crypticorn==2.0.0
|
23
|
+
```
|
24
|
+
|
25
|
+
If you want the latest version, which could be a pre release, run:
|
26
|
+
```bash
|
27
|
+
pip install --pre crypticorn
|
28
|
+
```
|
29
|
+
|
30
|
+
## Structure
|
31
|
+
|
32
|
+
Our API is available as an asynchronous Python SDK. The main entry point you need is the `ApiClient` class, which you would import like this:
|
33
|
+
```python
|
34
|
+
from crypticorn import ApiClient
|
35
|
+
```
|
36
|
+
|
37
|
+
## Usage
|
38
|
+
|
39
|
+
### With Async Context Protocol
|
40
|
+
```python
|
41
|
+
async with ApiClient(base_url=BaseUrl.Prod, api_key="your-api-key") as client:
|
42
|
+
await client.pay.products.get_products()
|
43
|
+
```
|
44
|
+
|
45
|
+
### Without Async Context Protocol
|
46
|
+
Without the context you need to close the session manually.
|
47
|
+
```python
|
48
|
+
client = ApiClient(base_url=BaseUrl.Prod, api_key="your-api-key")
|
49
|
+
asyncio.run(client.pay.models.get_products())
|
50
|
+
asyncio.run(client.close())
|
51
|
+
```
|
52
|
+
|
53
|
+
## Response Types
|
54
|
+
|
55
|
+
There are three different available output formats you can choose from:
|
56
|
+
|
57
|
+
### Serialized Response
|
58
|
+
You can get fully serialized responses as pydantic models. Using this, you get the full benefits of pydantic's type checking.
|
59
|
+
```python
|
60
|
+
response = await client.pay.products.get_products()
|
61
|
+
print(response)
|
62
|
+
```
|
63
|
+
The output would look like this:
|
64
|
+
```python
|
65
|
+
[ProductModel(id='67e8146e7bae32f3838fe36a', name='Awesome Product', price=5.0, scopes=None, duration=30, description='You need to buy this', is_active=True)]
|
66
|
+
```
|
67
|
+
|
68
|
+
### Serialized Response with HTTP Info
|
69
|
+
```python
|
70
|
+
await client.pay.products.get_products_with_http_info()
|
71
|
+
print(res)
|
72
|
+
```
|
73
|
+
The output would look like this:
|
74
|
+
```python
|
75
|
+
status_code=200 headers={'Date': 'Wed, 09 Apr 2025 19:15:19 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Alt-Svc': 'h3=":443"; ma=86400', 'Server': 'cloudflare', 'Cf-Cache-Status': 'DYNAMIC', 'Content-Encoding': 'gzip', 'CF-RAY': '92dc551a687bbe5e-ZRH'} data=[ProductModel(id='67e8146e7bae32f3838fe36a', name='Awesome Product', price=5.0, scopes=None, duration=30, description='You need to buy this', is_active=True)] raw_data=b'[{"id":"67e8146e7bae32f3838fe36a","name":"Awesome Product","price":5.0,"duration":30,"description":"You need to buy this","is_active":true}]'
|
76
|
+
```
|
77
|
+
You can then access the data of the response (as serialized output) with:
|
78
|
+
```python
|
79
|
+
print(res.data)
|
80
|
+
```
|
81
|
+
On top of that you get some information about the request:
|
82
|
+
```python
|
83
|
+
print(res.status_code)
|
84
|
+
print(res.raw_data)
|
85
|
+
print(res.headers)
|
86
|
+
|
87
|
+
|
88
|
+
### JSON Response
|
89
|
+
You can receive a classical JSON response by suffixing the function name with `_without_preload_content`
|
90
|
+
```python
|
91
|
+
response = await client.pay.products.get_products_without_preload_content()
|
92
|
+
print(await response.json())
|
93
|
+
```
|
94
|
+
The output would look like this:
|
95
|
+
```python
|
96
|
+
[{'id': '67e8146e7bae32f3838fe36a', 'name': 'Awesome Product', 'price': 5.0, 'duration': 30, 'description': 'You need to buy this', 'is_active': True}]
|
97
|
+
```
|
98
|
+
|
99
|
+
## Advanced Usage
|
100
|
+
|
101
|
+
You can override some configuration for specific sub clients. If just want to use the API as is you don't need to configure anything.
|
102
|
+
This might be of use if you are testing a specific API locally.
|
103
|
+
|
104
|
+
This will override the host for the Hive client to connect to http://localhost:8000 instead of the default caddy proxy:
|
105
|
+
```python
|
106
|
+
async with ApiClient(base_url=BaseUrl.DEV, jwt=jwt) as client:
|
107
|
+
client.configure(config=HiveConfig(host="http://localhost:8000"), sub_client=client.hive)
|
108
|
+
```
|
@@ -0,0 +1,28 @@
|
|
1
|
+
from crypticorn.auth import (
|
2
|
+
ApiClient,
|
3
|
+
Configuration,
|
4
|
+
AdminApi,
|
5
|
+
ServiceApi,
|
6
|
+
UserApi,
|
7
|
+
WalletApi,
|
8
|
+
AuthApi,
|
9
|
+
)
|
10
|
+
|
11
|
+
|
12
|
+
class AuthClient:
|
13
|
+
"""
|
14
|
+
A client for interacting with the Crypticorn Auth API.
|
15
|
+
"""
|
16
|
+
|
17
|
+
def __init__(
|
18
|
+
self,
|
19
|
+
config: Configuration,
|
20
|
+
):
|
21
|
+
self.config = config
|
22
|
+
self.base_client = ApiClient(configuration=self.config)
|
23
|
+
# Instantiate all the endpoint clients
|
24
|
+
self.admin = AdminApi(self.base_client)
|
25
|
+
self.service = ServiceApi(self.base_client)
|
26
|
+
self.user = UserApi(self.base_client)
|
27
|
+
self.wallet = WalletApi(self.base_client)
|
28
|
+
self.login = AuthApi(self.base_client)
|
@@ -0,0 +1,107 @@
|
|
1
|
+
from crypticorn.hive import HiveClient, Configuration
|
2
|
+
from crypticorn.klines import KlinesClient
|
3
|
+
from crypticorn.pay import PayClient
|
4
|
+
from crypticorn.trade import TradeClient
|
5
|
+
from crypticorn.metrics import MetricsClient
|
6
|
+
from crypticorn.auth import AuthClient
|
7
|
+
from crypticorn.common import BaseUrl, ApiVersion, Service, apikey_header as aph
|
8
|
+
import warnings
|
9
|
+
class ApiClient:
|
10
|
+
"""
|
11
|
+
The official client for interacting with the Crypticorn API.
|
12
|
+
|
13
|
+
It is consisting of multiple microservices covering the whole stack of the Crypticorn project.
|
14
|
+
"""
|
15
|
+
|
16
|
+
def __init__(
|
17
|
+
self,
|
18
|
+
api_key: str = None,
|
19
|
+
jwt: str = None,
|
20
|
+
base_url: BaseUrl = BaseUrl.PROD,
|
21
|
+
):
|
22
|
+
self.base_url = base_url
|
23
|
+
'''The base URL the client will use to connect to the API.'''
|
24
|
+
self.api_key = api_key
|
25
|
+
'''The API key to use for authentication.'''
|
26
|
+
self.jwt = jwt
|
27
|
+
'''The JWT to use for authentication.'''
|
28
|
+
|
29
|
+
self.hive = HiveClient(self._get_default_config(Service.HIVE))
|
30
|
+
self.trade = TradeClient(self._get_default_config(Service.TRADE))
|
31
|
+
self.klines = KlinesClient(self._get_default_config(Service.KLINES))
|
32
|
+
self.pay = PayClient(self._get_default_config(Service.PAY))
|
33
|
+
self.metrics = MetricsClient(self._get_default_config(Service.METRICS))
|
34
|
+
self.auth = AuthClient(self._get_default_config(Service.AUTH))
|
35
|
+
|
36
|
+
def __new__(cls, *args, **kwargs):
|
37
|
+
if kwargs.get("api_key") and not kwargs.get("jwt"):
|
38
|
+
# auth-service does not allow api_key
|
39
|
+
warnings.warn("The auth module does only accept JWT to be used to authenticate. If you use this module, you need to provide a JWT.")
|
40
|
+
return super().__new__(cls)
|
41
|
+
|
42
|
+
async def close(self):
|
43
|
+
"""Close all client sessions."""
|
44
|
+
clients = [
|
45
|
+
self.hive.base_client,
|
46
|
+
self.trade.base_client,
|
47
|
+
self.klines.base_client,
|
48
|
+
self.pay.base_client,
|
49
|
+
self.metrics.base_client,
|
50
|
+
self.auth.base_client,
|
51
|
+
]
|
52
|
+
|
53
|
+
for client in clients:
|
54
|
+
if hasattr(client, "close"):
|
55
|
+
await client.close()
|
56
|
+
|
57
|
+
def _get_default_config(self, service: Service, version: ApiVersion = ApiVersion.V1):
|
58
|
+
"""
|
59
|
+
Get the default configuration for a given service.
|
60
|
+
"""
|
61
|
+
return Configuration(
|
62
|
+
host=f"{self.base_url}/{version}/{service}",
|
63
|
+
access_token=self.jwt,
|
64
|
+
api_key={aph.scheme_name: self.api_key} if self.api_key else None,
|
65
|
+
api_key_prefix=({aph.scheme_name: aph.model.name} if self.api_key else None),
|
66
|
+
)
|
67
|
+
|
68
|
+
def configure(self, config: Configuration, sub_client: any):
|
69
|
+
"""
|
70
|
+
Update a sub-client's configuration by overriding with the values set in the new config.
|
71
|
+
Useful for testing a specific service against a local server instead of the default proxy.
|
72
|
+
|
73
|
+
:param config: The new configuration to use for the sub-client.
|
74
|
+
:param sub_client: The sub-client to configure.
|
75
|
+
|
76
|
+
Example:
|
77
|
+
This will override the host for the Hive client to connect to http://localhost:8000 instead of the default proxy:
|
78
|
+
>>> async with ApiClient(base_url=BaseUrl.DEV, jwt=jwt) as client:
|
79
|
+
>>> client.configure(config=HiveConfig(host="http://localhost:8000"), sub_client=client.hive)
|
80
|
+
"""
|
81
|
+
new_config = sub_client.config
|
82
|
+
for attr in vars(config):
|
83
|
+
new_value = getattr(config, attr)
|
84
|
+
if new_value is not None:
|
85
|
+
setattr(new_config, attr, new_value)
|
86
|
+
|
87
|
+
if sub_client == self.hive:
|
88
|
+
self.hive = HiveClient(new_config)
|
89
|
+
elif sub_client == self.trade:
|
90
|
+
self.trade = TradeClient(new_config)
|
91
|
+
elif sub_client == self.klines:
|
92
|
+
self.klines = KlinesClient(new_config)
|
93
|
+
elif sub_client == self.pay:
|
94
|
+
self.pay = PayClient(new_config)
|
95
|
+
elif sub_client == self.metrics:
|
96
|
+
self.metrics = MetricsClient(new_config)
|
97
|
+
elif sub_client == self.auth:
|
98
|
+
self.auth = AuthClient(new_config)
|
99
|
+
else:
|
100
|
+
raise ValueError(f"Unknown sub-client: {sub_client}")
|
101
|
+
|
102
|
+
async def __aenter__(self):
|
103
|
+
return self
|
104
|
+
|
105
|
+
async def __aexit__(self, exc_type, exc_val, exc_tb):
|
106
|
+
await self.close()
|
107
|
+
|
crypticorn-2.1.5/crypticorn/common/auth_client.py → crypticorn-2.2.0/crypticorn/common/auth.py
RENAMED
@@ -1,46 +1,51 @@
|
|
1
|
-
from fastapi import Depends, HTTPException, Query, status
|
2
|
-
from fastapi.security import HTTPAuthorizationCredentials, SecurityScopes
|
3
|
-
from typing_extensions import Annotated, Doc
|
4
1
|
import json
|
5
2
|
|
6
|
-
from crypticorn.auth import AuthClient,
|
3
|
+
from crypticorn.auth import Verify200Response, AuthClient, Configuration
|
7
4
|
from crypticorn.auth.client.exceptions import ApiException
|
8
5
|
from crypticorn.common import (
|
9
6
|
ApiError,
|
10
|
-
Scope,
|
11
7
|
ApiVersion,
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
8
|
+
BaseUrl,
|
9
|
+
Scope,
|
10
|
+
Service,
|
11
|
+
)
|
12
|
+
from fastapi import Depends, HTTPException, Query, status
|
13
|
+
from fastapi.security import (
|
14
|
+
HTTPAuthorizationCredentials,
|
15
|
+
SecurityScopes,
|
16
|
+
HTTPBearer,
|
17
|
+
APIKeyHeader,
|
16
18
|
)
|
19
|
+
from typing_extensions import Annotated
|
17
20
|
|
21
|
+
# Auth Schemes
|
22
|
+
http_bearer = HTTPBearer(
|
23
|
+
bearerFormat="JWT",
|
24
|
+
auto_error=False,
|
25
|
+
description="The JWT to use for authentication.",
|
26
|
+
)
|
27
|
+
|
28
|
+
apikey_header = APIKeyHeader(
|
29
|
+
name="X-API-Key",
|
30
|
+
auto_error=False,
|
31
|
+
description="The API key to use for authentication.",
|
32
|
+
)
|
18
33
|
|
34
|
+
# Auth Handler
|
19
35
|
class AuthHandler:
|
20
36
|
"""
|
21
|
-
Middleware for verifying API requests. Verifies the validity of the authentication token,
|
37
|
+
Middleware for verifying API requests. Verifies the validity of the authentication token, scopes, etc.
|
38
|
+
|
39
|
+
@param base_url: The base URL of the API.
|
40
|
+
@param api_version: The version of the API.
|
22
41
|
"""
|
23
42
|
|
24
43
|
def __init__(
|
25
44
|
self,
|
26
|
-
base_url:
|
27
|
-
BaseURL, Doc("The base URL for the auth service.")
|
28
|
-
] = BaseURL.PROD,
|
29
|
-
api_version: Annotated[
|
30
|
-
ApiVersion, Doc("The API version of the auth service.")
|
31
|
-
] = ApiVersion.V1,
|
32
|
-
whitelist: Annotated[
|
33
|
-
list[Domain],
|
34
|
-
Doc(
|
35
|
-
"The domains of which requests are allowed full access to the service."
|
36
|
-
),
|
37
|
-
] = [
|
38
|
-
Domain.PROD,
|
39
|
-
Domain.DEV,
|
40
|
-
], # TODO: decide whether this is needed, else omit
|
45
|
+
base_url: BaseUrl = BaseUrl.PROD,
|
41
46
|
):
|
42
|
-
self.
|
43
|
-
self.
|
47
|
+
self.url = f"{base_url}/{ApiVersion.V1}/{Service.AUTH}"
|
48
|
+
self.client = AuthClient(Configuration(host=self.url))
|
44
49
|
|
45
50
|
self.no_credentials_exception = HTTPException(
|
46
51
|
status_code=status.HTTP_401_UNAUTHORIZED,
|
@@ -51,7 +56,7 @@ class AuthHandler:
|
|
51
56
|
"""
|
52
57
|
Verifies the API key.
|
53
58
|
"""
|
54
|
-
return await self.
|
59
|
+
return await self.client.login.verify_api_key(api_key)
|
55
60
|
|
56
61
|
async def _verify_bearer(
|
57
62
|
self, bearer: HTTPAuthorizationCredentials
|
@@ -59,8 +64,8 @@ class AuthHandler:
|
|
59
64
|
"""
|
60
65
|
Verifies the bearer token.
|
61
66
|
"""
|
62
|
-
self.
|
63
|
-
return await self.
|
67
|
+
self.client.config.access_token = bearer.credentials
|
68
|
+
return await self.client.login.verify()
|
64
69
|
|
65
70
|
async def _validate_scopes(
|
66
71
|
self, api_scopes: list[Scope], user_scopes: list[Scope]
|
@@ -0,0 +1,37 @@
|
|
1
|
+
from enum import StrEnum
|
2
|
+
|
3
|
+
class ApiEnv(StrEnum):
|
4
|
+
PROD = "prod"
|
5
|
+
DEV = "dev"
|
6
|
+
LOCAL = "local"
|
7
|
+
DOCKER = "docker"
|
8
|
+
|
9
|
+
class BaseUrl(StrEnum):
|
10
|
+
PROD = "https://api.crypticorn.com"
|
11
|
+
DEV = "https://api.crypticorn.dev"
|
12
|
+
LOCAL = "http://localhost"
|
13
|
+
DOCKER = "http://host.docker.internal"
|
14
|
+
|
15
|
+
@classmethod
|
16
|
+
def from_env(cls, env: ApiEnv) -> "BaseUrl":
|
17
|
+
if env == ApiEnv.PROD:
|
18
|
+
return cls.PROD
|
19
|
+
elif env == ApiEnv.DEV:
|
20
|
+
return cls.DEV
|
21
|
+
elif env == ApiEnv.LOCAL:
|
22
|
+
return cls.LOCAL
|
23
|
+
elif env == ApiEnv.DOCKER:
|
24
|
+
return cls.DOCKER
|
25
|
+
|
26
|
+
|
27
|
+
class ApiVersion(StrEnum):
|
28
|
+
V1 = "v1"
|
29
|
+
|
30
|
+
|
31
|
+
class Service(StrEnum):
|
32
|
+
HIVE = "hive"
|
33
|
+
KLINES = "klines"
|
34
|
+
PAY = "pay"
|
35
|
+
TRADE = "trade"
|
36
|
+
AUTH = "auth"
|
37
|
+
METRICS = "metrics"
|
@@ -0,0 +1,26 @@
|
|
1
|
+
from crypticorn.hive import (
|
2
|
+
ApiClient,
|
3
|
+
Configuration,
|
4
|
+
ModelsApi,
|
5
|
+
DataApi,
|
6
|
+
StatusApi,
|
7
|
+
Configuration,
|
8
|
+
)
|
9
|
+
from crypticorn.common import apikey_header as aph
|
10
|
+
|
11
|
+
|
12
|
+
class HiveClient:
|
13
|
+
"""
|
14
|
+
A client for interacting with the Crypticorn Hive API.
|
15
|
+
"""
|
16
|
+
|
17
|
+
def __init__(
|
18
|
+
self,
|
19
|
+
config: Configuration,
|
20
|
+
):
|
21
|
+
self.config = config
|
22
|
+
self.base_client = ApiClient(configuration=self.config)
|
23
|
+
# Instantiate all the endpoint clients
|
24
|
+
self.models = ModelsApi(self.base_client)
|
25
|
+
self.data = DataApi(self.base_client)
|
26
|
+
self.status = StatusApi(self.base_client)
|
@@ -191,7 +191,7 @@ class Configuration:
|
|
191
191
|
) -> None:
|
192
192
|
"""Constructor"""
|
193
193
|
self._base_path = (
|
194
|
-
"
|
194
|
+
"http://localhost/v1/klines" if host is None else host
|
195
195
|
)
|
196
196
|
"""Default Base url
|
197
197
|
"""
|
@@ -516,7 +516,7 @@ class Configuration:
|
|
516
516
|
"""
|
517
517
|
return [
|
518
518
|
{
|
519
|
-
"url": "
|
519
|
+
"url": "http://localhost/v1/klines",
|
520
520
|
"description": "No description provided",
|
521
521
|
}
|
522
522
|
]
|
@@ -8,7 +8,6 @@ from crypticorn.klines import (
|
|
8
8
|
SymbolsApi,
|
9
9
|
UDFApi,
|
10
10
|
)
|
11
|
-
from crypticorn.common import BaseURL, ApiVersion, Service, apikey_header as aph
|
12
11
|
|
13
12
|
|
14
13
|
class FundingRatesApiWrapper(FundingRatesApi):
|
@@ -58,18 +57,9 @@ class KlinesClient:
|
|
58
57
|
|
59
58
|
def __init__(
|
60
59
|
self,
|
61
|
-
|
62
|
-
api_version: ApiVersion,
|
63
|
-
api_key: str = None,
|
64
|
-
jwt: str = None,
|
60
|
+
config: Configuration,
|
65
61
|
):
|
66
|
-
self.
|
67
|
-
self.config = Configuration(
|
68
|
-
host=self.host,
|
69
|
-
access_token=jwt,
|
70
|
-
api_key={aph.scheme_name: api_key} if api_key else None,
|
71
|
-
api_key_prefix=({aph.scheme_name: aph.model.name} if api_key else None),
|
72
|
-
)
|
62
|
+
self.config = config
|
73
63
|
self.base_client = ApiClient(configuration=self.config)
|
74
64
|
# Instantiate all the endpoint clients
|
75
65
|
self.funding = FundingRatesApiWrapper(self.base_client)
|