mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-29 15:10:37 +00:00
exchanges: Add UpdateTickers method and reserve UpdateTicker for single ticker symbol update requests (if supported) (#764)
* exchanges: add an UpdateTickers method to the main exchange interface This method will fetch all currency pair tickers of a given asset type and update them internally, does nothing for now. * exchanges: refactor UpdateTicker on all exchanges Keep the exact previous behaviour but implement the UpdateTickers method and refactor UpdateTicker by using it where applicable. * sync_manager: update all tickers when batching is enabled * binance: UpdateTicker to fetch single ticker symbol * ftx: UpdateTicker to fetch single ticker symbol
This commit is contained in:
@@ -621,7 +621,10 @@ func (m *syncManager) worker() {
|
||||
if m.config.Verbose {
|
||||
log.Debugf(log.SyncMgr, "Initialising %s REST ticker batching", exchangeName)
|
||||
}
|
||||
result, err = exchanges[x].UpdateTicker(c.Pair, c.AssetType)
|
||||
err = exchanges[x].UpdateTickers(c.AssetType)
|
||||
if err == nil {
|
||||
result, err = exchanges[x].FetchTicker(c.Pair, c.AssetType)
|
||||
}
|
||||
m.tickerBatchLastRequested[exchangeName] = time.Now()
|
||||
m.mux.Unlock()
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user