@fullstackcraftllc/floe 0.0.12 → 0.0.13

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ![npm](https://img.shields.io/npm/v/@fullstackcraftllc/floe?style=flat-square) ![License](https://img.shields.io/npm/l/@fullstackcraftllc/floe?style=flat-square) ![TypeScript](https://img.shields.io/badge/TypeScript-4.9-blue?style=flat-square&logo=typescript)
4
4
 
5
- Zero-dependency TypeScript functions for options flow: Black-Scholes, greeks, dealer exposures, implied PDFs, and more, with a clean, type-safe API. Built for use in trading platforms and fintech applications.
5
+ Zero-dependency TypeScript functions for options flow: Black-Scholes, greeks, IV surfaces, dealer exposures, implied PDFs, and more, with a clean, type-safe API. Built for use in trading platforms and fintech applications.
6
6
 
7
7
  The same library that is used in [Full Stack Craft's](https://fullstackcraft.com) various fintech products including [The Wheel Screener](https://wheelscreener.com), [LEAPS Screener](https://leapsscreener.com), [Option Screener](https://option-screener.com), [AMT JOY](https://amtjoy.com), and [VannaCharm](https://vannacharm.com).
8
8
 
@@ -84,15 +84,12 @@ By contributing, you agree that your contributions will be licensed under the sa
84
84
 
85
85
  ## TODOs
86
86
 
87
- - [ ] Implied PDF calculations
88
- - [ ] Tradier integration, normalization, and docs
89
- - [ ] TradeStation integration, normalization, and docs
90
- - [ ] Interactive Brokers integration, normalization, and docs
87
+ - [X] Implied PDF calculations
88
+ - [X] Tradier integration
89
+ - [X] TradeStation integration
90
+ - [ ] Interactive Brokers integration
91
+ - [ ] Trading functionality with all brokers
91
92
 
92
93
  ## Credits
93
94
 
94
- Built with ❤️ by [Full Stack Craft LLC](https://fullstackcraft.com)
95
-
96
- ---
97
-
98
- **© 2025 Full Stack Craft LLC** - All rights reserved.
95
+ Copyright © 2025 Built with ❤️ by [Full Stack Craft LLC](https://fullstackcraft.com)
@@ -662,6 +662,10 @@ class TastyTradeClient extends BaseBrokerClient_1.BaseBrokerClient {
662
662
  * Processes a single event from FEED_DATA.
663
663
  */
664
664
  processEventData(eventType, values) {
665
+ // for debugging summary events (if verbose)
666
+ if (eventType === 'Summary' && this.verbose) {
667
+ console.log(`[TastyTrade:DEBUG] Summary raw values:`, values);
668
+ }
665
669
  // Values are in order of acceptEventFields
666
670
  const fields = FEED_EVENT_FIELDS[eventType];
667
671
  if (!fields)
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TradierClient = void 0;
4
+ const indexOptions_1 = require("../../utils/indexOptions");
4
5
  const occ_1 = require("../../utils/occ");
5
6
  const BaseBrokerClient_1 = require("./BaseBrokerClient");
6
7
  /**
@@ -193,7 +194,8 @@ class TradierClient extends BaseBrokerClient_1.BaseBrokerClient {
193
194
  for (const occSymbol of occSymbols) {
194
195
  try {
195
196
  const parsed = (0, occ_1.parseOCCSymbol)(occSymbol);
196
- const key = `${parsed.symbol}:${parsed.expiration.toISOString().split('T')[0]}`;
197
+ const underlying = (0, indexOptions_1.getUnderlyingFromOptionRoot)(parsed.symbol);
198
+ const key = `${underlying}:${parsed.expiration.toISOString().split('T')[0]}`;
197
199
  if (!groups.has(key)) {
198
200
  groups.set(key, new Set());
199
201
  }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Maps option root symbols to their underlying symbols.
3
+ * Index options often have different root symbols than their underlying.
4
+ * e.g., SPX options have the prefix 'SPXW', at least in brokers like Tradier.
5
+ */
6
+ export declare const OPTION_ROOT_TO_UNDERLYING: Record<string, string>;
7
+ /**
8
+ * Get the underlying symbol for an option root.
9
+ * Returns the root itself if no mapping exists (i.e., for regular equity options).
10
+ */
11
+ export declare const getUnderlyingFromOptionRoot: (optionRoot: string) => string;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getUnderlyingFromOptionRoot = exports.OPTION_ROOT_TO_UNDERLYING = void 0;
4
+ /**
5
+ * Maps option root symbols to their underlying symbols.
6
+ * Index options often have different root symbols than their underlying.
7
+ * e.g., SPX options have the prefix 'SPXW', at least in brokers like Tradier.
8
+ */
9
+ exports.OPTION_ROOT_TO_UNDERLYING = {
10
+ 'SPXW': 'SPX', // SPX Weekly options
11
+ 'SPXPM': 'SPX', // SPX PM-settled options
12
+ 'NDXP': 'NDX', // NDX PM-settled options
13
+ 'RUTW': 'RUT', // RUT Weekly options
14
+ // Add more as needed
15
+ };
16
+ /**
17
+ * Get the underlying symbol for an option root.
18
+ * Returns the root itself if no mapping exists (i.e., for regular equity options).
19
+ */
20
+ const getUnderlyingFromOptionRoot = (optionRoot) => {
21
+ return exports.OPTION_ROOT_TO_UNDERLYING[optionRoot.toUpperCase()] || optionRoot;
22
+ };
23
+ exports.getUnderlyingFromOptionRoot = getUnderlyingFromOptionRoot;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstackcraftllc/floe",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "Production-ready options analytics toolkit. Normalize broker data structures and calculate Black-Scholes, Greeks, and exposures with a clean, type-safe API. Built for trading platforms and fintech applications.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",