Skip to content

Commit

Permalink
feat: Bypass cache for public calls (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
gazbert committed Nov 24, 2024
1 parent 363fc33 commit 13a4aa4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,10 @@ private ExchangeHttpResponse sendPublicRequestToExchange(
}

requestHeaders.put("Content-Type", "application/x-www-form-urlencoded");

// Bypass the exchange 1s cache.
// See: https://docs.cdp.coinbase.com/advanced-trade/docs/api-overview#public-endpoints
requestHeaders.put("Cache-Control", "no-cache");
}

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

0 comments on commit 13a4aa4

Please sign in to comment.