pmxt-core 2.50.16 → 2.51.1

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.
Files changed (50) hide show
  1. package/dist/exchanges/hunch/api.d.ts +736 -0
  2. package/dist/exchanges/hunch/api.js +820 -0
  3. package/dist/exchanges/hunch/auth.d.ts +36 -0
  4. package/dist/exchanges/hunch/auth.js +63 -0
  5. package/dist/exchanges/hunch/errors.d.ts +26 -0
  6. package/dist/exchanges/hunch/errors.js +94 -0
  7. package/dist/exchanges/hunch/fetcher.d.ts +204 -0
  8. package/dist/exchanges/hunch/fetcher.js +130 -0
  9. package/dist/exchanges/hunch/index.d.ts +51 -0
  10. package/dist/exchanges/hunch/index.js +330 -0
  11. package/dist/exchanges/hunch/normalizer.d.ts +56 -0
  12. package/dist/exchanges/hunch/normalizer.js +180 -0
  13. package/dist/exchanges/hunch/price.d.ts +5 -0
  14. package/dist/exchanges/hunch/price.js +12 -0
  15. package/dist/exchanges/hunch/utils.d.ts +79 -0
  16. package/dist/exchanges/hunch/utils.js +182 -0
  17. package/dist/exchanges/hunch/websocket.d.ts +25 -0
  18. package/dist/exchanges/hunch/websocket.js +137 -0
  19. package/dist/exchanges/hyperliquid/auth.js +15 -2
  20. package/dist/exchanges/hyperliquid/fetcher.d.ts +26 -1
  21. package/dist/exchanges/hyperliquid/fetcher.js +66 -4
  22. package/dist/exchanges/hyperliquid/index.d.ts +4 -1
  23. package/dist/exchanges/hyperliquid/index.js +84 -20
  24. package/dist/exchanges/hyperliquid/normalizer.d.ts +4 -3
  25. package/dist/exchanges/hyperliquid/normalizer.js +69 -11
  26. package/dist/exchanges/hyperliquid/utils.d.ts +7 -1
  27. package/dist/exchanges/hyperliquid/utils.js +16 -4
  28. package/dist/exchanges/kalshi/api.d.ts +1 -1
  29. package/dist/exchanges/kalshi/api.js +1 -1
  30. package/dist/exchanges/limitless/api.d.ts +1 -1
  31. package/dist/exchanges/limitless/api.js +1 -1
  32. package/dist/exchanges/myriad/api.d.ts +1 -1
  33. package/dist/exchanges/myriad/api.js +1 -1
  34. package/dist/exchanges/opinion/api.d.ts +1 -1
  35. package/dist/exchanges/opinion/api.js +1 -1
  36. package/dist/exchanges/polymarket/api-clob.d.ts +1 -1
  37. package/dist/exchanges/polymarket/api-clob.js +1 -1
  38. package/dist/exchanges/polymarket/api-data.d.ts +1 -1
  39. package/dist/exchanges/polymarket/api-data.js +1 -1
  40. package/dist/exchanges/polymarket/api-gamma.d.ts +1 -1
  41. package/dist/exchanges/polymarket/api-gamma.js +1 -1
  42. package/dist/exchanges/probable/api.d.ts +1 -1
  43. package/dist/exchanges/probable/api.js +1 -1
  44. package/dist/index.d.ts +4 -0
  45. package/dist/index.js +5 -1
  46. package/dist/server/app.js +1 -0
  47. package/dist/server/exchange-factory.js +8 -0
  48. package/dist/server/openapi.yaml +18 -0
  49. package/dist/types.d.ts +4 -0
  50. package/package.json +3 -3
@@ -2636,6 +2636,7 @@ components:
2636
2636
  - hyperliquid
2637
2637
  - suibets
2638
2638
  - rain
2639
+ - hunch
2639
2640
  - mock
2640
2641
  - router
2641
2642
  required: true
@@ -3157,6 +3158,12 @@ components:
3157
3158
  orderId:
3158
3159
  type: string
3159
3160
  description: 'The order that produced this trade, if known.'
3161
+ marketId:
3162
+ type: string
3163
+ description: 'The market this trade belongs to, when the venue exposes it (e.g. derivable from the fill''s coin/asset).'
3164
+ fee:
3165
+ type: number
3166
+ description: 'Trading fee paid by the user for this fill, when the venue exposes it.'
3160
3167
  txHash:
3161
3168
  type: string
3162
3169
  nullable: true
@@ -4543,6 +4550,17 @@ x-sdk-constructors:
4543
4550
  tsName: privateKey
4544
4551
  type: string
4545
4552
  description: Private key for authentication
4553
+ hunch:
4554
+ className: Hunch
4555
+ params:
4556
+ - name: pmxt_api_key
4557
+ tsName: pmxtApiKey
4558
+ type: string
4559
+ description: PMXT API key for hosted access
4560
+ - name: private_key
4561
+ tsName: privateKey
4562
+ type: string
4563
+ description: Private key for authentication
4546
4564
  mock:
4547
4565
  className: Mock
4548
4566
  params:
package/dist/types.d.ts CHANGED
@@ -183,6 +183,10 @@ export interface Trade {
183
183
  export interface UserTrade extends Trade {
184
184
  /** The order that produced this trade, if known. */
185
185
  orderId?: string;
186
+ /** The market this trade belongs to, when the venue exposes it (e.g. derivable from the fill's coin/asset). */
187
+ marketId?: string;
188
+ /** Trading fee paid by the user for this fill, when the venue exposes it. */
189
+ fee?: number;
186
190
  /** Populated in hosted mode after on-chain settlement; null for local-mode and for non-on-chain venues. */
187
191
  txHash?: string | null;
188
192
  /** Populated in hosted mode after on-chain settlement; null for local-mode and for non-on-chain venues. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmxt-core",
3
- "version": "2.50.16",
3
+ "version": "2.51.1",
4
4
  "description": "pmxt is a unified prediction market data API. The ccxt for prediction markets.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -29,8 +29,8 @@
29
29
  "test": "jest -c jest.config.js",
30
30
  "server": "tsx watch src/server/index.ts",
31
31
  "server:prod": "node dist/server/index.js",
32
- "generate:sdk:python": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g python -o ../sdks/python/generated --package-name pmxt_internal --additional-properties=projectName=pmxt-internal,packageVersion=2.50.16,library=urllib3",
33
- "generate:sdk:typescript": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g typescript-fetch -o ../sdks/typescript/generated --additional-properties=npmName=pmxtjs,npmVersion=2.50.16,supportsES6=true,typescriptThreePlus=true && node ../sdks/typescript/scripts/fix-generated.js",
32
+ "generate:sdk:python": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g python -o ../sdks/python/generated --package-name pmxt_internal --additional-properties=projectName=pmxt-internal,packageVersion=2.51.1,library=urllib3",
33
+ "generate:sdk:typescript": "npx @openapitools/openapi-generator-cli generate -i src/server/openapi.yaml -g typescript-fetch -o ../sdks/typescript/generated --additional-properties=npmName=pmxtjs,npmVersion=2.51.1,supportsES6=true,typescriptThreePlus=true && node ../sdks/typescript/scripts/fix-generated.js",
34
34
  "fetch:openapi": "node scripts/fetch-openapi-specs.js",
35
35
  "extract:jsdoc": "node ../scripts/extract-jsdoc.js",
36
36
  "generate:docs": "npm run extract:jsdoc && node ../scripts/generate-api-docs.js",