9 ms·
Hey folks, I'm the primary maintainer of Gryphon. The backstory here is: I was one of the founders of Tinker, the trading company that built Gryphon as our in-h
by reso 7y ago
Hey folks, I'm the primary maintainer of Gryphon. The backstory here is: I was one of the founders of Tinker, the trading company that built Gryphon as our in-house trading infrastructure. We operated 2014-18, starting with just a simple arbitrage bot, and slowly grew the operation until our trades were peaking above 20% of daily trading volume on the big exchanges.
The company has since wound down (founders moved on to other projects), but I always thought the code deserved to be shared, so we've open sourced it. Someone trying to do what we did will probably save 1.5 years of engineering effort if they build on Gryphon vs. make their own. As far as I know there isn't anything out there like this, in any market (not just cryptocurrencies).
Hope you guys like it!
- monkeydust 7y agoWell documented. Looks like a nice way to learn about market making in a real life situations with small fractions of bitcoin. Curious to know if someone takes it for a real drive in a production environment.
- reso 7y agoThanks! I hope they do. I had considered adding a 'reading list' to the docs for people who are new to trading, so this could be used as a teaching tool (or just to make using it easier). I'll bump that up the priority list.
- monkeydust 7y agoDitto. Heck you could combine all of it and make a nice udemy course for some extra $ if you wanted to.
- codesushi42 7y agoThanks for taking the time to open source this. So is its use case limited to arb? Or are other HFT strategies supported?
- reso 7y agoIt's perfectly general: arb, market making, signal trading, ml, etc. Whatever strategy class you're thinking of, you can probably implement it on Gryphon.
- short_sells_poo 7y agoCan you please explain to me how a tool written in python can be used for HFT or market making? I’m asking because we generally used ASICS and c++ in the past, or more recently rust. Even GPUs are often difficult because they introduce milliseconds of latency.
- 100qs 7y agoI don't believe true crypto HFT strategies exist (i.e. sub-millisecond tick to trade). It's just not possible with websockets and http requests being the standard for data feeds and order placement on crypto exchanges.
- reso 7y agoIf you want to restrict the definition of HFT to only sub-millisecond strategies you're correct. But then, all HFT is impossible in crypto, since with web request latency and rate limits, it would be very difficult to get tick speeds even in the 10s of milliseconds. It's fine if you want to call this "algo trading" instead of HFT, but I think a common understanding of the term would include Gryphon's capabilities. In any case Gryphon uses Cython to compile itself down to C, which isn't quite as good as writing in native C but is a good chunk of the way there.
- westurner 7y ago> In any case Gryphon uses Cython to compile itself down to C, which isn't quite as good as writing in native C but is a good chunk of the way there. Would there be any advantage to asyncio with uvloop (also written in Cython (on libuv like Node) like Pandas)? https://github.com/MagicStack/uvloop https://github.com/MagicStack/uvloop IDK how many e.g. signals routines benefit from asyncio yet.
- westurner 7y ago> As far as I know there isn't anything out there like this, in any market (not just cryptocurrencies). How does Gryphon compare to Catalyst (Zipline)? https://github.com/enigmampc/catalyst https://github.com/enigmampc/catalyst They list a few example algorithms: https://enigma.co/catalyst/example-algos.html https://enigma.co/catalyst/example-algos.html "Ask HN: Why would anyone share trading algorithms and compare by performance?" https://news.ycombinator.com/item?id=15802834 https://news.ycombinator.com/item?id=15802834 (pyfolio, popular [Zipline] algos shared through Quantopian) "Superalgos and the Trading Singularity" https://news.ycombinator.com/item?id=19109333 https://news.ycombinator.com/item?id=19109333 (awesome-quant,)
- thomasfromcdnjs 7y agoLooks great! Though looking at the code -> https://github.com/garethdmm/gryphon/tree/master/gryphon/lib/exchange https://github.com/garethdmm/gryphon/tree/master/gryphon/lib... Seems quite hard to extend it with new exchanges.
- reso 7y agoShouldn't be, you just need to write a wrapper for the exchange API with the interface defined in 'gryphon.lib.exchange.exchange_api_wrapper'. I'll add an article to the docs with more about that soon.
- westurner 7y agoWould CCXT be useful here? https://github.com/ccxt/ccxt https://github.com/ccxt/ccxt > The ccxt library currently supports the following 135 cryptocurrency exchange markets and trading APIs:
- reso 7y agoIt's possible CCXT could be used to easily wrap other exchanges into gryphon. I'm not familiar with the library so hard to guess if it would be a net win or not.
- thomasfromcdnjs 7y agoThanks! Which exchange is a good example? I find the directory structure just a confusing, why does each exchange-market get it's own file, wouldn't it be better for the exchange just to define some markets as hashes?
- reso 7y agoGemini is probably the best one, code-quality wise. Agreed, the way the trading-pair-to-exchange relationship works right now is imperfect. It's ripe for a good refactor.
- reso 7y ago
- deleted 7y ago[deleted]