Skip to content

Commit

Permalink
RIP: cyptohub, hacked...
Browse files Browse the repository at this point in the history
This reverts commit b43e8da5ae869c953768f558a0b1b292fcd050de.
  • Loading branch information
tpruvot committed Oct 4, 2018
1 parent 685747b commit 7c8817f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 116 deletions.
45 changes: 0 additions & 45 deletions web/yaamp/core/backend/markets.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function BackendPricesUpdate()
updateAlcurexMarkets();
updateBinanceMarkets();
updateBterMarkets();
updateCryptohubMarkets();
//updateEmpoexMarkets();
updateJubiMarkets();
updateLiveCoinMarkets();
Expand Down Expand Up @@ -1389,50 +1388,6 @@ function updateBterMarkets()
}
}

function updateCryptohubMarkets()
{
$exchange = 'cryptohub';
if (exchange_get($exchange, 'disabled')) return;

$list = getdbolist('db_markets', "name LIKE '$exchange%'");
if (empty($list)) return;

$markets = cryptohub_api_query('market/ticker');
if(!is_array($markets)) return;

foreach($list as $market)
{
$coin = getdbo('db_coins', $market->coinid);
if(!$coin) continue;

$symbol = $coin->getOfficialSymbol();
if (market_get($exchange, $symbol, "disabled")) {
$market->disabled = 1;
$market->message = 'disabled from settings';
$market->save();
continue;
}

$dbpair = 'BTC'.'_'.$symbol;
foreach ($markets as $pair => $ticker) {
if ($pair != $dbpair) continue;
$price2 = ($ticker['highestBid']+$ticker['lowestAsk'])/2;
$market->price = AverageIncrement($market->price, $ticker['highestBid']);
$market->price2 = AverageIncrement($market->price2, $price2);
$market->pricetime = time();
//if ($market->disabled < 9) $market->disabled = (floatval($ticker['baseVolume']) < 0.01);
$market->save();

if (empty($coin->price2)) {
$coin->price = $market->price;
$coin->price2 = $market->price2;
$coin->market = $exchange;
$coin->save();
}
}
}
}

function updateEmpoexMarkets()
{
$exchange = 'empoex';
Expand Down
68 changes: 0 additions & 68 deletions web/yaamp/core/exchange/cryptohub.php

This file was deleted.

3 changes: 0 additions & 3 deletions web/yaamp/core/exchange/exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ function strip_data($data)
require_once("cryptobridge.php");
require_once("gateio.php");
require_once("graviex.php");
require_once("cryptohub.php");
require_once("kraken.php");
require_once("poloniex.php");
require_once("yobit.php");
Expand Down Expand Up @@ -102,8 +101,6 @@ function getMarketUrl($coin, $marketName)
$url = "https://crex24.com/exchange/{$symbol}-{$base}";
else if($market == 'cryptobridge')
$url = "https://wallet.crypto-bridge.org/market/BRIDGE.{$symbol}_BRIDGE.{$base}";
else if($market == 'cryptohub')
$url = "https://cryptohub.online/market/{$symbol}/{$base}";
else if($market == 'cryptopia')
$url = "https://www.cryptopia.co.nz/Exchange?market={$symbol}_{$base}";
else if($market == 'cryptowatch')
Expand Down

0 comments on commit 7c8817f

Please sign in to comment.