growwapi
Version:
NodeJS SDK for Groww trading APIs
16 lines (15 loc) • 493 B
JavaScript
import { HttpClient } from '../utils/http';
import { buildUrlWithParams } from '../utils/url';
export class Positions {
constructor(baseUrl) {
this.http = new HttpClient(baseUrl, '/positions');
}
async user(params) {
const url = buildUrlWithParams('/user', params);
return (await this.http.get(url));
}
async tradingSymbol(params) {
const url = buildUrlWithParams('/trading-symbol', params);
return await this.http.get(url);
}
}