You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fetch the latest TWAP (time weighted average price) for a set of price feed IDs.
269
+
* This endpoint can be customized by specifying the encoding type and whether the results should also return the calculated TWAP using the options object.
270
+
* This will throw an error if there is a network problem or the price service returns a non-ok response.
271
+
*
272
+
* @param ids Array of hex-encoded price feed IDs for which updates are requested.
273
+
* @param window_seconds The time window in seconds over which to calculate the TWAP, ending at the current time.
274
+
* For example, a value of 300 would return the most recent 5 minute TWAP. Must be greater than 0 and less than or equal to 600 seconds (10 minutes).
275
+
* @param options Optional parameters:
276
+
* - encoding: Encoding type. If specified, return the TWAP binary data in the encoding specified by the encoding parameter. Default is hex.
277
+
* - parsed: Boolean to specify if the calculated TWAP should be included in the response. Default is false.
278
+
* - ignoreInvalidPriceIds: Boolean to specify if invalid price IDs should be ignored instead of returning an error. Default is false.
279
+
*
280
+
* @returns TwapsResponse object containing the latest TWAPs.
0 commit comments