asthatech / jsvortex Goto Github PK
View Code? Open in Web Editor NEWNodeJS SDK to trade with AsthaTrade
Home Page: https://asthatrade.com/vortex
NodeJS SDK to trade with AsthaTrade
Home Page: https://asthatrade.com/vortex
Hi @brisingr123 ๐
facing the same cors-error for order book also
Hi Astha Team @brisingr123 ๐
I was getting cors error in one of the endpoint which the quote endpoint
i have also attached the screenshot of error and the code that i used for more details
Hi @brisingr123 when I connected WebSocket I was getting incorrect data and the WebSocket was also not sending the updated price
after some time interval, I have attached the screenshot below of the code that I used and the output that I was getting please take a look at the last_traded_time and the Windows time also
Thanks
Shubham Yadav
@brisingr123 To Calculate the Pnl I Used the method that was shown in the documentation but this method gave incorrect results
`
let positionData = {"exchange":"MCX_FO","symbol":"CRUDEOIL","expiry_date":"2023-08-17","option_type":"CE","token":257369,"product":"INTRADAY","quantity":1,"overnight_buy_value":0,"overnight_sell_value":0,"overnight_average_price":0,"lot_size":100,"multiplier":100,"average_price":17,"value":-1700,"buy_value":3430,"sell_value":1730,"buy_quantity":2,"sell_quantity":1,"buy_price":17.15,"sell_price":17.3}
let ptype = "Long"
let ltp = 19
if (ptype == "Long") {
// when buy position is open
// Gain = (last_trade_price * quantity * lot_size * multiplier +overnight_sell_value ) - overnight_buy_value
let cpnl = (ltp * positionData.quantity * positionData.lot_size * positionData.multiplier + positionData.overnight_sell_value) - positionData.overnight_buy_value
console.log("cpnl for long position", cpnl) }
`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.