Skip to content
Trade Statistics

Get Trade Statistics by Price

Returns the trading-day summary for a security (average price, trade count, and active buy, active sell, and neutral volume) and statistics for the requested number of price levels. The Trade Statistics page on the security detail page uses it for the first screen. The Broker App offers 20 and 50 price levels. When the Client selects All, the Broker App switches to “Get All Trade Statistics by Price” and loads pages.

GEThttps://api.lbkrs.com/v1/quote/trades/topstatistics

Parameters

counter_idstringqueryRequired

Security ID in the format ST/<market>/<code>, such as ST/US/AAPL

countintegerquery

Number of price levels to return. Defaults to 50

timestampstringquery

Unix timestamp of the day to query, in seconds. Defaults to today. Available days come from statistics.trade_date in the response

trade_typeintegerquery

Trading session, US stocks only. Defaults to regular hours:

  • 0 - Regular hours
  • 1 - Pre-market
  • 2 - After-hours
  • 3 - All (pre-market, regular hours, and after-hours)

0123

Responses

HTTP 200The request succeeded. The response body contains the result of the “Get Trade Statistics by Price” operation.
Standard response envelopecodemessagedata
dataobjectdata structure
tradesarray<object>

Trade statistics by price level

Child attributes
pricestring

Trade price level, as a decimal string

buy_amountstring

Active buy volume at this price, in shares

sell_amountstring

Active sell volume at this price, in shares

neutral_amountstring

Neutral volume at this price, in shares

statisticsobject

Trading-day summary

Child attributes
avgpricestring

Average trade price, as a decimal string

trades_countstring

Number of trades

total_amountstring

Total volume, in shares

buystring

Active buy volume, in shares

sellstring

Active sell volume, in shares

neutralstring

Neutral volume, in shares

timestampstring

Unix timestamp of the trading day being summarized, in seconds

preclosestring

Previous close, as a decimal string. The Broker App uses it to color each price level as up or down

trade_datearray<string>

Trading days that can be queried (Unix timestamps in seconds), for the date picker. When timestamp is not sent, the Broker App uses the first item as the current date

Whale Docs