Permalink
Browse files

REDO Added C-Cex and Cryptopia Markets

  • Loading branch information...
rudy4682 committed Nov 4, 2015
1 parent e32471e commit 97dd1c7cae5919f3c9f82f6e28344de1554c2a5f
Showing with 29 additions and 6 deletions.
  1. +5 −1 .gitignore
  2. +14 −1 lib/database.js
  3. +3 −0 lib/locale.js
  4. +1 −1 lib/markets/ccex.js
  5. +1 −1 lib/markets/cryptopia.js
  6. +3 −0 locale/en.json
  7. +1 −1 views/markets/ccex.jade
  8. +1 −1 views/markets/cryptopia.jade
View
@@ -25,4 +25,8 @@ build/Release
node_modules
settings.json
.idea
.idea
*~
*.ico
*.png
View
@@ -11,8 +11,11 @@ var mongoose = require('mongoose')
, bittrex = require('./markets/bittrex')
, bleutrade = require('./markets/bleutrade')
, cryptsy = require('./markets/cryptsy')
, cryptopia = require('./markets/cryptopia')
, yobit = require('./markets/yobit')
, empoex = require('./markets/empoex');
, empoex = require('./markets/empoex')
, ccex = require('./markets/ccex');
// , BTC38 = require('./markets/BTC38');
function find_address(hash, cb) {
Address.findOne({a_id: hash}, function(err, address) {
@@ -206,6 +209,16 @@ function get_market_data(market, cb) {
return cb(err, obj);
});
break;
case 'cryptopia':
cryptopia.get_data(settings.markets.coin, settings.markets.exchange, settings.markets.cryptopia_id, function (err, obj) {
return cb(err, obj);
});
break;
case 'ccex':
ccex.get_data(settings.markets.coin.toLowerCase(), settings.markets.exchange.toLowerCase(), settings.markets.ccex_key, function (err, obj) {
return cb(err, obj);
});
break;
case 'yobit':
yobit.get_data(settings.markets.coin.toLowerCase(), settings.markets.exchange.toLowerCase(), function(err, obj){
return cb(err, obj);
View
@@ -12,6 +12,7 @@ exports.menu_api = "API",
exports.menu_markets = "Markets",
exports.menu_richlist = "Rich List",
exports.menu_reward = "Reward",
exports.menu_node = "Nodes",
exports.ex_title = "Block Explorer",
exports.ex_search_title = "Search",
@@ -130,7 +131,9 @@ exports.bittrex = "Bittrex",
exports.bleutrade = "Bleutrade",
exports.yobit = "Yobit",
exports.cryptsy = "Cryptsy",
exports.cryptopia = "Cryptopia",
exports.empoex = "Empoex",
exports.ccex = "C-Cex",
exports.reloadLocale = function reloadLocale(locale) {
// Discover where the locale file lives
View
@@ -2,7 +2,7 @@ var request = require('request');
var base_url = 'https://c-cex.com/t/';
var d1 = new Date();
var d2 = new Date();
d1.setDate(d1.getDate() - 2);
d1.setDate(d1.getDate() - 2);
function pad(x) {
if (x < 10) return "0" + x;
View
@@ -1,5 +1,5 @@
var request = require('request');
var base_url = 'https://www.cryptopia.co.nz/api';
function get_summary(coin, exchange, cryptopia_id, cb) {
var summary = {};
View
@@ -10,6 +10,7 @@
"menu_markets": "Markets",
"menu_richlist": "Top 100",
"menu_reward": "Reward",
"menu_node": "Nodes",
// explorer view
"ex_title": "Block Explorer",
@@ -121,6 +122,8 @@
"yobit": "Yobit",
"empoex": "Empoex",
"cryptsy": "Cryptsy",
"cryptopia": "Cryptopia",
"ccex": "C-Cex",
// Heavy rewards view
"heavy_title": "Reward/voting information",
View
@@ -1,5 +1,5 @@
extends menu
block market_view
.row
.col-md-12
@@ -1,5 +1,5 @@
extends menu
block market_view
.row
.col-md-12

0 comments on commit 97dd1c7

Please sign in to comment.