al6x / ib_api

Interactive Brokers API in TypeScript / Kotlin / Java / Nim
48 stars 10 forks source link

Error: Class 'IBWrapper' is not abstract and does not implement abstract member public abstract fun error(id: Int, errorCode: Int, errorMsg: String!, advancedOrderRejectJson: String!): Unit defined in com.ib.client.EWrapper #2

Closed mvalley21 closed 1 year ago

mvalley21 commented 1 year ago

Hi, I was trying out your API and received the following error. Any thoughts?

(python310) myhomedir@mymachine:~/ib_api$ bin/crun WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt: (21, 1) Class 'IBWrapper' is not abstract and does not implement abstract member public abstract fun error(id: Int, errorCode: Int, errorMsg: String!, advancedOrderRejectJson: String!): Unit defined in com.ib.client.EWrapper [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt: (113, 3) 'error' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt: (155, 3) 'tickSize' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt: (193, 3) 'tickOptionComputation' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt: (209, 3) 'orderStatus' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt: (229, 3) 'updatePortfolio' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt: (264, 3) 'updateMktDepth' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt: (270, 3) 'updateMktDepthL2' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt: (304, 3) 'realtimeBar' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt: (332, 3) 'position' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt: (388, 3) 'positionMulti' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt: (528, 3) 'pnlSingle' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt: (546, 3) 'tickByTickAllLast' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt: (553, 3) 'tickByTickBidAsk' overrides nothing [ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.3.72:compile (compile) on project ib_api: Compilation failure: Compilation failure: [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt:[21,1] Class 'IBWrapper' is not abstract and does not implement abstract member public abstract fun error(id: Int, errorCode: Int, errorMsg: String!, advancedOrderRejectJson: String!): Unit defined in com.ib.client.EWrapper [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt:[113,3] 'error' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt:[155,3] 'tickSize' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt:[193,3] 'tickOptionComputation' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt:[209,3] 'orderStatus' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt:[229,3] 'updatePortfolio' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt:[264,3] 'updateMktDepth' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt:[270,3] 'updateMktDepthL2' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt:[304,3] 'realtimeBar' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt:[332,3] 'position' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt:[388,3] 'positionMulti' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt:[528,3] 'pnlSingle' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt:[546,3] 'tickByTickAllLast' overrides nothing [ERROR] /home/myhomedir/ib_api/src/ib/lib/ib_wrapper.kt:[553,3] 'tickByTickBidAsk' overrides nothing [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

jbaron commented 1 year ago

I think this is related to having a different version of the IBKR client jar file than what is expected. Since this lib is few years old, I assume it is not yet IBKR 10.19 (latest stable version) compatible.

BTW if you are interested in Java/Kotlin and algo trading, checkout roboquant.org with among others support for IBKR (disclosure: I'm one of the main developers).

mvalley21 commented 1 year ago

Yes, I believe it's the version you are using vs the version on the website. BTW, other repos distribute the API like : https://github.com/softwarespartan/IB4m.

Which TWS API version are you using? I can see if i can locate it.

mvalley21 commented 1 year ago

Hi, I got it launch using the 9.76 API located here: https://web.archive.org/web/20220317061206/https://interactivebrokers.github.io/downloads/twsapi_macunix.976.01.zip

You may want to link to it in the main page for others.