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
197 stars 82 forks source link

Undefined classes #51

Closed laviRZ closed 4 years ago

laviRZ commented 4 years ago

Classes: AlpacaStreamMessage TradeUpdateMessage AccountUpdateMessage AlpacaStreamMessage

are not defined...

mainstringargs commented 4 years ago

Where are you seeing that? On maven central or from 'releases' here? I may have uploaded a bad compile.

mainstringargs commented 4 years ago

Or actually -- what version of the API are you using? Things have moved around in the past couple of months

mainstringargs commented 4 years ago

For the classes you reference, they are in the 5.0.8 javadoc -- please verify things on your end, and if they still look wrong, I'll try to figure out what is going on:

https://javadoc.io/static/io.github.mainstringargs/alpaca-java/5.0.8/io/github/mainstringargs/domain/alpaca/websocket/AlpacaStreamMessage.html https://javadoc.io/static/io.github.mainstringargs/alpaca-java/5.0.8/io/github/mainstringargs/domain/alpaca/websocket/trade/TradeUpdateMessage.html https://javadoc.io/static/io.github.mainstringargs/alpaca-java/5.0.8/io/github/mainstringargs/domain/alpaca/websocket/account/AccountUpdateMessage.html https://javadoc.io/static/io.github.mainstringargs/alpaca-java/5.0.8/io/github/mainstringargs/domain/alpaca/websocket/AlpacaStreamMessage.html

laviRZ commented 4 years ago

io.github.mainstringargs.domain appears to be missing

mainstringargs commented 4 years ago

Are you building this yourself or using jars? If you're building it yourself, you have to do a "./gradlew build" command to generate those classes. They will appear in build/generated-sources/schemajson

laviRZ commented 4 years ago

I downloaded it from github, and opened using IntelliJ.

mainstringargs commented 4 years ago

Ok -- i haven't been using intellij, so it may take some tweaking to get it intellij friendly -- for eclipse, there is an eclipse target that generates the eclipse config. I know for certain though, you will need to do a "gradlew build" to generate the json related classes, and add them to your intellij classpath.

laviRZ commented 4 years ago

Okay, it is working now, but I don't understand why the domain classes aren't in the github

mainstringargs commented 4 years ago

They are generated based on the json schemas that can be seen here:

https://github.com/mainstringargs/alpaca-java/tree/master/schema_json

We have elected not to check them in themselves, as the json itself is the canonical record of the datatypes.

On Tue, Mar 17, 2020 at 9:55 AM laviRZ notifications@github.com wrote:

Okay, it is working now, but I don't understand why the domain classes aren't in the github

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/mainstringargs/alpaca-java/issues/51#issuecomment-600115749, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVXM4QQTAEPHFH3NGUU7VLRH6FNDANCNFSM4LNOXEJA .