-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code changes for HUOBIAPI described in #10. Two outstanding issues lo…
…gged in notes and comments. Could not find mapping for trade ID and side
- Loading branch information
Gerard Moroney
committed
Dec 31, 2017
1 parent
190eea3
commit 210fb65
Showing
4 changed files
with
55 additions
and
36 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/*jshint esversion: 6 */ | ||
|
||
var sys = require('util'); | ||
|
||
// Connect to Redis | ||
var redis = require('redis'); | ||
var client = redis.createClient('6379','127.0.0.1'); | ||
client.on('connect', function() { | ||
console.log('Connected to Redis Server'); | ||
}); | ||
|
||
client.subscribe("HUOBIAPI:LTCBTC"); | ||
|
||
client.on("message", function(channel, message) { | ||
const msg = JSON.parse(message); | ||
//console.log("Message '" + message + "' on channel '" + channel + "' arrived!") | ||
console.log(channel,msg.tr_id,msg.tr_side); | ||
}); |