nexustrade 1.8.7 → 1.9.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.
- package/AGENTS.md +1 -0
- package/README.md +1 -0
- package/dist/cjs/client.js +3 -0
- package/dist/esm/client.d.ts +1 -0
- package/dist/esm/client.js +3 -0
- package/dist/esm/generated/ntSdk.generated.d.ts +14 -0
- package/package.json +1 -1
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
package/dist/cjs/client.js
CHANGED
|
@@ -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,
|
package/dist/esm/client.d.ts
CHANGED
package/dist/esm/client.js
CHANGED
|
@@ -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;
|