oceanbookpb

package
v0.0.0-...-a7768ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Order_Side_name = map[int32]string{
	0: "ASK",
	1: "BID",
}
View Source
var Order_Side_value = map[string]int32{
	"ASK": 0,
	"BID": 1,
}
View Source
var Order_State_name = map[int32]string{
	0: "PENDING",
	1: "FILLED",
	2: "CANCELLED",
}
View Source
var Order_State_value = map[string]int32{
	"PENDING":   0,
	"FILLED":    1,
	"CANCELLED": 2,
}

Functions

func RegisterOceanbookServer

func RegisterOceanbookServer(s *grpc.Server, srv OceanbookServer)

Types

type CancelOrderRequest

type CancelOrderRequest struct {
	OrderId              uint64   `protobuf:"varint,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"`
	Symbol               string   `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CancelOrderRequest) Descriptor

func (*CancelOrderRequest) Descriptor() ([]byte, []int)

func (*CancelOrderRequest) GetOrderId

func (m *CancelOrderRequest) GetOrderId() uint64

func (*CancelOrderRequest) GetSymbol

func (m *CancelOrderRequest) GetSymbol() string

func (*CancelOrderRequest) ProtoMessage

func (*CancelOrderRequest) ProtoMessage()

func (*CancelOrderRequest) Reset

func (m *CancelOrderRequest) Reset()

func (*CancelOrderRequest) String

func (m *CancelOrderRequest) String() string

func (*CancelOrderRequest) XXX_DiscardUnknown

func (m *CancelOrderRequest) XXX_DiscardUnknown()

func (*CancelOrderRequest) XXX_Marshal

func (m *CancelOrderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CancelOrderRequest) XXX_Merge

func (m *CancelOrderRequest) XXX_Merge(src proto.Message)

func (*CancelOrderRequest) XXX_Size

func (m *CancelOrderRequest) XXX_Size() int

func (*CancelOrderRequest) XXX_Unmarshal

func (m *CancelOrderRequest) XXX_Unmarshal(b []byte) error

type CancelOrderResponse

type CancelOrderResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CancelOrderResponse) Descriptor

func (*CancelOrderResponse) Descriptor() ([]byte, []int)

func (*CancelOrderResponse) ProtoMessage

func (*CancelOrderResponse) ProtoMessage()

func (*CancelOrderResponse) Reset

func (m *CancelOrderResponse) Reset()

func (*CancelOrderResponse) String

func (m *CancelOrderResponse) String() string

func (*CancelOrderResponse) XXX_DiscardUnknown

func (m *CancelOrderResponse) XXX_DiscardUnknown()

func (*CancelOrderResponse) XXX_Marshal

func (m *CancelOrderResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CancelOrderResponse) XXX_Merge

func (m *CancelOrderResponse) XXX_Merge(src proto.Message)

func (*CancelOrderResponse) XXX_Size

func (m *CancelOrderResponse) XXX_Size() int

func (*CancelOrderResponse) XXX_Unmarshal

func (m *CancelOrderResponse) XXX_Unmarshal(b []byte) error

type Depth

type Depth struct {
	Symbol               string        `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Bids                 []*PriceLevel `protobuf:"bytes,2,rep,name=bids,proto3" json:"bids,omitempty"`
	Asks                 []*PriceLevel `protobuf:"bytes,3,rep,name=asks,proto3" json:"asks,omitempty"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

func (*Depth) Descriptor

func (*Depth) Descriptor() ([]byte, []int)

func (*Depth) GetAsks

func (m *Depth) GetAsks() []*PriceLevel

func (*Depth) GetBids

func (m *Depth) GetBids() []*PriceLevel

func (*Depth) GetSymbol

func (m *Depth) GetSymbol() string

func (*Depth) ProtoMessage

func (*Depth) ProtoMessage()

func (*Depth) Reset

func (m *Depth) Reset()

func (*Depth) String

func (m *Depth) String() string

func (*Depth) XXX_DiscardUnknown

func (m *Depth) XXX_DiscardUnknown()

func (*Depth) XXX_Marshal

func (m *Depth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Depth) XXX_Merge

func (m *Depth) XXX_Merge(src proto.Message)

func (*Depth) XXX_Size

func (m *Depth) XXX_Size() int

func (*Depth) XXX_Unmarshal

func (m *Depth) XXX_Unmarshal(b []byte) error

type GetDepthRequest

type GetDepthRequest struct {
	Symbol               string   `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetDepthRequest) Descriptor

func (*GetDepthRequest) Descriptor() ([]byte, []int)

func (*GetDepthRequest) GetSymbol

func (m *GetDepthRequest) GetSymbol() string

func (*GetDepthRequest) ProtoMessage

func (*GetDepthRequest) ProtoMessage()

func (*GetDepthRequest) Reset

func (m *GetDepthRequest) Reset()

func (*GetDepthRequest) String

func (m *GetDepthRequest) String() string

func (*GetDepthRequest) XXX_DiscardUnknown

func (m *GetDepthRequest) XXX_DiscardUnknown()

func (*GetDepthRequest) XXX_Marshal

func (m *GetDepthRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetDepthRequest) XXX_Merge

func (m *GetDepthRequest) XXX_Merge(src proto.Message)

func (*GetDepthRequest) XXX_Size

func (m *GetDepthRequest) XXX_Size() int

func (*GetDepthRequest) XXX_Unmarshal

func (m *GetDepthRequest) XXX_Unmarshal(b []byte) error

type InsertOrderRequest

type InsertOrderRequest struct {
	Id                   uint64     `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Price                string     `protobuf:"bytes,2,opt,name=price,proto3" json:"price,omitempty"`
	Quantity             string     `protobuf:"bytes,3,opt,name=quantity,proto3" json:"quantity,omitempty"`
	Side                 Order_Side `protobuf:"varint,4,opt,name=side,proto3,enum=oceanbook.Order_Side" json:"side,omitempty"`
	Symbol               string     `protobuf:"bytes,5,opt,name=symbol,proto3" json:"symbol,omitempty"`
	StopPrice            string     `protobuf:"bytes,6,opt,name=stop_price,json=stopPrice,proto3" json:"stop_price,omitempty"`
	ImmediateOrCancel    bool       `protobuf:"varint,7,opt,name=immediate_or_cancel,json=immediateOrCancel,proto3" json:"immediate_or_cancel,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*InsertOrderRequest) Descriptor

func (*InsertOrderRequest) Descriptor() ([]byte, []int)

func (*InsertOrderRequest) GetId

func (m *InsertOrderRequest) GetId() uint64

func (*InsertOrderRequest) GetImmediateOrCancel

func (m *InsertOrderRequest) GetImmediateOrCancel() bool

func (*InsertOrderRequest) GetPrice

func (m *InsertOrderRequest) GetPrice() string

func (*InsertOrderRequest) GetQuantity

func (m *InsertOrderRequest) GetQuantity() string

func (*InsertOrderRequest) GetSide

func (m *InsertOrderRequest) GetSide() Order_Side

func (*InsertOrderRequest) GetStopPrice

func (m *InsertOrderRequest) GetStopPrice() string

func (*InsertOrderRequest) GetSymbol

func (m *InsertOrderRequest) GetSymbol() string

func (*InsertOrderRequest) ProtoMessage

func (*InsertOrderRequest) ProtoMessage()

func (*InsertOrderRequest) Reset

func (m *InsertOrderRequest) Reset()

func (*InsertOrderRequest) String

func (m *InsertOrderRequest) String() string

func (*InsertOrderRequest) XXX_DiscardUnknown

func (m *InsertOrderRequest) XXX_DiscardUnknown()

func (*InsertOrderRequest) XXX_Marshal

func (m *InsertOrderRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*InsertOrderRequest) XXX_Merge

func (m *InsertOrderRequest) XXX_Merge(src proto.Message)

func (*InsertOrderRequest) XXX_Size

func (m *InsertOrderRequest) XXX_Size() int

func (*InsertOrderRequest) XXX_Unmarshal

func (m *InsertOrderRequest) XXX_Unmarshal(b []byte) error

type NewOrderBookRequest

type NewOrderBookRequest struct {
	Symbol               string   `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*NewOrderBookRequest) Descriptor

func (*NewOrderBookRequest) Descriptor() ([]byte, []int)

func (*NewOrderBookRequest) GetSymbol

func (m *NewOrderBookRequest) GetSymbol() string

func (*NewOrderBookRequest) ProtoMessage

func (*NewOrderBookRequest) ProtoMessage()

func (*NewOrderBookRequest) Reset

func (m *NewOrderBookRequest) Reset()

func (*NewOrderBookRequest) String

func (m *NewOrderBookRequest) String() string

func (*NewOrderBookRequest) XXX_DiscardUnknown

func (m *NewOrderBookRequest) XXX_DiscardUnknown()

func (*NewOrderBookRequest) XXX_Marshal

func (m *NewOrderBookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NewOrderBookRequest) XXX_Merge

func (m *NewOrderBookRequest) XXX_Merge(src proto.Message)

func (*NewOrderBookRequest) XXX_Size

func (m *NewOrderBookRequest) XXX_Size() int

func (*NewOrderBookRequest) XXX_Unmarshal

func (m *NewOrderBookRequest) XXX_Unmarshal(b []byte) error

type NewOrderBookResponse

type NewOrderBookResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*NewOrderBookResponse) Descriptor

func (*NewOrderBookResponse) Descriptor() ([]byte, []int)

func (*NewOrderBookResponse) ProtoMessage

func (*NewOrderBookResponse) ProtoMessage()

func (*NewOrderBookResponse) Reset

func (m *NewOrderBookResponse) Reset()

func (*NewOrderBookResponse) String

func (m *NewOrderBookResponse) String() string

func (*NewOrderBookResponse) XXX_DiscardUnknown

func (m *NewOrderBookResponse) XXX_DiscardUnknown()

func (*NewOrderBookResponse) XXX_Marshal

func (m *NewOrderBookResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*NewOrderBookResponse) XXX_Merge

func (m *NewOrderBookResponse) XXX_Merge(src proto.Message)

func (*NewOrderBookResponse) XXX_Size

func (m *NewOrderBookResponse) XXX_Size() int

func (*NewOrderBookResponse) XXX_Unmarshal

func (m *NewOrderBookResponse) XXX_Unmarshal(b []byte) error

type OceanbookClient

type OceanbookClient interface {
	NewOrderBook(ctx context.Context, in *NewOrderBookRequest, opts ...grpc.CallOption) (*NewOrderBookResponse, error)
	InsertOrder(ctx context.Context, in *InsertOrderRequest, opts ...grpc.CallOption) (Oceanbook_InsertOrderClient, error)
	CancelOrder(ctx context.Context, in *CancelOrderRequest, opts ...grpc.CallOption) (*CancelOrderResponse, error)
	GetDepth(ctx context.Context, in *GetDepthRequest, opts ...grpc.CallOption) (*Depth, error)
}

OceanbookClient is the client API for Oceanbook service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewOceanbookClient

func NewOceanbookClient(cc *grpc.ClientConn) OceanbookClient

type OceanbookServer

OceanbookServer is the server API for Oceanbook service.

type Oceanbook_InsertOrderClient

type Oceanbook_InsertOrderClient interface {
	Recv() (*Trade, error)
	grpc.ClientStream
}

type Oceanbook_InsertOrderServer

type Oceanbook_InsertOrderServer interface {
	Send(*Trade) error
	grpc.ServerStream
}

type Order

type Order struct {
	Id                   uint64      `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Price                string      `protobuf:"bytes,2,opt,name=price,proto3" json:"price,omitempty"`
	Quantity             string      `protobuf:"bytes,3,opt,name=quantity,proto3" json:"quantity,omitempty"`
	Side                 Order_Side  `protobuf:"varint,4,opt,name=side,proto3,enum=oceanbook.Order_Side" json:"side,omitempty"`
	Symbol               string      `protobuf:"bytes,5,opt,name=symbol,proto3" json:"symbol,omitempty"`
	State                Order_State `protobuf:"varint,6,opt,name=state,proto3,enum=oceanbook.Order_State" json:"state,omitempty"`
	StopPrice            string      `protobuf:"bytes,7,opt,name=stop_price,json=stopPrice,proto3" json:"stop_price,omitempty"`
	ImmediateOrCancel    bool        `protobuf:"varint,8,opt,name=immediate_or_cancel,json=immediateOrCancel,proto3" json:"immediate_or_cancel,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*Order) Descriptor

func (*Order) Descriptor() ([]byte, []int)

func (*Order) GetId

func (m *Order) GetId() uint64

func (*Order) GetImmediateOrCancel

func (m *Order) GetImmediateOrCancel() bool

func (*Order) GetPrice

func (m *Order) GetPrice() string

func (*Order) GetQuantity

func (m *Order) GetQuantity() string

func (*Order) GetSide

func (m *Order) GetSide() Order_Side

func (*Order) GetState

func (m *Order) GetState() Order_State

func (*Order) GetStopPrice

func (m *Order) GetStopPrice() string

func (*Order) GetSymbol

func (m *Order) GetSymbol() string

func (*Order) ProtoMessage

func (*Order) ProtoMessage()

func (*Order) Reset

func (m *Order) Reset()

func (*Order) String

func (m *Order) String() string

func (*Order) XXX_DiscardUnknown

func (m *Order) XXX_DiscardUnknown()

func (*Order) XXX_Marshal

func (m *Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Order) XXX_Merge

func (m *Order) XXX_Merge(src proto.Message)

func (*Order) XXX_Size

func (m *Order) XXX_Size() int

func (*Order) XXX_Unmarshal

func (m *Order) XXX_Unmarshal(b []byte) error

type Order_Side

type Order_Side int32
const (
	Order_ASK Order_Side = 0
	Order_BID Order_Side = 1
)

func (Order_Side) EnumDescriptor

func (Order_Side) EnumDescriptor() ([]byte, []int)

func (Order_Side) String

func (x Order_Side) String() string

type Order_State

type Order_State int32
const (
	Order_PENDING   Order_State = 0
	Order_FILLED    Order_State = 1
	Order_CANCELLED Order_State = 2
)

func (Order_State) EnumDescriptor

func (Order_State) EnumDescriptor() ([]byte, []int)

func (Order_State) String

func (x Order_State) String() string

type PriceLevel

type PriceLevel struct {
	Price                string   `protobuf:"bytes,1,opt,name=price,proto3" json:"price,omitempty"`
	Quantity             string   `protobuf:"bytes,2,opt,name=quantity,proto3" json:"quantity,omitempty"`
	OrdersCount          uint64   `protobuf:"varint,3,opt,name=orders_count,json=ordersCount,proto3" json:"orders_count,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PriceLevel) Descriptor

func (*PriceLevel) Descriptor() ([]byte, []int)

func (*PriceLevel) GetOrdersCount

func (m *PriceLevel) GetOrdersCount() uint64

func (*PriceLevel) GetPrice

func (m *PriceLevel) GetPrice() string

func (*PriceLevel) GetQuantity

func (m *PriceLevel) GetQuantity() string

func (*PriceLevel) ProtoMessage

func (*PriceLevel) ProtoMessage()

func (*PriceLevel) Reset

func (m *PriceLevel) Reset()

func (*PriceLevel) String

func (m *PriceLevel) String() string

func (*PriceLevel) XXX_DiscardUnknown

func (m *PriceLevel) XXX_DiscardUnknown()

func (*PriceLevel) XXX_Marshal

func (m *PriceLevel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PriceLevel) XXX_Merge

func (m *PriceLevel) XXX_Merge(src proto.Message)

func (*PriceLevel) XXX_Size

func (m *PriceLevel) XXX_Size() int

func (*PriceLevel) XXX_Unmarshal

func (m *PriceLevel) XXX_Unmarshal(b []byte) error

type Trade

type Trade struct {
	Id                   uint64               `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Symbol               string               `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
	Price                string               `protobuf:"bytes,3,opt,name=price,proto3" json:"price,omitempty"`
	Quantity             string               `protobuf:"bytes,4,opt,name=quantity,proto3" json:"quantity,omitempty"`
	TakerId              uint64               `protobuf:"varint,5,opt,name=taker_id,json=takerId,proto3" json:"taker_id,omitempty"`
	MakerId              uint64               `protobuf:"varint,6,opt,name=maker_id,json=makerId,proto3" json:"maker_id,omitempty"`
	CreatedAt            *timestamp.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Trade) Descriptor

func (*Trade) Descriptor() ([]byte, []int)

func (*Trade) GetCreatedAt

func (m *Trade) GetCreatedAt() *timestamp.Timestamp

func (*Trade) GetId

func (m *Trade) GetId() uint64

func (*Trade) GetMakerId

func (m *Trade) GetMakerId() uint64

func (*Trade) GetPrice

func (m *Trade) GetPrice() string

func (*Trade) GetQuantity

func (m *Trade) GetQuantity() string

func (*Trade) GetSymbol

func (m *Trade) GetSymbol() string

func (*Trade) GetTakerId

func (m *Trade) GetTakerId() uint64

func (*Trade) ProtoMessage

func (*Trade) ProtoMessage()

func (*Trade) Reset

func (m *Trade) Reset()

func (*Trade) String

func (m *Trade) String() string

func (*Trade) XXX_DiscardUnknown

func (m *Trade) XXX_DiscardUnknown()

func (*Trade) XXX_Marshal

func (m *Trade) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Trade) XXX_Merge

func (m *Trade) XXX_Merge(src proto.Message)

func (*Trade) XXX_Size

func (m *Trade) XXX_Size() int

func (*Trade) XXX_Unmarshal

func (m *Trade) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL