Skip to content

Instantly share code, notes, and snippets.

@kiyoaki
Last active February 9, 2018 02:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiyoaki/0791247375e663bb722f009d47bd0f32 to your computer and use it in GitHub Desktop.
Save kiyoaki/0791247375e663bb722f009d47bd0f32 to your computer and use it in GitHub Desktop.
bitFlyer Realtime API sample code
var script = document.createElement('script');
script.src='https://cdn.pubnub.com/sdk/javascript/pubnub.4.20.1.min.js';
script.onload = function() {
var pubnub = new PubNub({
subscribeKey: "sub-c-52a9ab50-291b-11e5-baaa-0619f8945a4f",
publishKey: "nopublishkey",
ssl: true
})
pubnub.addListener({
message: function(m) {
console.log(m);
},
presence: function(p) {
console.log(p);
},
status: function(s) {
console.log(s);
}
});
pubnub.subscribe({
channels: ['lightning_executions_FX_BTC_JPY']
});
};
document.body.appendChild(script);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment