pmxtjs 2.35.27 → 2.35.29

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.
@@ -1276,10 +1276,19 @@ export class Exchange {
1276
1276
  await this.initPromise;
1277
1277
  const resolvedOutcomeId = resolveOutcomeId(outcomeId);
1278
1278
  try {
1279
- const paramsDict = { resolution: params.resolution };
1279
+ const paramsDict = {};
1280
+ if (params.resolution) {
1281
+ paramsDict.resolution = params.resolution;
1282
+ }
1280
1283
  if (params.limit) {
1281
1284
  paramsDict.limit = params.limit;
1282
1285
  }
1286
+ if (params.start) {
1287
+ paramsDict.start = params.start instanceof Date ? params.start.toISOString() : params.start;
1288
+ }
1289
+ if (params.end) {
1290
+ paramsDict.end = params.end instanceof Date ? params.end.toISOString() : params.end;
1291
+ }
1283
1292
  const args = [resolvedOutcomeId, paramsDict];
1284
1293
  const query = { id: resolvedOutcomeId, ...paramsDict };
1285
1294
  const json = await this.sidecarReadRequest('fetchTrades', query, args);
@@ -1279,10 +1279,19 @@ class Exchange {
1279
1279
  await this.initPromise;
1280
1280
  const resolvedOutcomeId = resolveOutcomeId(outcomeId);
1281
1281
  try {
1282
- const paramsDict = { resolution: params.resolution };
1282
+ const paramsDict = {};
1283
+ if (params.resolution) {
1284
+ paramsDict.resolution = params.resolution;
1285
+ }
1283
1286
  if (params.limit) {
1284
1287
  paramsDict.limit = params.limit;
1285
1288
  }
1289
+ if (params.start) {
1290
+ paramsDict.start = params.start instanceof Date ? params.start.toISOString() : params.start;
1291
+ }
1292
+ if (params.end) {
1293
+ paramsDict.end = params.end instanceof Date ? params.end.toISOString() : params.end;
1294
+ }
1286
1295
  const args = [resolvedOutcomeId, paramsDict];
1287
1296
  const query = { id: resolvedOutcomeId, ...paramsDict };
1288
1297
  const json = await this.sidecarReadRequest('fetchTrades', query, args);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmxtjs",
3
- "version": "2.35.27",
3
+ "version": "2.35.29",
4
4
  "description": "OpenAPI client for pmxtjs",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmxtjs",
3
- "version": "2.35.27",
3
+ "version": "2.35.29",
4
4
  "description": "Unified prediction market data API - The ccxt for prediction markets",
5
5
  "author": "PMXT Contributors",
6
6
  "repository": {
@@ -43,7 +43,7 @@
43
43
  "unified"
44
44
  ],
45
45
  "dependencies": {
46
- "pmxt-core": "2.35.27"
46
+ "pmxt-core": "2.35.29"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/jest": "^30.0.0",
package/pmxt/client.ts CHANGED
@@ -1382,10 +1382,19 @@ export abstract class Exchange {
1382
1382
  await this.initPromise;
1383
1383
  const resolvedOutcomeId = resolveOutcomeId(outcomeId);
1384
1384
  try {
1385
- const paramsDict: any = { resolution: params.resolution };
1385
+ const paramsDict: any = {};
1386
+ if (params.resolution) {
1387
+ paramsDict.resolution = params.resolution;
1388
+ }
1386
1389
  if (params.limit) {
1387
1390
  paramsDict.limit = params.limit;
1388
1391
  }
1392
+ if (params.start) {
1393
+ paramsDict.start = params.start instanceof Date ? params.start.toISOString() : params.start;
1394
+ }
1395
+ if (params.end) {
1396
+ paramsDict.end = params.end instanceof Date ? params.end.toISOString() : params.end;
1397
+ }
1389
1398
 
1390
1399
  const args = [resolvedOutcomeId, paramsDict];
1391
1400
  const query = { id: resolvedOutcomeId, ...paramsDict };