alpaca-java icon indicating copy to clipboard operation
alpaca-java copied to clipboard

Type enums cant access in code

Open shaikrehman07 opened this issue 1 year ago • 10 comments

TraderAPIEndpointType, MarketDataWebsocketSourceType, BrokerAPIEndpointType these are not found when using SDK.

shaikrehman07 avatar Jul 19 '24 02:07 shaikrehman07

They are available in the net.jacobpeterson.alpaca.model.util.apitype package (Javadoc). Make sure you're using the Maven artifact dependency. Many classes get generated at build time.

Petersoj avatar Jul 19 '24 05:07 Petersoj

only the above mentioned classes are not generated when using maven dependency for build.

shaikrehman07 avatar Jul 19 '24 21:07 shaikrehman07

Can you share your build.gradle or pom.xml or some code snippets showing the imported packages? I'm unable to reproduce your issue using version 10.0.1.

Petersoj avatar Jul 19 '24 21:07 Petersoj

Sure. Please find pom.xml file and screenshot of code. <img width="901" alt="code" src="https://github.com/user-attachments/assets/632ae010-5af5-4c38-b5d3-4bbc7577d pom be7">

shaikrehman07 avatar Jul 19 '24 22:07 shaikrehman07

Your pom.xml appears to look fine. Can you share the build stacktrace/error and the code snippet where you are getting a compilation error?

Petersoj avatar Jul 19 '24 22:07 Petersoj

Attached the code as you can see import for AlpacaAPI is fine but other 2 classes are given compile error. code

shaikrehman07 avatar Jul 19 '24 22:07 shaikrehman07

Run mvn build and paste the output. Can't see what the compilation errors are in the screenshot. Could also be IntelliJ's cache. Invalidate the cache by going to File > Invalidate Caches... > Invalidate & Restart.

Petersoj avatar Jul 20 '24 16:07 Petersoj

Is this still an issue for you?

Petersoj avatar Aug 03 '24 17:08 Petersoj

change version to 10.0.0 I am getting the same error wit 10.0.1

cucuso avatar Sep 05 '24 21:09 cucuso

changing to version 10.0.0 helped me. Thanks.

shaikrehman07 avatar Oct 23 '24 04:10 shaikrehman07