Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: including alternate fields for soon to be deprecated items #25

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
198 changes: 158 additions & 40 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "upstox-js-sdk",
"version": "2.1.0",
"version": "2.2.0",
"description": "The official Node Js client for communicating with the Upstox API",
"license": "MIT",
"main": "dist/index.js",
Expand Down Expand Up @@ -28,6 +28,9 @@
},
"dependencies": {
"@babel/cli": "^7.0.0",
"@babel/traverse": "^7.23.2",
"minimatch": "^3.0.5",
"nanoid": "^3.1.31",
"superagent": "^5.3.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class ApiClient {
* @type {String}
* @default https://api-v2.upstox.com
*/
this.basePath = 'https://api-v2.upstox.com'.replace(/\/+$/, '');
this.basePath = 'https://api.upstox.com/v2'.replace(/\/+$/, '');

/**
* The authentication methods to be included for all API calls.
Expand Down
8 changes: 8 additions & 0 deletions src/model/HoldingsData.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ export class HoldingsData {
obj.quantity = ApiClient.convertToType(data['quantity'], 'Number');
if (data.hasOwnProperty('tradingsymbol'))
obj.tradingsymbol = ApiClient.convertToType(data['tradingsymbol'], 'String');
if (data.hasOwnProperty('trading_symbol'))
obj.tradingSymbol = ApiClient.convertToType(data['trading_symbol'], 'String');
if (data.hasOwnProperty('last_price'))
obj.lastPrice = ApiClient.convertToType(data['last_price'], 'Number');
if (data.hasOwnProperty('close_price'))
Expand Down Expand Up @@ -130,6 +132,12 @@ HoldingsData.prototype.quantity = undefined;
*/
HoldingsData.prototype.tradingsymbol = undefined;

/**
* Shows the trading symbol of the instrument
* @member {String} tradingSymbol
*/
HoldingsData.prototype.tradingSymbol = undefined;

/**
* The last traded price of the instrument
* @member {Number} lastPrice
Expand Down
Loading