upstox-js-sdk
Version:
The official Node Js client for communicating with the Upstox API
148 lines (125 loc) • 7.62 kB
JavaScript
/*
* Upstox Developer API
* Build your App on the Upstox platform  # 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('MarketQuoteSymbol', function() {
beforeEach(function() {
instance = new UpstoxClient.MarketQuoteSymbol();
});
it('should create an instance of MarketQuoteSymbol', function() {
// TODO: update the code to test MarketQuoteSymbol
expect(instance).to.be.a(UpstoxClient.MarketQuoteSymbol);
});
it('should have the property ohlc (base name: "ohlc")', function() {
// TODO: update the code to test the property ohlc
expect(instance).to.have.property('ohlc');
// expect(instance.ohlc).to.be(expectedValueLiteral);
});
it('should have the property depth (base name: "depth")', function() {
// TODO: update the code to test the property depth
expect(instance).to.have.property('depth');
// expect(instance.depth).to.be(expectedValueLiteral);
});
it('should have the property timestamp (base name: "timestamp")', function() {
// TODO: update the code to test the property timestamp
expect(instance).to.have.property('timestamp');
// expect(instance.timestamp).to.be(expectedValueLiteral);
});
it('should have the property instrumentToken (base name: "instrument_token")', function() {
// TODO: update the code to test the property instrumentToken
expect(instance).to.have.property('instrumentToken');
// expect(instance.instrumentToken).to.be(expectedValueLiteral);
});
it('should have the property symbol (base name: "symbol")', function() {
// TODO: update the code to test the property symbol
expect(instance).to.have.property('symbol');
// expect(instance.symbol).to.be(expectedValueLiteral);
});
it('should have the property lastPrice (base name: "last_price")', function() {
// TODO: update the code to test the property lastPrice
expect(instance).to.have.property('lastPrice');
// expect(instance.lastPrice).to.be(expectedValueLiteral);
});
it('should have the property volume (base name: "volume")', function() {
// TODO: update the code to test the property volume
expect(instance).to.have.property('volume');
// expect(instance.volume).to.be(expectedValueLiteral);
});
it('should have the property averagePrice (base name: "average_price")', function() {
// TODO: update the code to test the property averagePrice
expect(instance).to.have.property('averagePrice');
// expect(instance.averagePrice).to.be(expectedValueLiteral);
});
it('should have the property oi (base name: "oi")', function() {
// TODO: update the code to test the property oi
expect(instance).to.have.property('oi');
// expect(instance.oi).to.be(expectedValueLiteral);
});
it('should have the property netChange (base name: "net_change")', function() {
// TODO: update the code to test the property netChange
expect(instance).to.have.property('netChange');
// expect(instance.netChange).to.be(expectedValueLiteral);
});
it('should have the property totalBuyQuantity (base name: "total_buy_quantity")', function() {
// TODO: update the code to test the property totalBuyQuantity
expect(instance).to.have.property('totalBuyQuantity');
// expect(instance.totalBuyQuantity).to.be(expectedValueLiteral);
});
it('should have the property totalSellQuantity (base name: "total_sell_quantity")', function() {
// TODO: update the code to test the property totalSellQuantity
expect(instance).to.have.property('totalSellQuantity');
// expect(instance.totalSellQuantity).to.be(expectedValueLiteral);
});
it('should have the property lowerCircuitLimit (base name: "lower_circuit_limit")', function() {
// TODO: update the code to test the property lowerCircuitLimit
expect(instance).to.have.property('lowerCircuitLimit');
// expect(instance.lowerCircuitLimit).to.be(expectedValueLiteral);
});
it('should have the property upperCircuitLimit (base name: "upper_circuit_limit")', function() {
// TODO: update the code to test the property upperCircuitLimit
expect(instance).to.have.property('upperCircuitLimit');
// expect(instance.upperCircuitLimit).to.be(expectedValueLiteral);
});
it('should have the property lastTradeTime (base name: "last_trade_time")', function() {
// TODO: update the code to test the property lastTradeTime
expect(instance).to.have.property('lastTradeTime');
// expect(instance.lastTradeTime).to.be(expectedValueLiteral);
});
it('should have the property oiDayHigh (base name: "oi_day_high")', function() {
// TODO: update the code to test the property oiDayHigh
expect(instance).to.have.property('oiDayHigh');
// expect(instance.oiDayHigh).to.be(expectedValueLiteral);
});
it('should have the property oiDayLow (base name: "oi_day_low")', function() {
// TODO: update the code to test the property oiDayLow
expect(instance).to.have.property('oiDayLow');
// expect(instance.oiDayLow).to.be(expectedValueLiteral);
});
});
});
}));