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

import betterproto

from settrade.pb.google import type


class InfoV3SymbolMarketStatus(betterproto.Enum):
    UNDEFINED_MARKET_STATUS = 0
    PRE_OPEN_E = 1
    PRE_OPEN1_E = 2
    PRE_OPEN2_E = 3
    OPEN_E = 4
    OPEN1_E = 5
    OPEN2_E = 6
    INTERMISSION_E = 7
    CALL_E = 8
    RUN_OFF_E = 9
    CLOSE_E = 10
    FREEZE1_E = 11
    FREEZE2_E = 12
    FREEZE3_E = 13
    HALT_E = 14
    FULL_HALT_E = 15
    CIRCUIT_BREAK_E = 16
    SUSPEND_E = 17
    PAUSE_E = 18
    EXPIRED_E = 19
    PRE_OPEN_D = 20
    PRE_OPEN0_D = 21
    PRE_OPEN1_D = 22
    PRE_OPEN2_D = 23
    OPEN0_D = 24
    OPEN1_D = 25
    OPEN2_D = 26
    DAY_D = 27
    PRE_SETTLEMENT_D = 28
    SETTLEMENT_D = 29
    INTERMISSION1_D = 30
    INTERMISSION2_D = 31
    INTERMISSION3_D = 32
    CLOSE_D = 33
    HALT_D = 34
    FULL_HALT_D = 35
    CIRCUIT_BREAK_D = 36
    SUSPEND_D = 37
    PAUSE_D = 38
    EXPIRED_D = 39


@dataclass
class InfoV3(betterproto.Message):
    """
    Topic: proto/topic/infov3/<symbol> Today's general instrument information
    """

    # Subscribed symbol
    symbol: str = betterproto.string_field(1)
    # Projected open price, exists only during Pre-open session
    projected_open_price: type.Money = betterproto.message_field(6)
    # Highest price
    high: type.Money = betterproto.message_field(2)
    # Lowest price
    low: type.Money = betterproto.message_field(3)
    # Current price
    last: type.Money = betterproto.message_field(4)
    # Change
    change: type.Money = betterproto.message_field(7)
    # Total traded volume
    total_volume: int = betterproto.int64_field(5)
    # Total traded value
    total_value: type.Money = betterproto.message_field(8)
    # Market status
    market_status: "InfoV3SymbolMarketStatus" = betterproto.enum_field(9)
