nexustrade 1.8.7 → 1.9.3

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/AGENTS.md CHANGED
@@ -258,6 +258,7 @@ ones the run cannot leave on its own, so the caller is the approver.
258
258
  ```ts
259
259
  const run = await client.createAgent("Find momentum names in the S&P 500", {
260
260
  idempotencyKey: "momentum-scan-v1",
261
+ costCeilingUsd: 20,
261
262
  });
262
263
 
263
264
  for await (const event of run) {
package/README.md CHANGED
@@ -491,6 +491,7 @@ sequenceDiagram
491
491
  ```ts
492
492
  const run = await client.createAgent("Find momentum names in the S&P 500", {
493
493
  idempotencyKey: "momentum-scan-v1",
494
+ costCeilingUsd: 20,
494
495
  });
495
496
  for await (const event of run) {
496
497
  console.log(event.text);
@@ -1108,6 +1108,9 @@ class NexusTradeClient {
1108
1108
  if (options.maxIterations !== undefined) {
1109
1109
  body.maxIterations = options.maxIterations;
1110
1110
  }
1111
+ if (options.costCeilingUsd !== undefined) {
1112
+ body.costCeilingUsd = options.costCeilingUsd;
1113
+ }
1111
1114
  const response = await this.transport.request("POST", "agents", {
1112
1115
  body,
1113
1116
  idempotencyKey: options.idempotencyKey,
@@ -320,6 +320,7 @@ export declare class NexusTradeClient {
320
320
  createAgent(prompt: string, options: {
321
321
  idempotencyKey: string;
322
322
  maxIterations?: number;
323
+ costCeilingUsd?: number;
323
324
  }): Promise<AgentRun>;
324
325
  /**
325
326
  * Reattach to a run already in flight.
@@ -1099,6 +1099,9 @@ export class NexusTradeClient {
1099
1099
  if (options.maxIterations !== undefined) {
1100
1100
  body.maxIterations = options.maxIterations;
1101
1101
  }
1102
+ if (options.costCeilingUsd !== undefined) {
1103
+ body.costCeilingUsd = options.costCeilingUsd;
1104
+ }
1102
1105
  const response = await this.transport.request("POST", "agents", {
1103
1106
  body,
1104
1107
  idempotencyKey: options.idempotencyKey,
@@ -193,11 +193,23 @@ export interface DynamicUnderlying {
193
193
  pipeline?: PipelineStage[];
194
194
  limit?: number;
195
195
  }
196
+ /**
197
+ * Minimum realised strike width, checked AFTER contracts resolve. Each leg snaps
198
+ * independently to the nearest listed strike, so the authored offsets and the
199
+ * realised width differ by up to a full grid step in either direction.
200
+ * minWidthPercent is a whole-number percent of spot (4 = 4%). Below the floor
201
+ * the structure is rejected and the next template in the ladder is tried.
202
+ */
203
+ export interface SpreadWidthConstraint {
204
+ minWidthPercent?: number;
205
+ minWidthDollars?: number;
206
+ }
196
207
  export interface OptionsBuilder {
197
208
  legs: OptionsBuilderLeg[];
198
209
  underlyingSymbol?: string;
199
210
  dynamicUnderlying?: DynamicUnderlying;
200
211
  spreadType?: OptionSpreadType;
212
+ widthConstraint?: SpreadWidthConstraint;
201
213
  }
202
214
  export interface OptionStructureTemplate {
203
215
  legs: OptionsBuilderLeg[];
@@ -205,6 +217,7 @@ export interface OptionStructureTemplate {
205
217
  /** May be candidate-bound (evaluated per underlying). */
206
218
  eligibility?: Condition | CandidateCondition;
207
219
  spreadType?: OptionSpreadType;
220
+ widthConstraint?: SpreadWidthConstraint;
208
221
  }
209
222
  /** Sleeves share the action-level totalBudget and cannot define their own. */
210
223
  export interface RebalanceOptionSleeve {
@@ -512,6 +525,7 @@ export declare const structureTemplate: (config: {
512
525
  name?: string;
513
526
  eligibility?: Condition | CandidateCondition;
514
527
  spreadType?: OptionSpreadType;
528
+ widthConstraint?: SpreadWidthConstraint;
515
529
  }) => OptionStructureTemplate;
516
530
  export declare const sleeve: (config: {
517
531
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexustrade",
3
- "version": "1.8.7",
3
+ "version": "1.9.3",
4
4
  "description": "Typed TypeScript SDK for NexusTrade portfolio authoring, backtesting, and optimization",
5
5
  "license": "MIT",
6
6
  "author": "Starks Technology",