max: simplify QueryTicker

This commit is contained in:
c9s 2024-03-19 15:46:41 +08:00
parent 693b641612
commit d399b39c44
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -72,7 +72,10 @@ func (e *Exchange) Name() types.ExchangeName {
}
func (e *Exchange) QueryTicker(ctx context.Context, symbol string) (*types.Ticker, error) {
ticker, err := e.client.PublicService.Ticker(toLocalSymbol(symbol))
req := e.client.NewGetTickerRequest()
req.Market(toLocalSymbol(symbol))
ticker, err := req.Do(ctx)
if err != nil {
return nil, err
}