A Python SDK for interacting with Orion Finance smart contracts
Project description
orion-finance-sdk-py
About
A Python Software Development Kit (SDK) to facilitate interactions with the Orion Finance protocol. This repository provides tools and utilities for quants and developers to seamlessly integrate with Orion's on-chain portfolio management infrastructure.
For comprehensive documentation, including setup guides, API references, and developer resources, visit docs.orionfinance.ai.
License
This software is distributed under the BSD-3-Clause license. See the LICENSE file for the full text.
Setup for Development
If you're working on the SDK itself:
# Clone the repository
git clone https://github.com/OrionFinanceAI/orion-finance-sdk-py.git
cd orion-finance-sdk-py
# Install dependencies
make uv-download
make venv
source .venv/bin/activate
make install
# Run tests
make test
# Run tests with coverage
make test # Coverage is included automatically
# Run code style checks
make codestyle
# Run docstring checks
make docs
Installation from PyPI
For end users, install the latest stable version from PyPI:
pip install orion-finance-sdk-py
Environment Variables Setup
The SDK requires the user to specify an RPC_URL environment variable in the .env file of the project. Follow the SDK Installation to get one.
Based on the usage, additional environment variables may be required, e.g.:
STRATEGIST_ADDRESS: The address of the strategist account.VAULT_DEPLOYER_PRIVATE_KEY: The private key of the vault deployer account.STRATEGIST_PRIVATE_KEY: The private key of the strategist account.ORION_VAULT_ADDRESS: The address of the Orion vault.
Examples of Usage
List available commands
orion --help
orion deploy-vault --help
orion submit-order --help
Deploy a new Transparent Orion vault
orion deploy-vault --vault-type transparent --name "Algorithmic Liquidity Provision & Hedging Agent" --symbol "ALPHA" --fee-type hard_hurdle --performance-fee 10 --management-fee 1
Deploy a new Encrypted Orion vault
orion deploy-vault --vault-type encrypted --name "Fully Homomorphic Encryption for Vault Management" --symbol "FHEVM" --fee-type high_water_mark --performance-fee 0 --management-fee 2
Submit an order intent to a vault
# Use off-chain stack to generate an order intent
echo '{"0x3E15268AdE04Eb579EE490CA92736301C7D644Bb": 0.4, "0x4371227723a006e8ee3941AfF5018D084a06DB95": 0.2, "0x784C3AB4C7bdC2d219b902fA63e87b376F178d82": 0.15, "0xD06b768D498FFD3151e4Bc89e0dBdAA0d1413044": 0.15, "0x1904c298d44b6cd10003C843e29D51407fE1309f": 0.1}' > order_intent.json
# Submit the order intent to the Orion vault
orion submit-order --order-intent-path order_intent.json
Update the strategist address for a vault
orion update-strategist --new-strategist-address 0x92Cc2706b5775e2E783D76F20dC7ccC59bB92E48
Update the fee model for a vault
orion update-fee-model --fee-type high_water_mark --performance-fee 5.5 --management-fee 0.1
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orion_finance_sdk_py-0.6.0.tar.gz.
File metadata
- Download URL: orion_finance_sdk_py-0.6.0.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3110aad259ddce9188925153d2321760594924206eb92cae318179d5f16c023e
|
|
| MD5 |
c946a2ca22703395f03de0285af0cc15
|
|
| BLAKE2b-256 |
0af67c53bf070808f67f99b26aad4ffa4b4c74d7b8ec67f95eae2ed48f70b4e4
|
File details
Details for the file orion_finance_sdk_py-0.6.0-py3-none-any.whl.
File metadata
- Download URL: orion_finance_sdk_py-0.6.0-py3-none-any.whl
- Upload date:
- Size: 1.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a206da6c243d7bc1a12bc07b45195591bd08a32832a02959ba00e2e4708e7478
|
|
| MD5 |
d4fa3c0efea36422a656fffb565d0962
|
|
| BLAKE2b-256 |
eb1d81f49b8d86a02ad21bb5449dd9e40de4ce924a55b93c87699a3b2998f675
|