with node.js I run this code:
var autobahn = require('autobahn');
var wsuri = "wss://api.poloniex.com";
var connection = new autobahn.Connection({
url: wsuri,
realm: "realm1"
});
connection.onopen = function (session) {
function marketEvent (args,kwargs) {
console.log(args);
}
function tickerEvent (args,kwargs) {
console.log(args);
}
function trollboxEvent (args,kwargs) {
console.log(args);
}
session.subscribe('USDT_BTC', marketEvent);
}
connection.onclose = function () {
console.log("Websocket connection closed");
}
connection.open();
and reseve via push-API JSON-Data:
[ { type: 'orderBookModify',
data: { type: 'bid', rate: '2357.77000002', amount: '0.82956965' } } ]
now I want to work with the data, is it possible to store it into mysql or declare a variable with just a sequence of the JSON-Array?