# coding: utf-8

"""
Klines Service API

API for retrieving OHLCV data, funding rates, and symbol information from Binance.

The version of the OpenAPI document: 1.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
"""  # noqa: E501


from __future__ import annotations
import json
from enum import Enum
from typing_extensions import Self


class ApiErrorIdentifier(str, Enum):
    """
    API error identifiers
    """

    """
    allowed enum values
    """
    ALLOCATION_BELOW_CURRENT_EXPOSURE = "allocation_below_current_exposure"
    ALLOCATION_BELOW_MIN_AMOUNT = "allocation_below_min_amount"
    BLACK_SWAN = "black_swan"
    BOT_ALREADY_DELETED = "bot_already_deleted"
    BOT_DISABLED = "bot_disabled"
    BOT_STOPPING_COMPLETED = "bot_stopping_completed"
    BOT_STOPPING_STARTED = "bot_stopping_started"
    CLIENT_ORDER_ID_ALREADY_EXISTS = "client_order_id_already_exists"
    INVALID_CONTENT_TYPE = "invalid_content_type"
    DELETE_BOT_ERROR = "delete_bot_error"
    EXCHANGE_INVALID_SIGNATURE = "exchange_invalid_signature"
    EXCHANGE_INVALID_TIMESTAMP = "exchange_invalid_timestamp"
    EXCHANGE_IP_ADDRESS_IS_NOT_AUTHORIZED = "exchange_ip_address_is_not_authorized"
    EXCHANGE_KEY_ALREADY_EXISTS = "exchange_key_already_exists"
    EXCHANGE_KEY_IN_USE = "exchange_key_in_use"
    EXCHANGE_SYSTEM_UNDER_MAINTENANCE = "exchange_system_under_maintenance"
    EXCHANGE_RATE_LIMIT_EXCEEDED = "exchange_rate_limit_exceeded"
    INSUFFICIENT_PERMISSIONS_SPOT_AND_FUTURES_REQUIRED = (
        "insufficient_permissions_spot_and_futures_required"
    )
    EXCHANGE_SERVICE_TEMPORARILY_UNAVAILABLE = (
        "exchange_service_temporarily_unavailable"
    )
    EXCHANGE_SYSTEM_IS_BUSY = "exchange_system_is_busy"
    EXCHANGE_SYSTEM_CONFIGURATION_ERROR = "exchange_system_configuration_error"
    EXCHANGE_INTERNAL_SYSTEM_ERROR = "exchange_internal_system_error"
    EXCHANGE_USER_ACCOUNT_IS_FROZEN = "exchange_user_account_is_frozen"
    API_KEY_EXPIRED = "api_key_expired"
    BEARER_TOKEN_EXPIRED = "bearer_token_expired"
    FORBIDDEN = "forbidden"
    HEDGE_MODE_NOT_ACTIVE = "hedge_mode_not_active"
    HTTP_REQUEST_ERROR = "http_request_error"
    INSUFFICIENT_BALANCE = "insufficient_balance"
    INSUFFICIENT_MARGIN = "insufficient_margin"
    INSUFFICIENT_SCOPES = "insufficient_scopes"
    INVALID_API_KEY = "invalid_api_key"
    INVALID_BEARER = "invalid_bearer"
    INVALID_DATA = "invalid_data"
    INVALID_DATA_RESPONSE = "invalid_data_response"
    INVALID_EXCHANGE_KEY = "invalid_exchange_key"
    INVALID_MARGIN_MODE = "invalid_margin_mode"
    INVALID_MODEL_NAME = "invalid_model_name"
    INVALID_PARAMETER_PROVIDED = "invalid_parameter_provided"
    LEVERAGE_LIMIT_EXCEEDED = "leverage_limit_exceeded"
    ORDER_VIOLATES_LIQUIDATION_PRICE_CONSTRAINTS = (
        "order_violates_liquidation_price_constraints"
    )
    MODEL_NAME_NOT_UNIQUE = "model_name_not_unique"
    NO_CREDENTIALS = "no_credentials"
    NOW_API_DOWN = "now_api_down"
    OBJECT_ALREADY_EXISTS = "object_already_exists"
    OBJECT_CREATED = "object_created"
    OBJECT_DELETED = "object_deleted"
    OBJECT_NOT_FOUND = "object_not_found"
    OBJECT_UPDATED = "object_updated"
    ORDER_IS_ALREADY_FILLED = "order_is_already_filled"
    ORDER_IS_BEING_PROCESSED = "order_is_being_processed"
    ORDER_QUANTITY_LIMIT_EXCEEDED = "order_quantity_limit_exceeded"
    ORDER_DOES_NOT_EXIST = "order_does_not_exist"
    ORDER_PRICE_IS_INVALID = "order_price_is_invalid"
    ORDER_SIZE_TOO_LARGE = "order_size_too_large"
    ORDER_SIZE_TOO_SMALL = "order_size_too_small"
    POSITION_LIMIT_EXCEEDED = "position_limit_exceeded"
    POSITION_DOES_NOT_EXIST = "position_does_not_exist"
    POSITION_OPENING_TEMPORARILY_SUSPENDED = "position_opening_temporarily_suspended"
    POST_ONLY_ORDER_WOULD_IMMEDIATELY_MATCH = "post_only_order_would_immediately_match"
    REQUEST_SCOPE_LIMIT_EXCEEDED = "request_scope_limit_exceeded"
    RISK_LIMIT_EXCEEDED = "risk_limit_exceeded"
    RPC_TIMEOUT = "rpc_timeout"
    SYSTEM_SETTLEMENT_IN_PROCESS = "system_settlement_in_process"
    STRATEGY_ALREADY_EXISTS = "strategy_already_exists"
    STRATEGY_DISABLED = "strategy_disabled"
    STRATEGY_LEVERAGE_MISMATCH = "strategy_leverage_mismatch"
    STRATEGY_NOT_SUPPORTING_EXCHANGE = "strategy_not_supporting_exchange"
    SUCCESS = "success"
    SYMBOL_DOES_NOT_EXIST = "symbol_does_not_exist"
    TRADING_ACTION_EXPIRED = "trading_action_expired"
    TRADING_ACTION_SKIPPED = "trading_action_skipped"
    TRADING_HAS_BEEN_LOCKED = "trading_has_been_locked"
    TRADING_IS_SUSPENDED = "trading_is_suspended"
    UNKNOWN_ERROR_OCCURRED = "unknown_error_occurred"
    REQUESTED_RESOURCE_NOT_FOUND = "requested_resource_not_found"

    @classmethod
    def from_json(cls, json_str: str) -> Self:
        """Create an instance of ApiErrorIdentifier from a JSON string"""
        return cls(json.loads(json_str))
