Merge pull request #1595 from c9s/c9s/simplify-max-query-ticker

REFACTOR: [max] simplify max query ticker
This commit is contained in:
c9s 2024-03-26 18:28:40 +08:00 committed by GitHub
commit d61498cf39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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
}