Account Information

Fetching the User's Profile

Retrieve the user's profile information:

profile = client.get_profile()

The returned Profile object has the following attributes:

  • wallet_address: The user's wallet address, as a string
  • username: The user's username, as a string

Fetching Account Information

Retrieve the user's account information:

account = client.get_account()

The returned Account object has the following attributes:

  • equity: Total value of the account, as a float
  • initial_margin: Initial margin required for the account, as a float
  • maintenance_margin: Maintenance margin required for the account, as a float
  • available_balance: Current available balance in the account, as a float

Fetching Portfolio Information

Retrieve the user's portfolio information:

portfolio = client.get_portfolio()

The returned Portfolio object has the following attributes:

  • live_pnl: Live Profit and Loss value, as a float
  • win_rate: Winning rate of the portfolio, as a float
  • realized_pnl: Realized Profit and Loss value, as a float
  • profit_factor: Profit factor of the portfolio, as a float
  • margin_used: Margin used by the portfolio, as a float
  • mm_utilization: Margin utilization, as a float
  • gamma: Gamma of the portfolio, as a float
  • delta: Delta of the portfolio, as a float
  • theta: Theta of the portfolio, as a float
  • vega: Vega of the portfolio, as a float
  • rho: Rho of the portfolio, as a float

Fetching Transfer History

Retrieve the user's transfer history:

transfers = client.get_transfers()

The returned list contains Transfer objects with the following attributes:

  • id: A unique identifier of the transfer, as an integer
  • asset: The asset being transferred, as a string
  • transfer_type: The type of transfer (e.g., DEPOSIT, WITHDRAW), as a TransferType enum
  • amount: The amount of asset being transferred, as a float
  • tx_hash: The transaction hash of the transfer, as a string
  • created_at: The timestamp when the transfer was created, as a string
  • status: The status of the transfer (e.g., PENDING, COMPLETED), as a TransferStatus enum