kiteconnect
Advanced tools
Comparing version 3.2.0 to 3.2.1
@@ -157,2 +157,5 @@ "use strict"; | ||
}, | ||
paramsSerializer: function(params) { | ||
return querystring.stringify(params); | ||
} | ||
}); | ||
@@ -675,15 +678,15 @@ | ||
* @instance | ||
* @param {Object} params Margin fetch order params. | ||
* @param {string} params.exchange Name of the exchange(eg. NSE, BSE, NFO, CDS, MCX) | ||
* @param {string} params.tradingsymbol Trading symbol of the instrument | ||
* @param {string} params.transaction_type eg. BUY, SELL | ||
* @param {string} params.variety Order variety (regular, amo, bo, co etc.) | ||
* @param {string} params.product Margin product to use for the order | ||
* @param {string} params.order_type Order type (MARKET, LIMIT etc.) | ||
* @param {number} params.quantity Quantity of the order | ||
* @param {number} params.price Price at which the order is going to be placed (LIMIT orders) | ||
* @param {number} params.trigger_price Trigger price (for SL, SL-M, CO orders) | ||
* @param {Object[]} orders Margin fetch orders. | ||
* @param {string} orders[].exchange Name of the exchange(eg. NSE, BSE, NFO, CDS, MCX) | ||
* @param {string} orders[].tradingsymbol Trading symbol of the instrument | ||
* @param {string} orders[].transaction_type eg. BUY, SELL | ||
* @param {string} orders[].variety Order variety (regular, amo, bo, co etc.) | ||
* @param {string} orders[].product Margin product to use for the order | ||
* @param {string} orders[].order_type Order type (MARKET, LIMIT etc.) | ||
* @param {number} orders[].quantity Quantity of the order | ||
* @param {number} orders[].price Price at which the order is going to be placed (LIMIT orders) | ||
* @param {number} orders[].trigger_price Trigger price (for SL, SL-M, CO orders) | ||
*/ | ||
self.orderMargins = function(params){ | ||
return _post("order.margins", params, ...Array(2), true); | ||
self.orderMargins = function(orders){ | ||
return _post("order.margins", orders, null, null, true); | ||
} | ||
@@ -1313,7 +1316,7 @@ | ||
if (isJSON) { | ||
// post JSON payload | ||
payload = JSON.stringify(params); | ||
// post JSON payload | ||
payload = JSON.stringify(params); | ||
} else { | ||
// post url encoded payload | ||
payload = querystring.stringify(params); | ||
// post url encoded payload | ||
payload = querystring.stringify(params); | ||
} | ||
@@ -1320,0 +1323,0 @@ } |
{ | ||
"name": "kiteconnect", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "The official JS client library for the Kite Connect trading APIs", | ||
@@ -5,0 +5,0 @@ "main": "./lib/", |
@@ -7,5 +7,5 @@ var KiteConnect = require('./lib').KiteConnect; | ||
// var apiSecret = 'qkfr1xg1gip2smdwafytppugvkhy8czj' | ||
var requestToken = 'Zgbq0bYXlDNuS4SvSw2gasq1gw7k6E6K' | ||
var refreshToken = 'IslYMBWQoNLieuGhKq0pT3kLZ2APxaMV' | ||
var accessToken = 'zjc3EMf1otyauz8QjkcJZ18nrIIFDaaZ' | ||
var requestToken = 'IrUgax150TF2fkHwg1qDwjjCxuun4xyl' | ||
var refreshToken = '' | ||
var accessToken = '' | ||
@@ -38,3 +38,4 @@ var k = new KiteConnect({ | ||
console.log('init') | ||
k.getGTTs().then(function (resp) { | ||
k.getLTP(['NSE:INFY']).then(function (resp) { | ||
console.log(resp) | ||
@@ -45,2 +46,8 @@ }).catch(function (error) { | ||
// k.getGTTs().then(function (resp) { | ||
// console.log(resp) | ||
// }).catch(function (error) { | ||
// console.log(error) | ||
// }) | ||
// k.getHoldings().then(function(resp) { | ||
@@ -113,2 +120,17 @@ // console.log(resp) | ||
// }) | ||
// k.orderMargins([{ | ||
// exchange: "NSE", | ||
// tradingsymbol: "ASHOKLEY", | ||
// transaction_type: "BUY", | ||
// variety: "regular", | ||
// product: "CNC", | ||
// order_type: "LIMIT", | ||
// quantity: 1, | ||
// price: 122.15 | ||
// }]).then(function (resp) { | ||
// console.log(resp) | ||
// }).catch(function (error) { | ||
// console.log(error) | ||
// }) | ||
} |
@@ -20,3 +20,3 @@ // var KiteConnect = require("./lib/"); | ||
api_key: "botul8yeg1hqkeei", | ||
access_token: "zjc3EMf1otyauz8QjkcJZ18nrIIFDaaZ" | ||
access_token: "oFofmJ5BGbG6z89oaZZLCwBXYB4B1Sqe" | ||
}); | ||
@@ -23,0 +23,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
462303
28372