Skip to content

Latest commit

 

History

History
220 lines (132 loc) · 8.25 KB

AccountApi.md

File metadata and controls

220 lines (132 loc) · 8.25 KB

\AccountApi

All URIs are relative to https://localhost:5000/v1/api

Method HTTP request Description
iserver_account_pnl_partitioned_get Get /iserver/account/pnl/partitioned PnL for the selected account
iserver_account_post Post /iserver/account Switch Account
iserver_accounts_get Get /iserver/accounts Brokerage Accounts
portfolio_account_id_ledger_get Get /portfolio/{accountId}/ledger Account Ledger
portfolio_account_id_meta_get Get /portfolio/{accountId}/meta Account Information
portfolio_account_id_summary_get Get /portfolio/{accountId}/summary Account Summary
portfolio_accounts_get Get /portfolio/accounts Portfolio Accounts
portfolio_subaccounts_get Get /portfolio/subaccounts List of Sub-Accounts

iserver_account_pnl_partitioned_get

::models::InlineResponse20016 iserver_account_pnl_partitioned_get() PnL for the selected account

Returns an object containing PnL for the selected account and its models (if any). To receive streaming PnL the endpoint /ws can be used. Refer to Streaming WebSocket Data for details.

Required Parameters

This endpoint does not need any parameter.

Return type

::models::InlineResponse20016

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

iserver_account_post

::models::InlineResponse20011 iserver_account_post(body) Switch Account

If an user has multiple accounts, and user wants to get orders, trades, etc. of an account other than currently selected account, then user can update the currently selected account using this API and then can fetch required information for the newly updated account.

Required Parameters

Name Type Description Notes
body SetAccount account id

Return type

::models::InlineResponse20011

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

iserver_accounts_get

::models::InlineResponse20021 iserver_accounts_get() Brokerage Accounts

Returns a list of accounts the user has trading access to, their respective aliases and the currently selected account. Note this endpoint must be called before modifying an order or querying open orders.

Required Parameters

This endpoint does not need any parameter.

Return type

::models::InlineResponse20021

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

portfolio_account_id_ledger_get

::models::InlineResponse20033 portfolio_account_id_ledger_get(account_id) Account Ledger

Information regarding settled cash, cash balances, etc. in the account's base currency and any other cash balances hold in other currencies. /portfolio/accounts or /portfolio/subaccounts must be called prior to this endpoint. The list of supported currencies is available at https://www.interactivebrokers.com/en/index.php?f=3185.

Required Parameters

Name Type Description Notes
account_id String account id

Return type

::models::InlineResponse20033

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

portfolio_account_id_meta_get

::models::Accounts portfolio_account_id_meta_get(account_id) Account Information

Account information related to account Id /portfolio/accounts or /portfolio/subaccounts must be called prior to this endpoint.

Required Parameters

Name Type Description Notes
account_id String account id

Return type

::models::Accounts

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

portfolio_account_id_summary_get

::models::InlineResponse20034 portfolio_account_id_summary_get(account_id) Account Summary

Returns information about margin, cash balances and other information related to specified account. See also /portfolio/{accountId}/ledger. /portfolio/accounts or /portfolio/subaccounts must be called prior to this endpoint.

Required Parameters

Name Type Description Notes
account_id String account id

Return type

::models::InlineResponse20034

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

portfolio_accounts_get

::models::Accounts portfolio_accounts_get() Portfolio Accounts

In non-tiered account structures, returns a list of accounts for which the user can view position and account information. This endpoint must be called prior to calling other /portfolio endpoints for those accounts. For querying a list of accounts which the user can trade, see /iserver/accounts. For a list of subaccounts in tiered account structures (e.g. financial advisor or ibroker accounts) see /portfolio/subaccounts.

Required Parameters

This endpoint does not need any parameter.

Return type

::models::Accounts

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

portfolio_subaccounts_get

::models::Account portfolio_subaccounts_get() List of Sub-Accounts

Used in tiered account structures (such as financial advisor and ibroker accounts) to return a list of sub-accounts for which the user can view position and account-related information. This endpoint must be called prior to calling other /portfolio endpoints for those subaccounts. To query a list of accounts the user can trade, see /iserver/accounts.

Required Parameters

This endpoint does not need any parameter.

Return type

::models::Account

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]