knowm / XChange

XChange is a Java library providing a streamlined API for interacting with 60+ Bitcoin and Altcoin exchanges providing a consistent interface for trading and accessing market data.
http://knowm.org/open-source/xchange/
MIT License
3.87k stars 1.94k forks source link

Implementing Cryptocompare #2424

Open IanWorthington opened 6 years ago

IanWorthington commented 6 years ago

I have some code ready and tested that implements the getting of hourly history for any supported exchange from the Cryptocompare service.

I've never worked with a multi-project setup like xchange before though. If someone could walk me through the process to correctly create an xchange-cryptocompare sub-project in my fork I'll submit a PR for it.

timmolter commented 6 years ago

https://github.com/timmolter/XChange/wiki/New-Implementation-Best-Practices

IanWorthington commented 6 years ago

I'm aware of that Tim. It doesn't, as far as I can see, address my lack of knowledge about maven master & sub projects.

(Nor, by the way, about how to install eclipse formatters, which you require)

timmolter commented 6 years ago

We don't require it, but if you use IntelliJ or Eclipse it's nice if you do.

Did you read this: https://github.com/timmolter/XChange/wiki/Getting-Started-with-XChange-for-Noobies

IanWorthington commented 6 years ago

@timmolter

Hi Tim.

Aye, I read that but it doesn't address my lack of knowledge about how to integrate my code into yours.

As I've implemented all I need to for myself at the moment and wish to move on I've uploaded it to https://github.com/IanWorthington/xchange-cryptocompare. Anyone who knows how and wishes may finish off the integration.

(NB. Unwittingly, I coded with lombok annotations. The files will have to be delomboked before adding to your repository if you choose not to relax your rules on that.)

Let me know if you choose not to and I'll put up a separate maven module for it.

jnorthrup commented 6 years ago

maintained here https://github.com/jnorthrup/XChange/commit/a6203c32a7847cd6ef6710854ad7aaff3bc01202 among the scarlet letter modules i keep

image

jnorthrup commented 6 years ago

@IanWorthington i had a good run with https://github.com/0xCopy/RelaxFactory/blob/master/pom.xml#L256 which uses the eclipse formatter files to define maven-time reformatting where one developer refused to remove tab spaces and curl brace preferences, etc.. there was no energy spent on the debate (often called bikeshedding) best

IanWorthington commented 6 years ago

@jnorthrup Many thanks Jim.

IanWorthington commented 6 years ago

@jnorthrup

Jim --Have updated my repository with Add support for obtaining lists of exchanges and coins.

Feel free to copy.

IanWorthington commented 6 years ago

Are there any negative consequences to putting Hibernate annotations in the xchange data classes directly?

timmolter commented 6 years ago

@IanWorthington Please don't do that. It would require adding the hibernate dependency and if we allowed it for Hibernate, people will want to also add more and more dependencies, annotations, methods, etc. The scope of XChange is to be an interface to the exchanges, no more, no less.

npomfret commented 6 years ago

Please don't do that! You can probably extend them with your own classes and annotate those?

makarid commented 6 years ago

Please don't make the code more complicated.Thanks

jnorthrup commented 6 years ago

Hi Ian, see XChange-stream or my XChange fork git@github.com:jnorthrup/XChange for different options. many of the exchanges can be reconstituted from the annotations using swagger extraction, and swagger can reproduce API proxies using rxjava so that everything is basically a streaming api -- all you would need to do is fix the jaxrs annotations for the ones you care about and bring over the existing auth code to the different proxy interfaces for the same apis and pojos.

in my repo you may be able to find the bin/boostrap script helps you restructure the project -- i just ask that you make pr's if you want me to carry over new additions to cryptocompare

On Thu, Apr 12, 2018 at 4:03 PM makarid notifications@github.com wrote:

Please don't make the code more complicated.Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/knowm/XChange/issues/2424#issuecomment-380731409, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEfKszg2UsyNwxAADwA0-1efB1P7X-3ks5tnxhmgaJpZM4SvQqz .

IanWorthington commented 6 years ago

Well, that's a resounding no then. One does though like clearly stated direction.

@npomfret That's plan B.

@jnorthrup I'll take a look thanks,

jnorthrup commented 6 years ago

@IanWorthington lombok got the green light. resubmit.

IanWorthington commented 6 years ago

Aye Jim, I saw that. I have to figure out how to sort out the maven config before I can do that.