# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: exchinfoeqv3.proto
# plugin: python-betterproto
from dataclasses import dataclass

import betterproto

from settrade.pb.google import type


class EquityMarketInfoV3EquityMarketStatus(betterproto.Enum):
    UNDEFINED_MARKET_STATUS = 0
    PRE_OPEN1 = 2
    PRE_OPEN2 = 3
    OPEN1 = 5
    OPEN2 = 6
    INTERMISSION = 7
    CALL = 8
    RUN_OFF = 9
    CLOSE = 10


@dataclass
class EquityExchangeInfoV3(betterproto.Message):
    """Topic: proto/topic/exchinfoeqv3/<market> Equity Exchange Info"""

    # Equity Market info
    market_info: "EquityMarketInfoV3" = betterproto.message_field(1)


@dataclass
class EquityMarketInfoV3(betterproto.Message):
    # Market name
    name: str = betterproto.string_field(1)
    # Market status
    market_status: "EquityMarketInfoV3EquityMarketStatus" = betterproto.enum_field(2)
    # Current index
    current: type.Money = betterproto.message_field(3)
    # Highest index
    high: type.Money = betterproto.message_field(4)
    # Lowest index
    low: type.Money = betterproto.message_field(5)
    # Change
    change: type.Money = betterproto.message_field(6)
    # Percent change
    percent_change: type.Money = betterproto.message_field(7)
    # total index volume
    total_index_volume: int = betterproto.int64_field(8)
    # total index value
    total_index_value: type.Money = betterproto.message_field(9)
