# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: PrivateAccountV3Api.proto, PrivateDealsV3Api.proto, PrivateOrdersV3Api.proto, PublicAggreBookTickerV3Api.proto, PublicAggreDealsV3Api.proto, PublicAggreDepthsV3Api.proto, PublicBookTickerBatchV3Api.proto, PublicBookTickerV3Api.proto, PublicDealsV3Api.proto, PublicIncreaseDepthsBatchV3Api.proto, PublicIncreaseDepthsV3Api.proto, PublicLimitDepthsV3Api.proto, PublicMiniTickerV3Api.proto, PublicMiniTickersV3Api.proto, PublicSpotKlineV3Api.proto, PushDataV3ApiWrapper.proto
# plugin: python-betterproto2
# This file has been @generated

__all__ = (
    "PrivateAccountV3Api",
    "PrivateDealsV3Api",
    "PrivateOrdersV3Api",
    "PublicAggreBookTickerV3Api",
    "PublicAggreDealsV3Api",
    "PublicAggreDealsV3ApiItem",
    "PublicAggreDepthV3ApiItem",
    "PublicAggreDepthsV3Api",
    "PublicBookTickerBatchV3Api",
    "PublicBookTickerV3Api",
    "PublicDealsV3Api",
    "PublicDealsV3ApiItem",
    "PublicIncreaseDepthV3ApiItem",
    "PublicIncreaseDepthsBatchV3Api",
    "PublicIncreaseDepthsV3Api",
    "PublicLimitDepthV3ApiItem",
    "PublicLimitDepthsV3Api",
    "PublicMiniTickerV3Api",
    "PublicMiniTickersV3Api",
    "PublicSpotKlineV3Api",
    "PushDataV3ApiWrapper",
)

from dataclasses import dataclass

import betterproto2

from .message_pool import default_message_pool

_COMPILER_VERSION = "0.9.0"
betterproto2.check_compiler_version(_COMPILER_VERSION)


@dataclass(eq=False, repr=False)
class PrivateAccountV3Api(betterproto2.Message):
    vcoin_name: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    coin_id: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)

    balance_amount: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)

    balance_amount_change: "str" = betterproto2.field(4, betterproto2.TYPE_STRING)

    frozen_amount: "str" = betterproto2.field(5, betterproto2.TYPE_STRING)

    frozen_amount_change: "str" = betterproto2.field(6, betterproto2.TYPE_STRING)

    type: "str" = betterproto2.field(7, betterproto2.TYPE_STRING)

    time: "int" = betterproto2.field(8, betterproto2.TYPE_INT64)


default_message_pool.register_message("", "PrivateAccountV3Api", PrivateAccountV3Api)


@dataclass(eq=False, repr=False)
class PrivateDealsV3Api(betterproto2.Message):
    price: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    quantity: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)

    amount: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)

    trade_type: "int" = betterproto2.field(4, betterproto2.TYPE_INT32)

    is_maker: "bool" = betterproto2.field(5, betterproto2.TYPE_BOOL)

    is_self_trade: "bool" = betterproto2.field(6, betterproto2.TYPE_BOOL)

    trade_id: "str" = betterproto2.field(7, betterproto2.TYPE_STRING)

    client_order_id: "str" = betterproto2.field(8, betterproto2.TYPE_STRING)

    order_id: "str" = betterproto2.field(9, betterproto2.TYPE_STRING)

    fee_amount: "str" = betterproto2.field(10, betterproto2.TYPE_STRING)

    fee_currency: "str" = betterproto2.field(11, betterproto2.TYPE_STRING)

    time: "int" = betterproto2.field(12, betterproto2.TYPE_INT64)


default_message_pool.register_message("", "PrivateDealsV3Api", PrivateDealsV3Api)


@dataclass(eq=False, repr=False)
class PrivateOrdersV3Api(betterproto2.Message):
    id: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    client_id: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)

    price: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)

    quantity: "str" = betterproto2.field(4, betterproto2.TYPE_STRING)

    amount: "str" = betterproto2.field(5, betterproto2.TYPE_STRING)

    avg_price: "str" = betterproto2.field(6, betterproto2.TYPE_STRING)

    order_type: "int" = betterproto2.field(7, betterproto2.TYPE_INT32)

    trade_type: "int" = betterproto2.field(8, betterproto2.TYPE_INT32)

    is_maker: "bool" = betterproto2.field(9, betterproto2.TYPE_BOOL)

    remain_amount: "str" = betterproto2.field(10, betterproto2.TYPE_STRING)

    remain_quantity: "str" = betterproto2.field(11, betterproto2.TYPE_STRING)

    last_deal_quantity: "str | None" = betterproto2.field(
        12, betterproto2.TYPE_STRING, optional=True
    )

    cumulative_quantity: "str" = betterproto2.field(13, betterproto2.TYPE_STRING)

    cumulative_amount: "str" = betterproto2.field(14, betterproto2.TYPE_STRING)

    status: "int" = betterproto2.field(15, betterproto2.TYPE_INT32)

    create_time: "int" = betterproto2.field(16, betterproto2.TYPE_INT64)

    market: "str | None" = betterproto2.field(
        17, betterproto2.TYPE_STRING, optional=True
    )

    trigger_type: "int | None" = betterproto2.field(
        18, betterproto2.TYPE_INT32, optional=True
    )

    trigger_price: "str | None" = betterproto2.field(
        19, betterproto2.TYPE_STRING, optional=True
    )

    state: "int | None" = betterproto2.field(20, betterproto2.TYPE_INT32, optional=True)

    oco_id: "str | None" = betterproto2.field(
        21, betterproto2.TYPE_STRING, optional=True
    )

    route_factor: "str | None" = betterproto2.field(
        22, betterproto2.TYPE_STRING, optional=True
    )

    symbol_id: "str | None" = betterproto2.field(
        23, betterproto2.TYPE_STRING, optional=True
    )

    market_id: "str | None" = betterproto2.field(
        24, betterproto2.TYPE_STRING, optional=True
    )

    market_currency_id: "str | None" = betterproto2.field(
        25, betterproto2.TYPE_STRING, optional=True
    )

    currency_id: "str | None" = betterproto2.field(
        26, betterproto2.TYPE_STRING, optional=True
    )


default_message_pool.register_message("", "PrivateOrdersV3Api", PrivateOrdersV3Api)


@dataclass(eq=False, repr=False)
class PublicAggreBookTickerV3Api(betterproto2.Message):
    bid_price: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    bid_quantity: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)

    ask_price: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)

    ask_quantity: "str" = betterproto2.field(4, betterproto2.TYPE_STRING)


default_message_pool.register_message(
    "", "PublicAggreBookTickerV3Api", PublicAggreBookTickerV3Api
)


@dataclass(eq=False, repr=False)
class PublicAggreDealsV3Api(betterproto2.Message):
    deals: "list[PublicAggreDealsV3ApiItem]" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, repeated=True
    )

    event_type: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)


default_message_pool.register_message(
    "", "PublicAggreDealsV3Api", PublicAggreDealsV3Api
)


@dataclass(eq=False, repr=False)
class PublicAggreDealsV3ApiItem(betterproto2.Message):
    price: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    quantity: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)

    trade_type: "int" = betterproto2.field(3, betterproto2.TYPE_INT32)

    time: "int" = betterproto2.field(4, betterproto2.TYPE_INT64)


default_message_pool.register_message(
    "", "PublicAggreDealsV3ApiItem", PublicAggreDealsV3ApiItem
)


@dataclass(eq=False, repr=False)
class PublicAggreDepthsV3Api(betterproto2.Message):
    asks: "list[PublicAggreDepthV3ApiItem]" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, repeated=True
    )

    bids: "list[PublicAggreDepthV3ApiItem]" = betterproto2.field(
        2, betterproto2.TYPE_MESSAGE, repeated=True
    )

    event_type: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)

    from_version: "str" = betterproto2.field(4, betterproto2.TYPE_STRING)

    to_version: "str" = betterproto2.field(5, betterproto2.TYPE_STRING)


default_message_pool.register_message(
    "", "PublicAggreDepthsV3Api", PublicAggreDepthsV3Api
)


@dataclass(eq=False, repr=False)
class PublicAggreDepthV3ApiItem(betterproto2.Message):
    price: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    quantity: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)


default_message_pool.register_message(
    "", "PublicAggreDepthV3ApiItem", PublicAggreDepthV3ApiItem
)


@dataclass(eq=False, repr=False)
class PublicBookTickerBatchV3Api(betterproto2.Message):
    items: "list[PublicBookTickerV3Api]" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, repeated=True
    )


default_message_pool.register_message(
    "", "PublicBookTickerBatchV3Api", PublicBookTickerBatchV3Api
)


@dataclass(eq=False, repr=False)
class PublicBookTickerV3Api(betterproto2.Message):
    bid_price: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    bid_quantity: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)

    ask_price: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)

    ask_quantity: "str" = betterproto2.field(4, betterproto2.TYPE_STRING)


default_message_pool.register_message(
    "", "PublicBookTickerV3Api", PublicBookTickerV3Api
)


@dataclass(eq=False, repr=False)
class PublicDealsV3Api(betterproto2.Message):
    deals: "list[PublicDealsV3ApiItem]" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, repeated=True
    )

    event_type: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)


default_message_pool.register_message("", "PublicDealsV3Api", PublicDealsV3Api)


@dataclass(eq=False, repr=False)
class PublicDealsV3ApiItem(betterproto2.Message):
    price: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    quantity: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)

    trade_type: "int" = betterproto2.field(3, betterproto2.TYPE_INT32)

    time: "int" = betterproto2.field(4, betterproto2.TYPE_INT64)


default_message_pool.register_message("", "PublicDealsV3ApiItem", PublicDealsV3ApiItem)


@dataclass(eq=False, repr=False)
class PublicIncreaseDepthsBatchV3Api(betterproto2.Message):
    items: "list[PublicIncreaseDepthsV3Api]" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, repeated=True
    )

    event_type: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)


default_message_pool.register_message(
    "", "PublicIncreaseDepthsBatchV3Api", PublicIncreaseDepthsBatchV3Api
)


@dataclass(eq=False, repr=False)
class PublicIncreaseDepthsV3Api(betterproto2.Message):
    asks: "list[PublicIncreaseDepthV3ApiItem]" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, repeated=True
    )

    bids: "list[PublicIncreaseDepthV3ApiItem]" = betterproto2.field(
        2, betterproto2.TYPE_MESSAGE, repeated=True
    )

    event_type: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)

    version: "str" = betterproto2.field(4, betterproto2.TYPE_STRING)


default_message_pool.register_message(
    "", "PublicIncreaseDepthsV3Api", PublicIncreaseDepthsV3Api
)


@dataclass(eq=False, repr=False)
class PublicIncreaseDepthV3ApiItem(betterproto2.Message):
    price: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    quantity: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)


default_message_pool.register_message(
    "", "PublicIncreaseDepthV3ApiItem", PublicIncreaseDepthV3ApiItem
)


@dataclass(eq=False, repr=False)
class PublicLimitDepthsV3Api(betterproto2.Message):
    asks: "list[PublicLimitDepthV3ApiItem]" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, repeated=True
    )

    bids: "list[PublicLimitDepthV3ApiItem]" = betterproto2.field(
        2, betterproto2.TYPE_MESSAGE, repeated=True
    )

    event_type: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)

    version: "str" = betterproto2.field(4, betterproto2.TYPE_STRING)


default_message_pool.register_message(
    "", "PublicLimitDepthsV3Api", PublicLimitDepthsV3Api
)


@dataclass(eq=False, repr=False)
class PublicLimitDepthV3ApiItem(betterproto2.Message):
    price: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    quantity: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)


default_message_pool.register_message(
    "", "PublicLimitDepthV3ApiItem", PublicLimitDepthV3ApiItem
)


@dataclass(eq=False, repr=False)
class PublicMiniTickersV3Api(betterproto2.Message):
    items: "list[PublicMiniTickerV3Api]" = betterproto2.field(
        1, betterproto2.TYPE_MESSAGE, repeated=True
    )


default_message_pool.register_message(
    "", "PublicMiniTickersV3Api", PublicMiniTickersV3Api
)


@dataclass(eq=False, repr=False)
class PublicMiniTickerV3Api(betterproto2.Message):
    symbol: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    price: "str" = betterproto2.field(2, betterproto2.TYPE_STRING)
    """
    Latest price
    """

    rate: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)
    """
    Change rate in UTC+8 timezone
    """

    zoned_rate: "str" = betterproto2.field(4, betterproto2.TYPE_STRING)
    """
    Change rate in local timezone
    """

    high: "str" = betterproto2.field(5, betterproto2.TYPE_STRING)
    """
    Rolling highest price
    """

    low: "str" = betterproto2.field(6, betterproto2.TYPE_STRING)
    """
    Rolling lowest price
    """

    volume: "str" = betterproto2.field(7, betterproto2.TYPE_STRING)
    """
    Rolling turnover
    """

    quantity: "str" = betterproto2.field(8, betterproto2.TYPE_STRING)
    """
    Rolling trading volume
    """

    last_close_rate: "str" = betterproto2.field(9, betterproto2.TYPE_STRING)
    """
    Change rate of previous close in UTC+8 timezone
    """

    last_close_zoned_rate: "str" = betterproto2.field(10, betterproto2.TYPE_STRING)
    """
    Change rate of previous close in local timezone
    """

    last_close_high: "str" = betterproto2.field(11, betterproto2.TYPE_STRING)
    """
    Rolling highest price in previous close mode
    """

    last_close_low: "str" = betterproto2.field(12, betterproto2.TYPE_STRING)
    """
    Rolling lowest price in previous close mode
    """


default_message_pool.register_message(
    "", "PublicMiniTickerV3Api", PublicMiniTickerV3Api
)


@dataclass(eq=False, repr=False)
class PublicSpotKlineV3Api(betterproto2.Message):
    interval: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)
    """
    Kline interval (Min1,Min5,Min15,Min30,Min60,Hour4,Hour8,Day1,Week1,Month1)
    """

    window_start: "int" = betterproto2.field(2, betterproto2.TYPE_INT64)
    """
    Window start timestamp (seconds since epoch)
    """

    opening_price: "str" = betterproto2.field(3, betterproto2.TYPE_STRING)
    """
    Opening price
    """

    closing_price: "str" = betterproto2.field(4, betterproto2.TYPE_STRING)
    """
    Closing price
    """

    highest_price: "str" = betterproto2.field(5, betterproto2.TYPE_STRING)
    """
    Highest price
    """

    lowest_price: "str" = betterproto2.field(6, betterproto2.TYPE_STRING)
    """
    Lowest price
    """

    volume: "str" = betterproto2.field(7, betterproto2.TYPE_STRING)
    """
    Volume
    """

    amount: "str" = betterproto2.field(8, betterproto2.TYPE_STRING)
    """
    Amount
    """

    window_end: "int" = betterproto2.field(9, betterproto2.TYPE_INT64)
    """
    Window end timestamp (seconds since epoch)
    """


default_message_pool.register_message("", "PublicSpotKlineV3Api", PublicSpotKlineV3Api)


@dataclass(eq=False, repr=False)
class PushDataV3ApiWrapper(betterproto2.Message):
    """


    Oneofs:
        - body: Data, NOTE: Since duplication is not allowed, please use full type and variable names as much as possible
    """

    channel: "str" = betterproto2.field(1, betterproto2.TYPE_STRING)

    public_deals: "PublicDealsV3Api | None" = betterproto2.field(
        301, betterproto2.TYPE_MESSAGE, optional=True, group="body"
    )

    public_increase_depths: "PublicIncreaseDepthsV3Api | None" = betterproto2.field(
        302, betterproto2.TYPE_MESSAGE, optional=True, group="body"
    )

    public_limit_depths: "PublicLimitDepthsV3Api | None" = betterproto2.field(
        303, betterproto2.TYPE_MESSAGE, optional=True, group="body"
    )

    private_orders: "PrivateOrdersV3Api | None" = betterproto2.field(
        304, betterproto2.TYPE_MESSAGE, optional=True, group="body"
    )

    public_book_ticker: "PublicBookTickerV3Api | None" = betterproto2.field(
        305, betterproto2.TYPE_MESSAGE, optional=True, group="body"
    )

    private_deals: "PrivateDealsV3Api | None" = betterproto2.field(
        306, betterproto2.TYPE_MESSAGE, optional=True, group="body"
    )

    private_account: "PrivateAccountV3Api | None" = betterproto2.field(
        307, betterproto2.TYPE_MESSAGE, optional=True, group="body"
    )

    public_spot_kline: "PublicSpotKlineV3Api | None" = betterproto2.field(
        308, betterproto2.TYPE_MESSAGE, optional=True, group="body"
    )

    public_mini_ticker: "PublicMiniTickerV3Api | None" = betterproto2.field(
        309, betterproto2.TYPE_MESSAGE, optional=True, group="body"
    )

    public_mini_tickers: "PublicMiniTickersV3Api | None" = betterproto2.field(
        310, betterproto2.TYPE_MESSAGE, optional=True, group="body"
    )

    public_book_ticker_batch: "PublicBookTickerBatchV3Api | None" = betterproto2.field(
        311, betterproto2.TYPE_MESSAGE, optional=True, group="body"
    )

    public_increase_depths_batch: "PublicIncreaseDepthsBatchV3Api | None" = (
        betterproto2.field(312, betterproto2.TYPE_MESSAGE, optional=True, group="body")
    )

    public_aggre_depths: "PublicAggreDepthsV3Api | None" = betterproto2.field(
        313, betterproto2.TYPE_MESSAGE, optional=True, group="body"
    )

    public_aggre_deals: "PublicAggreDealsV3Api | None" = betterproto2.field(
        314, betterproto2.TYPE_MESSAGE, optional=True, group="body"
    )

    public_aggre_book_ticker: "PublicAggreBookTickerV3Api | None" = betterproto2.field(
        315, betterproto2.TYPE_MESSAGE, optional=True, group="body"
    )

    symbol: "str | None" = betterproto2.field(
        3, betterproto2.TYPE_STRING, optional=True
    )
    """
    Trading pair
    """

    symbol_id: "str | None" = betterproto2.field(
        4, betterproto2.TYPE_STRING, optional=True
    )
    """
    Trading pair ID
    """

    create_time: "int | None" = betterproto2.field(
        5, betterproto2.TYPE_INT64, optional=True
    )
    """
    Message creation time
    """

    send_time: "int | None" = betterproto2.field(
        6, betterproto2.TYPE_INT64, optional=True
    )
    """
    Message sent time
    """


default_message_pool.register_message("", "PushDataV3ApiWrapper", PushDataV3ApiWrapper)
