Promise based ES6 client for connecting with stockfighter API
Has methods corresponding to all API and websocket endpoints listed in the stockfigher docs.
When running in node, use the --harmony_destructuring flag.
Also, the client uses an environmental variable, API_KEY, to authenticate to the API
const {checkVenue, buyStock, sellStock} = require('./stockfighter');
checkVenue('ABCDE')
.then(result => console.log(result)) //{ok: true, venue: 'ABCDE'}
.catch(err => console.log(err)) //{ok: false, error: 'Stuff and things'}
All methods that take more than one parameter are automatically curried for ease of reuse.
See Stockfighter API Docs for details on the responses.
Order stock is so you can programatically determine the direction.
api.ticker('ACCT', 'OBSEC', message => {
//Do something with each message that gets sent back :-)
})