Skip to main content

EMQ CLI with vendored EmQuantAPI integration.

Project description

emq-cli

emq is a domain-oriented command line tool for EmQuantAPI with vendored runtime libraries.

Requirements

  • Python 3.10+

Platform Support

  • macOS: x86_64, arm64 (universal wheel)
  • Linux: x86_64 only
  • Windows: amd64 only

Linux arm64/aarch64 is not supported by the vendored EmQuant Linux SDK at this time.

Quick Start

pip install emq-cli
emq --help

Login once (credentials from flags or env):

export EMQ_USER='your_user'
export EMQ_PASS='your_pass'
emq auth login

Sample market query:

emq market series 000001.SZ CLOSE --start 2025-01-01 --end 2025-12-31 --output table

Quick portfolio order:

emq portfolio qorder --code MYPORT --stock 300059.SZ --volume 1000 --price 10.5 --date 2025-01-15

Command Domains

  • auth: login, logout, status
  • market: snapshot, series
  • portfolio: create, list, hold, order, qorder
  • quota: usage
  • raw: css, csd, pquery, porder

Output

Every command uses a unified envelope and supports:

  • --output json (default)
  • --output table (ASCII)
  • --output csv

--output can be placed either before the domain command (global) or at the end of leaf commands (override).
If both are provided, the leaf command --output takes precedence.

Credential Persistence

  • auth login saves credentials to ~/.emq/state.json (plain text, initial version).
  • Business commands auto-login from saved state or environment variables.
  • auth logout clears local state and calls SDK logout.

Development

uv run ruff check .
uv run mypy src
uv run python scripts/validate_skill_sync.py
uv run pytest

Notes

  • The vendored SDK lives in src/emq/vendor/emquantapi/python3.
  • Root EMQuantAPI_Python should not be kept after migration.
  • Commit and release governance: docs/commit-and-release.md.

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

emq_cli-0.2.10.tar.gz (26.9 MB view details)

Uploaded Source

Built Distribution

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

emq_cli-0.2.10-py3-none-any.whl (27.0 MB view details)

Uploaded Python 3

File details

Details for the file emq_cli-0.2.10.tar.gz.

File metadata

  • Download URL: emq_cli-0.2.10.tar.gz
  • Upload date:
  • Size: 26.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for emq_cli-0.2.10.tar.gz
Algorithm Hash digest
SHA256 c5baa4de6a5b95b300f3c5a2fbb4ff266d0fb15e98ff6daa79392669a3dc64d1
MD5 6684597765920f359048ef2583339d1e
BLAKE2b-256 487d7de24cde2391db320c28a26847573f54c042f438fea2b3d31f685de0f8d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for emq_cli-0.2.10.tar.gz:

Publisher: publish.yml on Greapi/choice-emquantcli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file emq_cli-0.2.10-py3-none-any.whl.

File metadata

  • Download URL: emq_cli-0.2.10-py3-none-any.whl
  • Upload date:
  • Size: 27.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for emq_cli-0.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 d72b6698f3fcb2a27a35db0bbc95ef98cad9f2bdc2ca774cf665ac0990aafc11
MD5 5631eae97e8e9e6f38d0d849e9c774ab
BLAKE2b-256 d95e9c8e0420bc6bad14e3d06e41da1b1234cb155dfc35f09a0687fe1d5e8a04

See more details on using hashes here.

Provenance

The following attestation bundles were made for emq_cli-0.2.10-py3-none-any.whl:

Publisher: publish.yml on Greapi/choice-emquantcli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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