mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
Merge pull request #535 from narumiruna/grpc/register-trading-server
fix: grpc: register trading server
This commit is contained in:
commit
41c78f9035
13
evans/tradingService/submit_order_max.json
Normal file
13
evans/tradingService/submit_order_max.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"session": "max",
|
||||
"submit_orders": [
|
||||
{
|
||||
"exchange": "max",
|
||||
"symbol": "BTCTWD",
|
||||
"side": "BUY",
|
||||
"price": "20000",
|
||||
"quantity": "0.02",
|
||||
"order_type": "LIMIT"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -345,6 +345,12 @@ func (s *Server) ListenAndServe(bind string) error {
|
|||
Trader: s.Trader,
|
||||
})
|
||||
|
||||
pb.RegisterTradingServiceServer(grpcServer, &TradingService{
|
||||
Config: s.Config,
|
||||
Environ: s.Environ,
|
||||
Trader: s.Trader,
|
||||
})
|
||||
|
||||
reflection.Register(grpcServer)
|
||||
|
||||
if err := grpcServer.Serve(conn); err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user