timelock-sdk 0.0.41 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.cjs +1 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +111 -111
- package/dist/client.d.ts +55 -55
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/{index-B7b3c8cu.d.cts → index-CA5kB-yT.d.cts} +92 -92
- package/dist/package.d.cts +1 -1
- package/package.json +1 -1
package/dist/client.cjs
CHANGED
|
@@ -557,7 +557,7 @@ const getPriceHistory = async (poolAddress, resolution, startTimestamp, endTimes
|
|
|
557
557
|
const startSecs = Math.floor(startTimestamp.getTime() / 1e3);
|
|
558
558
|
const endSecs = Math.floor(endTimestamp.getTime() / 1e3);
|
|
559
559
|
const diffSeconds = endSecs - startSecs;
|
|
560
|
-
const url = `https://api.geckoterminal.com/api/v2/networks/${network}/pools/${poolAddress}/ohlcv/${timeframe}?aggregate=${aggregate}&limit=${Math.min(Math.ceil(diffSeconds / seconds), 1e3)}&token=quote¤cy=usd&before_timestamp=${endSecs}`;
|
|
560
|
+
const url = `https://api.geckoterminal.com/api/v2/networks/${network}/pools/${poolAddress}/ohlcv/${timeframe}?aggregate=${aggregate}&limit=${Math.min(Math.ceil(diffSeconds / seconds), 1e3)}&include_empty_intervals=true&token=quote¤cy=usd&before_timestamp=${endSecs}`;
|
|
561
561
|
const res = await fetch(url, { headers: { Accept: "application/json" } });
|
|
562
562
|
if (!res.ok) throw new Error(`Failed to fetch price history: ${res.statusText}`);
|
|
563
563
|
return (await res.json()).data.attributes.ohlcv_list.map(({ 0: timestamp, 4: price }) => ({
|