UNPKG

upstox-js-sdk

Version:

The official Node Js client for communicating with the Upstox API

22 lines (19 loc) 594 B
## Get order history for an order number ```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.OrderApi(); let apiVersion = "2.0"; let opts = { 'orderId': "240112010371054" }; apiInstance.getOrderDetails(apiVersion, opts, (error, data, response) => { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + JSON.stringify(data)); } }); ```