News for hackers. Stuff that matters.
Re:Cryptocurrency trading bot in ~40 lines of JavaScript by rolltiide on Thursday July 25, 2019 @04:21AM (#20523597)
One redeeming quality of cryptocurrencies existing is that all the exchanges have REST compliant APIs and real time data available for free

The finance sector’s biggest meme for the last decade and a half was that PhD quants were required to program trading algorithms when really a single exchange cost $12,000 a month for real time data, it came with horrible documentation, support, antiquated protocols, FIX, and then you had to figure out how to co-locate your own server to connect to the exchange fast enough to prevent front running

The gatekeeping is what kept this specialized for the most part

Re:Cryptocurrency trading bot in ~40 lines of JavaScript by gpderetta on Thursday July 25, 2019 @07:14AM (#20524370)
> FIX

Those that do not understand FIX are doomed to reinvent it badly. I only got an appreciation for the protocol when I implemented a FIX server from scratch. Even the wierd text+field delimiter encoding is not bad (except for performance of course).

Session management, order entry and recovery in FIX is well designed and well documented (although it takes a few readings of the spec to put the pieces together). The biggest issue is the plethora of underdocumented extensions that have been bolted on to satisfy niche needs. If you are lucky you can ignore them most of the time.

Another big issue is a lot of exchanges treat FIX as more of a guideline than an hard spec and you have to workaround the lossage.

The best exchange binary protocols I have worked with (at least here in EU, borrow heavily from FIX.

Re:Cryptocurrency trading bot in ~40 lines of JavaScript by short_sells_poo on Thursday July 25, 2019 @04:52AM (#20523746)
> The gatekeeping is what kept this specialized for the most part.

It certainly kept the vast majority of retail out, but I disagree that this was the main cause of specialization. I think that the number of lone geniuses who could've beat the market using algo trading is a number approaching zero.

It's true that you don't need a PhD, or even higher education, as the math you need can be entirely self taught. However, you need plenty of specialized knowledge to avoid the accidental discharge of the vast number of very expensive footguns that litter the landscape. This knowledge can be gained from literature, but without having someone streetwise as a guide, it's going to be very difficult to discern genuine insight from wishful thinking.

Re:Cryptocurrency trading bot in ~40 lines of JavaScript by mruts on Thursday July 25, 2019 @06:06AM (#20524080)
Honestly, it’s pretty easy to create a rough approximation of many popular hedge fund strategies. Like on Quantopian, it’s pretty easy to whip up a simple factor strategy in a couple hours. The returns aren’t bad, either.

The part that is hard are trading costs and slippage. But assuming that retail investor’s capital is relatively small and no trading costs (Alpaca provides this), an individual can do pretty well.

The parts that are hard for hedge funds is slippage, illiquidity of assets, trading costs, and client demands. As an individual you really don’t have to worry about those things and consequentially things become much easier.

The only downside is that it’s harder to get as much cheap leverage as the big guys. Also some (HFT) strategies are off limits to individuals, but that’s fine, because HFT really isn’t a good way to make money in the first place.

Re:Cryptocurrency trading bot in ~40 lines of JavaScript by tardis_thad on Thursday July 25, 2019 @05:58AM (#20524037)
It's also one of the reasons why I've built https://tardis.dev (historical tick-level cryptocurrency market data replay API).
Re:Cryptocurrency trading bot in ~40 lines of JavaScript by uberneo on Thursday July 25, 2019 @06:42AM (#20524239)
Hey , just check your product , its looks great!! good job. Wondering from how long you have been storing this data and have you using the Public API from each exchange to fetch all this data?
Re:Cryptocurrency trading bot in ~40 lines of JavaScript by tardis_thad on Thursday July 25, 2019 @06:58AM (#20524309)
Hi, thanks! It took me over six months to finish it and as always with my ideas seems like market for it is too small, at least currently.

Data is available since 2019-03-30 for majority of the supported exchanges. Yes it's all from public APIs.

Re:Cryptocurrency trading bot in ~40 lines of JavaScript by uberneo on Thursday July 25, 2019 @07:12AM (#20524362)
I can imagine , as a tech stack , you must be using ccxt , nodejs and some Timeseries database ? Also what all distinct "channels" you are saving ?
Re:Cryptocurrency trading bot in ~40 lines of JavaScript by tardis_thad on Thursday July 25, 2019 @07:19AM (#20524388)
No it's all custom stuff written from scratch, some in .NET Core, some in JavaScript (Cloudflare workers, Node.js client libs). I'm saving to flat files on Google Cloud Storage and Wasabi (S3 compatible alternative), given TBs of data it's much cheaper. Filtering is being done on demand. Regarding channels that heavily depends on exchange, you can use https://tardis.dev/api/v1/exchanges/:exchange API to get the list (eg. https://tardis.dev/api/v1/exchanges/bitmex)
Re:Cryptocurrency trading bot in ~40 lines of JavaScript by uberneo on Thursday July 25, 2019 @06:31AM (#20524203)
This reminds me of the movie "The Hummingbird Project" - https://www.imdb.com/title/tt6866224/ , where speed matters in all Financial transactions and even a 1ms matters in the game
Re:Cryptocurrency trading bot in ~40 lines of JavaScript by mercutio88 on Thursday July 25, 2019 @04:29AM (#20523639)
you are so right