Skip to content

alpacahq/alpaca-java

Repository files navigation

alpaca-java

Build Maven Central Java 17+ License

Java client for Alpaca Markets APIs.

REST clients are generated at build time from Alpaca OpenAPI specs. WebSocket stream clients and Broker Events SSE helpers are handwritten and committed in src/main/java/markets/alpaca/client/.

Documentation

Build from source

Java 17+ is required. OpenAPI specs are fetched by default, so a normal build does not need local spec files. Generated REST sources are written to build/generated/.

./gradlew build                  # generate, compile, and test
./gradlew generateApis           # generate clients for IDE setup
./gradlew check                  # full local verification
./gradlew integrationTest        # live tests; skips when credentials are absent

For the complete task list and local spec configuration, see AGENTS.md. For integration-test credentials see TESTING.md, and for release procedures see RELEASING.md.

Snapshots

Every successful current push to main publishes the current -SNAPSHOT version to Central Snapshots. Scope the snapshot repository to this module:

repositories {
    mavenCentral()
    maven {
        url = uri("https://central.sonatype.com/repository/maven-snapshots/")
        mavenContent { snapshotsOnly() }
        content { includeModule("markets.alpaca", "alpaca-java") }
    }
}

dependencies {
    implementation("markets.alpaca:alpaca-java:0.1.2-SNAPSHOT")
}

For release consumption, use Maven Central as shown in the Getting Started guide.

Contributing

Read the contributing guide for the pull-request workflow. Before changing the SDK, also read AGENTS.md for generated-code boundaries, local OpenAPI spec configuration, testing, and publishing safeguards.

About

The Official Java SDK for Alpaca API

Resources

License

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors