tradeblocks-mcp 2.2.0 → 2.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tradeblocks-mcp",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "MCP server for options trade analysis",
5
5
  "author": "David Romeo <davidmromeo@gmail.com>",
6
6
  "type": "module",
package/server/index.js CHANGED
@@ -3186,8 +3186,8 @@ var CLOSE_KNOWN_FIELDS = /* @__PURE__ */ new Set([
3186
3186
  var STATIC_FIELDS = /* @__PURE__ */ new Set([
3187
3187
  ...DAILY_STATIC_FIELDS
3188
3188
  ]);
3189
- function buildVixJoins() {
3190
- return VIX_TABLE_ALIASES.map((alias) => `LEFT JOIN market.daily ${alias} ON ${alias}.date = d.date AND ${alias}.ticker = '${VIX_TICKER_FOR_ALIAS[alias]}'`).join("\n ");
3189
+ function buildVixJoins(baseAlias = "d") {
3190
+ return VIX_TABLE_ALIASES.map((alias) => `LEFT JOIN market.daily ${alias} ON ${alias}.date = ${baseAlias}.date AND ${alias}.ticker = '${VIX_TICKER_FOR_ALIAS[alias]}'`).join("\n ");
3191
3191
  }
3192
3192
  function buildVixSelectCols() {
3193
3193
  return VIX_FIELD_MAPPINGS.map((m) => `${m.tableAlias}."${m.sourceCol}" AS "${m.alias}"`).join(", ");
@@ -3326,7 +3326,7 @@ function buildOutcomeQuery(tradeDatesOrKeys) {
3326
3326
  )
3327
3327
  SELECT m.ticker, m.date, ${dailyCloseCols}, ${vixCloseCols}, ${derivedCloseCols}
3328
3328
  FROM market.daily m
3329
- ${vixJoins.replace(/d\.date/g, "m.date")}
3329
+ ${buildVixJoins("m")}
3330
3330
  LEFT JOIN market._context_derived cd ON cd.date = m.date
3331
3331
  JOIN requested
3332
3332
  ON m.ticker = requested.ticker