// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        v5.29.3
// source: alt/v1/paper_trading.proto

package altv1

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type StartPaperTradingRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	AccountId     string                 `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	Spec          *BacktestRunSpec       `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
	StartingCash  *Price                 `protobuf:"bytes,3,opt,name=starting_cash,json=startingCash,proto3" json:"starting_cash,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *StartPaperTradingRequest) Reset() {
	*x = StartPaperTradingRequest{}
	mi := &file_alt_v1_paper_trading_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *StartPaperTradingRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*StartPaperTradingRequest) ProtoMessage() {}

func (x *StartPaperTradingRequest) ProtoReflect() protoreflect.Message {
	mi := &file_alt_v1_paper_trading_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use StartPaperTradingRequest.ProtoReflect.Descriptor instead.
func (*StartPaperTradingRequest) Descriptor() ([]byte, []int) {
	return file_alt_v1_paper_trading_proto_rawDescGZIP(), []int{0}
}

func (x *StartPaperTradingRequest) GetAccountId() string {
	if x != nil {
		return x.AccountId
	}
	return ""
}

func (x *StartPaperTradingRequest) GetSpec() *BacktestRunSpec {
	if x != nil {
		return x.Spec
	}
	return nil
}

func (x *StartPaperTradingRequest) GetStartingCash() *Price {
	if x != nil {
		return x.StartingCash
	}
	return nil
}

type StartPaperTradingResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	State         *PaperTradingState     `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
	Error         *ErrorInfo             `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *StartPaperTradingResponse) Reset() {
	*x = StartPaperTradingResponse{}
	mi := &file_alt_v1_paper_trading_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *StartPaperTradingResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*StartPaperTradingResponse) ProtoMessage() {}

func (x *StartPaperTradingResponse) ProtoReflect() protoreflect.Message {
	mi := &file_alt_v1_paper_trading_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use StartPaperTradingResponse.ProtoReflect.Descriptor instead.
func (*StartPaperTradingResponse) Descriptor() ([]byte, []int) {
	return file_alt_v1_paper_trading_proto_rawDescGZIP(), []int{1}
}

func (x *StartPaperTradingResponse) GetState() *PaperTradingState {
	if x != nil {
		return x.State
	}
	return nil
}

func (x *StartPaperTradingResponse) GetError() *ErrorInfo {
	if x != nil {
		return x.Error
	}
	return nil
}

type GetPaperTradingStateRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	AccountId     string                 `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *GetPaperTradingStateRequest) Reset() {
	*x = GetPaperTradingStateRequest{}
	mi := &file_alt_v1_paper_trading_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *GetPaperTradingStateRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetPaperTradingStateRequest) ProtoMessage() {}

func (x *GetPaperTradingStateRequest) ProtoReflect() protoreflect.Message {
	mi := &file_alt_v1_paper_trading_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use GetPaperTradingStateRequest.ProtoReflect.Descriptor instead.
func (*GetPaperTradingStateRequest) Descriptor() ([]byte, []int) {
	return file_alt_v1_paper_trading_proto_rawDescGZIP(), []int{2}
}

func (x *GetPaperTradingStateRequest) GetAccountId() string {
	if x != nil {
		return x.AccountId
	}
	return ""
}

type GetPaperTradingStateResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	State         *PaperTradingState     `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"`
	Error         *ErrorInfo             `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *GetPaperTradingStateResponse) Reset() {
	*x = GetPaperTradingStateResponse{}
	mi := &file_alt_v1_paper_trading_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *GetPaperTradingStateResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetPaperTradingStateResponse) ProtoMessage() {}

func (x *GetPaperTradingStateResponse) ProtoReflect() protoreflect.Message {
	mi := &file_alt_v1_paper_trading_proto_msgTypes[3]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use GetPaperTradingStateResponse.ProtoReflect.Descriptor instead.
func (*GetPaperTradingStateResponse) Descriptor() ([]byte, []int) {
	return file_alt_v1_paper_trading_proto_rawDescGZIP(), []int{3}
}

func (x *GetPaperTradingStateResponse) GetState() *PaperTradingState {
	if x != nil {
		return x.State
	}
	return nil
}

func (x *GetPaperTradingStateResponse) GetError() *ErrorInfo {
	if x != nil {
		return x.Error
	}
	return nil
}

type PaperTradingState struct {
	state       protoimpl.MessageState `protogen:"open.v1"`
	AccountId   string                 `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	Run         *BacktestRun           `protobuf:"bytes,2,opt,name=run,proto3" json:"run,omitempty"`
	Cash        *Price                 `protobuf:"bytes,3,opt,name=cash,proto3" json:"cash,omitempty"`
	Positions   []*BacktestPosition    `protobuf:"bytes,4,rep,name=positions,proto3" json:"positions,omitempty"`
	Fills       []*BacktestTrade       `protobuf:"bytes,5,rep,name=fills,proto3" json:"fills,omitempty"`
	EquityCurve []*BacktestEquityPoint `protobuf:"bytes,6,rep,name=equity_curve,json=equityCurve,proto3" json:"equity_curve,omitempty"`
	// risk_rejections lists orders the paper run's risk gate or portfolio refused.
	// It is additive: an empty list means every decided order cleared risk, while a
	// non-empty list lets the operator surface a blocked risk summary without faking
	// broker behaviour. The fill path stays unchanged; this only exposes rejections
	// the engine already tracked internally.
	RiskRejections []*PaperRiskRejection `protobuf:"bytes,7,rep,name=risk_rejections,json=riskRejections,proto3" json:"risk_rejections,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

func (x *PaperTradingState) Reset() {
	*x = PaperTradingState{}
	mi := &file_alt_v1_paper_trading_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *PaperTradingState) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*PaperTradingState) ProtoMessage() {}

func (x *PaperTradingState) ProtoReflect() protoreflect.Message {
	mi := &file_alt_v1_paper_trading_proto_msgTypes[4]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use PaperTradingState.ProtoReflect.Descriptor instead.
func (*PaperTradingState) Descriptor() ([]byte, []int) {
	return file_alt_v1_paper_trading_proto_rawDescGZIP(), []int{4}
}

func (x *PaperTradingState) GetAccountId() string {
	if x != nil {
		return x.AccountId
	}
	return ""
}

func (x *PaperTradingState) GetRun() *BacktestRun {
	if x != nil {
		return x.Run
	}
	return nil
}

func (x *PaperTradingState) GetCash() *Price {
	if x != nil {
		return x.Cash
	}
	return nil
}

func (x *PaperTradingState) GetPositions() []*BacktestPosition {
	if x != nil {
		return x.Positions
	}
	return nil
}

func (x *PaperTradingState) GetFills() []*BacktestTrade {
	if x != nil {
		return x.Fills
	}
	return nil
}

func (x *PaperTradingState) GetEquityCurve() []*BacktestEquityPoint {
	if x != nil {
		return x.EquityCurve
	}
	return nil
}

func (x *PaperTradingState) GetRiskRejections() []*PaperRiskRejection {
	if x != nil {
		return x.RiskRejections
	}
	return nil
}

// PaperRiskRejection summarises a single order that the paper run did not fill
// because a risk decision or portfolio application denied it. It mirrors the
// worker-owned RejectedOrder so operator surfaces can distinguish clear vs
// blocked risk without inspecting raw engine state.
type PaperRiskRejection struct {
	state           protoimpl.MessageState `protogen:"open.v1"`
	InstrumentId    string                 `protobuf:"bytes,1,opt,name=instrument_id,json=instrumentId,proto3" json:"instrument_id,omitempty"`
	Side            string                 `protobuf:"bytes,2,opt,name=side,proto3" json:"side,omitempty"`
	Quantity        *Quantity              `protobuf:"bytes,3,opt,name=quantity,proto3" json:"quantity,omitempty"`
	Reason          string                 `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"`
	TimestampUnixMs int64                  `protobuf:"varint,5,opt,name=timestamp_unix_ms,json=timestampUnixMs,proto3" json:"timestamp_unix_ms,omitempty"`
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

func (x *PaperRiskRejection) Reset() {
	*x = PaperRiskRejection{}
	mi := &file_alt_v1_paper_trading_proto_msgTypes[5]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *PaperRiskRejection) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*PaperRiskRejection) ProtoMessage() {}

func (x *PaperRiskRejection) ProtoReflect() protoreflect.Message {
	mi := &file_alt_v1_paper_trading_proto_msgTypes[5]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use PaperRiskRejection.ProtoReflect.Descriptor instead.
func (*PaperRiskRejection) Descriptor() ([]byte, []int) {
	return file_alt_v1_paper_trading_proto_rawDescGZIP(), []int{5}
}

func (x *PaperRiskRejection) GetInstrumentId() string {
	if x != nil {
		return x.InstrumentId
	}
	return ""
}

func (x *PaperRiskRejection) GetSide() string {
	if x != nil {
		return x.Side
	}
	return ""
}

func (x *PaperRiskRejection) GetQuantity() *Quantity {
	if x != nil {
		return x.Quantity
	}
	return nil
}

func (x *PaperRiskRejection) GetReason() string {
	if x != nil {
		return x.Reason
	}
	return ""
}

func (x *PaperRiskRejection) GetTimestampUnixMs() int64 {
	if x != nil {
		return x.TimestampUnixMs
	}
	return 0
}

// PaperOrder is an operator-submitted virtual order tracked against a started
// paper account. Side/type/status stay string-typed to match the existing paper
// summary shapes (PaperRiskRejection.side) and to keep the lifecycle additive
// without introducing new enums. No real broker order is ever created.
type PaperOrder struct {
	state        protoimpl.MessageState `protogen:"open.v1"`
	OrderId      string                 `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
	AccountId    string                 `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	InstrumentId string                 `protobuf:"bytes,3,opt,name=instrument_id,json=instrumentId,proto3" json:"instrument_id,omitempty"`
	// side is "buy" or "sell".
	Side     string    `protobuf:"bytes,4,opt,name=side,proto3" json:"side,omitempty"`
	Quantity *Quantity `protobuf:"bytes,5,opt,name=quantity,proto3" json:"quantity,omitempty"`
	// type is "market" or "limit".
	Type string `protobuf:"bytes,6,opt,name=type,proto3" json:"type,omitempty"`
	// limit_price is only set for a limit order.
	LimitPrice *Price `protobuf:"bytes,7,opt,name=limit_price,json=limitPrice,proto3" json:"limit_price,omitempty"`
	// status is "pending", "filled", "canceled", or "rejected".
	Status string `protobuf:"bytes,8,opt,name=status,proto3" json:"status,omitempty"`
	// reason is populated when status is "rejected" (risk or portfolio denial).
	Reason string `protobuf:"bytes,9,opt,name=reason,proto3" json:"reason,omitempty"`
	// fill is populated when status is "filled"; it reuses the BacktestTrade shape
	// so a fill summary carries instrument/side/quantity/price/timestamp.
	Fill            *BacktestTrade `protobuf:"bytes,10,opt,name=fill,proto3" json:"fill,omitempty"`
	CreatedAtUnixMs int64          `protobuf:"varint,11,opt,name=created_at_unix_ms,json=createdAtUnixMs,proto3" json:"created_at_unix_ms,omitempty"`
	UpdatedAtUnixMs int64          `protobuf:"varint,12,opt,name=updated_at_unix_ms,json=updatedAtUnixMs,proto3" json:"updated_at_unix_ms,omitempty"`
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

func (x *PaperOrder) Reset() {
	*x = PaperOrder{}
	mi := &file_alt_v1_paper_trading_proto_msgTypes[6]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *PaperOrder) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*PaperOrder) ProtoMessage() {}

func (x *PaperOrder) ProtoReflect() protoreflect.Message {
	mi := &file_alt_v1_paper_trading_proto_msgTypes[6]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use PaperOrder.ProtoReflect.Descriptor instead.
func (*PaperOrder) Descriptor() ([]byte, []int) {
	return file_alt_v1_paper_trading_proto_rawDescGZIP(), []int{6}
}

func (x *PaperOrder) GetOrderId() string {
	if x != nil {
		return x.OrderId
	}
	return ""
}

func (x *PaperOrder) GetAccountId() string {
	if x != nil {
		return x.AccountId
	}
	return ""
}

func (x *PaperOrder) GetInstrumentId() string {
	if x != nil {
		return x.InstrumentId
	}
	return ""
}

func (x *PaperOrder) GetSide() string {
	if x != nil {
		return x.Side
	}
	return ""
}

func (x *PaperOrder) GetQuantity() *Quantity {
	if x != nil {
		return x.Quantity
	}
	return nil
}

func (x *PaperOrder) GetType() string {
	if x != nil {
		return x.Type
	}
	return ""
}

func (x *PaperOrder) GetLimitPrice() *Price {
	if x != nil {
		return x.LimitPrice
	}
	return nil
}

func (x *PaperOrder) GetStatus() string {
	if x != nil {
		return x.Status
	}
	return ""
}

func (x *PaperOrder) GetReason() string {
	if x != nil {
		return x.Reason
	}
	return ""
}

func (x *PaperOrder) GetFill() *BacktestTrade {
	if x != nil {
		return x.Fill
	}
	return nil
}

func (x *PaperOrder) GetCreatedAtUnixMs() int64 {
	if x != nil {
		return x.CreatedAtUnixMs
	}
	return 0
}

func (x *PaperOrder) GetUpdatedAtUnixMs() int64 {
	if x != nil {
		return x.UpdatedAtUnixMs
	}
	return 0
}

type SubmitPaperOrderRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	AccountId     string                 `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	InstrumentId  string                 `protobuf:"bytes,2,opt,name=instrument_id,json=instrumentId,proto3" json:"instrument_id,omitempty"`
	Side          string                 `protobuf:"bytes,3,opt,name=side,proto3" json:"side,omitempty"`
	Quantity      *Quantity              `protobuf:"bytes,4,opt,name=quantity,proto3" json:"quantity,omitempty"`
	Type          string                 `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"`
	LimitPrice    *Price                 `protobuf:"bytes,6,opt,name=limit_price,json=limitPrice,proto3" json:"limit_price,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *SubmitPaperOrderRequest) Reset() {
	*x = SubmitPaperOrderRequest{}
	mi := &file_alt_v1_paper_trading_proto_msgTypes[7]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *SubmitPaperOrderRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*SubmitPaperOrderRequest) ProtoMessage() {}

func (x *SubmitPaperOrderRequest) ProtoReflect() protoreflect.Message {
	mi := &file_alt_v1_paper_trading_proto_msgTypes[7]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use SubmitPaperOrderRequest.ProtoReflect.Descriptor instead.
func (*SubmitPaperOrderRequest) Descriptor() ([]byte, []int) {
	return file_alt_v1_paper_trading_proto_rawDescGZIP(), []int{7}
}

func (x *SubmitPaperOrderRequest) GetAccountId() string {
	if x != nil {
		return x.AccountId
	}
	return ""
}

func (x *SubmitPaperOrderRequest) GetInstrumentId() string {
	if x != nil {
		return x.InstrumentId
	}
	return ""
}

func (x *SubmitPaperOrderRequest) GetSide() string {
	if x != nil {
		return x.Side
	}
	return ""
}

func (x *SubmitPaperOrderRequest) GetQuantity() *Quantity {
	if x != nil {
		return x.Quantity
	}
	return nil
}

func (x *SubmitPaperOrderRequest) GetType() string {
	if x != nil {
		return x.Type
	}
	return ""
}

func (x *SubmitPaperOrderRequest) GetLimitPrice() *Price {
	if x != nil {
		return x.LimitPrice
	}
	return nil
}

type SubmitPaperOrderResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Order         *PaperOrder            `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"`
	Error         *ErrorInfo             `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *SubmitPaperOrderResponse) Reset() {
	*x = SubmitPaperOrderResponse{}
	mi := &file_alt_v1_paper_trading_proto_msgTypes[8]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *SubmitPaperOrderResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*SubmitPaperOrderResponse) ProtoMessage() {}

func (x *SubmitPaperOrderResponse) ProtoReflect() protoreflect.Message {
	mi := &file_alt_v1_paper_trading_proto_msgTypes[8]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use SubmitPaperOrderResponse.ProtoReflect.Descriptor instead.
func (*SubmitPaperOrderResponse) Descriptor() ([]byte, []int) {
	return file_alt_v1_paper_trading_proto_rawDescGZIP(), []int{8}
}

func (x *SubmitPaperOrderResponse) GetOrder() *PaperOrder {
	if x != nil {
		return x.Order
	}
	return nil
}

func (x *SubmitPaperOrderResponse) GetError() *ErrorInfo {
	if x != nil {
		return x.Error
	}
	return nil
}

type CancelPaperOrderRequest struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	AccountId     string                 `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	OrderId       string                 `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *CancelPaperOrderRequest) Reset() {
	*x = CancelPaperOrderRequest{}
	mi := &file_alt_v1_paper_trading_proto_msgTypes[9]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *CancelPaperOrderRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CancelPaperOrderRequest) ProtoMessage() {}

func (x *CancelPaperOrderRequest) ProtoReflect() protoreflect.Message {
	mi := &file_alt_v1_paper_trading_proto_msgTypes[9]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use CancelPaperOrderRequest.ProtoReflect.Descriptor instead.
func (*CancelPaperOrderRequest) Descriptor() ([]byte, []int) {
	return file_alt_v1_paper_trading_proto_rawDescGZIP(), []int{9}
}

func (x *CancelPaperOrderRequest) GetAccountId() string {
	if x != nil {
		return x.AccountId
	}
	return ""
}

func (x *CancelPaperOrderRequest) GetOrderId() string {
	if x != nil {
		return x.OrderId
	}
	return ""
}

type CancelPaperOrderResponse struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Order         *PaperOrder            `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"`
	Error         *ErrorInfo             `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *CancelPaperOrderResponse) Reset() {
	*x = CancelPaperOrderResponse{}
	mi := &file_alt_v1_paper_trading_proto_msgTypes[10]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *CancelPaperOrderResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CancelPaperOrderResponse) ProtoMessage() {}

func (x *CancelPaperOrderResponse) ProtoReflect() protoreflect.Message {
	mi := &file_alt_v1_paper_trading_proto_msgTypes[10]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use CancelPaperOrderResponse.ProtoReflect.Descriptor instead.
func (*CancelPaperOrderResponse) Descriptor() ([]byte, []int) {
	return file_alt_v1_paper_trading_proto_rawDescGZIP(), []int{10}
}

func (x *CancelPaperOrderResponse) GetOrder() *PaperOrder {
	if x != nil {
		return x.Order
	}
	return nil
}

func (x *CancelPaperOrderResponse) GetError() *ErrorInfo {
	if x != nil {
		return x.Error
	}
	return nil
}

type FillPaperOrderRequest struct {
	state     protoimpl.MessageState `protogen:"open.v1"`
	AccountId string                 `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
	OrderId   string                 `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
	// fill_price is the simulated execution price for a market order. A limit order
	// executes at its own limit price, so fill_price may be omitted for it.
	FillPrice     *Price `protobuf:"bytes,3,opt,name=fill_price,json=fillPrice,proto3" json:"fill_price,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *FillPaperOrderRequest) Reset() {
	*x = FillPaperOrderRequest{}
	mi := &file_alt_v1_paper_trading_proto_msgTypes[11]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *FillPaperOrderRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*FillPaperOrderRequest) ProtoMessage() {}

func (x *FillPaperOrderRequest) ProtoReflect() protoreflect.Message {
	mi := &file_alt_v1_paper_trading_proto_msgTypes[11]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use FillPaperOrderRequest.ProtoReflect.Descriptor instead.
func (*FillPaperOrderRequest) Descriptor() ([]byte, []int) {
	return file_alt_v1_paper_trading_proto_rawDescGZIP(), []int{11}
}

func (x *FillPaperOrderRequest) GetAccountId() string {
	if x != nil {
		return x.AccountId
	}
	return ""
}

func (x *FillPaperOrderRequest) GetOrderId() string {
	if x != nil {
		return x.OrderId
	}
	return ""
}

func (x *FillPaperOrderRequest) GetFillPrice() *Price {
	if x != nil {
		return x.FillPrice
	}
	return nil
}

type FillPaperOrderResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	Order *PaperOrder            `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"`
	// state is the account snapshot after the fill so the operator sees the cash
	// and position effect without a second query. For a rejected order it carries
	// the unchanged account state.
	State         *PaperTradingState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"`
	Error         *ErrorInfo         `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *FillPaperOrderResponse) Reset() {
	*x = FillPaperOrderResponse{}
	mi := &file_alt_v1_paper_trading_proto_msgTypes[12]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *FillPaperOrderResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*FillPaperOrderResponse) ProtoMessage() {}

func (x *FillPaperOrderResponse) ProtoReflect() protoreflect.Message {
	mi := &file_alt_v1_paper_trading_proto_msgTypes[12]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use FillPaperOrderResponse.ProtoReflect.Descriptor instead.
func (*FillPaperOrderResponse) Descriptor() ([]byte, []int) {
	return file_alt_v1_paper_trading_proto_rawDescGZIP(), []int{12}
}

func (x *FillPaperOrderResponse) GetOrder() *PaperOrder {
	if x != nil {
		return x.Order
	}
	return nil
}

func (x *FillPaperOrderResponse) GetState() *PaperTradingState {
	if x != nil {
		return x.State
	}
	return nil
}

func (x *FillPaperOrderResponse) GetError() *ErrorInfo {
	if x != nil {
		return x.Error
	}
	return nil
}

var File_alt_v1_paper_trading_proto protoreflect.FileDescriptor

const file_alt_v1_paper_trading_proto_rawDesc = "" +
	"\n" +
	"\x1aalt/v1/paper_trading.proto\x12\x06alt.v1\x1a\x13alt/v1/common.proto\x1a\x13alt/v1/market.proto\x1a\x15alt/v1/backtest.proto\"\x9a\x01\n" +
	"\x18StartPaperTradingRequest\x12\x1d\n" +
	"\n" +
	"account_id\x18\x01 \x01(\tR\taccountId\x12+\n" +
	"\x04spec\x18\x02 \x01(\v2\x17.alt.v1.BacktestRunSpecR\x04spec\x122\n" +
	"\rstarting_cash\x18\x03 \x01(\v2\r.alt.v1.PriceR\fstartingCash\"u\n" +
	"\x19StartPaperTradingResponse\x12/\n" +
	"\x05state\x18\x01 \x01(\v2\x19.alt.v1.PaperTradingStateR\x05state\x12'\n" +
	"\x05error\x18\x02 \x01(\v2\x11.alt.v1.ErrorInfoR\x05error\"<\n" +
	"\x1bGetPaperTradingStateRequest\x12\x1d\n" +
	"\n" +
	"account_id\x18\x01 \x01(\tR\taccountId\"x\n" +
	"\x1cGetPaperTradingStateResponse\x12/\n" +
	"\x05state\x18\x01 \x01(\v2\x19.alt.v1.PaperTradingStateR\x05state\x12'\n" +
	"\x05error\x18\x02 \x01(\v2\x11.alt.v1.ErrorInfoR\x05error\"\xe6\x02\n" +
	"\x11PaperTradingState\x12\x1d\n" +
	"\n" +
	"account_id\x18\x01 \x01(\tR\taccountId\x12%\n" +
	"\x03run\x18\x02 \x01(\v2\x13.alt.v1.BacktestRunR\x03run\x12!\n" +
	"\x04cash\x18\x03 \x01(\v2\r.alt.v1.PriceR\x04cash\x126\n" +
	"\tpositions\x18\x04 \x03(\v2\x18.alt.v1.BacktestPositionR\tpositions\x12+\n" +
	"\x05fills\x18\x05 \x03(\v2\x15.alt.v1.BacktestTradeR\x05fills\x12>\n" +
	"\fequity_curve\x18\x06 \x03(\v2\x1b.alt.v1.BacktestEquityPointR\vequityCurve\x12C\n" +
	"\x0frisk_rejections\x18\a \x03(\v2\x1a.alt.v1.PaperRiskRejectionR\x0eriskRejections\"\xbf\x01\n" +
	"\x12PaperRiskRejection\x12#\n" +
	"\rinstrument_id\x18\x01 \x01(\tR\finstrumentId\x12\x12\n" +
	"\x04side\x18\x02 \x01(\tR\x04side\x12,\n" +
	"\bquantity\x18\x03 \x01(\v2\x10.alt.v1.QuantityR\bquantity\x12\x16\n" +
	"\x06reason\x18\x04 \x01(\tR\x06reason\x12*\n" +
	"\x11timestamp_unix_ms\x18\x05 \x01(\x03R\x0ftimestampUnixMs\"\xa6\x03\n" +
	"\n" +
	"PaperOrder\x12\x19\n" +
	"\border_id\x18\x01 \x01(\tR\aorderId\x12\x1d\n" +
	"\n" +
	"account_id\x18\x02 \x01(\tR\taccountId\x12#\n" +
	"\rinstrument_id\x18\x03 \x01(\tR\finstrumentId\x12\x12\n" +
	"\x04side\x18\x04 \x01(\tR\x04side\x12,\n" +
	"\bquantity\x18\x05 \x01(\v2\x10.alt.v1.QuantityR\bquantity\x12\x12\n" +
	"\x04type\x18\x06 \x01(\tR\x04type\x12.\n" +
	"\vlimit_price\x18\a \x01(\v2\r.alt.v1.PriceR\n" +
	"limitPrice\x12\x16\n" +
	"\x06status\x18\b \x01(\tR\x06status\x12\x16\n" +
	"\x06reason\x18\t \x01(\tR\x06reason\x12)\n" +
	"\x04fill\x18\n" +
	" \x01(\v2\x15.alt.v1.BacktestTradeR\x04fill\x12+\n" +
	"\x12created_at_unix_ms\x18\v \x01(\x03R\x0fcreatedAtUnixMs\x12+\n" +
	"\x12updated_at_unix_ms\x18\f \x01(\x03R\x0fupdatedAtUnixMs\"\xe3\x01\n" +
	"\x17SubmitPaperOrderRequest\x12\x1d\n" +
	"\n" +
	"account_id\x18\x01 \x01(\tR\taccountId\x12#\n" +
	"\rinstrument_id\x18\x02 \x01(\tR\finstrumentId\x12\x12\n" +
	"\x04side\x18\x03 \x01(\tR\x04side\x12,\n" +
	"\bquantity\x18\x04 \x01(\v2\x10.alt.v1.QuantityR\bquantity\x12\x12\n" +
	"\x04type\x18\x05 \x01(\tR\x04type\x12.\n" +
	"\vlimit_price\x18\x06 \x01(\v2\r.alt.v1.PriceR\n" +
	"limitPrice\"m\n" +
	"\x18SubmitPaperOrderResponse\x12(\n" +
	"\x05order\x18\x01 \x01(\v2\x12.alt.v1.PaperOrderR\x05order\x12'\n" +
	"\x05error\x18\x02 \x01(\v2\x11.alt.v1.ErrorInfoR\x05error\"S\n" +
	"\x17CancelPaperOrderRequest\x12\x1d\n" +
	"\n" +
	"account_id\x18\x01 \x01(\tR\taccountId\x12\x19\n" +
	"\border_id\x18\x02 \x01(\tR\aorderId\"m\n" +
	"\x18CancelPaperOrderResponse\x12(\n" +
	"\x05order\x18\x01 \x01(\v2\x12.alt.v1.PaperOrderR\x05order\x12'\n" +
	"\x05error\x18\x02 \x01(\v2\x11.alt.v1.ErrorInfoR\x05error\"\x7f\n" +
	"\x15FillPaperOrderRequest\x12\x1d\n" +
	"\n" +
	"account_id\x18\x01 \x01(\tR\taccountId\x12\x19\n" +
	"\border_id\x18\x02 \x01(\tR\aorderId\x12,\n" +
	"\n" +
	"fill_price\x18\x03 \x01(\v2\r.alt.v1.PriceR\tfillPrice\"\x9c\x01\n" +
	"\x16FillPaperOrderResponse\x12(\n" +
	"\x05order\x18\x01 \x01(\v2\x12.alt.v1.PaperOrderR\x05order\x12/\n" +
	"\x05state\x18\x02 \x01(\v2\x19.alt.v1.PaperTradingStateR\x05state\x12'\n" +
	"\x05error\x18\x03 \x01(\v2\x11.alt.v1.ErrorInfoR\x05errorBCZAgit.toki-labs.com/toki/alt/packages/contracts/gen/go/alt/v1;altv1b\x06proto3"

var (
	file_alt_v1_paper_trading_proto_rawDescOnce sync.Once
	file_alt_v1_paper_trading_proto_rawDescData []byte
)

func file_alt_v1_paper_trading_proto_rawDescGZIP() []byte {
	file_alt_v1_paper_trading_proto_rawDescOnce.Do(func() {
		file_alt_v1_paper_trading_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_alt_v1_paper_trading_proto_rawDesc), len(file_alt_v1_paper_trading_proto_rawDesc)))
	})
	return file_alt_v1_paper_trading_proto_rawDescData
}

var file_alt_v1_paper_trading_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
var file_alt_v1_paper_trading_proto_goTypes = []any{
	(*StartPaperTradingRequest)(nil),     // 0: alt.v1.StartPaperTradingRequest
	(*StartPaperTradingResponse)(nil),    // 1: alt.v1.StartPaperTradingResponse
	(*GetPaperTradingStateRequest)(nil),  // 2: alt.v1.GetPaperTradingStateRequest
	(*GetPaperTradingStateResponse)(nil), // 3: alt.v1.GetPaperTradingStateResponse
	(*PaperTradingState)(nil),            // 4: alt.v1.PaperTradingState
	(*PaperRiskRejection)(nil),           // 5: alt.v1.PaperRiskRejection
	(*PaperOrder)(nil),                   // 6: alt.v1.PaperOrder
	(*SubmitPaperOrderRequest)(nil),      // 7: alt.v1.SubmitPaperOrderRequest
	(*SubmitPaperOrderResponse)(nil),     // 8: alt.v1.SubmitPaperOrderResponse
	(*CancelPaperOrderRequest)(nil),      // 9: alt.v1.CancelPaperOrderRequest
	(*CancelPaperOrderResponse)(nil),     // 10: alt.v1.CancelPaperOrderResponse
	(*FillPaperOrderRequest)(nil),        // 11: alt.v1.FillPaperOrderRequest
	(*FillPaperOrderResponse)(nil),       // 12: alt.v1.FillPaperOrderResponse
	(*BacktestRunSpec)(nil),              // 13: alt.v1.BacktestRunSpec
	(*Price)(nil),                        // 14: alt.v1.Price
	(*ErrorInfo)(nil),                    // 15: alt.v1.ErrorInfo
	(*BacktestRun)(nil),                  // 16: alt.v1.BacktestRun
	(*BacktestPosition)(nil),             // 17: alt.v1.BacktestPosition
	(*BacktestTrade)(nil),                // 18: alt.v1.BacktestTrade
	(*BacktestEquityPoint)(nil),          // 19: alt.v1.BacktestEquityPoint
	(*Quantity)(nil),                     // 20: alt.v1.Quantity
}
var file_alt_v1_paper_trading_proto_depIdxs = []int32{
	13, // 0: alt.v1.StartPaperTradingRequest.spec:type_name -> alt.v1.BacktestRunSpec
	14, // 1: alt.v1.StartPaperTradingRequest.starting_cash:type_name -> alt.v1.Price
	4,  // 2: alt.v1.StartPaperTradingResponse.state:type_name -> alt.v1.PaperTradingState
	15, // 3: alt.v1.StartPaperTradingResponse.error:type_name -> alt.v1.ErrorInfo
	4,  // 4: alt.v1.GetPaperTradingStateResponse.state:type_name -> alt.v1.PaperTradingState
	15, // 5: alt.v1.GetPaperTradingStateResponse.error:type_name -> alt.v1.ErrorInfo
	16, // 6: alt.v1.PaperTradingState.run:type_name -> alt.v1.BacktestRun
	14, // 7: alt.v1.PaperTradingState.cash:type_name -> alt.v1.Price
	17, // 8: alt.v1.PaperTradingState.positions:type_name -> alt.v1.BacktestPosition
	18, // 9: alt.v1.PaperTradingState.fills:type_name -> alt.v1.BacktestTrade
	19, // 10: alt.v1.PaperTradingState.equity_curve:type_name -> alt.v1.BacktestEquityPoint
	5,  // 11: alt.v1.PaperTradingState.risk_rejections:type_name -> alt.v1.PaperRiskRejection
	20, // 12: alt.v1.PaperRiskRejection.quantity:type_name -> alt.v1.Quantity
	20, // 13: alt.v1.PaperOrder.quantity:type_name -> alt.v1.Quantity
	14, // 14: alt.v1.PaperOrder.limit_price:type_name -> alt.v1.Price
	18, // 15: alt.v1.PaperOrder.fill:type_name -> alt.v1.BacktestTrade
	20, // 16: alt.v1.SubmitPaperOrderRequest.quantity:type_name -> alt.v1.Quantity
	14, // 17: alt.v1.SubmitPaperOrderRequest.limit_price:type_name -> alt.v1.Price
	6,  // 18: alt.v1.SubmitPaperOrderResponse.order:type_name -> alt.v1.PaperOrder
	15, // 19: alt.v1.SubmitPaperOrderResponse.error:type_name -> alt.v1.ErrorInfo
	6,  // 20: alt.v1.CancelPaperOrderResponse.order:type_name -> alt.v1.PaperOrder
	15, // 21: alt.v1.CancelPaperOrderResponse.error:type_name -> alt.v1.ErrorInfo
	14, // 22: alt.v1.FillPaperOrderRequest.fill_price:type_name -> alt.v1.Price
	6,  // 23: alt.v1.FillPaperOrderResponse.order:type_name -> alt.v1.PaperOrder
	4,  // 24: alt.v1.FillPaperOrderResponse.state:type_name -> alt.v1.PaperTradingState
	15, // 25: alt.v1.FillPaperOrderResponse.error:type_name -> alt.v1.ErrorInfo
	26, // [26:26] is the sub-list for method output_type
	26, // [26:26] is the sub-list for method input_type
	26, // [26:26] is the sub-list for extension type_name
	26, // [26:26] is the sub-list for extension extendee
	0,  // [0:26] is the sub-list for field type_name
}

func init() { file_alt_v1_paper_trading_proto_init() }
func file_alt_v1_paper_trading_proto_init() {
	if File_alt_v1_paper_trading_proto != nil {
		return
	}
	file_alt_v1_common_proto_init()
	file_alt_v1_market_proto_init()
	file_alt_v1_backtest_proto_init()
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_alt_v1_paper_trading_proto_rawDesc), len(file_alt_v1_paper_trading_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   13,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_alt_v1_paper_trading_proto_goTypes,
		DependencyIndexes: file_alt_v1_paper_trading_proto_depIdxs,
		MessageInfos:      file_alt_v1_paper_trading_proto_msgTypes,
	}.Build()
	File_alt_v1_paper_trading_proto = out.File
	file_alt_v1_paper_trading_proto_goTypes = nil
	file_alt_v1_paper_trading_proto_depIdxs = nil
}
