tradeblocks-mcp 3.0.0 → 3.0.2
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/{server/chunk-JAAQMESY.js → dist/chunk-XXYOUIZY.js} +699 -111
- package/dist/chunk-XXYOUIZY.js.map +1 -0
- package/dist/iv-solver-worker.js +295 -0
- package/dist/{market-provider-GGLA7ACC.js → market-provider-VDRJUEF2.js} +2 -2
- package/dist/test-exports.js +10 -2
- package/dist/test-exports.js.map +1 -1
- package/manifest.json +1 -1
- package/package.json +4 -2
- package/{dist/chunk-CCITWAAI.js → server/chunk-PNKG7RY7.js} +455 -311
- package/server/chunk-PNKG7RY7.js.map +1 -0
- package/server/index.js +18 -6
- package/server/index.js.map +1 -1
- package/server/iv-solver-worker.js +295 -0
- package/server/{market-provider-D5SI47K7.js → market-provider-VOYYVYWT.js} +2 -2
- package/src/index.ts +20 -3
- package/src/market/ingestor/market-ingestor.ts +2 -2
- package/src/test-exports.ts +8 -0
- package/src/utils/iv-solver-pool.ts +396 -0
- package/src/utils/iv-solver-worker.ts +112 -0
- package/src/utils/option-quote-greeks.ts +246 -51
- package/src/utils/providers/thetadata/decode.ts +16 -10
- package/dist/chunk-CCITWAAI.js.map +0 -1
- package/server/chunk-JAAQMESY.js.map +0 -1
- /package/dist/{market-provider-GGLA7ACC.js.map → market-provider-VDRJUEF2.js.map} +0 -0
- /package/server/{market-provider-D5SI47K7.js.map → market-provider-VOYYVYWT.js.map} +0 -0
package/server/index.js
CHANGED
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
BACHELIER_DTE_THRESHOLD,
|
|
46
46
|
MassiveProvider,
|
|
47
47
|
ThetaDataProvider,
|
|
48
|
-
|
|
48
|
+
applyQuoteGreeksParallel,
|
|
49
49
|
bachelierPrice,
|
|
50
50
|
bsPrice,
|
|
51
51
|
buildOccTicker,
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
getProvider,
|
|
55
55
|
markPrice,
|
|
56
56
|
parseLegsString
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-PNKG7RY7.js";
|
|
58
58
|
import {
|
|
59
59
|
PortfolioStatsCalculator,
|
|
60
60
|
REPORT_FIELDS,
|
|
@@ -15641,7 +15641,7 @@ var MarketIngestor = class {
|
|
|
15641
15641
|
underlyingPriceByTime.set(time, bar.open);
|
|
15642
15642
|
}
|
|
15643
15643
|
}
|
|
15644
|
-
const stats =
|
|
15644
|
+
const stats = await applyQuoteGreeksParallel({
|
|
15645
15645
|
rows,
|
|
15646
15646
|
getDate: (row) => row.timestamp.slice(0, 10),
|
|
15647
15647
|
getTime: (row) => row.timestamp.slice(11, 16),
|
|
@@ -19714,9 +19714,21 @@ async function startTradeBlocksMcp(options = {}) {
|
|
|
19714
19714
|
process.on("SIGINT", shutdown);
|
|
19715
19715
|
process.on("SIGTERM", shutdown);
|
|
19716
19716
|
}
|
|
19717
|
-
|
|
19718
|
-
|
|
19719
|
-
|
|
19717
|
+
async function resolveEntrypointPath(filePath) {
|
|
19718
|
+
const resolved = path13.resolve(filePath);
|
|
19719
|
+
try {
|
|
19720
|
+
return await fs3.realpath(resolved);
|
|
19721
|
+
} catch {
|
|
19722
|
+
return resolved;
|
|
19723
|
+
}
|
|
19724
|
+
}
|
|
19725
|
+
async function isDirectEntrypoint() {
|
|
19726
|
+
if (!process.argv[1]) return false;
|
|
19727
|
+
const entrypoint = await resolveEntrypointPath(process.argv[1]);
|
|
19728
|
+
const currentFile = await resolveEntrypointPath(fileURLToPath(import.meta.url));
|
|
19729
|
+
return entrypoint === currentFile;
|
|
19730
|
+
}
|
|
19731
|
+
if (await isDirectEntrypoint()) {
|
|
19720
19732
|
startTradeBlocksMcp().catch((error) => {
|
|
19721
19733
|
console.error("Error:", error.message || error);
|
|
19722
19734
|
process.exit(1);
|