Skip to main content

Account Positions

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

ParameterTypeRequired fieldsDescriptionExample value
account_idStringYesAccount ID20150320010101001
page_sizeintNoNumber of entries per page: default value is 10, and the maximum value is 100 with integers being filled.10
last_instrument_idStringNoThe last target id of the previous page, if not passed, the first page is checked by default202202180001

Response Parameter

ParameterTypeRequired fieldsDescriptionExample value
has_nextBooleanYesIs there a next pagetrue
holdings[ ]HoldingNoPosition List

Holding:

ParameterTypeDescriptionExample value
instrument_idStringSymbol ID913252773
symbolStringTicker symbol00001
instrument_typeStringType of underlying equities: STOCK stockSTOCK
short_nameStringStock abbreviation, in EnglishCKH HOLDINGS
currencyStringCurrencyHKD
unit_costStringCost price9.5460000000
qtyintNumber of shares11000.0
total_costStringTotal cost105006.00000000000000000000
last_priceStringMarket Price52.250
market_valueStringMarket capitalization574750.0000000000000
unrealized_profit_lossStringFloating profit and loss469744.00000000000000000000
unrealized_profit_loss_rateStringfloating profit and loss ratio4.4735
holding_proportionStringPosition ratio0.9854

Request Example

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.HK.value)
api = API(api_client)
response = api.account.get_account_position(account_id)
if response.status_code == 200:
account_position = response.json()

Response Example

{
"has_next": false,
"holdings": [
{
"instrument_id": "913252773",
"symbol": "00001",
"instrument_type": "STOCK",
"short_name": "CKH HOLDINGS",
"qty": 11000.0,
"unit_cost": "9.5460000000",
"currency": "HKD",
"total_cost": "105006.00000000000000000000",
"last_price": "52.250",
"market_value": "574750.0000000000000",
"unrealized_profit_loss": "469744.00000000000000000000",
"unrealized_profit_loss_rate": "4.4735",
"holding_proportion": "0.9854"
},
{
"instrument_id": "950146898",
"symbol": "09988",
"instrument_type": "STOCK",
"short_name": "BABA-SW",
"qty": 100.0,
"unit_cost": "100.0000000000",
"currency": "HKD",
"total_cost": "10000.00000000000000000000",
"last_price": "85.250",
"market_value": "8525.0000000000000",
"unrealized_profit_loss": "-1475.00000000000000000000",
"unrealized_profit_loss_rate": "-0.1475",
"holding_proportion": "0.0146"
}
]
}

Exception Example

{
"error_code": "INVALID_TOKEN",
"message": "401 UNAUTHORIZED \"app_id and account_id not related\""
}