API Reference#

Configuration#

class orion_finance_sdk_py.contracts.OrionConfig[source]#

Bases: OrionSmartContract

OrionConfig contract.

Initialize the OrionConfig contract.

property fee_change_cooldown_duration: int#

Fetch the fee change cooldown duration in seconds.

property get_investment_universe: list[str]#

Alias for whitelisted_assets (Investment Universe).

is_orion_vault(vault_address)[source]#

Check if an address is a registered Orion vault.

Return type:

bool

Parameters:

vault_address (str)

is_system_idle()[source]#

Check if the system is in idle state, required for vault deployment.

Return type:

bool

is_whitelisted(token_address)[source]#

Check if a token address is whitelisted.

Return type:

bool

Parameters:

token_address (str)

is_whitelisted_manager(manager_address)[source]#

Check if a manager address is whitelisted.

Return type:

bool

Parameters:

manager_address (str)

property manager_intent_decimals: int#

Alias for strategist_intent_decimals.

property max_fulfill_batch_size: int#

Fetch the maximum fulfill batch size.

property min_deposit_amount: int#

Fetch the minimum deposit amount from the OrionConfig contract.

property min_redeem_amount: int#

Fetch the minimum redeem amount from the OrionConfig contract.

property orion_transparent_vaults: list[str]#

Fetch all Orion transparent vault addresses from the OrionConfig contract.

property risk_free_rate: int#

Fetch the risk free rate from the OrionConfig contract.

property rs_fee_coefficient: int#

Fetch the revenue share fee coefficient from the OrionConfig contract.

property strategist_intent_decimals: int#

Fetch the strategist intent decimals from the OrionConfig contract.

token_decimals(token_address)[source]#

Fetch the decimals of a token address.

Return type:

int

Parameters:

token_address (str)

property underlying_asset: str#

Fetch the underlying asset address.

property v_fee_coefficient: int#

Fetch the volume fee coefficient from the OrionConfig contract.

property whitelisted_asset_names: list[str]#

Fetch all whitelisted asset names from the OrionConfig contract.

property whitelisted_assets: list[str]#

Fetch all whitelisted asset addresses from the OrionConfig contract.

Vaults#

class orion_finance_sdk_py.contracts.OrionVault(contract_name)[source]#

Bases: OrionSmartContract

OrionVault contract.

Initialize the OrionVault contract.

Parameters:

contract_name (str)

property active_fee_model: dict#

Fetch the currently active fee model (struct FeeModel).

can_request_deposit(user)[source]#

Check if a user is allowed to request a deposit.

This method queries the vault’s depositAccessControl contract. If no access control is set (zero address), it returns True.

Return type:

bool

Parameters:

user (str)

cancel_deposit_request(amount)[source]#

Cancel a previously submitted deposit request.

Return type:

TransactionResult

Parameters:

amount (int)

cancel_redeem_request(shares)[source]#

Cancel a previously submitted redemption request.

Return type:

TransactionResult

Parameters:

shares (int)

convert_to_assets(shares)[source]#

Convert shares to assets.

Return type:

int

Parameters:

shares (int)

get_portfolio()[source]#

Get the vault portfolio.

Return type:

dict

property is_decommissioning: bool#

Check if the vault is in decommissioning mode.

property manager_address: str#

Fetch the manager address.

max_deposit(receiver)[source]#

Fetch the maximum deposit amount for a receiver.

Return type:

int

Parameters:

receiver (str)

property max_management_fee: int#

Fetch the maximum management fee allowed from the vault contract.

property max_performance_fee: int#

Fetch the maximum performance fee allowed from the vault contract.

pending_deposit(fulfill_batch_size=None)[source]#

Get total pending deposit amount across all users.

Return type:

int

Parameters:

fulfill_batch_size (int | None)

pending_redeem(fulfill_batch_size=None)[source]#

Get total pending redemption shares across all users.

Return type:

int

Parameters:

fulfill_batch_size (int | None)

property pending_vault_fees: float#

Fetch the pending vault fees in the underlying asset.

request_deposit(assets)[source]#

Submit an asynchronous deposit request.

Return type:

TransactionResult

Parameters:

assets (int)

request_redeem(shares)[source]#

Submit a redemption request.

Return type:

TransactionResult

Parameters:

shares (int)

set_deposit_access_control(access_control_address)[source]#

Set the deposit access control contract address.

Return type:

TransactionResult

Parameters:

access_control_address (str)

property share_price: int#

Fetch the current share price (value of 1 share unit).

property strategist_address: str#

Fetch the strategist address.

property total_assets: int#

Fetch the total assets of the vault.

update_fee_model(fee_type, performance_fee, management_fee)[source]#

Update the fee model for the vault.

Return type:

TransactionResult

Parameters:
  • fee_type (int)

  • performance_fee (int)

  • management_fee (int)

update_strategist(new_strategist_address)[source]#

Update the strategist address for the vault.

Return type:

TransactionResult

Parameters:

new_strategist_address (str)

class orion_finance_sdk_py.contracts.OrionTransparentVault[source]#

Bases: OrionVault

OrionTransparentVault contract.

Initialize the OrionTransparentVault contract.

submit_order_intent(order_intent)[source]#

Submit a portfolio order intent.

Parameters:

order_intent (dict[str, int]) – Dictionary mapping token addresses to values

Return type:

TransactionResult

Returns:

TransactionResult

transfer_manager_fees(amount)[source]#

Transfer manager fees (claimVaultFees).

Return type:

TransactionResult

Parameters:

amount (int)

Factory#

class orion_finance_sdk_py.contracts.VaultFactory(vault_type, contract_address=None)[source]#

Bases: OrionSmartContract

VaultFactory contract.

Initialize the VaultFactory contract.

Parameters:
  • vault_type (str)

  • contract_address (str | None)

create_orion_vault(strategist_address, name, symbol, fee_type, performance_fee, management_fee, deposit_access_control='0x0000000000000000000000000000000000000000')[source]#

Create an Orion vault for a given strategist address.

Return type:

TransactionResult

Parameters:
  • strategist_address (str)

  • name (str)

  • symbol (str)

  • fee_type (int)

  • performance_fee (int)

  • management_fee (int)

  • deposit_access_control (str)

get_vault_address_from_result(result)[source]#

Extract the vault address from OrionVaultCreated event in the transaction result.

Return type:

str | None

Parameters:

result (TransactionResult)

Liquidity Orchestrator#

class orion_finance_sdk_py.contracts.LiquidityOrchestrator[source]#

Bases: OrionSmartContract

LiquidityOrchestrator contract.

Initialize the LiquidityOrchestrator contract.

property epoch_duration: int#

Fetch the epoch duration in seconds.

property slippage_tolerance: int#

Fetch the slippage tolerance.

property target_buffer_ratio: int#

Fetch the target buffer ratio.