DashTV - The easy way to keep an eye on your investment

mjsrs

Member
Aug 6, 2014
87
68
68
Most of my data is taken from https://dash-stats.firebaseio.com/stats.json (latest on the bottom) . Dash price is always slightly lower than Poloniex. I don't know from which exchange exactly it's taken, maybe it's an average value?
Hi pille ,

The price at dash-stats.com is an average value from cryptsy, bittrex and poloniex. Those are the top 3 exchanges with more volume.
Code is open-source and you can see it here:
https://github.com/mjsrs/dash-board/blob/master/docker/sync.py

Edit: added bter and livecoin to the price average calcs
 
Last edited by a moderator:

mjsrs

Member
Aug 6, 2014
87
68
68
Actually I request the API data every minute with a cronjob and write it to a file which my users access. (Is there a better solution? thought it's ok).
But still, with the worldcoinindex API I could refresh only every 5 minutes.

Edit: fiat prices are now calculated from poloniex price too.

The best way to do it is to use javascript API:
https://www.firebase.com/docs/web/api/
With this API you will have the changes in realtime without requesting all data every minute.
PM if you need help with this.
 
  • Like
Reactions: pille

tungfa

Administrator
Dash Core Team
Moderator
Foundation Member
Masternode Owner/Operator
Apr 9, 2014
8,906
6,729
1,283
I really like the black and white !
do not change it please ;)
(specially the black D thumbnail)
 

tungfa

Administrator
Dash Core Team
Moderator
Foundation Member
Masternode Owner/Operator
Apr 9, 2014
8,906
6,729
1,283
you know
Zero Block ?
https://zeroblock.com/mobile/

Their page and app's rule for BTC (news, facts, numbers and charts)
if you extend your page a 'little further' we would have an amazing
"Dash Block" - TV"
;)

Edit:
could not stop,
this would be so sexy
;)
(this is just a sketch, if you need a proper version i am happy to help)
 
Last edited by a moderator:
  • Like
Reactions: TaoOfSatoshi

pille

Active Member
Feb 18, 2015
268
295
123
This is a great idea for bigger screens tungfa. For small displays it could remain as it is (Raspi, Smartphone) and if it gets bigger it could extend. Is there a service around that provides a chart like this, I can simply embed? Doing this myself exceeds my abilities.
 

tungfa

Administrator
Dash Core Team
Moderator
Foundation Member
Masternode Owner/Operator
Apr 9, 2014
8,906
6,729
1,283
This is a great idea for bigger screens tungfa. For small displays it could remain as it is (Raspi, Smartphone) and if it gets bigger it could extend. Is there a service around that provides a chart like this, I can simply embed? Doing this myself exceeds my abilities.
I have no Idea ether
I can only copy / paste this visually together
 

mjsrs

Member
Aug 6, 2014
87
68
68
Maybe you should kick cryptsy, their price is a lot lower because of their withdrawal problems. The average is distorted by them.
Cryptsy is already kicking out themselves because their server is really slow at the moment.
I've added two more exchanges: bter and livecoin. It will make the price more accurate.
Now the price is an average from 5 exchanges.

Regarding the communication with my API, if you can't or don't want to use the javascript api, I would suggest you use this url to get the data:
https://dash-stats.firebaseio.com/stats.json?orderBy="timestamp"&limitToLast=1

This url will give you only the lastest added info, decreasing response time and traffic.
It's important to reduce traffic because I'm using a free plan which gives 10Gb of traffic :)
 

tungfa

Administrator
Dash Core Team
Moderator
Foundation Member
Masternode Owner/Operator
Apr 9, 2014
8,906
6,729
1,283
down ?
:sad:
 

tungfa

Administrator
Dash Core Team
Moderator
Foundation Member
Masternode Owner/Operator
Apr 9, 2014
8,906
6,729
1,283
down ?
:sad:
 

Lebubar

Active Member
Mar 15, 2014
249
213
103
It seems that it was not fixed permanently ;) down for me right now.

Edit : working now.
 
Last edited by a moderator:

Balych

Active Member
Sep 12, 2015
365
211
113
Dash Address
Xba1ychX7CjgbRrCKE1LjHjT3jLUhcexs5
It would be nice to add numeral.language('x') where x is window.navigator.language or any other function which get browsers locale ;)
 
  • Like
Reactions: pille

pille

Active Member
Feb 18, 2015
268
295
123
It would be nice to add numeral.language('x') where x is window.navigator.language or any other function which get browsers locale ;)
Is there an easy way to embed all the languages?
 

Balych

Active Member
Sep 12, 2015
365
211
113
Dash Address
Xba1ychX7CjgbRrCKE1LjHjT3jLUhcexs5
Numeral-js ver 1.5.0+ support 27 language settings with languages.js

May be it work
JavaScript:
var lang = (navigator.language || navigator.systemLanguage || navigator.userLanguage).substr(0, 2).toLowerCase();

numeral.language(lang)
 

pille

Active Member
Feb 18, 2015
268
295
123
multilingual seperators done.

('be-nl'||'chs'||'cs'||'da-dk'||'de-ch'||'de'||'en-gb'||'es'||'et'||'fi'||'fr-CA'||'fr-ch'||'fr'||'hu'||'it'||'ja'||'nl-nl'||'pl'||'pt-br'||'pt-pt'||'ru-UA'||'ru'||'sk'||'th'||'tr'||'uk-UA')
 
Last edited by a moderator:
  • Like
Reactions: naruby and Balych

Balych

Active Member
Sep 12, 2015
365
211
113
Dash Address
Xba1ychX7CjgbRrCKE1LjHjT3jLUhcexs5
Nice, thank you!