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

Add exchanges #5

Open
remipaeta opened this issue Dec 5, 2017 · 35 comments
Open

Add exchanges #5

remipaeta opened this issue Dec 5, 2017 · 35 comments

Comments

@remipaeta
Copy link

Is it possible to add exchanges ? I can also pay you privately.

@remipaeta
Copy link
Author

I tried to add a third exchange but I have errors on Arbitrator.php

@kingchenx
Copy link

Its better u wait for the rework code :D
And yea, me too interested to add more exchanges

@cryptoeax
Copy link
Owner

Which exchanges are you interested in @RPCrypto?

@kingchenx
Copy link

Hitbtc, kraken, yobit, bitfinex and so... many mores :P

@cryptoeax
Copy link
Owner

Haha, well sure, but to be honest I didn't really intend to start maintaining this open source project, this sort of happened as a result of the original project getting blocked. :-)

I would be happy to do some work on it if there is a sensible way to fund the development but otherwise my contributions so far was more scratching my own itch... Adding support for exchanges is a lot of work.

@cryptoeax
Copy link
Owner

If people have any particular exchange they would like to see supported, please feel free to comment here. I'm working on some future improvements including support for some new exchanges.

@remipaeta
Copy link
Author

I would like Bleutrade, Cryptopia and Binance

@Scorpic1
Copy link

Scorpic1 commented Jan 4, 2018

Please add support Binance, Cryptopia and Yobit.
Thanks.

@ericfraselle
Copy link

Is it possible to add Bitfitnex, Bitlish, Kraken and GDAX?

@cryptoeax
Copy link
Owner

Why GDAX? It only supports a few markets so I don't believe supporting it would be that beneficial...

@ericfraselle
Copy link

You're right

@onesource
Copy link

I would like to see another exchange like Binance added so that I can remove Poloniex before they require the verification of legacy accounts, which requires a SSN.

@ericfraselle
Copy link

For me, I can't try the bot because it's no more possible to signup on bittrex for the moment. It's why I would like to add some other exchange.
To replace an exchange is it the poloniex.php and/or bittrex.php, the only file(s) to swap with another exchange API?

@cryptoeax
Copy link
Owner

For me, I can't try the bot because it's no more possible to signup on bittrex for the moment. It's why I would like to add some other exchange.

Yep, I'm very aware of this problem. :-/ Have you seen #54?

To replace an exchange is it the poloniex.php and/or bittrex.php, the only file(s) to swap with another exchange API?

Mostly yes. You also need to provide bot/xchange/map.ID and web/xchange/ID.ico as well. You can use the bleutrade branch as an example. I'd be happy to help answer questions etc. in case you're interested to contribute it back. :-)

@beannt
Copy link

beannt commented Jan 10, 2018

I love to have support for coinexchange.io and cryptopia, since there are many pairs with high spread.

@ElSaico
Copy link

ElSaico commented Jan 10, 2018

The Cryptopia API seems to be fairly straightforward - quite similar to Bittrex, despite not being a blatant ripoff very similar like Bleutrade.

https://www.cryptopia.co.nz/Forum/Thread/255 - Public API
https://www.cryptopia.co.nz/Forum/Thread/256 - Private API

Maybe I'll get my hands dirty on this; no promises though, since they are quite full these days.

@ElSaico
Copy link

ElSaico commented Jan 10, 2018

Sometimes I really wish the exchanges had sandbox APIs - there's even testing blockchains for BTC and BCH, so why not that?

@cryptoeax
Copy link
Owner

I love to have support for coinexchange.io and cryptopia, since there are many pairs with high spread.

@RPCrypto is already working on Cryptopia (sadly it is no longer possible to register there and I don't have an account there myself so won't even be able to verify the code myself). It would be nice if you would help with coinexchange.io! If you'd like to work on it, you can use exchange ID 8. If you need help feel free to ask questions either here or on gitter. Thank you!

@beannt
Copy link

beannt commented Jan 10, 2018

Sure, I will give a try on coinexchange.io. Since PHP is not my main programming language, it's might take some time, but I willing to contribute.

@cryptoeax
Copy link
Owner

The Cryptopia API seems to be fairly straightforward - quite similar to Bittrex, despite not being a blatant ripoff very similar like Bleutrade.

https://www.cryptopia.co.nz/Forum/Thread/255 - Public API
https://www.cryptopia.co.nz/Forum/Thread/256 - Private API

It would be nice to share code with the Bleutrade class as much as possible, the same way it shares code with Bittrex right now with the BittrexLikeExchange. You may for example be able to inherit from Bleutrade and customize methods like getID(), getName() and so on.

BTW a more like explanation behind exchanges ripping each other off is they buying the same exchange software and customizing it. :-) I doubt each exchange writes their own from scratch.

Sometimes I really wish the exchanges had sandbox APIs - there's even testing blockchains for BTC and BCH, so why not that?

In my experience they for the most part don't have working APIs even... Each one has various bugs that I have had to work around so far, so we are far from that ideal world. :-(

Longer term I think https://github.com/ccxt/ccxt would be a better solution. But longer longer term I have plans to redo the whole bot from scratch so I'm not sure how much time I'd spend on porting existing exchanges to use ccxt...

@cryptoeax
Copy link
Owner

Sure, I will give a try on coinexchange.io. Since PHP is not my main programming language, it's might take some time, but I willing to contributes.

Thank you, and no worries, PHP isn't my main language either, but it's quite easy to pick up and has great documentation on php.net

One question though. Is this all of the API support they have? http://coinexchangeio.github.io/slate/ I'm afraid this isn't nearly enough, they offer no wallet management or trading APIs...

@beannt
Copy link

beannt commented Jan 10, 2018

Just looked at it already. They haven't supported trading api yet. I think I will find another good exchange instead. Skipping coinexchange.io for now, until they release v2 api.

@cryptoeax
Copy link
Owner

Another option is (if you're up for it) to look at their website with your browser's devtools and poke into their JS code to see what it does. I have done this for Poloniex recently with some success but it obviously takes more time!

@beannt
Copy link

beannt commented Jan 10, 2018

That's not bad idea. The hardest thing to do with browser way is dealing with authentication/cookie/captcha/2FA things, might need some time to analyze the method they use , any suggestion? since you known how to work with poloniex before.

@beannt
Copy link

beannt commented Jan 10, 2018

I found another exchange instead, tradesatoshi, found some open source on github https://github.com/WorldBot/Trade-Satoshi-API, a good way to start :)

@cryptoeax
Copy link
Owner

That's not bad idea. The hardest thing to do with browser way is dealing with authentication/cookie/captcha/2FA things, might need some time to analyze the method they use , any suggestion? since you known how to work with poloniex before.

For Poloniex I was trying to construct real time orderbook data from their websocket API (the code isn't in this repo) and was just reading their code to see how it processes the incoming data since their API is undocumented. But the auth issue is a big one, typically exchanges either have an API that uses some kind of HMAC based authentication where you digitally sign each request with your API key (see any of our exchange implementations for examples) or they use a cookie that the exchange sign-in system sets when you use the browser to sign in, and APIs that are hidden behind the latter form of authentication aren't useful for automation through bots very easily.

That being said, these days you can run Firefox and Chrome in headless mode, and there are libraries like https://github.com/GoogleChrome/puppeteer that allow you to automate the browser, so one could potentially look into adding the functionality to log in using puppeteer to the exchange and lift the cookie and give it to the bot, but that would require the account to not have 2FA enabled which is quite insecure. I'm not inclined to accept such changes for security reasons... :)

@cryptoeax
Copy link
Owner

I found another exchange instead, tradesatoshi, found some open source on github https://github.com/WorldBot/Trade-Satoshi-API, a good way to start :)

OK cool. It's sad that exchange also doesn't have registrations open any more!

@cryptoeax
Copy link
Owner

A couple of recent Exchange API changes were pushed today (b72135e and 04b1fd5). This is of interest to those who are implementing new exchanges. You are welcome to ignore the newly added arguments like the existing exchanges do.

@beannt
Copy link

beannt commented Jan 11, 2018

That's unlucky, many exchanges closed registration recently. I think I will try binance or kucoin since they have just opened limited registration each day.

@Intel1146
Copy link

hitbtc would be awesome, thanks

@thosuperman
Copy link

I think binance would be a good choice, https://github.com/binance-exchange/binance-official-api-docs

@cryptoeax
Copy link
Owner

cryptoeax commented Jan 11, 2018

I think binance would be a good choice, https://github.com/binance-exchange/binance-official-api-docs

I'm working on an implementation of Binance on top of ccxt. :-)

@beannt
Copy link

beannt commented Jan 11, 2018

Nice, many supported exchanges with ccxt. It's seem the right way to do. Some info: Cryptopia have just opened for registration :-)

@cryptoeax
Copy link
Owner

Yes, I think at this point it's better to wait for my CCXTAdapter class and use it for further exchanges, it makes adding new exchanges much simpler!

@cryptoeax
Copy link
Owner

I posted the binance branch here: #109 (comment) Those who want to use the CCXTAdapter class can start doing so now!

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

No branches or pull requests

10 participants