Skip to content

Commit

Permalink
fix: Stop sending toTimestamp for all tokens (#16)
Browse files Browse the repository at this point in the history
Stop sending toTimestamp in API requests
by default for all tokens.
Requests that include toTimestamp bypass
the API cache, leading to increased latency.

Co-authored-by: Cezary Chodun <cezary.chodun@redstone.finance>
  • Loading branch information
CezaryChodun and Cezary Chodun authored Feb 4, 2025
1 parent 76007b2 commit 2d9a549
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/proxies/cache-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default class CacheProxy {
}): Promise<{ [symbol: string]: PriceDataWithSignature }> {
const params: any = {
provider: args.provider,
toTimestamp: args.timestamp ?? Date.now()
...(args.timestamp != null ? { toTimestamp: args.timestamp } : {})
};

if (args.symbols !== undefined) {
Expand Down

0 comments on commit 2d9a549

Please sign in to comment.