ctubio / tribeca

Self-hosted crypto trading bot (automated high frequency market making) in node.js, angular, typescript and c++
https://127.0.0.1:3000
Other
95 stars 26 forks source link

Implement Korbit Gateway and KRW Currency #110

Closed beegmon closed 7 years ago

beegmon commented 7 years ago

Would it be possible to add Korbit as a supported exchange and KRW as a supported currency for BTC and ETH pairs?

https://apidocs.korbit.co.kr/

It is HTTP REST api only, no websocket/FIX is supported. Post-only is also not an option in terms of limit order behavior.

I understand this is something that few if anyone outside of myself would use currently.

I also understand that I may be the only one able to test such an integration as getting an account on Korbit isn't something you can really do without basically living in Korea. This means that I might be the only one who can test such an integration. So it may not be worth the time to implement.

However, I trade Korbit right now and it is ripe for the type automation that Tribeca provides and I need something faster/more mature than my current shell implementation of a market making bot.

Could this be implemented if the bounty/tip provided is sizable enough to make it worth the time and support for such a gateway?

I thought about implementing this myself and posting a PR for it but I am not familiar enough with the code to understand how to integrate it. I would like it integrated into Tribeca so I don't have to track the Korbit gateway in a separate branch on my end.

ctubio commented 7 years ago

sure i can try it. can you send on IRC the TEST api keys/api secret or any other TEST API credentials from https://www.korbit-test.com/settings/api ? i see at https://apidocs.korbit.co.kr/#test-environment that maaaybe is possible?

would be great if you can open an acocunt and just send me the TEST api credentials on IRC, so i dont open any account; otherwise im not sure how we can do it (another option is to use your production account but with little little funds on it)

don't worry for the tip if we can use test coins/your account, then is not initialy needed, once finnished if you really enjoy it you can always come back and tip for the fun :dancer:

~btw out of curiosity can i ask if you are in north or south Korea? :D~ ah yea, south xD coOl'¡!

ctubio commented 7 years ago

added KRW at https://github.com/ctubio/tribeca/commit/12037787a70f90432a32f4717598e06a9a92854a

beegmon commented 7 years ago

Test account information has been sent to you via IRC. For now lets just focus on BTC. Korbit supports ETH/ETC but the wallet address they gave me on the test account is a real wallet address, so I can't send any test coins to it (unlike BTC which is a testnet wallet).

BTC is the most supported in Korbit at the moment, and the API calls for doing BTC and ETH are basically the same, except for a change in the currency parameter for the URL. So it makes sense to just get BTC working first, and try eth after that is stable, since I will have to put some real eth in there testing.

ctubio commented 7 years ago

~do you know in https://www.korbit-test.com/ where are the open orders displayed? im looking arround but im not sure because the translator from korean is a bit messy~

~i think at https://www.korbit-test.com/my_assets you can see the amount held in open trades, but the list of open trades is somewhere?~ ah ok is at https://www.korbit-test.com/orders/trade :dancer:

ctubio commented 7 years ago

maybe the token refresh doesnt work, and maybe the market trades also doesnt work.

i couldnt test market trades (UI panel at the very right) because there isnt mucha ctivity in the test environment

about the resfresh token im still testing it, cos need to wait 1 hour between each refresh and i always miss it xD (for now)

but all other stuff seems niiiiice, let me know if you see any other issue, thanks'¡

beegmon commented 7 years ago

Thank you soo much for this work. I have been dealing with a family emergency since Friday of last week, and haven't had any time to keep on top of progress. I will get this setup on my production korbit account sometime this week and let you now.

Again sorry for the radio silence. It's been a crazy couple of days...Thanks again for all the work!

ctubio commented 7 years ago

sure take your time, no hurry for us, hope all goes well in the other side of the world'''

i expect you will find some minor issues that i didnt found in the test environment, but if you let me know when you have time i will try to fix ofcourse