Skip to content

Commit 13a4aa4

Browse files
author
gazbert
committed
feat: Bypass cache for public calls (#165)
1 parent 363fc33 commit 13a4aa4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bxbot-exchanges/src/main/java/com/gazbert/bxbot/exchanges/CoinbaseExchangeAdapter.java

+4
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,10 @@ private ExchangeHttpResponse sendPublicRequestToExchange(
372372
}
373373

374374
requestHeaders.put("Content-Type", "application/x-www-form-urlencoded");
375+
376+
// Bypass the exchange 1s cache.
377+
// See: https://docs.cdp.coinbase.com/advanced-trade/docs/api-overview#public-endpoints
378+
requestHeaders.put("Cache-Control", "no-cache");
375379
}
376380

377381
final URL url = new URL(PUBLIC_API_BASE_URL + apiMethod + queryString);

0 commit comments

Comments
 (0)