Commit fbcf3d1d authored by Gampe Sebastian's avatar Gampe Sebastian
Browse files

remove files to faircoin-freevision-exchange repository

parent 78427bca
dev/*
data/freevision*.json
data/freevision*.csv
data/stats/*.csv
# FairCoin FreeVision Bot
## Usage
### Currency conversion
/c amount [m|µ]currency_shortcode to [m|µ]currency_shortcode
examples:
/c 10 FAIR to EUR
/c 10 FAIR to mFAIR
/c 10 USD to FAIR
/c 100 FAIR to mBTC
show complete conversion table:
/c 1 FAIR
use the bid price for calculation ( defaulf exchange price)
/c ...
/cbid ...
use price between bid and ask for calculation
/cmid ...
use ask price for calculation
/cask ...
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
/**
* Default styles for the dygraphs charting library.
*/
.dygraph-legend {
position: absolute;
font-size: 14px;
z-index: 10;
width: 250px; /* labelsDivWidth */
/*
dygraphs determines these based on the presence of chart labels.
It might make more sense to create a wrapper div around the chart proper.
top: 0px;
right: 2px;
*/
background: white;
line-height: normal;
text-align: left;
overflow: hidden;
}
/* styles for a solid line in the legend */
.dygraph-legend-line {
display: inline-block;
position: relative;
bottom: .5ex;
padding-left: 1em;
height: 1px;
border-bottom-width: 2px;
border-bottom-style: solid;
/* border-bottom-color is set based on the series color */
}
/* styles for a dashed line in the legend, e.g. when strokePattern is set */
.dygraph-legend-dash {
display: inline-block;
position: relative;
bottom: .5ex;
height: 1px;
border-bottom-width: 2px;
border-bottom-style: solid;
/* border-bottom-color is set based on the series color */
/* margin-right is set based on the stroke pattern */
/* padding-left is set based on the stroke pattern */
}
.dygraph-roller {
position: absolute;
z-index: 10;
}
/* This class is shared by all annotations, including those with icons */
.dygraph-annotation {
position: absolute;
z-index: 10;
overflow: hidden;
}
/* This class only applies to annotations without icons */
/* Old class name: .dygraphDefaultAnnotation */
.dygraph-default-annotation {
border: 1px solid black;
background-color: white;
text-align: center;
}
.dygraph-axis-label {
/* position: absolute; */
/* font-size: 14px; */
z-index: 10;
line-height: normal;
overflow: hidden;
color: black; /* replaces old axisLabelColor option */
}
.dygraph-axis-label-x {
}
.dygraph-axis-label-y {
}
.dygraph-axis-label-y2 {
}
.dygraph-title {
font-weight: bold;
z-index: 10;
text-align: center;
/* font-size: based on titleHeight option */
}
.dygraph-xlabel {
text-align: center;
/* font-size: based on xLabelHeight option */
}
/* For y-axis label */
.dygraph-label-rotate-left {
text-align: center;
/* See http://caniuse.com/#feat=transforms2d */
transform: rotate(90deg);
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-o-transform: rotate(90deg);
-ms-transform: rotate(90deg);
}
/* For y2-axis label */
.dygraph-label-rotate-right {
text-align: center;
/* See http://caniuse.com/#feat=transforms2d */
transform: rotate(-90deg);
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
}
.input-group-prepend, .input-group-prepend > span {
width:12em;
}
.input-group-append, .input-group-append > select {
width:6em;
}
.curr { font-size:0.8em; }
.prices { text-align: right; }
#pricegraph { width:100%; }
#pricegraph_btn { padding-bottom: 1em; }
#resetZoom { float:right; }
#legend {
float:right;
width:10rem;
position: relative;
top:-1em;
text-align: right;
}
.finfo_config {
text-align:right;
background:lavender;
border:0.5rem solid white;
padding:1em;
}
.finfo_chart {
font-size:0.7em;
padding:1rem;
background:lavender;
border:0.5rem solid white;
height:39em;
}
.ticker {
border:0.5rem solid white;
padding:1.5rem;
background:lightblue;
}
.api {
font-size: 0.8em;
line-height: 0.1em;
}
#history > .row:first-child > * {
font-weight:bold;
}
#history > .row > .col:nth-child(2),
#history > .row > .col:nth-child(5) {
color:blue;
}
.finfo_history {
font-size:0.8em;
padding:1rem;
background:lavender;
margin:0.5rem;
}
This diff is collapsed.
This diff is collapsed.
function content_load( url, datatype ){
var json = null;
if( datatype == undefined ){
datatype=url.match(/\..*$/g)[0].slice(1);
}
console.log( url, datatype );
$.ajax({
'async': false,
'global': false,
'cache': false,
'url': url,
'dataType': ((datatype == 'csv') ? 'text' : datatype),
'success': function (data) {
result = data;
}
});
if(datatype == 'csv'){
result=result.split(/\n/g);
var AA=[];
result.forEach(
function(v,i){
var A=v.split(/,/g);
if( A.length > 1 && A[0] != '' ){
AA.push(A);
}
}
);
result=AA;
}
return result;
}
function getQueryVariable(variable)
{
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if(pair[0] == variable){return pair[1];}
}
return(false);
}
//https://www.coinexchange.io/api/v1/getmarketsummary?market_id=200
//https://www.coinexchange.io/api/v1/getorderbook?market_id=200
var DATA;
var PAIR;
var DEFAULT_CURRENCY='eur';
var GRAPH;
$( document ).ready(
function() {
$( '#curr' ).change(function() {
get_data( $(this).val() );
});
get_data( (( getQueryVariable('c') == false ) ? DEFAULT_CURRENCY : getQueryVariable('c') ) );
$('#resetZoom').click(function(){ unzoomGraph(); });
}
);
var lastlegend='..loading..';
function legendFormatter(data) {
if (data.x == null) {
// This happens when there's no selection and {legend: 'always'} is set.
//return '<br>' + data.series.map(function(series) { return series.dashHTML + ' ' + series.labelHTML }).join('<br>');
return lastlegend;
}
var html = this.getLabels()[0] + ': ' + data.xHTML;
data.series.forEach(function(series) {
if (!series.isVisible) return;
var labeledData = series.labelHTML + ': ' + series.yHTML;
if (series.isHighlighted) {
labeledData = '<b>' + labeledData + '</b>';
}
html += '<br>' + series.dashHTML + ' ' + labeledData;
});
lastlegend=html;
return html;
}
function unzoomGraph() {
GRAPH.updateOptions({
dateWindow: null,
valueRange: null
});
}
function create_graph(){
var D=[];
var L=['time','fv_price','fm_price'];
var factor_curr=0;
var factor=0;
DATA.history.slice(1).forEach(
function(v,i){
var A=v.split(/,/g);
if( A.length > 1 ){
factor=parseFloat(A[5]);
if( factor_curr == 0 ) factor_curr=factor;
fact=factor/factor_curr;
var LMH_fv=[A[1]*fact,A[1]*fact,A[2]*fact];
var LMH_fm=[A[3]*fact,(A[3]*fact+A[4]*fact)/2,A[4]*fact];
D.push([new Date(A[0]*1000),LMH_fv,LMH_fm]);
}
}
);
console.log(D);
GRAPH = new Dygraph(
document.getElementById("pricegraph"),
D, // path to CSV file
{
customBars:true,
labels:L,
labelsSeparateLines: true,
labelsKMB: true,
legendFormatter: legendFormatter,
labelsDiv: document.getElementById('legend'),
legend:'always',
hideOverlayOnMouseOut:false,
series: {
'fv_price': { axis: 'y' },
'fm_price': { axis: 'y' }
},
axes : {
y : {
valueFormatter: function(v) {
return v.toFixed(4) + ' ' + DATA.config.FACTOR_PREPOSITION + DATA.config.CURRENCY.toUpperCase();
},
axisLabelFormatter: function(v) {
return v.toFixed(3);
}
}
}
} // options
);
var linear = document.getElementById("linear");
var log = document.getElementById("log");
var setLog = function(val) {
GRAPH.updateOptions({ logscale: val });
linear.disabled = !val;
log.disabled = val;
};
linear.onclick = function() { setLog(false); };
log.onclick = function() { setLog(true); };
GRAPH.setSelection(GRAPH.file_.length-1);
}
function get_data(curr){
DATA=content_load('functions/get_data.php?c=' + curr,'json' );
PAIR=content_load('data/coingecko_currencies.json');
$('#curr').html('');
var tmp='';
PAIR.sort().forEach(
function(v,i){
tmp+='<option value="'+v+'" '+((v==DATA.config.CURRENCY) ? 'selected' : '' )+'>'+v.toUpperCase()+'</option>';
}
);
$('#curr').html(tmp);
$('#fv_bid').html( DATA.fv_bid.toString().slice(0,-2) + '<sub>' + DATA.fv_bid.toString().slice(-2) + '</sub>' );
$('#fm_bid').html( DATA.fm_bid.toString().slice(0,-2) + '<sub>' + DATA.fm_bid.toString().slice(-2) + '</sub>' );
$('#fm_ask').html( DATA.fm_ask.toString().slice(0,-2) + '<sub>' + DATA.fm_ask.toString().slice(-2) + '</sub>' );
$('#fv_ask').html( DATA.fv_ask.toString().slice(0,-2) + '<sub>' + DATA.fv_ask.toString().slice(-2) + '</sub>' );
$('.curr').html(DATA.config.FACTOR_PREPOSITION + DATA.config.CURRENCY.toUpperCase() + ' / FAIR' );
$('#conf').html( JSON.stringify( DATA.config).replace(/\,/g,'<br>').replace(/\"|\{|\}/g,'').replace(/\:/g,' = ') );
console.log(curr);
$('.api.share > a').attr('href',window.location.origin + window.location.pathname+'?c='+curr);
$('.api.data > a').attr('href','data/freevision_'+DATA.config.CURRENCY+'.json');
$('.api.history > a').attr('href','data/freevisionHistory_'+DATA.config.CURRENCY+'.csv');
var tmp='';
DATA.history.slice(0,1).concat(DATA.history.slice(1).reverse()).forEach(
function(v,i){
tmp+=history_out(v,i);
}
);
$('#history').html(tmp);
create_graph();
}
function history_out(v,i){
var V=v.split(/,/g);
var tmp='';
if( V.length > 1 ){
tmp+='<div class="row">'
tmp+='<div class="col-sm-2">'+(( i == 0 ) ? V[0] : new Date(V[0]*1000 - new Date().getTimezoneOffset()*60*1000).toJSON().slice(0,16).replace(/T/g,' '))+'</div>';
tmp+='<div class="col">'+V[1]+'</div>';
tmp+='<div class="col">'+V[3]+'</div>';
tmp+='<div class="col">'+V[4]+'</div>';
tmp+='<div class="col">'+V[2]+'</div>';
tmp+='<div class="col">'+V[5]+'</div>';
//tmp+='<div class="col">'+V[6]+'</div>';
tmp+='</div>';
}
return tmp;
}
{
"ask": 3006.62,
"bid": 3003.98,
"last": 2998.73,
"high": 3032.12,
"low": 2993.19,
"open": {
"hour": 2998.43,
"day": 3015.52,
"week": 3114.24,
"month": 3337.50,
"month_3": 5597.74,
"month_6": 6347.26,
"year": 7653.92
},
"averages": {
"day": 3010.10,
"week": 3010.35,
"month": 3041.64
},
"volume": 41219.40837125,
"changes": {
"price": {
"hour": 0.30,
"day": -16.79,
"week": -115.51,
"month": -338.77,
"month_3": -2599.01,
"month_6": -3348.53,
"year": -4655.19
},
"percent": {
"hour": 0.01,
"day": -0.56,
"week": -3.71,
"month": -10.15,
"month_3": -46.43,
"month_6": -52.76,
"year": -60.82
}
},
"volume_percent": 16.31,
"timestamp": 1549299565,
"display_timestamp": "2019-02-04 16:59:25",
"display_symbol": "BTC-EUR"
}
\ No newline at end of file
{"success":"1","request":"\/api\/v1\/public\/getorderbook","message":"","result":{"SellOrders":[{"Type":"sell","Price":"0.00003369","OrderTime":"2019-02-04 16:47:47","Quantity":"194.57794856"},{"Type":"sell","Price":"0.00003370","OrderTime":"2019-02-03 15:12:14","Quantity":"276.76128607"},{"Type":"sell","Price":"0.00003372","OrderTime":"2019-02-02 19:54:55","Quantity":"153.00000000"},{"Type":"sell","Price":"0.00003375","OrderTime":"2019-02-02 19:56:18","Quantity":"248.00000000"},{"Type":"sell","Price":"0.00003378","OrderTime":"2019-02-02 12:59:29","Quantity":"515.11888539"},{"Type":"sell","Price":"0.00003379","OrderTime":"2019-01-31 12:41:52","Quantity":"30.00000000"},{"Type":"sell","Price":"0.00003400","OrderTime":"2018-12-03 18:36:41","Quantity":"300.00000000"},{"Type":"sell","Price":"0.00003400","OrderTime":"2019-02-04 01:20:32","Quantity":"550.00000000"},{"Type":"sell","Price":"0.00003449","OrderTime":"2018-12-03 18:37:11","Quantity":"300.00000000"},{"Type":"sell","Price":"0.00003470","OrderTime":"2019-02-02 13:47:46","Quantity":"700.00000000"},{"Type":"sell","Price":"0.00003487","OrderTime":"2019-01-10 22:52:47","Quantity":"1639.72902558"},{"Type":"sell","Price":"0.00003488","OrderTime":"2019-01-07 20:28:07","Quantity":"800.00000000"},{"Type":"sell","Price":"0.00003500","OrderTime":"2018-12-14 00:02:01","Quantity":"700.00000000"},{"Type":"sell","Price":"0.00003500","OrderTime":"2018-12-27 22:32:13","Quantity":"100.00000000"},{"Type":"sell","Price":"0.00003500","OrderTime":"2019-01-27 19:00:18","Quantity":"1000.00000000"},{"Type":"sell","Price":"0.00003500","OrderTime":"2019-02-03 23:16:47","Quantity":"1094.77323044"},{"Type":"sell","Price":"0.00003500","OrderTime":"2019-02-04 16:14:22","Quantity":"2600.00000000"},{"Type":"sell","Price":"0.00003501","OrderTime":"2018-12-03 18:37:48","Quantity":"292.48060445"},{"Type":"sell","Price":"0.00003580","OrderTime":"2019-01-10 06:34:09","Quantity":"500.00000000"},{"Type":"sell","Price":"0.00003595","OrderTime":"2019-01-15 08:24:15","Quantity":"400.00000000"},{"Type":"sell","Price":"0.00003599","OrderTime":"2018-12-28 12:22:25","Quantity":"12.00000000"},{"Type":"sell","Price":"0.00003600","OrderTime":"2018-12-13 20:42:02","Quantity":"225.98989691"},{"Type":"sell","Price":"0.00003600","OrderTime":"2018-12-27 22:32:34","Quantity":"100.00000000"},{"Type":"sell","Price":"0.00003601","OrderTime":"2018-11-27 09:29:08","Quantity":"200.00000000"},{"Type":"sell","Price":"0.00003698","OrderTime":"2018-12-07 14:46:36","Quantity":"2000.00000000"},{"Type":"sell","Price":"0.00003700","OrderTime":"2018-12-03 17:06:26","Quantity":"500.00000000"},{"Type":"sell","Price":"0.00003700","OrderTime":"2018-12-21 17:40:19","Quantity":"1500.00000000"},{"Type":"sell","Price":"0.00003700","OrderTime":"2019-01-20 05:09:57","Quantity":"921.56527009"},{"Type":"sell","Price":"0.00003701","OrderTime":"2018-11-27 09:29:28","Quantity":"200.00000000"},{"Type":"sell","Price":"0.00003800","OrderTime":"2018-12-03 03:18:16","Quantity":"100.00000000"},{"Type":"sell","Price":"0.00003800","OrderTime":"2018-12-11 21:49:20","Quantity":"1000.00000000"},{"Type":"sell","Price":"0.00003800","OrderTime":"2019-01-24 16:11:38","Quantity":"966.18607997"},{"Type":"sell","Price":"0.00003890","OrderTime":"2018-12-03 18:30:13","Quantity":"100.00000000"},{"Type":"sell","Price":"0.00003895","OrderTime":"2018-12-03 18:29:37","Quantity":"100.00000000"},{"Type":"sell","Price":"0.00003895","OrderTime":"2018-12-13 10:21:09","Quantity":"40.27452133"},{"Type":"sell","Price":"0.00003899","OrderTime":"2018-12-07 14:47:04","Quantity":"5000.00000000"},{"Type":"sell","Price":"0.00003901","OrderTime":"2018-11-23 14:28:13","Quantity":"10000.00000000"},{"Type":"sell","Price":"0.00003950","OrderTime":"2018-11-30 20:35:03","Quantity":"235.00000000"},{"Type":"sell","Price":"0.00003970","OrderTime":"2018-11-30 20:35:40","Quantity":"200.00000000"},{"Type":"sell","Price":"0.00003995","OrderTime":"2019-01-15 08:26:53","Quantity":"50.00000000"},{"Type":"sell","Price":"0.00003997","OrderTime":"2018-11-21 06:52:16","Quantity":"2501.87640731"},{"Type":"sell","Price":"0.00003999","OrderTime":"2018-11-21 22:39:54","Quantity":"250.00000000"},{"Type":"sell","Price":"0.00003999","OrderTime":"2018-11-24 06:43:28","Quantity":"203.00000000"},{"Type":"sell","Price":"0.00003999","OrderTime":"2018-11-29 18:31:15","Quantity":"300.00000000"},{"Type":"sell","Price":"0.00003999","OrderTime":"2018-12-08 01:21:39","Quantity":"10000.00000000"},{"Type":"sell","Price":"0.00003999","OrderTime":"2018-12-13 17:31:50","Quantity":"700.00000000"},{"Type":"sell","Price":"0.00003999","OrderTime":"2018-12-16 22:29:53","Quantity":"125.00000000"},{"Type":"sell","Price":"0.00004000","OrderTime":"2018-11-20 23:11:29","Quantity":"100.00000000"},{"Type":"sell","Price":"0.00004000","OrderTime":"2018-11-23 07:57:19","Quantity":"8713.33429268"},{"Type":"sell","Price":"0.00004000","OrderTime":"2019-01-27 19:00:43","Quantity":"1000.00000000"}],"BuyOrders":[{"Type":"buy","Price":"0.00003183","OrderTime":"2019-02-04 16:47:46","Quantity":"230.71347785"},{"Type":"buy","Price":"0.00003182","OrderTime":"2019-02-04 16:46:47","Quantity":"48.56097503"},{"Type":"buy","Price":"0.00003180","OrderTime":"2019-02-04 16:12:11","Quantity":"160.00000000"},{"Type":"buy","Price":"0.00003165","OrderTime":"2019-02-04 03:24:08","Quantity":"100.00000000"},{"Type":"buy","Price":"0.00003165","OrderTime":"2019-02-04 10:18:05","Quantity":"300.00000000"},{"Type":"buy","Price":"0.00003160","OrderTime":"2019-02-04 01:16:48","Quantity":"500.00000000"},{"Type":"buy","Price":"0.00003150","OrderTime":"2019-02-03 22:50:12","Quantity":"209.27422222"},{"Type":"buy","Price":"0.00003128","OrderTime":"2019-02-04 15:38:40","Quantity":"284.84654731"},{"Type":"buy","Price":"0.00003126","OrderTime":"2019-02-04 15:09:08","Quantity":"278.31094050"},{"Type":"buy","Price":"0.00003125","OrderTime":"2019-02-04 01:15:12","Quantity":"500.00000000"},{"Type":"buy","Price":"0.00003101","OrderTime":"2019-02-04 16:42:49","Quantity":"322.47662045"},{"Type":"buy","Price":"0.00003100","OrderTime":"2019-02-03 22:36:03","Quantity":"125.00000000"},{"Type":"buy","Price":"0.00003100","OrderTime":"2019-02-04 01:14:46","Quantity":"1000.00000000"},{"Type":"buy","Price":"0.00003096","OrderTime":"2019-02-03 20:34:18","Quantity":"288.00000000"},{"Type":"buy","Price":"0.00003090","OrderTime":"2019-02-03 19:32:46","Quantity":"90.00000000"},{"Type":"buy","Price":"0.00003080","OrderTime":"2019-02-03 13:05:29","Quantity":"65.00000000"},{"Type":"buy","Price":"0.00003080","OrderTime":"2019-02-04 13:10:46","Quantity":"380.00000000"},{"Type":"buy","Price":"0.00003071","OrderTime":"2019-02-03 02:02:46","Quantity":"83.21102572"},{"Type":"buy","Price":"0.00003051","OrderTime":"2019-02-03 00:38:51","Quantity":"143.33798755"},{"Type":"buy","Price":"0.00003050","OrderTime":"2019-02-03 00:12:25","Quantity":"100.00000000"},{"Type":"buy","Price":"0.00003040","OrderTime":"2019-02-03 00:03:48","Quantity":"90.00000000"},{"Type":"buy","Price":"0.00003030","OrderTime":"2019-02-03 00:01:19","Quantity":"100.00000000"},{"Type":"buy","Price":"0.00003020","OrderTime":"2019-02-02 23:58:32","Quantity":"194.76816071"},{"Type":"buy","Price":"0.00003015","OrderTime":"2019-02-02 22:46:00","Quantity":"340.00000000"},{"Type":"buy","Price":"0.00003011","OrderTime":"2019-02-04 11:47:26","Quantity":"230.50758834"},{"Type":"buy","Price":"0.00003010","OrderTime":"2019-02-02 13:43:38","Quantity":"1000.00000000"},{"Type":"buy","Price":"0.00002975","OrderTime":"2019-02-02 09:30:10","Quantity":"29.47899160"},{"Type":"buy","Price":"0.00002960","OrderTime":"2019-02-02 22:51:53","Quantity":"180.00000000"},{"Type":"buy","Price":"0.00002957","OrderTime":"2019-02-02 22:39:33","Quantity":"155.00000000"},{"Type":"buy","Price":"0.00002935","OrderTime":"2019-02-02 22:37:45","Quantity":"200.00000000"},{"Type":"buy","Price":"0.00002923","OrderTime":"2019-02-04 03:55:48","Quantity":"613.95077966"},{"Type":"buy","Price":"0.00002921","OrderTime":"2019-02-03 04:33:45","Quantity":"1027.04553235"},{"Type":"buy","Price":"0.00002920","OrderTime":"2019-02-02 22:30:44","Quantity":"1643.88561644"},{"Type":"buy","Price":"0.00002910","OrderTime":"2019-02-02 13:46:33","Quantity":"600.00000000"},{"Type":"buy","Price":"0.00002905","OrderTime":"2019-02-04 13:59:05","Quantity":"177.40543701"},{"Type":"buy","Price":"0.00002902","OrderTime":"2019-02-02 00:38:24","Quantity":"700.45309851"},{"Type":"buy","Price":"0.00002901","OrderTime":"2019-02-04 06:02:28","Quantity":"13683.81194088"},{"Type":"buy","Price":"0.00002900","OrderTime":"2019-01-14 07:53:54","Quantity":"10000.00000000"},{"Type":"buy","Price":"0.00002810","OrderTime":"2019-01-07 20:28:41","Quantity":"500.00000000"},{"Type":"buy","Price":"0.00002757","OrderTime":"2019-02-01 16:15:43","Quantity":"153.00000000"},{"Type":"buy","Price":"0.00002750","OrderTime":"2018-12-31 11:56:16","Quantity":"8.10128436"},{"Type":"buy","Price":"0.00002707","OrderTime":"2018-12-25 13:40:43","Quantity":"25.71681566"},{"Type":"buy","Price":"0.00002571","OrderTime":"2019-01-11 14:58:31","Quantity":"55.02546694"},{"Type":"buy","Price":"0.00002533","OrderTime":"2019-01-09 12:21:56","Quantity":"41.12180142"},{"Type":"buy","Price":"0.00002526","OrderTime":"2019-02-02 09:58:39","Quantity":"1187.64845606"},{"Type":"buy","Price":"0.00002525","OrderTime":"2018-12-11 10:47:35","Quantity":"2737.76718363"},{"Type":"buy","Price":"0.00002515","OrderTime":"2018-12-07 05:11:03","Quantity":"14.00000000"},{"Type":"buy","Price":"0.00002252","OrderTime":"2019-01-09 12:24:31","Quantity":"63.30144161"},{"Type":"buy","Price":"0.00002251","OrderTime":"2018-10-16 04:15:09","Quantity":"1500.00000000"},{"Type":"buy","Price":"0.00002251","OrderTime":"2018-11-22 17:39:26","Quantity":"37.00000000"}]}}
\ No newline at end of file
{"fv_bid":"0.05","fv_ask":"0.11","fm_bid":"0.088","fm_ask":"0.105","config":{"ASK_DEPTH_EUR":1000,"BID_DEPTH_EUR":1000,"ASK_OFFSET_EUR":0.01,"BID_OFFSET_EUR":0.01,"BID_MIN_EUR":0.05},"formulas":{"(1)fv_bid":"max ( BID_MIN_EUR&#44; int( ( bid_price - BID_OFFSET_EUR ) * 10 )\/10 )","(2)fm_bid":"free market bid price @ BID_DEPTH_EUR","(3)fm_ask":"free market ask price @ ASK_DEPTH_EUR","(4)fv_ask":"ask_price + ASK_OFFSET_EUR"}}
\ No newline at end of file
timestamp,fv_bid,fv_ask,fm_bid,fm_ask,bid_depth_eur,ask_depth_eur
1549279266,0.05,0.12,0.087,0.108,1000,1000
1549299566,0.05,0.11,0.088,0.105,1000,1000
Header set Access-Control-Allow-Origin "*"
<?php
ini_set('display_errors',1);
//define('COINEXCHANGE','../data/coinexchange.json');
//define('COINEXCHANGE_URL','https://www.coinexchange.io/api/v1/getmarketsummary?market_id=200');
define('COINEXCHANGE','../data/coinexchange.json');
define('COINEXCHANGE_URL','https://www.coinexchange.io/api/v1/getorderbook?market_id=200');
//https://www.coinexchange.io/api/v1/getorderbook?market_id=200
//define('BITCOINAVERAGE','../data/bitcoinaverage.json');
//define('BITCOINAVERAGE_URL','https://apiv2.bitcoinaverage.com/indices/global/ticker/BTCEUR');
define('FREEVISION', '../data/freevision_');
define('FREEVISION_HISTORY', '../data/freevisionHistory_');
define('COINGECKO_CURRENCIES', '../data/coingecko_currencies.json');
define('COINGECKO_CURRENCIES_URL','https://api.coingecko.com/api/v3/simple/supported_vs_currencies');
define('COINGECKO_FAIR_PAIRS', '../data/coingecko_fair_pairs.json');
define('COINGECKO_FAIR_PAIRS_URL','https://api.coingecko.com/api/v3/simple/price?ids=faircoin&vs_currencies=');
define('WALLET_TICKER_BID', '../data/ticker');
define('WALLET_TICKER_ASK', '../data/ticker_ask');
define('WALLET_TICKER_MID', '../data/ticker_mid');
define('DEFAULT_CURRENCY','eur');
//define('ASK_DEPTH_EUR',1000);
//define('BID_DEPTH_EUR',1000);
//define('SLOT_SIZE_EUR',100);
define('ASK_DEPTH_SLOTS',10);
define('BID_DEPTH_SLOTS',10);
define('SLOT_SIZE_FAIR',1000);
define('ASK_OFFSET_PERC',1.05);
define('BID_OFFSET_PERC',0.95);
define('REFRESH_TIME_SECONDS',3600);
define('FACTOR_PREPOSITION',Array(
1 => '',
0.001=> 'm',
0.000001=>'µ'
)
);
define('LOG_NORMALIZED_25',
Array(
1,
1.25,
1.5,
1.75,
2,
2.5,
3,
3.5,
4,
5,
6,
7,
8
)
);
define('LOG_NORMALIZED_5',
Array(
1,
1.05,
1.1,
1.15,
1.2,
1.25,
1.3,
1.35,
1.4,
1.5,
1.6,
1.7,
1.8,
1.9,
2,
2.1,
2.2,
2.3,
2.4,
2.5,
2.6,
2.7,
2.8,
3,
3.25,