Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement a Nadex autotrading bot?

I have been searching for a way to autotrade on Nadex

https://www.nadex.com

and came across this script https://github.com/FreeTheQuarks/NadexBot

It is an old script and I am not that experienced in Python.

Q1: Is this a good way to go about, thus since it is not a official API and is probably scraping data from the site, which would mean slower requests and trade execution?


There is also an unofficial API client https://github.com/knoguchi/nadex/tree/master/nadex

But again, not sure if good for live trading.

Q2: Is there better ways to go about this and if so where should I start?

like image 392
0101 Avatar asked Oct 14 '25 18:10

0101


2 Answers

I'm the author of the Nadex unofficial API Python client. I still maintain it. Recently the streamer support was added. However, I suggest that you use JavaScript from nadex.com. It's always up-to-date and works just like the official web site, obviously.

The JS code is professionally written. Very readable. There are 100 JavaScript files but essential ones for the API access are only handful.

Nadex is a part of IG Group. Hence the JS has lots of IG namespace. IG offers API and documents for developers. Nadex message format is a little different from IG's but the design is same. Once you learn the document, all the JavaScript code is really easy to understand.

like image 159
Kenji Noguchi Avatar answered Oct 17 '25 07:10

Kenji Noguchi


A1: Measure Twice Rather Before One Cut$

Simply put, it is your money you trade with, so warnings like this one ( from FreeTheQuarks )

(cit.:)
This was the first non-trivial program I wrote.
It hasn't received any significant updates in years.
I've only made minor readability updates after first putting this on git.

should give one a sufficient sign to re-think the risks, before one puts a first dollar on table.

This is a for-profit game, isn't it?


A2: Yes, there is a better way.

All quantitatively supported trading strategies need stable and consistent care - i.e. one needs to have

  1. rock-solid historical data
  2. stable API to work with ( Trade Execution & Management, Market Events )
  3. reliable & performant testbed for validating one's own quantitative model of the trading strategy

Having shared this piece of some 100+ man*years experience, one may decide on one's own whether to rely on or rather forget to start any reasonable work with just some reverse-engineering efforts on an "un-official API client".

In case the profit generation capability of some trading strategy supports the case, one may safely order an outsourced technical implementation and technical integration efforts in a turn-key manner.

Epilogue:

If there are quantitatively supported reasons to implement a trading strategy,
the profit envelope thereof sets the ultimate economically viable model
for having that strategy automated and operated in-vivo.

Failure to decide in this order of precedence
results in nothing but wasted time & money.
Your money.

like image 30
user3666197 Avatar answered Oct 17 '25 08:10

user3666197



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!