Skip to main content

NexusQuant strategy provider CLI

Project description

nexusquant-cli

Command line tool for NexusQuant strategy providers.

It supports browser login through Cognito, stores tokens locally, refreshes tokens, and calls the Nexus strategy provider APIs. Provider commands require a Cognito user with custom:userType=strategyProvider or custom:userType=admin.

Install

python3 -m pip install -e .
pip install nexusquant-cli

Login

nexusquant auth
nexusquant auth --status
nexusquant auth --refresh
nexusquant auth --logout

Tokens are stored in the current OS user's config directory, for example ~/Library/Application Support/nexusquant-cli/credentials.json on macOS. The file is written with 0600 permissions when supported.

Strategy Commands

Create or update a strategy:

nexusquant strategy create \
  --strategy-id my_alpha_001 \
  --name "My Alpha" \
  --schema-file schema.json \
  --output-unit SHARE_COUNT

List strategies registered by the current provider. Admin users see all strategies:

nexusquant strategy list

List signal history for one strategy:

nexusquant strategy signal my_alpha_001 --history --limit 20

Send a single signal:

nexusquant strategy signal my_alpha_001 \
  --strategy-name "My Alpha" \
  --ticker AAPL \
  --direction buy \
  --price 150.25 \
  --quantity 100 \
  --order-type MARKET

--order-type is a signal-level setting: MARKET or LIMIT (limit uses --price). Legacy NORMAL is accepted by the CLI as an alias for LIMIT. If omitted, the API defaults to MARKET.

Send a multi-route signals map:

nexusquant strategy signal my_alpha_001 \
  --strategy-name "My Alpha" \
  --signals-file signals.json

Get non-PII subscriber config for a strategy:

nexusquant strategy sub config my_alpha_001

JSON Inputs

--schema-file must contain the strategy_schema object accepted by nexus-service, for example:

{
  "type": "object",
  "properties": {
    "window": {
      "type": "integer",
      "default": 14,
      "title": "Window",
      "source": "user"
    }
  },
  "required": []
}

--signals-file must contain a JSON object whose keys are default or user ids:

{
  "default": {
    "ticker": "AAPL",
    "time": "2026-04-26T19:30:00Z",
    "price": 150.25,
    "direction": "buy",
    "order_type": "LIMIT",
    "quantity": 100,
    "metadata": {}
  }
}

Environment Overrides

Normal use does not require configuration. For staging or local development:

Variable Meaning
NEXUSQUANT_API_ENDPOINT API endpoint host, default https://api.nexusquant.co; CLI calls /api/... under it
NEXUSQUANT_API_BASE_URL Optional full API base override, e.g. https://api.nexusquant.co/api
NEXUSQUANT_COGNITO_DOMAIN Cognito Hosted UI host, default auth.lookatwallstreet.com
NEXUSQUANT_COGNITO_CLIENT_ID Cognito app client id
NEXUSQUANT_REDIRECT_URI OAuth callback, default http://127.0.0.1:8251/callback

There is also a hidden typo-compatible alias: nexusquant startegy ... maps to nexusquant strategy ....

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nexusquant_cli-0.1.2.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nexusquant_cli-0.1.2-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file nexusquant_cli-0.1.2.tar.gz.

File metadata

  • Download URL: nexusquant_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nexusquant_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8d28d8da10fad614118314e3896411c17d37cc4afb4919e23dad975671c017fc
MD5 5054f48b783f76adac74f7e1d103cb37
BLAKE2b-256 37565e126e71c99e1ff2fe88447fce3f9bdfe707d699dab69f931ed2a43fd3b7

See more details on using hashes here.

File details

Details for the file nexusquant_cli-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: nexusquant_cli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for nexusquant_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 62c74b98acf138a43a6ab938a68be12322009c020a0202a2a93b7af0bc781441
MD5 f1e718c53752c3bc237a6fa99c1b7e02
BLAKE2b-256 49b21c119fe4fd915c10cf0dc94b2c2751506e454c2d4c05b1aa6910f9c48594

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page