diff --git a/v2/ticker_service.go b/v2/ticker_service.go index bbc55b0e..3c4aa749 100644 --- a/v2/ticker_service.go +++ b/v2/ticker_service.go @@ -10,8 +10,9 @@ import ( // ListBookTickersService list best price/qty on the order book for a symbol or symbols type ListBookTickersService struct { - c *Client - symbol *string + c *Client + symbol *string + symbols []string } // Symbol set symbol @@ -20,6 +21,12 @@ func (s *ListBookTickersService) Symbol(symbol string) *ListBookTickersService { return s } +// Symbols set symbols +func (s *ListBookTickersService) Symbols(symbols ...string) *ListBookTickersService { + s.symbols = symbols + return s +} + // Do send request func (s *ListBookTickersService) Do(ctx context.Context, opts ...RequestOption) (res []*BookTicker, err error) { r := &request{ @@ -28,6 +35,8 @@ func (s *ListBookTickersService) Do(ctx context.Context, opts ...RequestOption) } if s.symbol != nil { r.setParam("symbol", *s.symbol) + } else if s.symbols != nil { + r.setParam("symbols", s.symbols) } data, err := s.c.callAPI(ctx, r, opts...) data = common.ToJSONList(data)