Skip to content
Profit and Loss Analysis

Get Asset Changes by Currency

Returns, by currency, total assets at the start and end of the range, net investment in the range (with net cash, stock, and other inflows), and the profit and loss amount. Use it for the My Assets module on the profit and loss analysis page. The returned currencies can serve as the module's currency options.

WhaleCore portfolioService() already wraps this capability through getAssetFlow(period:). When you use WhaleCore, prefer the WhaleCore capability over calling this operation directly.

GEThttps://api.lbkrs.com/portfolio/pnl/currency_overview

Parameters

start_timestringqueryRequired

Range start as a Unix timestamp in seconds

end_timestringqueryRequired

Range end as a Unix timestamp in seconds

start_datestringqueryRequired

Range start date in YYYY-MM-DD format, converted from start_time

end_datestringqueryRequired

Range end date in YYYY-MM-DD format, converted from end_time

Responses

HTTP 200The request succeeded. The response body contains the result of the “Get asset changes by currency” operation.
Standard response envelopecodemessagedata
dataobjectdata structure
asset_detailarray<object>

Asset changes by currency. It is an empty array when there is no data

Child attributes
currencystring

Currency code, such as HKD or USD

init_asset_amountstring

Total assets at the start of the period

end_asset_amountstring

Total assets at the end of the period

invest_amountstring

Net investment in the period

pl_amountstring

Profit and loss amount

invest_detailsarray<object>

Net investment breakdown

Child attributes
invest_typestring

Net investment type:

  • INVEST_CASH - Net cash inflow
  • INVEST_STOCK - Net stock inflow
  • INVEST_OTHER - Other net inflow
Values
INVEST_CASH
INVEST_STOCK
INVEST_OTHER
amountstring

Net inflow amount of the type

Whale Docs