UNPKG

rofex

Version:

Primary REST API. Websocket API

24 lines (20 loc) 683 B
#Primary REST API / WebSocket API [API](http://api.primary.com.ar/docs/Primary-API.pdf) ``` RofexWebSocketAPI = new Rofex.WebSocket('user','pass'); RofexWebSocketAPI.marketData('ROFX','DODic18'); RofexWebSocketAPI.marketData('ROFX','RFX20Dic18'); RofexWebSocketAPI.on('marketData',function(data){console.log(data)}); var RofexRestAPI = new Rofex.Rest('user','pass'); //Promise pattern RofexRestAPI.data.getTrades('ROFX','RFX20Dic18','2018-10-26') .then((data)=>{ console.log('REST:',data) }); //Callback pattern RofexRestAPI.data.getTrades('ROFX','RFX20Dic18','2018-10-26',(err,data) => { console.log(data) }); ``` ## Authors Pablo Vasquez ( @pablofvasquez )