Skip to content
XChange is a Java library providing a streamlined API for interacting with 50+ Bitcoin and Altcoin exchanges providing a consistent interface for trading and accessing market data.
Java
Latest commit 7d10a5e @timmolter Merge pull request #1182 from Achterhoeker/patch-30
Update anxpro.json with minimal order amount for xrp/btc
Failed to load latest commit information.
etc removed unecessary files [ci skip]
xchange-anx Update anxpro.json
xchange-atlasats Revert small incorrect change
xchange-bitbay revert last changes
xchange-bitcoinaverage [core] [refactor] Make Currency into a class
xchange-bitcoincharts [core] [refactor] Make Currency into a class
xchange-bitcoinde [maven-release-plugin] prepare for next development iteration
xchange-bitcoinium [core] [refactor] Make Currency into a class
xchange-bitcurex [refactor] moved Balance into account package with Wallet
xchange-bitfinex fixes #1172
xchange-bitkonan [core] [refactor] Make Currency into a class
xchange-bitmarket fixes #1172
xchange-bitso fixes #1172
xchange-bitstamp fixes #1172
xchange-bittrex fixes #1172
xchange-bleutrade fixes #1172
xchange-blockchain [maven-release-plugin] prepare for next development iteration
xchange-btc38 [core] [refactor] Make Currency into a class
xchange-btccentral [btccentral] Accept expired certificate
xchange-btcchina fixes #1172
xchange-btce fixes #1172
xchange-btcmarkets fixes #1172
xchange-btctrade fixes #1172
xchange-bter fixes #1172
xchange-campbx fixes #1172
xchange-cavirtex [core] [refactor] Make Currency into a class
xchange-cexio fixes #1172
xchange-clevercoin fixes #1172
xchange-coinbase fixes #1172
xchange-coinbaseex fixes #1172
xchange-coinfloor [refactor] moved Balance into account package with Wallet
xchange-coinmate fixes #1172
xchange-coinsetter fixes #1172
xchange-cointrader fixes #1172
xchange-core fixes #1172
xchange-cryptofacilities fixes #1172
xchange-cryptonit [core] Merge certificate tools into CertHelper, add one for expired c…
xchange-cryptsy fixes #1172
xchange-empoex fixes #1172
xchange-examples Withdraw to Ripple for Bitstamp if address starts with 'r'
xchange-gatecoin fixes #1172
xchange-hitbtc fixes #1172
xchange-huobi fixes #1172
xchange-independentreserve fixes #1172
xchange-itbit fixes #1172
xchange-jubi [core] [refactor] Make Currency into a class
xchange-kraken fixes #1172
xchange-lakebtc fixes #1172
xchange-loyalbit fixes #1172
xchange-mercadobitcoin fixes #1172
xchange-mexbt fixes #1172
xchange-okcoin fixes #1172
xchange-openexchangerates [core] [refactor] Make Currency into a class
xchange-poloniex fixes #1172
xchange-quoine fixes #1172
xchange-ripple fixes #1172
xchange-taurus fixes #1172
xchange-therock fixes #1172
xchange-vircurex fixes #1172
xchange-yacuna imports cleanup on various exchanges
.gitignore fixes
.travis.yml run build on new travis container platform
CODE_COVERAGE.md Add unit tests for btcmarkets module
CONTRIBUTORS typo fix [ci skip]
LICENSE update license and contributors file
README.md formatting fix [ci skip]
pom.xml Add unit tests for bitmarket module

README.md

XChange XChange

XChange is a Java library providing a simple and consistent API for interacting with 50+ Bitcoin and other crypto currency exchanges providing a consistent interface for trading and accessing market data.

Important!

The world of Bitcoin changes quickly and XChange is no exception. The best way to stay updated on important announcements is to follow tweets on Knowm's Twitter page. For the latest bugfixes and features you should use the snapshot jars or build yourself from the DEVELOP branch. See below for more details about building with Maven. To report bugs and see what issues people are currently working on see the issues page. There are also most likely some open bounties to be had as well.

Description

XChange is a library providing a simple and consistent API for interacting with a diverse set of crypto currency exchanges, including support for Bitcoin.

A complete list of implemented exchanges, data providers and brokers can be found on our Exchange Support page.

Usage is very simple: Create an Exchange instance, get the appropriate service, and request data.

Example

Exchange bitstamp = ExchangeFactory.INSTANCE.createExchange(BitstampExchange.class.getName());

PollingMarketDataService marketDataService = bitstamp.getPollingMarketDataService();

Ticker ticker = marketDataService.getTicker(CurrencyPair.BTC_USD);

System.out.println(ticker.toString());

All exchange implementations expose the same API, but you can also directly access the underlying "raw" data from the individual exchanges if you need to.

Now go ahead and study some more examples, download the thing and provide feedback.

Features

  • MIT license
  • consistent API across all implemented exchanges
  • active development
  • very minimal 3rd party dependencies
  • modular components
  • polling and streaming capability

More Info

Project Site: http://knowm.org/open-source/xchange
Example Code: http://knowm.org/open-source/xchange/xchange-example-code
Change Log: http://knowm.org/open-source/xchange/xchange-change-log/
Java Docs: http://knowm.org/javadocs/xchange/index.html

Wiki

Home: https://github.com/timmolter/XChange/wiki
Design Notes: https://github.com/timmolter/XChange/wiki/Design-Notes
Milestones: https://github.com/timmolter/XChange/wiki/Milestones
Exchange Support: https://github.com/timmolter/XChange/wiki/Exchange-support
New Implementation Best Practices: https://github.com/timmolter/XChange/wiki/New-Implementation-Best-Practices Installing SSL Certificates into TrustStore: https://github.com/timmolter/XChange/wiki/Installing-SSL-Certificates-into-TrustStore Getting Started with XChange for Noobies: https://github.com/timmolter/XChange/wiki/Getting-Started-with-XChange-for-Noobies

Continuous Integration

Build Status
Build History

Getting Started

Non-Maven

Download XChange Release Jars: http://search.maven.org/#search%7Cga%7C1%7Cxeiam%20xchange

Download XChange Snapshot Jars: https://oss.sonatype.org/content/groups/public/com/xeiam/xchange/

Maven

The XChange release artifacts are hosted on Maven Central.

Add the following dependencies in your pom.xml file. You will need at least xchange-core. Add the additional dependencies for the exchange modules you are interested in (XYZ shown only for a placeholder). There is example code for all the modules in xchange-examples.

<dependency>
  <groupId>com.xeiam.xchange</groupId>
  <artifactId>xchange-core</artifactId>
  <version>3.1.0</version>
</dependency>
<dependency>
  <groupId>com.xeiam.xchange</groupId>
  <artifactId>xchange-examples</artifactId>
  <version>3.1.0</version>
</dependency>
<dependency>
  <groupId>com.xeiam.xchange</groupId>
  <artifactId>xchange-XYZ</artifactId>
  <version>3.1.0</version>
</dependency>

For snapshots, add the following repository to your pom.xml file.

<repository>
  <id>sonatype-oss-snapshot</id>
  <snapshots/>
  <url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>

The current snapshot version is:

4.0.0-SNAPSHOT

Building with Maven

run unit tests: mvn clean test
run unit and integration tests: mvn clean verify -DskipIntegrationTests=false
install in local Maven repo: mvn clean install
create project javadocs: mvn javadoc:aggregate
generate dependency tree: mvn dependency:tree

Bugs

Please report any bugs or submit feature requests to XChange's Github issue tracker.

Contributing

If you'd like to submit a new implementation for another exchange, please take a look at New Implementation Best Practices first, as there are lots of time-saving tips!

For more information such as a contributor list and a list of known projects depending on XChange, visit the Main Project Wiki.

Donations

Donate with Bitcoin: 1JVyTP9v9z54dALuhDTZDQfS6FUjcKjPgZ

All donations will be used to pay bounties for new features, refactoring, etc. Please consider donating or even posting your own bounties on our Issues Page. Open bounties and bounties paid thus far can be found on knowm's bounties page.

Something went wrong with that request. Please try again.