Getting started with Python
Installation
Typechecking
architect-py is fully typed, so you can use it with an IDE that supports type checking (e.g. VSCode with the Pylance extension). Generally speaking, the package will work if it typechecks.
Example
In this example, we'll use the architect-py SDK to place a limit order on CME's Micro Ethereum (MET) futures front month contract, 10% below the current best bid.
Async vs sync
Using the AsyncClient is preferred, but the Python SDK also includes a sync version which can be imported as from architect_py import Client. Its interface is identical to the async client with the following exceptions:
Methods starting with
stream_are not availableMethods starting with
subscribe_are not availableorderflowbidirectional channel is unavailable
When following the documentation, simply omit the await keyword from the examples when using the sync client.
Additional examples
Additional examples can be found in the GitHub repository.
Last updated