Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create wrapper for 1 or more standard crypto currency APIs #19

Open
msgilligan opened this issue Apr 2, 2015 · 4 comments
Open

Create wrapper for 1 or more standard crypto currency APIs #19

msgilligan opened this issue Apr 2, 2015 · 4 comments

Comments

@msgilligan
Copy link
Member

If it's possible to create a JavaMoney SPI-compatible wrapper for a standard crypto currency API like Xchange, JavaMoney could quickly support a large number of exchanges.

I have not studied the feasibility of this at all, but wanted to propose the idea as an issue so others could comment.

@keilw
Copy link
Member

keilw commented Apr 2, 2015

Sounds like a good idea. While Xchange is built against Java 6, especially the Backports (the API should in theory work as far back as Java 6, I think there was no "Diamond" usage either) should work fine.

@keilw
Copy link
Member

keilw commented Apr 2, 2015

Yes, the API-BP has 1.6 so only in the BP of the RI there are references to Java 7. Creating e.g. an independent Android port should therefore work. And in real life most likely a lot of apps use Java 7 anyway.

@msgilligan
Copy link
Member Author

I've implemented a basic version of this over in http://github.com/msgilligan/bitcoinj-addons.

BaseXChangeExchangeRateProvider.java does the heavy lifting: https://github.com/msgilligan/bitcoinj-addons/blob/master/bitcoinj-money/src/main/java/com/msgilligan/bitcoinj/money/BaseXChangeExchangeRateProvider.java

I started with wrapper classes for each exchange built on top of this, but I recently added DynamicXChangeRateProvider.java which can wrap any XChange provider specified by classname string: https://github.com/msgilligan/bitcoinj-addons/blob/master/bitcoinj-money/src/main/java/com/msgilligan/bitcoinj/money/DynamicXChangeRateProvider.java

@msgilligan
Copy link
Member Author

I've also very-softly-launched OmniPortfolio which uses this stuff. The UI and the site need more work before I'll even consider it soft-launched, but there is a public-facing text-only website now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants