Merge pull request #525 from c9s/fix/grpc-user-data-stream-subscribe

grpc: implement SubmitOrder method
This commit is contained in:
Yo-An Lin 2022-04-15 15:06:01 +08:00 committed by GitHub
commit 426af0109e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,9 +49,16 @@ func (s *TradingService) SubmitOrder(ctx context.Context, request *pb.SubmitOrde
if err != nil {
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) {