Comments (5)
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.
Thanks for the feedback.
from jib.jl.
THANK YOU, I appreciate the pointers and the example.
from jib.jl.
This example is valuable and informative. I suggest if you could put it on the library home page.
from jib.jl.
@lbilli Thanks for your time and effort!
from jib.jl.
Related Issues (16)
- Drop support of legacy versions
- Primary Exchange Error - Unsupported Keyword HOT 2
- Unable to parse data. java.lang.NumberFormatException: For input string HOT 3
- Decimal vs floating point data type for sizes
- julia noob needs a little help with Jib asynch HOT 2
- Jib.reqMktData throws e = TypeError: in typeassert, expected Float64, got a value of type Nothing
- Error message "UndefVarError: Execution not defined" HOT 3
- Drop attempt to infer server time zone
- LoadError: [ Info: reader exiting IOError: stream is closed or unusable HOT 1
- just started getting this IOError: write: broken pipe (EPIPE) HOT 6
- Unable to connect thru IB Gateway ERROR: EOFError: read end of file HOT 2
- past and future stock options prices ? HOT 1
- "Central Standard Time" should also reference "America/Chicago" HOT 1
- Compatibility with Julia version / enhancements HOT 6
- check_all() blocks on Windows HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jib.jl.