The OpenAPI service is currently suspended for new applications. We will inform you once the service is restored. Existing users who have already been granted access to the OpenAPI can continue to use it as usual.
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 integrate into Webull through Webull OpenAPI.

  • Request URL: /account/positions

  • Request method: GET

  • Frequency limit: The calling frequency of each App ID is limited to 10 times in 30 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 ID913256135
symbolStringTicker symbolAAPL
instrument_typeStringTickerTypeSTOCK
currencyStringCurrencyUSD
unit_costStringCost price9.54
qtyintNumber of shares11000.0
total_costStringTotal cost105006.00
last_priceStringMarket Price52.250
market_valueStringMarket capitalization574750.00
unrealized_profit_lossStringFloating profit and loss469744.00
unrealized_profit_loss_rateStringfloating profit and loss ratio4.4700
holding_proportionStringPosition ratio0.9800

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.US.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":[
0:{
"instrument_id":
"913256135"
"symbol":
"AAPL"
"short_name":
"AAPL"
"qty":
200
"unit_cost":
"10.00"
"currency":
"USD"
"total_cost":
"2000.00"
"last_price":
"135.62"
"market_value":
"27124.00"
"unrealized_profit_loss":
"25124.00"
"unrealized_profit_loss_rate":
"12.56"
"holding_proportion":
"1.00"
}
]
}

Exception Example

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