import { HttpMethod } from '@dripjs/types' ; import { BarResponse , Config } from '../../../../types' ; import { PublicEndPoints , RestBarRequest , RestBarResponse } from '../../../types' ; import { RestInsider } from '../../rest-insider' ; export class Bar extends RestInsider { constructor ( config ) { super ( config , PublicEndPoints . TradeBucketed ) ; } async fetch ( request ) { const res = await this . request ( HttpMethod . GET , request ) ; return { ratelimit : res . ratelimit , bars : < BarResponse [ ] > res . body , error : res . error , } ; } }