Bitcoin Forum
June 22, 2024, 09:36:13 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 [48] 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 »
  Print  
Author Topic: CoinChoose - alternative site to show respective profitability of the alt coins  (Read 150551 times)
Tommo_Aus
Sr. Member
****
Offline Offline

Activity: 420
Merit: 250


View Profile
August 09, 2013, 01:03:20 AM
 #941

I'm trying to access the API through Java but keep getting a 403 - Forbidden error, is the API blocked unless you're using a browser? I'm doing something like:

URL url = new URL("http://www.coinchoose.com/api.php");
HttpURLConnection conn;
try {
     conn = (HttpURLConnection) url.openConnection();
     return IOUtils.toString(conn.getInputStream());
} catch (IOException ex) {
     throw new Exception("CoinChoose unavailable", ex);
}

Doing this works for any other API, just not this one Sad

Tompool - http://tompool.org - a 2% fee SHA256/Scrypt/BURST/Groestl multipool supporting ANC, ASC, DGC, EZC, FLO, GLD, GME, MNC, RYC, TGC, TRC, XNC, ZET & more
sal002 (OP)
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile WWW
August 09, 2013, 12:24:28 PM
 #942

I am trying to use the JSON feature.  Is there a param that can be passed to the PHP to just return one coin?  I'm trying to pull this into Excel however the data opening in http://jsonviewer.stack.hu/# is not really usable for my situation as it doesn't parse easy.  JSON doesn't seem to have any Start Array.  They all start with 0 so have no unique variable designator to call a particular block.

Thanks.

JR

Code:
  {
    "0": "ALF",
    "symbol": "ALF",
    "1": "Alphacoin",
    "name": "Alphacoin",
    "2": "scrypt",
    "algo": "scrypt",
    "3": "139899",
    "currentBlocks": "139899",
    "4": "0.28117197",
    "difficulty": "0.28117197",
    "5": "50",
    "reward": "50",
    "6": "0.5",
    "minBlockTime": "0.5",
    "7": "42348021",
    "networkhashrate": "42348021",
    "price": "0.00000668",
    "exchange": "CRY",
    "ratio": 177.67324231619,
    "adjustedratio": 149.30524564386,
    "avgProfit": "238.90397144111515",
    "avgHash": "32870159.8819"
  },
  {
    "0": "AMC",
    "symbol": "AMC",
    "1": "AmericanCoin",
    "name": "AmericanCoin",
    "2": "scrypt",
    "algo": "scrypt",
    "3": "26447",
    "currentBlocks": "26447",
    "4": "0.58185063",
    "difficulty": "0.58185063",
    "5": "100",
    "reward": "100",
    "6": "1",
    "minBlockTime": "1",
    "7": "4298789",
    "networkhashrate": "4298789",
    "price": "0.0000082675",
    "exchange": "CRY",
    "ratio": 212.52512455529,
    "adjustedratio": 196.45179580741,
    "avgProfit": "201.92091254984373",
    "avgHash": "5449881.8681"
  },

Hi - since the API is already being used in several applications, I can't alter the format now.  However, you could just iterate thru and find the symbol by examining the "symbol".
sal002 (OP)
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile WWW
August 09, 2013, 12:25:41 PM
 #943

I'm trying to access the API through Java but keep getting a 403 - Forbidden error, is the API blocked unless you're using a browser? I'm doing something like:

URL url = new URL("http://www.coinchoose.com/api.php");
HttpURLConnection conn;
try {
     conn = (HttpURLConnection) url.openConnection();
     return IOUtils.toString(conn.getInputStream());
} catch (IOException ex) {
     throw new Exception("CoinChoose unavailable", ex);
}

Doing this works for any other API, just not this one Sad

You might have been blocked by CloudFlare as there is nothing on my side blocking it (several applications use it not from a browser with no issue).  Please PM me your IP and I can whitelist.
Cryptoin
Full Member
***
Offline Offline

Activity: 155
Merit: 100



View Profile
August 11, 2013, 05:22:14 PM
 #944

Any chance you will be adding trade volume in BTC to the charts?
lucazane
Legendary
*
Offline Offline

Activity: 1198
Merit: 1000



View Profile WWW
August 11, 2013, 05:32:05 PM
 #945

Any chance you will be adding trade volume in BTC to the charts?
it would be great !

Total volume trade (sum of all exchange)

The Blocks Factory Mining POOL : DGB(sha256d, Skein, Qubit, Groestl & Scrypt), FTC
Tommo_Aus
Sr. Member
****
Offline Offline

Activity: 420
Merit: 250


View Profile
August 12, 2013, 12:35:15 AM
 #946

You might have been blocked by CloudFlare as there is nothing on my side blocking it (several applications use it not from a browser with no issue).  Please PM me your IP and I can whitelist.

Found a solution, I had to add a browser user agent string to the request:


          URLConnection conn = url.openConnection();
          conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB;     rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 (.NET CLR 3.5.30729)");

Queries work now, not sure why I needed to add this to an API tho.

Tompool - http://tompool.org - a 2% fee SHA256/Scrypt/BURST/Groestl multipool supporting ANC, ASC, DGC, EZC, FLO, GLD, GME, MNC, RYC, TGC, TRC, XNC, ZET & more
Jazkal
Sr. Member
****
Offline Offline

Activity: 319
Merit: 250



View Profile
August 12, 2013, 03:19:17 PM
 #947

What happened to CGB? Was it de-listed?
Vitalicus
Full Member
***
Offline Offline

Activity: 467
Merit: 100


DIA | Data infrastructure for DeFi


View Profile
August 12, 2013, 07:35:08 PM
 #948

where is ppcoin ?

sal002 (OP)
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile WWW
August 12, 2013, 07:37:45 PM
 #949

*sigh* Block explorers died.
Eli0t
Sr. Member
****
Offline Offline

Activity: 252
Merit: 250


View Profile
August 12, 2013, 07:40:35 PM
 #950

would it be possible to add a button to take out the top result so we can see the history of the other coins?

eg with BTG hitting 53000% none of the other coins can be seen until its off the graph (and the coin toggle buttons no longer remove the coin)

LTC:  LKpJf3uk7KsHU73kxq8iFJrP1AAKN7Yni7  DGC:  DKXGvEbj3Rwgrm2QQbRyNPDDZDYoq4Y44d  XPM:  AWV5AKfLFyoBaMjg9C77rGUBhuFxz5DGGL
Athanasios Motok
Full Member
***
Offline Offline

Activity: 387
Merit: 100


View Profile
August 12, 2013, 10:02:09 PM
 #951

How can you find out a profitability of a coin?
sal002 (OP)
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile WWW
August 13, 2013, 01:51:45 AM
 #952

would it be possible to add a button to take out the top result so we can see the history of the other coins?

eg with BTG hitting 53000% none of the other coins can be seen until its off the graph (and the coin toggle buttons no longer remove the coin)

Partially got this done - now just to save what was previously clicked (on the refresh).
sal002 (OP)
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile WWW
August 13, 2013, 01:52:26 AM
 #953

How can you find out a profitability of a coin?

Besides looking at my site Smiley Huh
bandjhughes
Member
**
Offline Offline

Activity: 81
Merit: 10


View Profile
August 13, 2013, 02:37:45 AM
 #954

Hello,  Great job with CoinChoose. I find it extremely useful.

Can I make one suggestion/request?  When doing a history query, for the coins that are on multiple markets it's not always super simple to determine if the record is using the LTC or the BTC market.  Would it be difficult for you to add an exchange type field in the record (i.e., a field with either BTC or LTC)?

Thanks,
Jazkal
Sr. Member
****
Offline Offline

Activity: 319
Merit: 250



View Profile
August 13, 2013, 01:18:27 PM
 #955

What happened to CGB? Was it de-listed?
CGB is still not being listed. Is this a bug, or by design?
sal002 (OP)
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile WWW
August 13, 2013, 01:33:17 PM
 #956

It's block explorer is down so it is by design.  I do not keep up a coin if the data is stale as that would easily skew the numbers.

To be clear - I do not really 'delist' a coin unless the coin's developers make it clear that I need to delist it.  So far, I have delisted Powercoin and Doubloons.  That is it - every other coin falters usually because the Block explorer is dead and I cannot get updated statistics.  If a block explorer stays dead for a few days, I try to bring up a local daemon. 

With respect to CGB, I was working on a few other things on the site yesterday (clicking the legend and a few backend tweaks) and did not have time to bring up the local daemon.  I will work on it shortly.
sal002 (OP)
Hero Member
*****
Offline Offline

Activity: 490
Merit: 500


View Profile WWW
August 13, 2013, 01:33:49 PM
 #957

Hello,  Great job with CoinChoose. I find it extremely useful.

Can I make one suggestion/request?  When doing a history query, for the coins that are on multiple markets it's not always super simple to determine if the record is using the LTC or the BTC market.  Would it be difficult for you to add an exchange type field in the record (i.e., a field with either BTC or LTC)?

Thanks,

Sure - do you mean the json.php request?
gudmunsn
Sr. Member
****
Offline Offline

Activity: 336
Merit: 250



View Profile
August 13, 2013, 03:06:55 PM
 #958

The WDC patch has altered the block size and time, so that should affect the stats on coinchoose. You should probably update that when you get a chance, as it will greatly reduce stales Smiley

Jazkal
Sr. Member
****
Offline Offline

Activity: 319
Merit: 250



View Profile
August 13, 2013, 06:18:56 PM
 #959

It's block explorer is down so it is by design.  I do not keep up a coin if the data is stale as that would easily skew the numbers.

To be clear - I do not really 'delist' a coin unless the coin's developers make it clear that I need to delist it.  So far, I have delisted Powercoin and Doubloons.  That is it - every other coin falters usually because the Block explorer is dead and I cannot get updated statistics.  If a block explorer stays dead for a few days, I try to bring up a local daemon. 

With respect to CGB, I was working on a few other things on the site yesterday (clicking the legend and a few backend tweaks) and did not have time to bring up the local daemon.  I will work on it shortly.
Good to know. And thanks for the good work you do.
bandjhughes
Member
**
Offline Offline

Activity: 81
Merit: 10


View Profile
August 13, 2013, 07:01:13 PM
Last edit: August 13, 2013, 07:15:31 PM by bandjhughes
 #960

Hello,  Great job with CoinChoose. I find it extremely useful.

Can I make one suggestion/request?  When doing a history query, for the coins that are on multiple markets it's not always super simple to determine if the record is using the LTC or the BTC market.  Would it be difficult for you to add an exchange type field in the record (i.e., a field with either BTC or LTC)?

Thanks,

Sure - do you mean the json.php request?

Yes, the json.php request. Thank You !!!

As an example of why this would be beneficial....here are two histories for BQC during the last hour:

{"currency":"BQC","profitability":"234.08428870675","time":"2013-08-13 13:10:02","price":"0.000025003333333333"}

{"currency":"BQC","profitability":"97.422862240985","time":"2013-08-13 13:10:02","price":"0.000914"},

both have the same time, and one is for the BTC market and the other for the LTC market.  Obviously one could tell from the price which is which.  But sometimes there are no trades on one of the markets during a period and then you only have one BQC record for that period.  So instead of writing my own code to figure out which market the trade occurred on, it would be great if that field was already in the record.

Thanks again for your great site!
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 [48] 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 »
  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!