# coding: utf-8

"""
    FastAPI

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

    The version of the OpenAPI document: 0.1.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
    """
    SUCCESS = 'success'
    INVALID_API_KEY = 'invalid_api_key'
    INVALID_SIGNATURE = 'invalid_signature'
    INVALID_TIMESTAMP = 'invalid_timestamp'
    IP_ADDRESS_IS_NOT_AUTHORIZED = 'ip_address_is_not_authorized'
    INSUFFICIENT_PERMISSIONS_SPOT_AND_FUTURES_REQUIRED = 'insufficient_permissions_spot_and_futures_required'
    USER_ACCOUNT_IS_FROZEN = 'user_account_is_frozen'
    RATE_LIMIT_EXCEEDED = 'rate_limit_exceeded'
    INVALID_PARAMETER_PROVIDED = 'invalid_parameter_provided'
    REQUEST_SCOPE_LIMIT_EXCEEDED = 'request_scope_limit_exceeded'
    INVALID_CONTENT_TYPE = 'invalid_content_type'
    REQUESTED_RESOURCE_NOT_FOUND = 'requested_resource_not_found'
    ORDER_DOES_NOT_EXIST = 'order_does_not_exist'
    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_PRICE_IS_INVALID = 'order_price_is_invalid'
    POST_ONLY_ORDER_WOULD_IMMEDIATELY_MATCH = 'post_only_order_would_immediately_match'
    SYMBOL_DOES_NOT_EXIST = 'symbol_does_not_exist'
    POSITION_DOES_NOT_EXIST = 'position_does_not_exist'
    POSITION_LIMIT_EXCEEDED = 'position_limit_exceeded'
    POSITION_OPENING_TEMPORARILY_SUSPENDED = 'position_opening_temporarily_suspended'
    INSUFFICIENT_BALANCE = 'insufficient_balance'
    INSUFFICIENT_MARGIN = 'insufficient_margin'
    LEVERAGE_LIMIT_EXCEEDED = 'leverage_limit_exceeded'
    RISK_LIMIT_EXCEEDED = 'risk_limit_exceeded'
    ORDER_VIOLATES_LIQUIDATION_PRICE_CONSTRAINTS = 'order_violates_liquidation_price_constraints'
    INVALID_MARGIN_MODE = 'invalid_margin_mode'
    INTERNAL_SYSTEM_ERROR = 'internal_system_error'
    SYSTEM_CONFIGURATION_ERROR = 'system_configuration_error'
    SERVICE_TEMPORARILY_UNAVAILABLE = 'service_temporarily_unavailable'
    SYSTEM_IS_BUSY_PLEASE_TRY_AGAIN_LATER = 'system_is_busy_please_try_again_later'
    SYSTEM_UNDER_MAINTENANCE = 'system_under_maintenance'
    RPC_TIMEOUT = 'rpc_timeout'
    SYSTEM_SETTLEMENT_IN_PROCESS = 'system_settlement_in_process'
    TRADING_IS_SUSPENDED = 'trading_is_suspended'
    TRADING_HAS_BEEN_LOCKED = 'trading_has_been_locked'
    UNKNOWN_ERROR_OCCURRED = 'unknown_error_occurred'
    HTTP_REQUEST_ERROR = 'http_request_error'
    BLACK_SWAN = 'black_swan'
    TRADING_ACTION_EXPIRED = 'trading_action_expired'
    BOT_DISABLED = 'bot_disabled'
    NEW_TRADING_ACTION = 'new_trading_action'
    ORDER_SIZE_TOO_SMALL = 'order_size_too_small'
    ORDER_SIZE_TOO_LARGE = 'order_size_too_large'
    HEDGE_MODE_NOT_ACTIVE = 'hedge_mode_not_active'

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


