OrderlyExchangeConfig#

API documentation for tradeexecutor.strategy.freqtrade.config.OrderlyExchangeConfig Python class in Trading Strategy framework.

class OrderlyExchangeConfig[source]#

Bases: object

Configuration for Orderly vault deposits and withdrawals.

Deposit flow: 1. ERC20.approve(vault_address, amount) 2. Vault.deposit((account_id, broker_hash, token_hash, amount))

Withdrawal flow: 1. Vault.withdraw((account_id, broker_hash, token_hash, amount))

broker_hash = keccak256(broker_id) token_hash = keccak256(token_id)

__init__(vault_address, orderly_account_id, broker_id, token_id=None, fee_tolerance=Decimal('1.0'), confirmation_timeout=600, poll_interval=10)#
Parameters:
  • vault_address (str) –

  • orderly_account_id (str) –

  • broker_id (str) –

  • token_id (str | None) –

  • fee_tolerance (Decimal) –

  • confirmation_timeout (int) –

  • poll_interval (int) –

Return type:

None

Methods

__init__(vault_address, orderly_account_id, ...)

Attributes

vault_address

Orderly vault contract address

orderly_account_id

Orderly account ID (32 bytes hex)

broker_id

Broker ID string (will be keccak256 hashed)

token_id

Token ID string (will be keccak256 hashed)

fee_tolerance

Maximum fee variance allowed when confirming deposit/withdrawal (in reserve currency units)

confirmation_timeout

Seconds to wait for balance update after on-chain tx confirms

poll_interval

Seconds between Freqtrade balance checks

vault_address: str#

Orderly vault contract address

orderly_account_id: str#

Orderly account ID (32 bytes hex)

broker_id: str#

Broker ID string (will be keccak256 hashed)

token_id: str | None#

Token ID string (will be keccak256 hashed)

fee_tolerance: Decimal#

Maximum fee variance allowed when confirming deposit/withdrawal (in reserve currency units)

confirmation_timeout: int#

Seconds to wait for balance update after on-chain tx confirms

poll_interval: int#

Seconds between Freqtrade balance checks

__init__(vault_address, orderly_account_id, broker_id, token_id=None, fee_tolerance=Decimal('1.0'), confirmation_timeout=600, poll_interval=10)#
Parameters:
  • vault_address (str) –

  • orderly_account_id (str) –

  • broker_id (str) –

  • token_id (str | None) –

  • fee_tolerance (Decimal) –

  • confirmation_timeout (int) –

  • poll_interval (int) –

Return type:

None