laplace-api 2.0.1 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "laplace-api",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Client library for Laplace API for the US stock market and BIST (Istanbul stock market) fundamental financial data.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -31,6 +31,7 @@ export interface CapitalIncrease {
31
31
  rightsTotalAmount: string;
32
32
  rightsStartDate: string;
33
33
  rightsEndDate: string;
34
+ rightsLastSellDate: string;
34
35
  bonusRate: string;
35
36
  bonusTotalAmount: string;
36
37
  bonusStartDate: string;
@@ -179,10 +179,11 @@ export class FinancialClient extends Client {
179
179
  });
180
180
  }
181
181
 
182
- async getHistoricalRatios(symbol: string, keys: HistoricalRatiosKey[], region: Region): Promise<StockHistoricalRatios[]> {
182
+ async getHistoricalRatios(symbol: string, keys: HistoricalRatiosKey[], region: Region, locale: Locale): Promise<StockHistoricalRatios[]> {
183
183
  const url = new URL(`${this['baseUrl']}/api/v2/stock/historical-ratios`);
184
184
  url.searchParams.append('symbol', symbol);
185
185
  url.searchParams.append('region', region);
186
+ url.searchParams.append('locale', locale);
186
187
  url.searchParams.append('slugs', keys.join(','));
187
188
 
188
189
  return this.sendRequest<StockHistoricalRatios[]>({
@@ -8,6 +8,7 @@ export enum AssetType {
8
8
  Index = 'index',
9
9
  Etf = 'etf',
10
10
  Commodity = 'commodity',
11
+ StockRights = 'stock_rights'
11
12
  }
12
13
 
13
14
  export enum AssetClass {
@@ -36,7 +36,8 @@ describe('FinancialRatios', () => {
36
36
  const resp = await financialClient.getHistoricalRatios(
37
37
  "TUPRS",
38
38
  Object.values(HistoricalRatiosKey).flat(),
39
- Region.Tr
39
+ Region.Tr,
40
+ Locale.Tr
40
41
  );
41
42
  expect(resp).not.toBeEmpty();
42
43
  for (const ratio of resp) {
@@ -1,2 +1,2 @@
1
- BASE_URL=https://api.finfree.app
2
- API_KEY=api-6fa6cefb-16df-4a19-8351-54f83c6bbe2f
1
+ BASE_URL=
2
+ API_KEY=