@liberfi.io/react-predict 0.3.65 → 0.3.67

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/server.mjs CHANGED
@@ -222,8 +222,9 @@ var PredictClient = class {
222
222
  return await httpGet(url);
223
223
  }
224
224
  /** Maps to `GET /api/v1/markets/:slug/price-history?source=...&range=...`. */
225
- async getPriceHistory(slug, source, range) {
226
- const query = buildQuery({ source, range });
225
+ async getPriceHistory(slug, sourceOrParams, range) {
226
+ const params = typeof sourceOrParams === "string" ? { source: sourceOrParams, range } : sourceOrParams;
227
+ const query = buildQuery(params);
227
228
  const url = `${this.endpoint}/api/v1/markets/${encodeURIComponent(slug)}/price-history${query}`;
228
229
  return await httpGet(url);
229
230
  }