Permalink
Browse files

geändert: volume/exchanges.php

	geändert:               volume/functions.php
	geändert:               walls/exchanges.php
	geändert:               walls/functions.php
	geändert:               walls/gather_exchanges.php
  • Loading branch information...
bananenwilly committed Mar 19, 2016
1 parent d88ba60 commit fa61b0fc6d492033f3b55a40608ad022799a8de0
Showing with 41 additions and 24 deletions.
  1. +1 −0 .gitignore
  2. +2 −2 volume/exchanges.php
  3. +6 −6 volume/functions.php
  4. +8 −2 walls/exchanges.php
  5. +5 −5 walls/functions.php
  6. +19 −9 walls/gather_exchanges.php
View
@@ -0,0 +1 @@
+panel/*
View
@@ -89,7 +89,7 @@ function get_bittrex_btc_nbt () {
//southx BTC-NBT
function get_southx_btc_nbt ($btc_usd) {
-$url = 'https://www.southxchange.com/api/price/btc/nbt';
+$url = 'https://www.southxchange.com/api/price/btc/us-nbt';
$content = file_get_contents($url);
$json = json_decode($content, true);
@@ -112,7 +112,7 @@ function get_southx_btc_nbt ($btc_usd) {
//southx NBT-USD
function get_southx_nbt_usd() {
-$url = 'https://www.southxchange.com/api/price/nbt/usd';
+$url = 'https://www.southxchange.com/api/price/us-nbt/usd';
$content = file_get_contents($url);
$json = json_decode($content, true);
View
@@ -63,10 +63,10 @@ function pair2link($pairname)
$answer = "<a href='https://www.bittrex.com/Market/Index?MarketName=BTC-NBT' target='_blank'>Bittrex BTC/NBT</a>";
break;
case "southx_btc_nbt":
- $answer = "<a href='https://www.southxchange.com/Market/Book/BTC/NBT' target='_blank'>southXchange BTC/NBT</a>";
+ $answer = "<a href='https://www.southxchange.com/Market/Book/BTC/US-NBT' target='_blank'>southXchange BTC/NBT</a>";
break;
case "southx_nbt_usd":
- $answer = "<a href='https://www.southxchange.com/Market/Book/NBT/USD' target='_blank'>southXchange NBT/USD</a>";
+ $answer = "<a href='https://www.southxchange.com/Market/Book/US-NBT/USD' target='_blank'>southXchange NBT/USD</a>";
break;
case "cryptsy_nbt_btc":
$answer = "<a href='https://www.cryptsy.com/markets/view/NBT_BTC' target='_blank'>Cryptsy NBT/BTC</a>";
@@ -84,16 +84,16 @@ function pair2link($pairname)
$answer = "<a href='https://hitbtc.com/exchange/NBTBTC' target='_blank'>HitBTC NBT/BTC</a>";
break;
case "ccedk_nbt_usd":
- $answer = "<a href='https://www.ccedk.com/nbt-usd' target='_blank'>CCEDK NBT/USD</a>";
+ $answer = "<a href='https://www.ccedk.com/us-nbt-usd' target='_blank'>CCEDK NBT/USD</a>";
break;
case "ccedk_nbt_eur":
- $answer = "<a href='https://www.ccedk.com/nbt-eur' target='_blank'>CCEDK NBT/EUR</a>";
+ $answer = "<a href='https://www.ccedk.com/us-nbt-eur' target='_blank'>CCEDK NBT/EUR</a>";
break;
case "ccedk_nbt_btc":
- $answer = "<a href='https://www.ccedk.com/nbt-btc' target='_blank'>CCEDK NBT/BTC</a>";
+ $answer = "<a href='https://www.ccedk.com/us-nbt-btc' target='_blank'>CCEDK NBT/BTC</a>";
break;
case "ccedk_nbt_ppc":
- $answer = "<a href='https://www.ccedk.com/nbt-ppc' target='_blank'>CCEDK NBT/PPC</a>";
+ $answer = "<a href='https://www.ccedk.com/us-nbt-ppc' target='_blank'>CCEDK NBT/PPC</a>";
break;
case "nulagoon_btc_nbt":
$answer = "<a href='https://nulagoon.com/' target='_blank'>NuLagoon Tube BTC/NBT</a>";
View
@@ -12,6 +12,8 @@ function check_value($value)
//get btc-usd price
function get_btc_usd()
{
+$btc_usd=false;
+
$url = 'https://api.bitfinex.com/v1/pubticker/btcusd/';
$content = file_get_contents($url);
$json = json_decode($content, true);
@@ -41,6 +43,8 @@ function get_btc_usd()
//get nbt/cny price
function get_nbt_cny($btc_usd)
{
+$nbt_cny = false;
+
$url = 'https://www.okcoin.cn/api/ticker.do';
$content = file_get_contents($url);
$json = json_decode($content, true);
@@ -68,6 +72,8 @@ function get_nbt_cny($btc_usd)
//get nbt/eur price
function get_nbt_eur()
{
+$nbt_eur = false;
+
$url = 'http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote?format=json';
$content = file_get_contents($url);
$json = json_decode($content, true);
@@ -187,7 +193,7 @@ function get_bittrex_btc_nbt($search_tolerance,$btc_usd) {
//southx BTC-NBT
function get_southx_btc_nbt($search_tolerance,$btc_usd) {
-$url = 'https://www.southxchange.com/api/book/btc/nbt';
+$url = 'https://www.southxchange.com/api/book/btc/us-nbt';
$content = file_get_contents($url);
$json = json_decode($content, true);
$ask_total=0;
@@ -232,7 +238,7 @@ function get_southx_btc_nbt($search_tolerance,$btc_usd) {
//southx NBT-USD
function get_southx_nbt_usd($search_tolerance) {
-$url = 'https://www.southxchange.com/api/book/nbt/usd';
+$url = 'https://www.southxchange.com/api/book/us-nbt/usd';
$content = file_get_contents($url);
$json = json_decode($content, true);
$ask_total=0;
View
@@ -16,10 +16,10 @@ function pair2link($pairname)
$answer = "<a href='https://www.bittrex.com/Market/Index?MarketName=BTC-NBT' target='_blank'>Bittrex BTC/NBT</a>";
break;
case "southx_btc_nbt":
- $answer = "<a href='https://www.southxchange.com/Market/Book/BTC/NBT' target='_blank'>southXchange BTC/NBT</a>";
+ $answer = "<a href='https://www.southxchange.com/Market/Book/BTC/US-NBT' target='_blank'>southXchange BTC/NBT</a>";
break;
case "southx_nbt_usd":
- $answer = "<a href='https://www.southxchange.com/Market/Book/NBT/USD' target='_blank'>southXchange NBT/USD</a>";
+ $answer = "<a href='https://www.southxchange.com/Market/Book/US-NBT/USD' target='_blank'>southXchange NBT/USD</a>";
break;
case "cryptsy_nbt_btc":
$answer = "<a href='https://www.cryptsy.com/markets/view/NBT_BTC' target='_blank'>Cryptsy NBT/BTC</a>";
@@ -37,13 +37,13 @@ function pair2link($pairname)
$answer = "<a href='https://hitbtc.com/exchange/NBTBTC' target='_blank'>HitBTC NBT/BTC</a>";
break;
case "ccedk_nbt_usd":
- $answer = "<a href='https://www.ccedk.com/nbt-usd' target='_blank'>CCEDK NBT/USD</a>";
+ $answer = "<a href='https://www.ccedk.com/us-nbt-usd' target='_blank'>CCEDK NBT/USD</a>";
break;
case "ccedk_nbt_eur":
- $answer = "<a href='https://www.ccedk.com/nbt-eur' target='_blank'>CCEDK NBT/EUR</a>";
+ $answer = "<a href='https://www.ccedk.com/us-nbt-eur' target='_blank'>CCEDK NBT/EUR</a>";
break;
case "ccedk_nbt_btc":
- $answer = "<a href='https://www.ccedk.com/nbt-btc' target='_blank'>CCEDK NBT/BTC</a>";
+ $answer = "<a href='https://www.ccedk.com/us-nbt-btc' target='_blank'>CCEDK NBT/BTC</a>";
break;
case "nulagoon_btc_nbt":
$answer = "<a href='https://nulagoon.com/' target='_blank'>NuLagoon Tube BTC/NBT</a>";
View
@@ -2,13 +2,13 @@
include('config.php');
include('logger.php');
include('exchanges.php');
-include("functions.php");
-error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
+include('functions.php');
+#error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
#try to open lock file
-$fp = fopen(".lock_walls", "r+");
+#$fp = fopen(".lock_walls", "r+");
-if (flock($fp, LOCK_EX)) {
+#if (flock($fp, LOCK_EX)) {
#we have a lock - let's go.
#get fiat prices
@@ -21,6 +21,16 @@
writelog("all", "no_bitcoin_price", "unresolved");
exit; #no bitcoin price available, sorry. will not gather data (offline?)
}
+ if (!$nbt_cny)
+ {
+ writelog("all", "no_cny_price", "unresolved");
+ exit; #no cny price available, sorry. will not gather data (offline?)
+ }
+ if (!$nbt_eur)
+ {
+ writelog("all", "no_eur_price", "unresolved");
+ exit; #no eur price available, sorry. will not gather data (offline?)
+ }
#do the query
$timestamp=time();
@@ -32,9 +42,9 @@
#create chart points
include("../charts/createcsv_walls.php");
#unlock if we locked
- flock($fp, LOCK_UN);
-}
-else {
- writelog("all", "file_locked", "unresolved");
-}
+# flock($fp, LOCK_UN);
+#}
+#else {
+# writelog("all", "file_locked", "unresolved");
+#}
?>

0 comments on commit fa61b0f

Please sign in to comment.