A fully-featured Python SDK for trading on Architect.
Just some of the features of this SDK: symbology, portfolio management, order entry, advanced algos, and marketdata subscriptions.
Also, it is compatible with Jupyter notebooks! Check the examples for an example notebook.
- pip:
pip install architect-py
- poetry:
poetry add architect-py
- uv:
uv add architect-py
API keys/secrets for the brokerage can be generated on the user account page.
Go to FUNCTIONS.md file to see a catalog of methods.
Go to the Examples to see examples of a variety of common use cases. To run a specific example, use e.g. python -m examples.orderflow_streaming
.
See the Getting started with Python guide for more information.
In general, most types in the package can be imported from the top-level; in rare cases, some types may come from GraphQL and need to be imported from architect_py.graphql_client.fragments
.
from architect_py import * # includes both AsyncClient and Client
from architect_py.graphql_client.fragments import (
ExecutionInfoFields,
ProductInfoFields,
)
Using an LLM or an IDE with code completion like VSCode or PyCharm can be very helpful.