Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
XChange is a Java library providing a streamlined API for interacting with 30+ Bitcoin and Altcoin exchanges providing a consistent interface for trading and accessing market data.
Java
Failed to load latest commit information.
etc removed unecessary files [ci skip]
xchange-anx Use net.iharder.Base64 instead of si.mazi.rescu.utils.Base64.
xchange-atlasats misc. cleanup, went through some TODOs, removed unecessary "throws" d…
xchange-bitbay [maven-release-plugin] prepare for next development iteration
xchange-bitcoinaverage [maven-release-plugin] prepare for next development iteration
xchange-bitcoincharts [maven-release-plugin] prepare for next development iteration
xchange-bitcoinde Changed BitcoindeTickerIntegration test to BitcoindeOrderBookIntegrat…
xchange-bitcoinium [maven-release-plugin] prepare for next development iteration
xchange-bitcointoyou Use the base64 dependency via Maven instead of bundling it. Makes it …
xchange-bitcurex Use the base64 dependency via Maven instead of bundling it. Makes it …
xchange-bitfinex Use net.iharder.Base64 instead of si.mazi.rescu.utils.Base64.
xchange-bitkonan [bitkonan] accept LTC in getTicker and getOrderBook, remove local dat…
xchange-bitmarket Add getting history operations to obtain commission for history trades
xchange-bitso Fixed lazy copy and pasting naming errors in BitsoAdapters
xchange-bitstamp Reuse rescu's deserializers. Remove duplicate classes.
xchange-bittrex Add available, frozen fields to Wallet.
xchange-bleutrade Add available, frozen fields to Wallet.
xchange-blockchain [maven-release-plugin] prepare for next development iteration
xchange-btc38 Btc38 exchange (public market data only)
xchange-btccentral [maven-release-plugin] prepare for next development iteration
xchange-btcchina Add available, frozen fields to Wallet.
xchange-btce Initial basic test of retrieving transaction history.
xchange-btctrade Add available, frozen fields to Wallet.
xchange-bter Add available, frozen fields to Wallet.
xchange-campbx Reuse rescu's deserializers. Remove duplicate classes.
xchange-cavirtex [maven-release-plugin] prepare for next development iteration
xchange-cexio Add available, frozen fields to Wallet.
xchange-clevercoin Update cancel limited order endpoint
xchange-coinbase GET methods don't consume anything (no request body).
xchange-coinbaseex Merge pull request #989 from radumiron/develop
xchange-coinfloor [maven-release-plugin] prepare for next development iteration
xchange-coinmate [core,kraken,coinmate] removed additional data map from Trade, replac…
xchange-coinsetter CoinsetterSocketIOService does not return OrderBooks or Trades that a…
xchange-cointrader Add locale to SimpleDateFormat in Cointrader test
xchange-core [core,ripple] Introduced inheritance to Order.Builder classes, fixed …
xchange-cryptonit [maven-release-plugin] prepare for next development iteration
xchange-cryptotrade [maven-release-plugin] prepare for next development iteration
xchange-cryptsy [Cryptsy] Public market data service fix
xchange-empoex Use net.iharder.Base64 instead of si.mazi.rescu.utils.Base64.
xchange-examples [bitkonan] accept LTC in getTicker and getOrderBook, remove local dat…
xchange-hitbtc Add available, frozen fields to Wallet.
xchange-huobi Adjusted demo including futures, renamed method
xchange-independentreserve adding correct timestamp for trades
xchange-itbit Use net.iharder.Base64 instead of si.mazi.rescu.utils.Base64.
xchange-jubi Adding Jubi exchange (public market data only)
xchange-kraken [core,kraken,coinmate] removed additional data map from Trade, replac…
xchange-lakebtc Fix LakeBTC URI and service path
xchange-loyalbit Use the base64 dependency via Maven instead of bundling it. Makes it …
xchange-mercadobitcoin [maven-release-plugin] prepare for next development iteration
xchange-mexbt Merge pull request #1010 from sutra/feature/mexbt-withdrawAmount
xchange-okcoin fixes #976
xchange-openexchangerates fix for issue #598 - OER NullPointerException
xchange-poloniex [maven-release-plugin] prepare for next development iteration
xchange-quoine Merge pull request #960 from jheusser/quoine_margin
xchange-ripple [core,ripple] Introduced inheritance to Order.Builder classes, fixed …
xchange-taurus Reuse rescu's deserializers. Remove duplicate classes.
xchange-vircurex [maven-release-plugin] prepare for next development iteration
xchange-yacuna Yacuna submit
.gitignore fixes
.travis.yml Set travis to test with different system locales
AUTHORS update LICENSE and AUTHORS [ci skip]
LICENSE update LICENSE and AUTHORS [ci skip]
README.md fix unit tests not running by deafult
pom.xml [MeXBT] Implement RESTful API & WebSocket API of MeXBT.

README.md

XChange XChange

XChange is a Java library providing a simple and consistent API for interacting with 30+ Bitcoin 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 Xeiam'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 financial security 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://xeiam.com/xchange
Example Code: http://xeiam.com/xchange-example-code
Change Log: http://xeiam.com/xchange-change-log
Java Docs: http://xeiam.com/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.0.0</version>
</dependency>
<dependency>
  <groupId>com.xeiam.xchange</groupId>
  <artifactId>xchange-examples</artifactId>
  <version>3.0.0</version>
</dependency>
<dependency>
  <groupId>com.xeiam.xchange</groupId>
  <artifactId>xchange-XYZ</artifactId>
  <version>3.0.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:

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

1MHMpzFxx4fRSaeYGSxhyEcgux7j4Gqwsc

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 Xeiam's bounties page.

Something went wrong with that request. Please try again.