Giter Site home page Giter Site logo

historicalData about jib.jl HOT 5 CLOSED

lbilli avatar lbilli commented on June 3, 2024 1
historicalData

from jib.jl.

Comments (5)

lbilli avatar lbilli commented on June 3, 2024 4

Here's a quick example to retrieve EUR historical 5min bars:

using Jib
ib = Jib.connect(4002, 1);    # Connect on port 4002
d, w = Jib.simple_wrap();
Jib.start_reader(ib, w);

# Define contract
eur = Jib.Contract(symbol="EUR", secType="CASH", exchange="IDEALPRO", currency="USD");

# Send request
Jib.reqHistoricalData(ib, 1234, eur, "20200603 16:00:00 EDT", "2 D", "5 mins", "MIDPOINT", true, 1, false)

# Display result
d[:history]

Refer to IB API documentation for more details and the meaning of the arguments.

The function historicalData() is a member of Wrapper and is provided by the user. It is implicitly invoked when data are received. The one used in this example is defined here.

Note. In this case there's a slight deviation from the official IB API implementations: IB calls historicalData() multiple times, row by row (Bar), whereas Jib calls it only once for the whole table (DataFrame).

from jib.jl.

lbilli avatar lbilli commented on June 3, 2024 1

Thanks for the feedback.

from jib.jl.

ihiasi avatar ihiasi commented on June 3, 2024

THANK YOU, I appreciate the pointers and the example.

from jib.jl.

Sinansi avatar Sinansi commented on June 3, 2024

This example is valuable and informative. I suggest if you could put it on the library home page.

from jib.jl.

Sinansi avatar Sinansi commented on June 3, 2024

@lbilli Thanks for your time and effort!

from jib.jl.

Related Issues (16)

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.