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

inves-broker

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inves-broker - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1-beta.0

dist/brokers/Broker.d.ts

9

dist/index.js

@@ -33,2 +33,3 @@ "use strict";

const DhanBroker_1 = require("./brokers/DhanBroker");
const SwastikaBroker_1 = require("./brokers/SwastikaBroker");
dotenv.config();

@@ -61,2 +62,10 @@ function IConnect(brokerName, config) {

}
case "SWASTIKA": {
if (config.swastikaAPIKey && config.swastikaAPISecret && config.swastikaAESSecret && config.brokerEnvironment) {
return new SwastikaBroker_1.SwastikaBroker(config.swastikaAPIKey, config.swastikaAPISecret, config.swastikaAESSecret, config.brokerEnvironment);
}
else {
throw new Error('Swastika needs api key, api secret, AES key, and broker environment in the config.');
}
}
}

@@ -63,0 +72,0 @@ throw new Error('Pass a valid broker name.');

2

package.json
{
"name": "inves-broker",
"version": "0.3.0",
"version": "0.3.1-beta.0",
"description": "Interact with multiple broker APIs in the Indian stock market.",

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

@@ -5,2 +5,3 @@ import { Broker, KiteBroker, PaytmMoneyBroker } from "./brokers";

import { DhanBroker } from "./brokers/DhanBroker";
import { SwastikaBroker } from "./brokers/SwastikaBroker";
dotenv.config();

@@ -31,2 +32,9 @@

}
case "SWASTIKA": {
if (config.swastikaAPIKey && config.swastikaAPISecret && config.swastikaAESSecret && config.brokerEnvironment) {
return new SwastikaBroker(config.swastikaAPIKey, config.swastikaAPISecret, config.swastikaAESSecret, config.brokerEnvironment);
} else {
throw new Error('Swastika needs api key, api secret, AES key, and broker environment in the config.');
}
}
}

@@ -33,0 +41,0 @@ throw new Error('Pass a valid broker name.');

interface GetLoginURLParams {
kiteRedirectList?: Record<string, string>,
paytmStateKey?: string
paytmStateKey?: string,
swastikaStateKey?: string,
}

@@ -5,0 +6,0 @@

@@ -0,1 +1,3 @@

import { BrokerEnviroment } from "./enums";
export interface InvesBrokerConfig {

@@ -8,2 +10,6 @@ kiteAPIKey?: string;

dhanPartnerSecret?: string;
swastikaAPIKey?: string;
swastikaAPISecret?: string;
swastikaAESSecret?: string;
brokerEnvironment?: BrokerEnviroment;
}

@@ -5,6 +5,13 @@ enum BrokerName {

DHAN = "DHAN",
SWASTIKA = "SWASTIKA",
}
enum BrokerEnviroment {
UAT = "UAT",
PRODUCTION = "PRODUCTION",
}
export {
BrokerName
BrokerName,
BrokerEnviroment,
}
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