Giter Site home page Giter Site logo

Comments (2)

sevakram avatar sevakram commented on August 16, 2024

Hi
I did not get a time to run it when market was live, but you can try this-

test_script.py

from jugaad_data import nse
from datetime import datetime
import time
DELAY = 60

n = nse.NSELive()

print("LastPriceTime\tLocalTime\tCE\tStrike\tPE")
while True:
    option_chain = n.index_option_chain("NIFTY")
    for option in option_chain['filtered']['data']:
        print("{}\t{}\t{}\t{}\t{}".format(option_chain['records']['timestamp'], datetime.now(), option['CE']['lastPrice'], option['strikePrice'], option['PE']['lastPrice']))
    time.sleep(DELAY)

run it as below when market is running

python test_script.py > liveprice.txt

  • Observe the columns LastPriceTime and LocalTime. This will give you an idea about to what extent the quotes are delayed.
  • Reduce DELAY value and observe how low can you go. Basically if you ping within very short time, you might get the same price and timestamp if the update time is slow.

from jugaad-data.

sevakram avatar sevakram commented on August 16, 2024

Closing as its not a library related issue.

from jugaad-data.

Related Issues (20)

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.