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 stringusername: 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 floatinitial_margin: Initial margin required for the account, as a floatmaintenance_margin: Maintenance margin required for the account, as a floatavailable_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 floatwin_rate: Winning rate of the portfolio, as a floatrealized_pnl: Realized Profit and Loss value, as a floatprofit_factor: Profit factor of the portfolio, as a floatmargin_used: Margin used by the portfolio, as a floatmm_utilization: Margin utilization, as a floatgamma: Gamma of the portfolio, as a floatdelta: Delta of the portfolio, as a floattheta: Theta of the portfolio, as a floatvega: Vega of the portfolio, as a floatrho: 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 integerasset: The asset being transferred, as a stringtransfer_type: The type of transfer (e.g., DEPOSIT, WITHDRAW), as aTransferTypeenumamount: The amount of asset being transferred, as a floattx_hash: The transaction hash of the transfer, as a stringcreated_at: The timestamp when the transfer was created, as a stringstatus: The status of the transfer (e.g., PENDING, COMPLETED), as aTransferStatusenum
Updated almost 3 years ago
