UNPKG

upstox-js-sdk

Version:

The official Node Js client for communicating with the Upstox API

18 lines (15 loc) 504 B
## Get user MTF positions ```javascript let UpstoxClient = require('upstox-js-sdk'); let defaultClient = UpstoxClient.ApiClient.instance; var OAUTH2 = defaultClient.authentications['OAUTH2']; OAUTH2.accessToken = "{your_access_token}"; let apiInstance = new UpstoxClient.PortfolioApi(); apiInstance.getMtfPositions((error, data, response) => { if (error) { console.error(error.response.text); } else { console.log('API called successfully. Returned data:', data); } }); ```