
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@quantiply/xts-interactive-api
Advanced tools
The official JS client library for the Symphony Fintech Trading API's
Welcome to the XTS-Interactive-API SDK version 3, This repository is Official Node.js library for Symphony XTS-Interactive-API.
API Documentation for XTS-trading API can be found in the below link.
https://symphonyfintech.com/xts-trading-front-end-api/
The XTS Trading API provides developer, data-scientist, financial analyst and investor the functionality necessary to create automated trading strategies, as well as other trading related applications with support of XTS OEMS hosted by Financial Institutions to trade with Indian electronic exchanges.
With the use of the socket.io library, the API has streaming capability and will push data notifications in a JSON format. Your application can place orders and receive real-time trade notification.
There is also an examples folder available which illustrates how to create a connection to XTS OEMS hosted by Brokers to subscribe to real-time events. Please request for apikeys with Symphony Fintech developer support team to start integrating your application with XTS OEMS.
npm install xts-interactive-api
Access the interactive component of xts-interactive-api like below.
var XTSInteractive = require('xts-interactive-api').Interactive;
Creating the instance of xtsInteractive
xtsInteractive = new XTSInteractive('https://developers.symphonyfintech.in');
call the login API to generate the token
var loginRequest = {
secretKey: 'Abcd@123',
appKey: '5a75a3616cabe678',
source: 'WEBAPI',
};
let logIn = await xtsInteractive.logIn(loginRequest);
Once the token is generated and userID is retrieved you can call any api provided in the documentation. All API’s are easy to integrate and implemented with async-await mechanism. Below is the sample Code snippet which calls the balance API.
let balance = await xtsInteractive.getBalance();
console.log(balance);
This component provides functionality to access the socket related events. All real-time events can be registered via XTSInteractiveWS. After token is generated, you can access the socket component and instantiate the socket Instance and call the init method of the socket like below
var XTSInteractiveWS = require('xts-interactive-api').WS;
xtsInteractiveWS = new XTSInteractiveWS(
'https://developers.symphonyfintech.in'
);
var socketInitRequest = {
userID: 'XYZ',
token: 'ABCDJGJKHK', // Token Generated after successful LogIn
};
xtsInteractiveWS.init(socketInitRequest);
You can now register events to listen to the real time order and trade updates and will be receiving the json objects in the response.
var registerEvents = async function () {
//instantiating the listeners for all event related data
//"connect" event listener
xtsInteractiveWS.onConnect((connectData) => {
console.log(connectData);
});
//"joined" event listener
xtsInteractiveWS.onJoined((joinedData) => {
console.log(joinedData);
});
//"error" event listener
xtsInteractiveWS.onError((errorData) => {
console.log(errorData);
});
//"disconnect" event listener
xtsInteractiveWS.onDisconnect((disconnectData) => {
console.log(disconnectData);
});
//"order" event listener
xtsInteractiveWS.onOrder((orderData) => {
console.log(orderData);
});
//"trade" event listener
xtsInteractiveWS.onTrade((tradeData) => {
console.log(tradeData);
});
//"position" event listener
xtsInteractiveWS.onPosition((positionData) => {
console.log(positionData);
});
//"logout" event listener
xtsInteractiveWS.onLogout((logoutData) => {
console.log(logoutData);
});
};
Below is the brief information related to api’s provided by XTS-Interactive-API SDK.
Calls POST /order.
let response = await xtsInteractive.placeOrder({
exchangeSegment: 'NSECM',
exchangeInstrumentID: 22,
productType: 'NRML',
orderType: 'MARKET',
orderSide: 'BUY',
timeInForce: 'DAY',
disclosedQuantity: 0,
orderQuantity: 20,
limitPrice: 1500.0,
stopPrice: 1600.0,
orderUniqueIdentifier: '45485',
clientID: userID,
};);
Calls PUT /order.
let response = await xtsInteractive.modifyOrder({
appOrderID: 1200037025,
modifiedProductType: 'CO',
modifiedOrderType: 'MARKET',
modifiedOrderQuantity: 100,
modifiedDisclosedQuantity: 0,
modifiedLimitPrice: 300,
modifiedStopPrice: 300,
modifiedTimeInForce: 'DAY',
orderUniqueIdentifier: '454845',
clientID: userID,
});
Calls DELETE /order.
let response = await xtsInteractive.cancelOrder({
appOrderID: 1828071433,
orderUniqueIdentifier: 155151,
});
Calls POST /order/cover.
let response = await xtsInteractive.placeCoverOrder({
exchangeSegment: 'NSECM',
exchangeInstrumentID: 22,
orderSide: 'Buy',
orderQuantity: 2,
disclosedQuantity: 0,
limitPrice: 2054,
stopPrice: 2054,
orderType: 'MARKET',
orderUniqueIdentifier: '45485',
clientID: userID,
});
Calls PUT /order/cover.
let response = await xtsInteractive.exitCoverOrder({
appOrderID: '1400070884',
clientID: userID,
orderUniqueIdentifier: '454845',
});
calls GET /order
let response = await xtsInteractive.getOrderBook();
calls GET /order/trade
let response = await xtsInteractive.getTradeBook();
calls GET /portfolio/position
let response = await xtsInteractive.getPositions({
dayOrNet: 'NetWise',
clientID: userID,
});
Calls PUT /portfolio/position/convert
let response = await xtsInteractive.positionConversion({
exchangeSegment: 'NSECM',
exchangeInstrumentID: 1922,
oldProductType: 'MIS',
newProductType: 'CNC',
isDayWise: false,
targetQty: '1',
clientID: userID,
});
Calls GET /portfolio/holding
let response = await xtsInteractive.getHoldings();
Calls GET /users/balance
let response = await xtsInteractive.getBalance();
Calls GET /users/profile
let response = await xtsInteractive.getProfile();
We do have a market data component which will provide the streaming of our real-time streaming market data. For more info please check the following link.
FAQs
The official JS client library for the Symphony Fintech Trading API's
The npm package @quantiply/xts-interactive-api receives a total of 5 weekly downloads. As such, @quantiply/xts-interactive-api popularity was classified as not popular.
We found that @quantiply/xts-interactive-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.