Last active
February 9, 2018 02:20
-
-
Save kiyoaki/0791247375e663bb722f009d47bd0f32 to your computer and use it in GitHub Desktop.
bitFlyer Realtime API sample code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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