Skip to content
Assets Overview

Query Account Position

This interface is used to query the current stock holding details of a specified securities account. By providing the account number account_no and an optional currency filter currency, it returns detailed information for each holding, including position quantity, cost price, latest price, and today's buy/sell amounts. Note that this interface only returns long stock positions, excluding short positions and other asset types.

GEThttps://b-api.longbridge.xyz/v1/whaleapi/asset/stock_info

Authorization

AuthorizationstringheaderRequired

Send the Broker ACCESS_TOKEN as Authorization: Bearer <token>.

Parameters

account_nostringRequired

Account Information

currencystringOptional

Currency

Responses

HTTP 200Fields are taken from the real responses definition for this operation in the published Whale OpenAPI spec (whale-openapi/Whale-openapi.json).
Standard response envelopecodemessagedata
dataobjectdata structure
stock_listarray<object>required

position list. position list

Child attributes
symbolstringrequired

security underlying. security underlying

marketstringrequired

market. market

currencystringrequired

currency. currency

total_quantitystringrequired

total position quantity. total position quantity

available_quantitystringrequired

avaiable position quantity. avaiable position quantity

last_donestringrequired

Latest price. Latest price

pre_closestringrequired

Yesterday's close. Yesterday's close

average_cost_pricestringrequired

average cost price. average cost price

diluted_cost_coststringrequired

diluted cost price. diluted cost price

init_quantitystringrequired

init quantity. init quantity

pl_infoobject

【废弃字段】t-1 profit and loss information

Child attributes
currencystring

currency. currency

amountstring

amount. amount

buy_amountstringrequired

buy amount. buy amount

sell_amountstringrequired

sell amount. sell amount

HTTP 400Bad request. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 401The user is not authenticated, or the login session has expired.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 403The current account is not authorized to use this feature. Grant the required permission to the account in User Permission.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

HTTP 408The request timed out. Check the business error code in code and the error details in message.
Standard response envelopecodemessagedata
dataobjectdata structure

No nested fields

Whale Docs