"""Type definitions for Purrio CLI."""

from typing import Any, TypedDict

from hyperliquid.utils.types import Fill, L2BookData, Side


class AssetPosition(TypedDict):
    position: dict[str, Any]
    type: str


class OpenOrder(TypedDict):
    coin: str
    limitPx: str
    oid: int
    side: Side
    sz: str
    timestamp: int
    orderStatus: str
    origSz: str


class FundingData(TypedDict):
    coin: str
    fundingRate: str
    premium: str
    time: int


AllMids = dict[str, float]
UserFills = list[Fill]
OpenOrders = list[OpenOrder]
FundingHistory = list[FundingData]
DisplayValue = float | str | int | None

__all__ = [
    "AssetPosition",
    "OpenOrder",
    "FundingData",
    "AllMids",
    "UserFills",
    "OpenOrders",
    "FundingHistory",
    "DisplayValue",
    "Fill",
    "L2BookData",
    "Side",
]
