Code Monkey home page Code Monkey logo

jsvortex's People

Contributors

brisingr123 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

rahulmr

jsvortex's Issues

CORS-Error

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

image
image

Websocket Data Not Updating

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
image

Thanks
Shubham Yadav

Pnl Calculation Issue

@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) }

`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.