"""
API error codes for Backpack Exchange SDK.
"""

from enum import Enum


class ApiErrorCode(Enum):
    """API error codes."""
    ACCOUNT_DEACTIVATED = "ACCOUNT_DEACTIVATED"
    ACCOUNT_LIQUIDATING = "ACCOUNT_LIQUIDATING"
    BORROW_LIMIT = "BORROW_LIMIT"
    BORROW_REQUIRES_LEND_REDEEM = "BORROW_REQUIRES_LEND_REDEEM"
    FORBIDDEN = "FORBIDDEN"
    INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS"
    INSUFFICIENT_MARGIN = "INSUFFICIENT_MARGIN"
    INSUFFICIENT_SUPPLY = "INSUFFICIENT_SUPPLY"
    INVALID_ASSET = "INVALID_ASSET"
    INVALID_CLIENT_REQUEST = "INVALID_CLIENT_REQUEST"
    INVALID_MARKET = "INVALID_MARKET"
    INVALID_ORDER = "INVALID_ORDER"
    INVALID_POSITION_ID = "INVALID_POSITION_ID"
    INVALID_PRICE = "INVALID_PRICE"
    INVALID_QUANTITY = "INVALID_QUANTITY"
    INVALID_RANGE = "INVALID_RANGE"
    INVALID_SIGNATURE = "INVALID_SIGNATURE"
    INVALID_SOURCE = "INVALID_SOURCE"
    INVALID_SYMBOL = "INVALID_SYMBOL"
    INVALID_TWO_FACTOR_CODE = "INVALID_TWO_FACTOR_CODE"
    LEND_LIMIT = "LEND_LIMIT"
    LEND_REQUIRES_BORROW_REPAY = "LEND_REQUIRES_BORROW_REPAY"
    MAINTENANCE = "MAINTENANCE"
    MAX_LEVERAGE_REACHED = "MAX_LEVERAGE_REACHED"
    NOT_IMPLEMENTED = "NOT_IMPLEMENTED"
    ORDER_LIMIT = "ORDER_LIMIT"
    POSITION_LIMIT = "POSITION_LIMIT"
    PRECONDITION_FAILED = "PRECONDITION_FAILED"
    RESOURCE_NOT_FOUND = "RESOURCE_NOT_FOUND"
    SERVER_ERROR = "SERVER_ERROR"
    TIMEOUT = "TIMEOUT"
    TOO_MANY_REQUESTS = "TOO_MANY_REQUESTS"
    TRADING_PAUSED = "TRADING_PAUSED"
    UNAUTHORIZED = "UNAUTHORIZED"
