Bitcoin Forum
November 14, 2024, 12:23:47 AM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Tablook - a Universal Bitcoin/Altcoin ticker for Android  (Read 516 times)
tablook (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
April 12, 2016, 04:38:26 AM
Last edit: September 01, 2016, 03:48:37 AM by tablook
 #1

See Tablook.com.

I wanted to put all interesting bitcon-related information in one table for convenient look-up. But new coins/exchanges/mining pools and other data sources keep popping up every day, so instead of displaying some fixed information, I threw a JavaScript interpreter and editor in, so user can write her own scripts to download and format information in any way possible. You can display difficulty projections, mining profitability calculations, exchange rates, or any other data available on the internet. Share scripts with others, and search for scripts that others created - kinda micro app store.

Examples of scripts that I created:

btc_bitstamp - Last bitcoin price at Bitstamp
btc_bitfinex - Last bitcoin price at Bitfinex
kraken_polo_eth_btc_arb - watch for ETH arbitrage opportunities between Kraken and Poloniex
btc_difficulty - show current bitcoin difficulty and projected increase
eth_btc_polniex - ETH/BTC exchange rate at poloniex
fx_eurusd - obvious
datetime - current time

Scripts can also vibrate the phone and show notifications, in case you want to be notified when BTC crosses $10000 level (soon I hope!).
I even wrote a script to show next bus arrival time for my local bus route.

App is available in Google Play Store https://play.google.com/store/apps/details?id=com.tablook1.tablook.

Can make an iPhone version if there is any interest.
tablook (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
April 12, 2016, 05:07:54 AM
 #2

To make scripts smaller and editing easier, it uses a simplified version of JavaScript where callbacks are not needed, every function is automatically a promise. So instead of writing

http.get("website.com", function(html) { log(html);}),

you write

log(http.get("website.com"));

and it will execute asynchronously.
tablook (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
September 01, 2016, 03:40:49 AM
Last edit: September 01, 2016, 03:51:39 AM by tablook
 #3

Added a script to watch current balance of a bitcoin address.
Search for "watch_address" in the Tablook store.

This is how the script looks:

Code:
function coins(addr)
{
  json=api.http.get('https://blockchain.info/unspent?active='+addr);
  outputs=JSON.parse(json).unspent_outputs;
  sum = 0;
  for(var i=0; i < outputs.length; i++)
    sum += parseFloat(outputs[i].value);
  return sum;
};
addr1 = coins('12c6DSiU4Rq3P4ZxziKxzrL5LmMBrzjrJX');
'Address ' + ((addr1)/100000000).toFixed(3);"

The Tablook store version watches the first spendable address (which belongs to Satoshi, obviously. If this one ever spends, watch out!).
Replace Satoshi's address with any other, or modify it to watch several addresses.
I use it to watch my bait address (an unencrypted wallet.dat sitting in my computer and designed to detect when my computer gets pwned).
tablook (OP)
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
September 01, 2016, 04:31:28 AM
 #4

To show a notification if Satoshi's coins move, add this:

Code:
if(addr1 < 50*1e8)
{
  api.vibrate(1000);
  api.notify('OMG!', 'Sell Sell Sell!');
}
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!