UNPKG

upstox-js-sdk

Version:

The official Node Js client for communicating with the Upstox API

106 lines (90 loc) 5.54 kB
/* * Upstox Developer API * Build your App on the Upstox platform ![Banner](https://api.upstox.com/api-docs/images/banner.jpg \"banner\") # Introduction Upstox API is a set of rest APIs that provide data required to build a complete investment and trading platform. Execute orders in real time, manage user portfolio, stream live market data (using Websocket), and more, with the easy to understand API collection. All requests are over HTTPS and the requests are sent with the content-type ‘application/json’. Developers have the option of choosing the response type as JSON or CSV for a few API calls. To be able to use these APIs you need to create an App in the Developer Console and generate your **apiKey** and **apiSecret**. You can use a redirect URL which will be called after the login flow. If you are a **trader**, you can directly create apps from Upstox mobile app or the desktop platform itself from **Apps** sections inside the **Account** Tab. Head over to <a href=\"http://account.upstox.com/developer/apps\" target=\"_blank\">account.upstox.com/developer/apps</a>.</br> If you are a **business** looking to integrate Upstox APIs, reach out to us and we will get a custom app created for you in no time. It is highly recommended that you do not embed the **apiSecret** in your frontend app. Create a remote backend which does the handshake on behalf of the frontend app. Marking the apiSecret in the frontend app will make your app vulnerable to threats and potential issues. * * OpenAPI spec version: v2 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * * Swagger Codegen version: 3.0.46 * * Do not edit the class manually. * */ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. define(['expect.js', '../../src/index'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. factory(require('expect.js'), require('../../src/index')); } else { // Browser globals (root is window) factory(root.expect, root.UpstoxClient); } }(this, function(expect, UpstoxClient) { 'use strict'; var instance; describe('(package)', function() { describe('TradeWiseProfitAndLossData', function() { beforeEach(function() { instance = new UpstoxClient.TradeWiseProfitAndLossData(); }); it('should create an instance of TradeWiseProfitAndLossData', function() { // TODO: update the code to test TradeWiseProfitAndLossData expect(instance).to.be.a(UpstoxClient.TradeWiseProfitAndLossData); }); it('should have the property quantity (base name: "quantity")', function() { // TODO: update the code to test the property quantity expect(instance).to.have.property('quantity'); // expect(instance.quantity).to.be(expectedValueLiteral); }); it('should have the property isin (base name: "isin")', function() { // TODO: update the code to test the property isin expect(instance).to.have.property('isin'); // expect(instance.isin).to.be(expectedValueLiteral); }); it('should have the property scripName (base name: "scrip_name")', function() { // TODO: update the code to test the property scripName expect(instance).to.have.property('scripName'); // expect(instance.scripName).to.be(expectedValueLiteral); }); it('should have the property tradeType (base name: "trade_type")', function() { // TODO: update the code to test the property tradeType expect(instance).to.have.property('tradeType'); // expect(instance.tradeType).to.be(expectedValueLiteral); }); it('should have the property buyDate (base name: "buy_date")', function() { // TODO: update the code to test the property buyDate expect(instance).to.have.property('buyDate'); // expect(instance.buyDate).to.be(expectedValueLiteral); }); it('should have the property buyAverage (base name: "buy_average")', function() { // TODO: update the code to test the property buyAverage expect(instance).to.have.property('buyAverage'); // expect(instance.buyAverage).to.be(expectedValueLiteral); }); it('should have the property sellDate (base name: "sell_date")', function() { // TODO: update the code to test the property sellDate expect(instance).to.have.property('sellDate'); // expect(instance.sellDate).to.be(expectedValueLiteral); }); it('should have the property sellAverage (base name: "sell_average")', function() { // TODO: update the code to test the property sellAverage expect(instance).to.have.property('sellAverage'); // expect(instance.sellAverage).to.be(expectedValueLiteral); }); it('should have the property buyAmount (base name: "buy_amount")', function() { // TODO: update the code to test the property buyAmount expect(instance).to.have.property('buyAmount'); // expect(instance.buyAmount).to.be(expectedValueLiteral); }); it('should have the property sellAmount (base name: "sell_amount")', function() { // TODO: update the code to test the property sellAmount expect(instance).to.have.property('sellAmount'); // expect(instance.sellAmount).to.be(expectedValueLiteral); }); }); }); }));