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 .

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 bull \
  --price 150.25 \
  --level 0.8 \
  --quantity 100

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,
    "level": 0.8,
    "direction": "bull",
    "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.0.tar.gz (9.5 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.0-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nexusquant_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for nexusquant_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 45452554cef0f5ade1e1c958529af5016600ab96c27277c7d730c038b291feb6
MD5 676ca87b9b3abb706eb2f118ed7e7f91
BLAKE2b-256 e6c793d37bf6136b4d6b4989f6fe5e8ca3dac3633930eebed40b775dc23eb653

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nexusquant_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for nexusquant_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e501619e43237dfbe9b9927c1b82cf1280efca454df96e1ffe0dea6efb24ad0
MD5 d39ac3e642909917b14ab9315d2cad38
BLAKE2b-256 b5341c3414fba8a605984752c86342684ae11705a74ea15191d21dc2841144b1

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