Orion Finance SDK#

This guide shows how to install the Orion SDK locally. The source code is publicly available on GitHub.


Workflow Overview#

The typical workflow for using the Orion Finance SDK:

  1. Install SDK - Install the Orion Finance SDK package (see below);

  2. Deploy Vault - Create a new vault using orion deploy-vault;

  3. Set Strategist (if needed) - If you want to submit intents as a manager, set yourself as the strategist for your vault;

  4. Submit Intents - Submit portfolio allocation intents using orion submit-order.


Install from PyPI#

Install the latest stable version from PyPI:

pip install orion-finance-sdk

Check available CLI commands any time:

orion --help

Configure Environment#

Create a .env file in your project directory with the following variables:

Required for Vault Deployment#

  • RPC_URL - Chain RPC endpoint;

  • MANAGER_PRIVATE_KEY - Manager private key for signing vault deployment transactions;

  • MANAGER_ADDRESS - Manager address for fees/ownership (must match the address derived from MANAGER_PRIVATE_KEY).

Quick Start#

Example usage of the Orion Finance SDK:

from orion_finance_sdk_py import OrionConfig

config = OrionConfig()
print(f"Risk-free Rate: {config.risk_free_rate}")

Required for Intent Submission#

  • ORION_VAULT_ADDRESS - Address of the deployed Orion vault to interact with (obtained after vault deployment);

Note: Keep your .env file private and never commit it to version control.

Vault Deployment#

Deploy a new vault using the Orion CLI.

Who Can Create Vaults?#

  • Managers can create vaults using the Orion CLI.

What is an RPC URL?#

An RPC URL is the endpoint the SDK uses to communicate with contracts on the blockchain network.

It’s provided by a node or node service provider (e.g., Alchemy) and allows the SDK to send transactions and query blockchain data.

Getting an RPC URL#

You can get an RPC URL from multiple providers. Below are two popular options:

1. Alchemy#

  1. Go to Alchemy and create a free account.

  2. Click “Create App” in your dashboard.

  3. Select:

    • Chain - Ethereum;

    • Network - Sepolia Testnet.

  4. Once created, click your app and copy the HTTP URL — this is your RPC URL.

  5. Paste it into your .env file:

RPC_URL=https://eth-sepolia.g.alchemy.com/v2/YOUR_API_KEY

2. Infura#

  1. Go to Infura and sign up.

  2. Create a new project in your dashboard.

  3. Select the Sepolia network.

  4. Copy the HTTPS endpoint and paste it into your .env file:

RPC_URL=https://sepolia.infura.io/v3/YOUR_API_KEY

Deploy a Transparent Vault#

orion deploy-vault \
  --vault-type transparent \
  --name "Algorithmic Liquidity Provision & Hedging Agent" \
  --symbol "ALPHA" \
  --fee-type hard_hurdle \
  --performance-fee 100 \
  --management-fee 10

What this does:

  • Deploys an ERC-7540 vault smart contract;

  • Registers the manager address set in your .env;

  • Sets the fee type and fees amounts;

  • Makes allocations visible onchain.


Verify Deployment#

  • The CLI outputs the vault contract address;

  • Add it to your manager records and share it with users.

Submit Rebalancing Order Intents#

Submit portfolio allocation intents that the protocol executes on the next rebalancing cycle.

Prerequisites#

  • A deployed vault;

  • Portfolio file generated by your strategy.

Who Can Submit Intents?#

  • Strategists can submit portfolio intents for vaults they are assigned to.

  • Managers who have set themselves as the strategist for their vault can also submit intents directly.


Intent Submission#

orion submit-order \
  --order-intent-path order_intent.json \
  --fuzz

Encrypts allocation details; the optional --fuzz flag provides additional obfuscation to the intent without meaningfully modifying the underlying strategy.

Notes#

  • Intents are collected and executed at the next rebalance, enabling bundling, batching, and netting.

  • Ensure portfolio inputs match the expected schema for your strategy/vault.

Expected Portfolio File Schema#

Column Name

Type

Description

address

string

Token contract address (checksummed).

percentage_of_tvl

decimal

Percentage of total vault value to allocate (0-100).

{
  "0x5BA134aBc8BA11Cf7868F4Dfb02497A3f1544Eb5": 0.25,
  "0x490a81a1939762E6AA87C68C346A0be5E21B466c": 0.02,
  "0x8A359aAfbf0DF440B34bb97445d981C1944CD053": 0.015,
  "0xbD39EeAd46c3f28EB8309A74641ab9Ef947FFc83": 0.0255,
  "0x6b2741F97Ea3EA9C5bFeEa33575d1E73c4481010": 0.06,
  "0x58f7aaE7B2c017F74B7403C9e89537f43B13bE87": 0.4,
  "0x28345814d210f2FE11C8de03236f0Ba7b603D282": 0.22,
  "0x484fF4FB5Ca053b47e5e0490C363b5ea38bB2adF": 0.0095
}

Note:

  • For transparent vaults, these values will be visible onchain once submitted.

  • For private vaults, values are encrypted and only known to managers.

API Reference#