tradeblocks-mcp 3.3.1 → 3.4.0

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 (77) hide show
  1. package/dist/{chunk-NWNSKALN.js → chunk-DHHEGI3Q.js} +15 -8
  2. package/dist/chunk-DHHEGI3Q.js.map +1 -0
  3. package/dist/{chunk-2I3S2ZLT.js → chunk-GD3STARM.js} +278 -45
  4. package/dist/chunk-GD3STARM.js.map +1 -0
  5. package/dist/{chunk-4HZLVUOZ.js → chunk-TMCRS75V.js} +2281 -336
  6. package/dist/chunk-TMCRS75V.js.map +1 -0
  7. package/dist/market/provenance/index.d.ts +617 -0
  8. package/dist/market/provenance/index.js +22410 -0
  9. package/dist/market/provenance/index.js.map +1 -0
  10. package/dist/{market-provider-6U33TQUT.js → market-provider-JJIJ7QMU.js} +3 -3
  11. package/dist/{sync-3UBC37VW.js → sync-4Y4BSU6S.js} +3 -3
  12. package/dist/test-exports.js +4012 -451
  13. package/dist/test-exports.js.map +1 -1
  14. package/package.json +8 -2
  15. package/server/{chunk-RJDJHZ5Y.js → chunk-65OJTDFW.js} +276 -45
  16. package/server/chunk-65OJTDFW.js.map +1 -0
  17. package/server/{chunk-RM4B2VKS.js → chunk-ALICPVPK.js} +2231 -370
  18. package/server/chunk-ALICPVPK.js.map +1 -0
  19. package/server/{chunk-OMUDNJBJ.js → chunk-KP4NYKL5.js} +15 -8
  20. package/server/chunk-KP4NYKL5.js.map +1 -0
  21. package/server/index.d.ts +37 -21
  22. package/server/index.js +3780 -477
  23. package/server/index.js.map +1 -1
  24. package/server/{market-provider-L56RFHAC.js → market-provider-DIPCCFJU.js} +3 -3
  25. package/server/{sync-CENKDN53.js → sync-357V232A.js} +3 -3
  26. package/src/db/connection.ts +142 -3
  27. package/src/db/index.ts +1 -0
  28. package/src/db/market-datasets.ts +208 -24
  29. package/src/db/market-views.ts +28 -11
  30. package/src/db/parquet-writer.ts +234 -11
  31. package/src/market/ingestor/index.ts +1 -0
  32. package/src/market/ingestor/market-ingestor.ts +7 -0
  33. package/src/market/ingestor/types.ts +18 -0
  34. package/src/market/provenance/canonical-json.ts +119 -0
  35. package/src/market/provenance/canonical-market-resolver.ts +696 -0
  36. package/src/market/provenance/content-manifest.ts +1934 -0
  37. package/src/market/provenance/content-object-store.ts +179 -0
  38. package/src/market/provenance/dataset-registry.ts +144 -0
  39. package/src/market/provenance/index.ts +130 -0
  40. package/src/market/provenance/partition-commit-attempt.ts +89 -0
  41. package/src/market/provenance/partition-commit-store.ts +1760 -0
  42. package/src/market/provenance/rate-slices.ts +60 -0
  43. package/src/market/provenance/refresh-completion.ts +989 -0
  44. package/src/market/provenance/xnys-session-calendar.ts +170 -0
  45. package/src/market/stores/coverage.ts +48 -0
  46. package/src/market/stores/duckdb-enriched-store.ts +26 -5
  47. package/src/market/stores/duckdb-quote-store.ts +29 -18
  48. package/src/market/stores/enriched-legacy-migration.ts +297 -0
  49. package/src/market/stores/enriched-sql.ts +19 -3
  50. package/src/market/stores/enriched-store.ts +16 -2
  51. package/src/market/stores/index.ts +143 -14
  52. package/src/market/stores/parquet-chain-store.ts +4 -1
  53. package/src/market/stores/parquet-enriched-store.ts +162 -41
  54. package/src/market/stores/parquet-oi-daily-store.ts +3 -3
  55. package/src/market/stores/parquet-quote-store.ts +37 -24
  56. package/src/market/stores/parquet-spot-store.ts +14 -10
  57. package/src/market/stores/quote-store.ts +5 -0
  58. package/src/market/stores/rth-aggregation.ts +4 -2
  59. package/src/market/stores/spot-store.ts +75 -6
  60. package/src/market/stores/types.ts +27 -0
  61. package/src/test-exports.ts +153 -2
  62. package/src/tools/market-enrichment.ts +2 -4
  63. package/src/utils/market-enricher.ts +249 -66
  64. package/src/utils/option-quote-greeks.ts +20 -8
  65. package/src/utils/providers/thetadata/bulk-roots.ts +10 -0
  66. package/src/utils/providers/thetadata.ts +5 -17
  67. package/src/utils/quote-parquet-projection.ts +50 -1
  68. package/dist/chunk-2I3S2ZLT.js.map +0 -1
  69. package/dist/chunk-4HZLVUOZ.js.map +0 -1
  70. package/dist/chunk-NWNSKALN.js.map +0 -1
  71. package/server/chunk-OMUDNJBJ.js.map +0 -1
  72. package/server/chunk-RJDJHZ5Y.js.map +0 -1
  73. package/server/chunk-RM4B2VKS.js.map +0 -1
  74. /package/dist/{market-provider-6U33TQUT.js.map → market-provider-JJIJ7QMU.js.map} +0 -0
  75. /package/dist/{sync-3UBC37VW.js.map → sync-4Y4BSU6S.js.map} +0 -0
  76. /package/server/{market-provider-L56RFHAC.js.map → market-provider-DIPCCFJU.js.map} +0 -0
  77. /package/server/{sync-CENKDN53.js.map → sync-357V232A.js.map} +0 -0
@@ -1,6 +1,7 @@
1
1
  import {
2
+ ALL_GREEKS,
2
3
  getSofrRateByKey
3
- } from "./chunk-2I3S2ZLT.js";
4
+ } from "./chunk-GD3STARM.js";
4
5
  import {
5
6
  loadMddsProtoRoot
6
7
  } from "./chunk-2E63THNI.js";
@@ -2390,8 +2391,11 @@ function memoizedSofrRate(dateKey) {
2390
2391
  sofrRateByDateKey.set(dateKey, rate);
2391
2392
  return rate;
2392
2393
  }
2393
- function hasQuoteGreeks(row) {
2394
- return isFiniteNumber2(row.delta ?? null) && isFiniteNumber2(row.gamma ?? null) && isFiniteNumber2(row.theta ?? null) && isFiniteNumber2(row.vega ?? null) && isFiniteNumber2(row.iv ?? null);
2394
+ function hasQuoteGreeks(row, needed = ALL_GREEKS) {
2395
+ for (const greek of needed) {
2396
+ if (!isFiniteNumber2(row[greek] ?? null)) return false;
2397
+ }
2398
+ return true;
2395
2399
  }
2396
2400
  function hasProviderFirstOrderGreeks(row) {
2397
2401
  return row.greeks_source === "thetadata" && isFiniteNumber2(row.delta ?? null) && (row.gamma == null || isFiniteNumber2(row.gamma)) && isFiniteNumber2(row.theta ?? null) && isFiniteNumber2(row.vega ?? null) && isFiniteNumber2(row.iv ?? null);
@@ -2769,6 +2773,12 @@ function computeThetaQuoteMidGreekRow(params) {
2769
2773
  };
2770
2774
  }
2771
2775
 
2776
+ // src/utils/providers/thetadata/bulk-roots.ts
2777
+ function bulkQuoteRootsForUnderlying(underlying) {
2778
+ const upper = underlying.toUpperCase();
2779
+ return upper === "SPX" ? ["SPX", "SPXW"] : [upper];
2780
+ }
2781
+
2772
2782
  // src/utils/providers/thetadata.ts
2773
2783
  var BULK_YIELD_CHUNK = 5e4;
2774
2784
  var BULK_GREEKS_STRIKE_RANGE = 20;
@@ -2844,10 +2854,6 @@ function stockOhlcRowToBar(ticker, row) {
2844
2854
  time: msOfDayToEtMinute(row.msOfDay)
2845
2855
  };
2846
2856
  }
2847
- function bulkQuoteRootsForUnderlying(underlying) {
2848
- const upper = underlying.toUpperCase();
2849
- return upper === "SPX" ? ["SPX", "SPXW"] : [upper];
2850
- }
2851
2857
  function inferExerciseStyle(symbol) {
2852
2858
  const europeanRoots = /* @__PURE__ */ new Set([
2853
2859
  "SPX",
@@ -3284,8 +3290,9 @@ export {
3284
3290
  OPTION_QUOTE_MID_GREEKS_REVISION,
3285
3291
  OPTION_QUOTE_MID_GREEKS_GAMMA_SOURCE,
3286
3292
  computeThetaQuoteMidGreekRow,
3293
+ bulkQuoteRootsForUnderlying,
3287
3294
  ThetaDataProvider,
3288
3295
  getProvider,
3289
3296
  _resetProvider
3290
3297
  };
3291
- //# sourceMappingURL=chunk-NWNSKALN.js.map
3298
+ //# sourceMappingURL=chunk-DHHEGI3Q.js.map