Petersoj / alpaca-java

A Java API for Alpaca, the commission free, algo friendly, stock trading broker. https://alpaca.markets
https://petersoj.github.io/alpaca-java/
MIT License
203 stars 83 forks source link

Type enums cant access in code #155

Open shaikrehman07 opened 4 months ago

shaikrehman07 commented 4 months ago

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

Petersoj commented 4 months ago

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.

shaikrehman07 commented 4 months ago

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

Petersoj commented 4 months ago

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.

shaikrehman07 commented 4 months ago

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">

Petersoj commented 4 months ago

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?

shaikrehman07 commented 4 months ago

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

code
Petersoj commented 4 months ago

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 commented 3 months ago

Is this still an issue for you?

cucuso commented 2 months ago

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

shaikrehman07 commented 1 month ago

changing to version 10.0.0 helped me. Thanks.