An implementation of a Stockfighter server in C and Go
Written by Stockfighter user Amtiskaw (a.k.a. Fohristiwhirl on GitHub)
- Compile
disorderBook.c
and name the executabledisorderBook.exe
- Compile
disorderBook_front.go
and run it - Connect your trading bots to http://127.0.0.1:8000/ob/api/ instead of the normal URL
- WebSockets are at ws://127.0.0.1:8000/ob/api/ws/
- Don't use https or wss
There is no authentication by default. If you want authentication, edit accounts.json
to contain a list of valid users and their API keys and use the command line option -accounts accounts.json
(then authentication will work in the same way as on the official servers, via "X-Starfighter-Authorization" headers).
- Your bots can use whatever accounts, venues, and symbols they like
- New exchanges/stocks are created as needed when someone tries to do something on them
- Some stupid bots are available to trade against - you must start them (or many copies) manually
- Scores can be accessed at /ob/api/venues/<venue>/stocks/<symbol>/scores (accessing this with your bots is cheating though)
- Everything persists forever; we will eventually run out of RAM
- The timestamps are only accurate to the nearest second
- By default, only accepts connections from localhost
Thanks to patio11, cite-reader, Medecau, DanielVF, eu90h, rjsamson, rami.
This is a remake of my earlier server made with Python, which is slower.