Skip to main content

tastytrade order-execution consumer / SDK: drains order intents off Redis Streams and places them

Project description

faro — a tastytrade order-execution consumer

faro

A tastytrade order-execution consumer (and the seed of a small tastytrade SDK). faro drains order intents off a Redis Stream and places them against tastytrade, reporting results back on a results stream. It owns a minimal, in-house tastytrade REST client (not a third-party broker library), so the credential and money path is auditable end to end.

The wire schema it speaks is wire (dollarsmore-wire); a producer emits OrderIntents, faro consumes them and emits ResultEvents.

Install

pip install dollarsmore-faro
# or
uv add dollarsmore-faro

The distribution is dollarsmore-faro; the import package is faro.

Run

python -m faro                 # cert/sandbox by default
python -m faro --prod          # production
python -m faro --account ... --redis-url redis://host:6379/0 --consumer faro-1

Credentials and wiring come from the environment (never baked into the image):

Variable Purpose
TASTYTRADE_CLIENT_SECRET OAuth2 client secret
TASTYTRADE_REFRESH_TOKEN OAuth2 refresh token
TASTYTRADE_ACCOUNT account number (optional if exactly one account)
REDIS_URL Redis connection (default redis://localhost:6379/0)

Layout

Two layers live side by side; the seam is where a future fuller SDK grows:

  • SDK coresession.py (OAuth2 refresh-token session, never logs tokens, refuses non-tastyworks hosts), client.py (TastytradeClient REST), symbols.py (OCC option symbols), executor.py (BrokerExecutor port + TastytradeExecutor adapter — the swappable broker seam).
  • Consumer appstream.py (Redis Streams transport: intents / results / dead-letter), service.py (FaroService dispatch loop, crash-tolerant with PEL recovery), heartbeat.py (container healthcheck verdict), __main__.py (wires it together).

Develop

uv sync                        # wire resolves from PyPI (dollarsmore-wire)
uv run pytest -q
uv run ruff check .

Docker

docker build -t faro .         # installs dollarsmore-wire from PyPI

The image ships only faro + wire + requests/redis — no strategy code — so it is safe to publish.

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

dollarsmore_faro-0.1.2.tar.gz (460.2 kB view details)

Uploaded Source

Built Distribution

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

dollarsmore_faro-0.1.2-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dollarsmore_faro-0.1.2.tar.gz
  • Upload date:
  • Size: 460.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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 dollarsmore_faro-0.1.2.tar.gz
Algorithm Hash digest
SHA256 eccd64a8452deb447f42039ee4c3fe26456d20dd62a8cdbf3fffa13dc224d552
MD5 b774eb66a6f1f5e1c4e1aae7240fb9f3
BLAKE2b-256 6ae2b3acf48b772345a735ddfce16926f817448b2b986b50428cec410baa764e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dollarsmore_faro-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","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 dollarsmore_faro-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1404482d590dce11519cac5f193c2621a517f1060b4b5ea95b213f132c952e63
MD5 b8cbca9f1d370c55f287109542328425
BLAKE2b-256 9c6d0ca8a23f3040fcc1e973c785a6b44bf9725f4bc12095abf5fc161edfc91f

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