mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
Merge pull request #525 from c9s/fix/grpc-user-data-stream-subscribe
grpc: implement SubmitOrder method
This commit is contained in:
commit
426af0109e
|
@ -49,9 +49,16 @@ func (s *TradingService) SubmitOrder(ctx context.Context, request *pb.SubmitOrde
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
_ = createdOrders
|
|
||||||
|
|
||||||
return nil, nil
|
resp := &pb.SubmitOrderResponse{
|
||||||
|
Session: sessionName,
|
||||||
|
Orders: nil,
|
||||||
|
}
|
||||||
|
for _, createdOrder := range createdOrders {
|
||||||
|
resp.Orders = append(resp.Orders, transOrder(session, createdOrder))
|
||||||
|
}
|
||||||
|
|
||||||
|
return resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *TradingService) CancelOrder(ctx context.Context, request *pb.CancelOrderRequest) (*pb.CancelOrderResponse, error) {
|
func (s *TradingService) CancelOrder(ctx context.Context, request *pb.CancelOrderRequest) (*pb.CancelOrderResponse, error) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user