Bitcoin Forum
June 19, 2024, 10:01:47 AM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 [15]  All
  Print  
Author Topic: Bitcoin Windows gadget which displays BTC and currency amounts  (Read 69251 times)
w.a.y.n.e
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
April 15, 2024, 08:12:30 AM
 #281

Same thing every time, as soon as the top field is not hidden, the exchange rate calculation goes wrong, hide it, and it works properly.

I'm sorry for the slow response... life happened.


omg no need to apologise, any reply/help is greatly appreciated.

and i've been away for the weekend so only just seen the reply.


Quote
The thing you're trying to do can't be done that way - if you're showing both top and bottom fields, bottom field will always be calculated from the top field. You can't show two unrelated values - bottom field will always be top field multiplied with exchange rate.

ahhhhh, I thought because the top field had the un modified value of lastprice in USD and even if that was being hidden it was still using that for the currency conversion, I see what your saying now, in that if I don't hide it, it calculates again using the top field entry so then comes up with that strange figure.

I had kind of considered that maybe it couldn't display both (very handy for when the free conversion api goes offline - frequently)


Quote
What you can do is the following. Hide top field. Use correction 1 and make sure you use currency API (as you already do). That will show GBP exchange rate in bottom field.

Then, under secondary exchange clear exchange URL (as you don't need it). Under "Field 1" (or 2 or 3, whicever you prefer) enter label USD and JSON key "lastPrice".

Then expand your gadget. Bottom field should show GBP exchange rate, and Field 1 should show USD exchange rate. There are two more fields, and you can't hide them unfortunately.

Yup, that's exactly what i do, and in the other fields I put the Low and High proces for the day (i have open set in Mybitcoins below) and this is a more than suitable option, and i just need to expand it to check if the conversion is working.

Quote
Or simply use two gadgets, one for GBP and one for USD, and show only bottom field on both.
For some reason i had not considered running 2 mycoins, I guess that's an option too


Thanks again for all your help and support, really appreciate it.
Domchi (OP)
Sr. Member
****
Offline Offline

Activity: 517
Merit: 268


View Profile
April 16, 2024, 12:23:47 AM
 #282

Quote
Or simply use two gadgets, one for GBP and one for USD, and show only bottom field on both.
For some reason i had not considered running 2 mycoins, I guess that's an option too

Yeah, you can spin as many of them as you want. Should have made that more obvious somehow.

Thanks again for all your help and support, really appreciate it.

I must admit I'm humbled that someone uses this gadget after all these years, and after the original platform it's made for is EOL'd 4 years ago. Smiley
w.a.y.n.e
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
May 31, 2024, 10:48:48 AM
 #283

If anyone else is having problems retrieving wallet balance, since blockchain.info started refusing requests from old IE versions, here's the solution. In settings, don't use "Addresses" field. Retrieve your address balance through "Pool #1":
Poll #1 URL: https://chain.api.btc.com/v3/address/YOUR_BTC_ADDRESS
Paid amount JSON key: json.data.balance/100000000

So this stopped working a week or 2 ago, initially dropped out for a day then came back, now gives 404 on the page, and going back to the root address only gives 503 error.

So i figured i'd look for a new address to put in Pool #1 and came up with this....

https://api.blockcypher.com/v1/btc/main/addrs/PUT_YOUR_ADDRESS_HERE

and that works in the browser, and gives this block of data in the first section of the return (test address they use)

Code:
{
  "address": "38DGj87axzmQiZeAd1w1y5FEmuu5a7pfBa",
  "total_received": 1630000,
  "total_sent": 1630000,
  "balance": 0,
  "unconfirmed_balance": 0,
  "final_balance": 0,
  "n_tx": 7,
  "unconfirmed_n_tx": 0,
  "final_n_tx": 7,
  "txrefs": [

so i figured great, i can substitute that in (yes i tested with my address and all good) and in the Paid amount JSON key use: json.data.final_balance/100000000

but it doesn't work, i've also just tried plain balance, json.data.balance etc etc, with no luck.
can anyone see what i'm doing wrong please
w.a.y.n.e
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
May 31, 2024, 11:11:07 PM
 #284

I figured it out, so using the API URL above, then in Paid amount JSON key: json.final_balance/100000000

that is working
Domchi (OP)
Sr. Member
****
Offline Offline

Activity: 517
Merit: 268


View Profile
June 01, 2024, 04:12:41 AM
 #285

I figured it out, so using the API URL above, then in Paid amount JSON key: json.final_balance/100000000

that is working

Glad to hear that!
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 [15]  All
  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!