nexusquant-cli 0.1.0__tar.gz → 0.1.1__tar.gz
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.
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/PKG-INFO +6 -2
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/README.md +5 -1
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/nexusquant_cli/commands/strategy/cmd.py +22 -2
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/pyproject.toml +1 -1
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/.gitignore +0 -0
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/nexusquant_cli/__init__.py +0 -0
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/nexusquant_cli/__main__.py +0 -0
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/nexusquant_cli/api_client.py +0 -0
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/nexusquant_cli/auth_pkce.py +0 -0
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/nexusquant_cli/commands/__init__.py +0 -0
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/nexusquant_cli/commands/_util.py +0 -0
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/nexusquant_cli/commands/auth/__init__.py +0 -0
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/nexusquant_cli/commands/auth/cmd.py +0 -0
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/nexusquant_cli/commands/strategy/__init__.py +0 -0
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/nexusquant_cli/config.py +0 -0
- {nexusquant_cli-0.1.0 → nexusquant_cli-0.1.1}/nexusquant_cli/main.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nexusquant-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: NexusQuant strategy provider CLI
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Requires-Dist: httpx>=0.27
|
|
@@ -65,9 +65,12 @@ nexusquant strategy signal my_alpha_001 \
|
|
|
65
65
|
--direction bull \
|
|
66
66
|
--price 150.25 \
|
|
67
67
|
--level 0.8 \
|
|
68
|
-
--quantity 100
|
|
68
|
+
--quantity 100 \
|
|
69
|
+
--order-type MARKET
|
|
69
70
|
```
|
|
70
71
|
|
|
72
|
+
`--order-type` is a signal-level setting. Use `MARKET` for market orders or `NORMAL` for limit orders; `NORMAL` uses the signal `--price` as the limit reference. If omitted, the service defaults to `MARKET`.
|
|
73
|
+
|
|
71
74
|
Send a multi-route `signals` map:
|
|
72
75
|
|
|
73
76
|
```bash
|
|
@@ -111,6 +114,7 @@ nexusquant strategy sub config my_alpha_001
|
|
|
111
114
|
"price": 150.25,
|
|
112
115
|
"level": 0.8,
|
|
113
116
|
"direction": "bull",
|
|
117
|
+
"order_type": "NORMAL",
|
|
114
118
|
"quantity": 100,
|
|
115
119
|
"metadata": {}
|
|
116
120
|
}
|
|
@@ -54,9 +54,12 @@ nexusquant strategy signal my_alpha_001 \
|
|
|
54
54
|
--direction bull \
|
|
55
55
|
--price 150.25 \
|
|
56
56
|
--level 0.8 \
|
|
57
|
-
--quantity 100
|
|
57
|
+
--quantity 100 \
|
|
58
|
+
--order-type MARKET
|
|
58
59
|
```
|
|
59
60
|
|
|
61
|
+
`--order-type` is a signal-level setting. Use `MARKET` for market orders or `NORMAL` for limit orders; `NORMAL` uses the signal `--price` as the limit reference. If omitted, the service defaults to `MARKET`.
|
|
62
|
+
|
|
60
63
|
Send a multi-route `signals` map:
|
|
61
64
|
|
|
62
65
|
```bash
|
|
@@ -100,6 +103,7 @@ nexusquant strategy sub config my_alpha_001
|
|
|
100
103
|
"price": 150.25,
|
|
101
104
|
"level": 0.8,
|
|
102
105
|
"direction": "bull",
|
|
106
|
+
"order_type": "NORMAL",
|
|
103
107
|
"quantity": 100,
|
|
104
108
|
"metadata": {}
|
|
105
109
|
}
|
|
@@ -258,6 +258,16 @@ def strategy_signal(
|
|
|
258
258
|
help="USD notional for notional_usd sizing. Positive number.",
|
|
259
259
|
),
|
|
260
260
|
] = None,
|
|
261
|
+
order_type: Annotated[
|
|
262
|
+
str | None,
|
|
263
|
+
typer.Option(
|
|
264
|
+
"--order-type",
|
|
265
|
+
help=(
|
|
266
|
+
"Signal-level broker order type: MARKET (default) or NORMAL "
|
|
267
|
+
"(limit order; uses --price)."
|
|
268
|
+
),
|
|
269
|
+
),
|
|
270
|
+
] = None,
|
|
261
271
|
metadata_json: Annotated[
|
|
262
272
|
str | None,
|
|
263
273
|
typer.Option(
|
|
@@ -273,7 +283,8 @@ def strategy_signal(
|
|
|
273
283
|
readable=True,
|
|
274
284
|
help=(
|
|
275
285
|
"UTF-8 JSON object for multi-route signals map. Keys are default or user_id; "
|
|
276
|
-
"values are signal objects. When provided,
|
|
286
|
+
"values are signal objects and may include order_type. When provided, "
|
|
287
|
+
"single-signal options are ignored."
|
|
277
288
|
),
|
|
278
289
|
),
|
|
279
290
|
] = None,
|
|
@@ -285,7 +296,10 @@ def strategy_signal(
|
|
|
285
296
|
``nexusquant strategy signal my_alpha --history --limit 20``
|
|
286
297
|
|
|
287
298
|
Single signal:
|
|
288
|
-
``nexusquant strategy signal my_alpha --ticker AAPL --direction bull --price 150 --level 0.8 --quantity 100``
|
|
299
|
+
``nexusquant strategy signal my_alpha --ticker AAPL --direction bull --price 150 --level 0.8 --quantity 100 --order-type MARKET``
|
|
300
|
+
|
|
301
|
+
Limit signal:
|
|
302
|
+
``nexusquant strategy signal my_alpha --ticker AAPL --direction bear --price 150 --level 0.8 --quantity 100 --order-type NORMAL``
|
|
289
303
|
|
|
290
304
|
Signals map:
|
|
291
305
|
``nexusquant strategy signal my_alpha --signals-file signals.json --strategy-name "My Alpha"``
|
|
@@ -299,6 +313,7 @@ def strategy_signal(
|
|
|
299
313
|
level,
|
|
300
314
|
quantity,
|
|
301
315
|
notional_usd,
|
|
316
|
+
order_type,
|
|
302
317
|
signals_file,
|
|
303
318
|
)
|
|
304
319
|
)
|
|
@@ -355,6 +370,11 @@ def strategy_signal(
|
|
|
355
370
|
signal["quantity"] = quantity
|
|
356
371
|
if notional_usd is not None:
|
|
357
372
|
signal["notional_usd"] = notional_usd
|
|
373
|
+
if order_type is not None:
|
|
374
|
+
normalized_order_type = order_type.strip().upper()
|
|
375
|
+
if normalized_order_type not in {"MARKET", "NORMAL"}:
|
|
376
|
+
raise typer.BadParameter("--order-type must be MARKET or NORMAL.")
|
|
377
|
+
signal["order_type"] = normalized_order_type
|
|
358
378
|
metadata = load_json_option(metadata_json, label="metadata")
|
|
359
379
|
if metadata is not None:
|
|
360
380
|
signal["metadata"] = metadata
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|