Account Positions(v1)
Interface Description
Function description: Query the account position list according to the account ID page.
Applicable objects: Customers who connect to Webull through the OpenApi development platform.
Request URL: /account/positions
Request method: GET
Frequency limit: The calling frequency of each AppId is limited to 2 times in 2 seconds.
Request parameters
| Parameter | Type | Required fields | Description | Example value |
|---|---|---|---|---|
| account_id | String | Yes | Account ID | 863417315629211648 |
| page_size | int | No | Number of entries per page: default value is 10, and the maximum value is 100 with integers being filled. | 10 |
| last_id | String | No | The last id of the previous page, if not passed, the first page is checked by default | 123456 |
Response parameter
| Parameter | Type | Required fields | Description | Example value |
|---|---|---|---|---|
| has_next | Boolean | Yes | Is there a next page | true |
| holdings | [ ]Holding | No | Position List |
Holding:
| Parameter | Type | Description | Example value |
|---|---|---|---|
| id | String | Unique identifier for the account position | 123456 |
| instrument_id | String | Ticker ID | 913256135 |
| symbol | String | Ticker symbol | AAPL |
| instrument_type | String | refer to the dictionary value Category | US_STOCK |
| short_name | String | Stock abbreviation, in English | AAPL |
| currency | String | Currency | USD |
| unit_cost | String | Cost price | 101.0775 |
| qty | int | Number of shares | 20 |
| total_cost | String | Total cost | 2021.55 |
| last_price | String | Market Price | 176.84 |
| market_value | String | Market capitalization | 2006.00 |
| unrealized_profit_loss | String | Floating profit and loss | 1530.80 |
| unrealized_profit_loss_rate | String | floating profit and loss ratio | 16.2133 |
| holding_proportion | String | Position ratio | 1.0000 |
| account_tax_type | String | Account tax type refers to the dictionary value AccountTaxType. For cash account only. | SPECIFIC |
| positions | []ContractPosition | Details of Positions in contract dimention. For margin account only. |
positions
| Parameter | Type | Description | Example value |
|---|---|---|---|
| contract_id | String | Contract id | IQG6KIFUR4043631CNHVEFAH09 |
| account_tax_type | String | Account tax type refers to the dictionary value AccountTaxType | SPECIFIC |
| qty | String | Number of shares | 6 |
| total_cost | String | Total cost | 598.60 |
| unrealized_profit_loss | String | Floating profit and loss | 467.04 |
| market_value | String | Market capitalization | 594.00 |
| margin_type | String | Margin type | ONE_DAY |
Request example
- Python
- Java
from webullsdktrade.api import API
from webullsdkcore.client import ApiClient
from webullsdkcore.common.region import Region
api_client = ApiClient(your_app_key, your_app_secret, Region.JP.value)
api = API(api_client)
response = api.account.get_account_position(account_id)
if response.status_code == 200:
account_position = response.json()
HttpApiConfig apiConfig = HttpApiConfig.builder()
.appKey(Env.APP_KEY)
.appSecret(Env.APP_SECRET)
.regionId(Region.jp.name())
.build();
TradeApiService apiService = new TradeHttpApiService(apiConfig);
AccountPositions accountPositions = apiService.getAccountPositions(accountId, pageSize, lastId);
Response example
Cash Account
Margin Account