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

degiro-api

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

degiro-api - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

.github/workflows/node.js.yml

4

dist/api/createOrderRequest.js

@@ -17,4 +17,4 @@ "use strict";

body: JSON.stringify(order),
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -21,0 +21,0 @@ var uri = "" + accountConfig.data.tradingUrl + CREATE_ORDER_PATH + ";jsessionid=" + accountConfig.data.sessionId + "?intAccount=" + accountData.data.intAccount + "&sessionId=" + accountConfig.data.sessionId;

@@ -14,4 +14,4 @@ "use strict";

body: '',
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -18,0 +18,0 @@ // tslint:disable-next-line: max-line-length

@@ -14,4 +14,4 @@ "use strict";

body: JSON.stringify(order),
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -18,0 +18,0 @@ // tslint:disable-next-line: max-line-length

@@ -15,4 +15,4 @@ "use strict";

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -19,0 +19,0 @@ // Do the request to get a account config data

@@ -12,4 +12,4 @@ "use strict";

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -16,0 +16,0 @@ // Do the request to get a account config data

@@ -15,4 +15,4 @@ "use strict";

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -19,0 +19,0 @@ // Do the request to get a account config data

@@ -28,4 +28,4 @@ "use strict";

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -32,0 +32,0 @@ // Do the request to get a account config data

@@ -22,4 +22,4 @@ "use strict";

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -26,0 +26,0 @@ // Do the request to get a account config data

@@ -18,4 +18,4 @@ "use strict";

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -22,0 +22,0 @@ // Do the request to get a account config data

@@ -12,4 +12,4 @@ "use strict";

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -16,0 +16,0 @@ // Do the request to get a account config data

@@ -61,4 +61,4 @@ "use strict";

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -65,0 +65,0 @@ latestNewsURI = "" + accountConfig.data.companiesServiceUrl + GET_LATESTS_NEWS_PATH + "?" + params;

@@ -19,4 +19,4 @@ "use strict";

var requestOptions = {
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -23,0 +23,0 @@ // Do the request to get a account config data

@@ -17,4 +17,4 @@ "use strict";

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -21,0 +21,0 @@ // Create params to reach popular stocks

@@ -13,4 +13,4 @@ "use strict";

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -17,0 +17,0 @@ fetch(accountConfig.data.productSearchUrl + "v5/products/info?intAccount=" + accountData.data.intAccount + "&sessionId=" + accountConfig.data.sessionId, requestOptions)

@@ -12,4 +12,4 @@ "use strict";

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -16,0 +16,0 @@ // Do the request to get a account config data

@@ -15,4 +15,4 @@ "use strict";

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -19,0 +19,0 @@ // Do the request to get a account config data

@@ -15,4 +15,4 @@ "use strict";

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};

@@ -19,0 +19,0 @@ // Do the request to get a account config data

@@ -28,9 +28,9 @@ "use strict";

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
};
// Do the request to get a session
utils_1.debug("Making request to " + (BASE_API_URL + LOGIN_URL_PATH) + " with options:");
utils_1.debug("Making request to " + BASE_API_URL + LOGIN_URL_PATH + " with options:");
utils_1.debug(JSON.stringify(requestOptions, null, 2));
fetch(BASE_API_URL + LOGIN_URL_PATH, requestOptions)
fetch("" + BASE_API_URL + LOGIN_URL_PATH, requestOptions)
.then(function (res) {

@@ -40,3 +40,3 @@ if (!payload.oneTimePassword)

utils_1.debug('Sending OTP');
return fetch(BASE_API_URL + LOGIN_URL_PATH + "/totp", requestOptions);
return fetch("" + BASE_API_URL + LOGIN_URL_PATH + "/totp", requestOptions);
})

@@ -43,0 +43,0 @@ .then(function (res) { return res.json(); })

@@ -64,3 +64,3 @@ "use strict";

pwd: _this.pwd,
oneTimePassword: _this.oneTimePassword
oneTimePassword: _this.oneTimePassword,
})

@@ -67,0 +67,0 @@ .then(function (loginResponse) {

{
"name": "degiro-api",
"version": "1.0.1",
"version": "1.0.2",
"public": true,

@@ -11,5 +11,6 @@ "description": "Unofficial DeGiro API for Javascript. Buy and sell in the stock market. See your portfolio and much more",

"build": "rm -fr dist && tsc",
"lint": "tslint --project tsconfig.json 'src/**/*.ts'",
"lint": "tslint -c tslint.json --project tsconfig.json",
"lint-fix": "tslint -c tslint.json --project tsconfig.json --fix",
"test": "mocha -r ts-node/register tests/**/*.spec.ts",
"coverage": "nyc yarn test && nyc report --reporter=text-lcov > coverage.lcov",
"coverage": "nyc yarn test || exit 0; nyc report --reporter=text-lcov > coverage.lcov",
"npm:publish": "yarn lint && yarn build && yarn publish",

@@ -16,0 +17,0 @@ "push": "yarn lint && yarn build && git push",

@@ -20,3 +20,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -29,4 +29,4 @@ } = {

body: JSON.stringify(order),
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -33,0 +33,0 @@

@@ -16,3 +16,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -25,4 +25,4 @@ } = {

body: '',
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -29,0 +29,0 @@

@@ -16,3 +16,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -25,4 +25,4 @@ } = {

body: JSON.stringify(order),
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -29,0 +29,0 @@

@@ -20,3 +20,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -27,4 +27,4 @@ } = {

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -31,0 +31,0 @@

@@ -16,3 +16,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -23,4 +23,4 @@ } = {

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -27,0 +27,0 @@

@@ -20,3 +20,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -27,4 +27,4 @@ } = {

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -31,0 +31,0 @@

@@ -23,3 +23,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -30,4 +30,4 @@ } = {

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -34,0 +34,0 @@

@@ -26,3 +26,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -33,4 +33,4 @@ } = {

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -37,0 +37,0 @@

@@ -23,3 +23,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -30,4 +30,4 @@ } = {

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -34,0 +34,0 @@

@@ -16,3 +16,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -23,4 +23,4 @@ } = {

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -27,0 +27,0 @@

@@ -30,3 +30,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -37,4 +37,4 @@ } = {

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -41,0 +41,0 @@

@@ -22,7 +22,7 @@ // Import types

headers?: any,
credentials: "include",
credentials: 'include',
referer: string,
} = {
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -29,0 +29,0 @@

@@ -22,3 +22,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -29,4 +29,4 @@ } = {

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -33,0 +33,0 @@

@@ -17,3 +17,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -26,4 +26,4 @@ } = {

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -30,0 +30,0 @@

@@ -16,3 +16,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -23,4 +23,4 @@ } = {

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -27,0 +27,0 @@

@@ -20,3 +20,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -27,4 +27,4 @@ } = {

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -31,0 +31,0 @@

@@ -20,3 +20,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -27,4 +27,4 @@ } = {

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}

@@ -31,0 +31,0 @@

@@ -32,3 +32,3 @@ // Import types

},
credentials: "include",
credentials: 'include',
referer: string,

@@ -41,14 +41,14 @@ } = {

},
credentials: "include",
referer: "https://trader.degiro.nl/trader/",
credentials: 'include',
referer: 'https://trader.degiro.nl/trader/',
}
// Do the request to get a session
debug(`Making request to ${BASE_API_URL + LOGIN_URL_PATH} with options:`)
debug(`Making request to ${BASE_API_URL}${LOGIN_URL_PATH} with options:`)
debug(JSON.stringify(requestOptions, null, 2))
fetch(BASE_API_URL + LOGIN_URL_PATH, requestOptions)
fetch(`${BASE_API_URL}${LOGIN_URL_PATH}`, requestOptions)
.then((res) => {
if (!payload.oneTimePassword) return res
debug('Sending OTP')
return fetch(BASE_API_URL + LOGIN_URL_PATH + "/totp", requestOptions);
return fetch(`${BASE_API_URL}${LOGIN_URL_PATH}/totp`, requestOptions);
})

@@ -55,0 +55,0 @@ .then(res => res.json())

@@ -107,6 +107,6 @@ // Import modules

return new Promise((resolve, reject) => {
loginRequest({
username: this.username,
pwd: this.pwd,
oneTimePassword: this.oneTimePassword
loginRequest({
username: this.username,
pwd: this.pwd,
oneTimePassword: this.oneTimePassword,
})

@@ -113,0 +113,0 @@ .then((loginResponse: LoginResponseType) => {

export type LoginRequestParamsType = {
username: string,
pwd: string,
oneTimePassword: string | undefined
oneTimePassword: string | undefined,
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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