mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
grpc: register trading server
This commit is contained in:
parent
8ba0b8c81d
commit
6920ac9090
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"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -339,6 +339,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