Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

laplace-api

Package Overview
Dependencies
Maintainers
0
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

laplace-api - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

2

package.json
{
"name": "laplace-api",
"version": "1.1.1",
"version": "1.1.2",
"description": "Client library for Laplace API for the US stock market and BIST (Istanbul stock market) fundamental financial data.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -70,3 +70,3 @@ import { Client } from './client';

async createCustomTheme(params: CreateCustomThemeParams): Promise<string> {
const response = await this.sendRequest<string>({
const response = await this.sendRequest<{ id: string }>({
method: 'POST',

@@ -77,3 +77,3 @@ url: `/api/v1/custom-theme`,

return response;
return response.id;
}

@@ -80,0 +80,0 @@

@@ -130,7 +130,11 @@ import { Client } from './client';

export class StockClient extends Client {
async getAllStocks(region: Region): Promise<Stock[]> {
async getAllStocks(region: Region, page: number|null = null, pageSize: number|null = null): Promise<Stock[]> {
return this.sendRequest<Stock[]>({
method: 'GET',
url: '/api/v1/stock/all',
params: { region },
url: '/api/v2/stock/all',
params: {
region,
...(page !== null ? { page } : {}),
...(pageSize !== null ? { pageSize } : {}),
},
});

@@ -137,0 +141,0 @@ }

@@ -29,2 +29,9 @@ import { Logger } from 'winston';

test('GetAllStocksWithPagination', async () => {
const resp = await client.getAllStocks(Region.Tr, 10, 10);
expect(resp).not.toBeEmpty();
expect(resp.length).toBe(10);
});
test('GetStockDetailByID', async () => {

@@ -31,0 +38,0 @@ const resp = await client.getStockDetailById("61dd0d6f0ec2114146342fd0", Locale.Tr);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc