alex314159 / ib-re-actor-976-plus Goto Github PK
View Code? Open in Web Editor NEWA clojure friendly wrapper for the Interactive Brokers java API.
A clojure friendly wrapper for the Interactive Brokers java API.
The gateway and synchronous functions seem to only pass nil messages to the handler functions (though the default println
handler does print the actual reply message to stdout, so connectivity is working.)
None of the examples seem to use them. Are they deprecated?
For example:
(defonce connection (gateway/connect 2 "localhost" default-paper-port println))
(class (ib-re-actor-976-plus.synchronous/server-time connection))
;; => nil
;; though println does render the time message to stdout
(def print-handlers
{:data #(println "Received:" %)
:end #(println "End of the request.")
:error #(println "Error: " %)})
(gateway/request-current-time connection print-handlers)
;; =>
;; Received: nil
;; End of the request.
;;
;; println does print the full reply message to stdout
Tried with both versions available currently, they fail for different reasons.
9.81:
Syntax error compiling at (ib_re_actor_976_plus/translation.clj:110:1).
Unable to find static field: CRYPTO in class com.ib.client.Types$SecType
10.15:
Syntax error (IllegalArgumentException) compiling reify* at (ib_re_actor_976_plus/wrapper.clj:185:25).
Can't define method not in interfaces: error
(I've made sure to rename and add the EWrapper_10.15.02.java
file to resources of my local project, so that ewrapper-java-methods
doesn't fall back to older version)
Just a heads up that the method signature for tickOptionComputation
in EWrapper
changes in the newer 9.79 beta of twsapi, breaking ib-re-actor with that version
I'm using 9.76 as a workaround for now; recording this in case anyone else runs across this issue.
Updating EWrapper.java
in the ib-re-actor source with the new one from 9.79 might fix it.
Trying to load wrapper.clj
with 9.79 yields:
2. Unhandled clojure.lang.Compiler$CompilerException
Error compiling /Users/pjlegato/.m2/repository/ib-re-actor-976-plus/ib-re-actor-976-plus/0.1.1-SNAPSHOT/ib-re-actor-976-plus-0.1.1-SNAPSHOT.jar:ib_re_actor_976_plus/wrapper.clj at (168:25)
#:clojure.error{:phase :compile-syntax-check,
:line 168,
:column 25,
:source
"/Users/pjlegato/.m2/repository/ib-re-actor-976-plus/ib-re-actor-976-plus/0.1.1-SNAPSHOT/ib-re-actor-976-plus-0.1.1-SNAPSHOT.jar:ib_re_actor_976_plus/wrapper.clj",
:symbol reify*}
[...]
1. Caused by java.lang.IllegalArgumentException
Can't define method not in interfaces: tickOptionComputation
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.