@@ -15,6 +15,7 @@ import {
1515 IExchangeAsset ,
1616 IExchangeInfo ,
1717 IHistoricalCandlestick ,
18+ IHistoricalCount ,
1819 IHistoricalOrderBook ,
1920 IHistoricalInstrument ,
2021 IHistoricalTrade ,
@@ -45,6 +46,7 @@ import {
4546 IExchangeInfoDto ,
4647 IGuidIdResultDto ,
4748 IHistoricalCandlestickDto ,
49+ IHistoricalCountDto ,
4850 IHistoricalOrderBookDto ,
4951 IHistoricalInstrumentDto ,
5052 IHistoricalTradeDto ,
@@ -756,6 +758,38 @@ export class ShrimpyApiClient {
756758 return this . _historicalInstrumentsDtoConverter . convertFromDto ( resultDto ) ;
757759 }
758760
761+ public async getHistoricalCount (
762+ type : 'trade' | 'orderbook' ,
763+ exchange : string ,
764+ baseTradingSymbol : string ,
765+ quoteTradingSymbol : string ,
766+ startTime : Date ,
767+ endTime : Date
768+ ) : Promise < IHistoricalCount > {
769+ const endpoint = `historical/count` ;
770+ const parameters : {
771+ type : string ,
772+ exchange : string ,
773+ baseTradingSymbol : string ,
774+ quoteTradingSymbol : string ,
775+ startTime : string ,
776+ endTime : string
777+ } = {
778+ type : type ,
779+ exchange : exchange ,
780+ baseTradingSymbol : baseTradingSymbol ,
781+ quoteTradingSymbol : quoteTradingSymbol ,
782+ startTime : this . _dateDtoConverter . convertToDto ( startTime ) ,
783+ endTime : this . _dateDtoConverter . convertToDto ( endTime )
784+ } ;
785+ const countDto = await this . _callEndpoint < IHistoricalCountDto > ( endpoint , 'GET' , parameters , true ) ;
786+ const result : IHistoricalCount = {
787+ count : countDto . count
788+ } ;
789+
790+ return result ;
791+ }
792+
759793/* Management */
760794
761795 public async getStatus ( ) : Promise < IManagementStatus > {
0 commit comments