Skip to main content

Candella Copytrade SDK. Push algo signals that fan out to followers' brokers.

Project description

Candella SDK (Python)

The official Python SDK for Candella Copytrade. Push your algo's signals into Candella with one signed call, and Candella fans them out to your followers' brokerage accounts.

Full API reference: https://candella.dev/copytrade/developers

Install

pip install candella

Quickstart

from candella import Copytrade

cc = Copytrade(api_key="...", secret="...", strategy_id="my-algo")

cc.start_session()                          # arms live execution when your algo wakes

# right next to your own broker order:
webull.place_order("SPY", "buy", 10)        # your execution, your account
cc.signal("SPY", "buy", 10, price=512.30)   # the copy signal, one line

# options use canonical OCC fields (broker-neutral; Candella re-encodes per follower):
cc.signal_option("SPY", "BTO", 5, price=3.10, expiry="2026-07-18", strike=520, right="C")

cc.end_session()                            # when your algo sleeps

Or as a context manager:

with Copytrade(api_key="...", secret="...", strategy_id="my-algo") as cc:
    cc.start_session()
    ...

How it works

  • Identity is server-side. You never send which lead or account you are; your API key resolves that. You only describe the trade.
  • Sessions are the consent gate. Signals only fan out to real accounts while a session is active. A signal sent with no active session is recorded and dropped before any order, which is how you integration-test safely.
  • Idempotency. Pass a stable signal_id (your order id or a hash) for safe retries. If omitted, a content hash of the signal is used, so an identical re-send collapses instead of double-firing.
  • Emit explicit closes. A sell or stc signal must accompany every exit, or followers hold positions that never close.
  • Latency floor around one second, dominated by the downstream broker write rather than this client. Good for minute-bar and swing strategies, not sub-second HFT.

Credentials

Generate an API key and secret on your Algo keys page.

Development

git clone https://github.com/jwlutz/candella-sdk-python
cd candella-sdk-python
pip install -e ".[dev]"
pytest

License

MIT

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

candella-0.0.1.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

candella-0.0.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file candella-0.0.1.tar.gz.

File metadata

  • Download URL: candella-0.0.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.5 {"installer":{"name":"uv","version":"0.11.5","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 candella-0.0.1.tar.gz
Algorithm Hash digest
SHA256 87884ca6c28a1b233d195d2520c9324b87ce015b5a3550639140d186af47ceec
MD5 ca76fe357736ebfbb0494ebd5bb61523
BLAKE2b-256 fdc455c72f5b864351efc1a6c3360c1e9842ace092504a1cae7d33bfd81b5c8e

See more details on using hashes here.

File details

Details for the file candella-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: candella-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.5 {"installer":{"name":"uv","version":"0.11.5","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 candella-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a3225ba411988034959f1245c1ee5a421769f11a3c45f51d00cab2539e101a38
MD5 cbe367b8dcdee012f41458a89c6eb63a
BLAKE2b-256 5275fd30b115b6ef65561d1d243743818b0d582e6ed511827cdcad7b914b179b

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