A Stockfighter clone built in Elixir using Phoenix.
Right now Stackfooter implements all of the base Stockfighter API (the GM API is not supported). Documentation for the Stockfighter API can be found here: https://starfighter.readme.io. Position tracking and user scores have been added, as well as websockets implementing the full production Stockfighter API. Scores are available in JSON format at stackfooter.rjsamson.org/ob/api/scores, and scores for a specific account are available at /ob/api/scores/:account. Performance metrics are now also available at /beaker.
Everything pretty much works at this point, but since there's still no proper web interface to spin up venues, add api keys and accounts, add tickers, etc, the easiest way to play around with Stackfooter is to do the following:
- Install Elixir
- Install dependencies with
mix deps.get
- Create a dev.secret.exs file to populate an API key
cp config/dev.secret.example.exs config/dev.secret.exs
- Add any additional API keys / accounts or venues / tickers to lib/stackfooter/bootstrap.ex
- Start phoenix in iex mode with
iex -S mix phoenix.server
- Use the API as you usually would at http://localhost:4000 with the API keys and Venue from the config
Performance improvements in the Venue GenServerFull API compatibilitySettlement Desk for position trackingScores APIBootstrap with default venues and API keysWebsocketsClean up ugly and redundant code in the Venue!Improve Venue performance for closed orders- Add JSON API for configuration and control of Venues / Tickers
- Web interface for setup and control
Thanks to danielvf and amtiskaw for some pointers, and again to amtiskaw for the excellent test script to work out some last minute inconsistencies. Also, big thanks to patio11 for making Stockfighter!