Pages:
Author

Topic: Bitcoin Windows gadget which displays BTC and currency amounts (Read 69300 times)

sr. member
Activity: 529
Merit: 271
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!
newbie
Activity: 16
Merit: 0
I figured it out, so using the API URL above, then in Paid amount JSON key: json.final_balance/100000000

that is working
newbie
Activity: 16
Merit: 0
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
sr. member
Activity: 529
Merit: 271
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
newbie
Activity: 16
Merit: 0
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.
sr. member
Activity: 529
Merit: 271
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.

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.

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.

Or simply use two gadgets, one for GBP and one for USD, and show only bottom field on both.
newbie
Activity: 16
Merit: 0
been playing around with different things, it seems the top and bottom field are tied together regardless of alternative ticker URLs used, be that in the secondary, or source/pool fields, to the point that if i remove all of the info regarding currency conversion (the API key and GBP selection) it defaults to USD in the bottom field and will show a similar weird value, until you hide the top field, then it corrects, so it looks like you can't have top and bottom field visible at the same time

In this test i put an alternative ticker url in the secondary and source#1 with the appropriate JSON key in the first fields and then also in the hashrate one for the source#1, and then changed the top field to look to the secondary exchange, with the same results as before, and then to correction+pool and then to the cumulative hashrates, all resulted in that same incorrect value in the bottom field. so it's like the currency conversion is being done off the value in the top field, not from the primary exchange (which for this test was still the binance one
newbie
Activity: 16
Merit: 0
Morning,

I think i've tried every combination of that, including dropping the ticker URL into source one and selecting pools + correction.

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.

here's a run down of all of my settings, after your suggestion above:

Quote
PRESETS:
Trading selected

GENERAL:
Custom Top Field: Secondary exchange rate (field 3)
Hide bottom field:  unticked
Main currency/top field label: USD
Correction in currency (will be added to the total amount, can be negative) 1
Note (write anything you want here, for your use, shows on mouseover):                               Value of 1 Bitcoin

ALERT:
not changed anything in this section, all settings default and values 0

UPDATES:
Source data update interval (in minutes): 10
Exchange data update interval (in seconds):  600

PRIMARY EXCHANGE:
Exchange URL: https://api.binance.com/api/v3/ticker?symbol=BTCUSDT
Exchange rate JSON Key: lastPrice
Ticker Currency (not main currency):  USD

Target curerency:  GBP
Target currency API Key:  my API key

SECONDARY EXCHANGE:
Exchange URL: https://api.binance.com/api/v3/ticker?symbol=BTCUSDT

Field 1 Label: Low
JSON KEy: lowPrice

Field 2 Label: High
JSON KEy: highPrice

Field 3 Label: USD
JSON Key: lastPrice

Everything below that point relating to SOURCES is blank



that setup results in the strange calculation in the bottom field, just as if i only use a primary exchange rate, yet as soon as the top field is hidden, the GBP calculation field works as expected, Field 3 of Secondary Exchange rate remains as expected at the lastPrice, this exact scenario also happens if I move the secondary exchange URL and JSON key to Source #1 section and point the top field there instead, and also the same if i simply remove the second exchange URL completely and just run with the one.

If i point the top field to a blank thing, such as pools + correction when that is empty, "1" is displayed and the GBP calculation appears correct, perhaps with "1" added or not, not sure on that as i never checked
sr. member
Activity: 529
Merit: 271
Hi, Thanks for the nice gadget which i am using for many years.
It stopped working.
I tried to change the primary exchange, which gives N/A

I checked in browser  https://api.binance.com/api/v3/ticker?symbol=BTCUSDT

It gives error

{
  "code": 0,
  "msg": "Service unavailable from a restricted location according to 'b. Eligibility' in https://www.binance.com/en/terms. Please contact customer service if you believe you received this message in error."
}
What to do?

Hi dishwara - terribly sorry, it seems I completely missed your message and I'm seeing it only now. Do you still have this issue?

It's definitely on the Binance side, probably related to location you're connecting from. Maybe try VPN or another exchange?

Also your site to download mycoin gadget  gives 404 error.
https://domchi.cc/gadgets/MyBitcoins.gadget

This is incorrect URL. Please try download button here: https://domchi.cc/mybitcoins/index.htm



Currently, you're probably asking why does he have the top field hidden and showing the USD price field 3 if he wan't it shown in non-expanded mode..... well therein lies the problem, currently i have the correction in the currency set to 1 to force GBP value to be for one bitcoin, all is ok with that option. (that can be 0 is showing the custom top field, but if not then it has to be one)

But, when i change the settings of the custom top field to display primary exchange rate, it does this



Now it's always done this, and i can't remember if we'd spoken about this before (if we have, accept my apologies) to be honest, i'm still not convinced it's not me messing something up

Hey w.a.y.n.e., nice to hear from you again!

Not sure if I have understood the issue correctly, but let's see if I we can untangle this. Your bottom field seems to be multiplying primary and secondary exchange rate.

Can you try setting your top field to display secondary exchange rate (and be sure to set secondary exchange URL as well), and using primary exchange rate (and correction 1) in your bottom field? Bottom field is calculated so you need to make sure USD and GBP rates are fetched separately, one from primary, and other from secondary exhange URL.
newbie
Activity: 16
Merit: 0
Also, if by any chance Bitstamp which is the default doesn't work for retrieving exchange rate, you can use Binance as primary exchange:
Primary exchange: https://api.binance.com/api/v3/ticker?symbol=BTCUSDT
Exchange rate JSON key: lastPrice


So, sure enough Bitstamp went over the weekend, exactly the same issue as before for grabbing wallet balance, this fix worked nicely though, thank you Smiley

I do have another oddity, which MyCoins has always done, will post it later when i've managed to compile a post that makes sense with pictures, it relates to displaying Primary currency last/bid price in top field and currency exchanged last/bid price in the lower field



So. lets see if i can explain this, first, settings and desired result...

So as you can see from this image, i use both gadgets, Mycoins to show current value of 1 bitcoin (last/bid price) currently showing GBP via the inbuilt conversion API, My Bitcoins then shows by wallet ballance in BTC and the converted value in GBP

https://i.postimg.cc/g20sDYKv/pair-condensed.png

Now, that is how i've ran them for a while, but i'd actually like the USD price per bitcoin above the GBP one, however, there's an odd issue when i do that.

So this image shows how i currently have the expanded view configured, as you can see i'm using the Secondary exchange section to display low, high and the USD bid/last price.

https://i.postimg.cc/jSkX3G8B/full.png

Currently, you're probably asking why does he have the top field hidden and showing the USD price field 3 if he wan't it shown in non-expanded mode..... well therein lies the problem, currently i have the correction in the currency set to 1 to force GBP value to be for one bitcoin, all is ok with that option. (that can be 0 is showing the custom top field, but if not then it has to be one)

But, when i change the settings of the custom top field to display primary exchange rate, it does this

https://i.postimg.cc/sDmK7B5j/issue.png


Now it's always done this, and i can't remember if we'd spoken about this before (if we have, accept my apologies) to be honest, i'm still not convinced it's not me messing something up

legendary
Activity: 1855
Merit: 1016
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

Also, if by any chance Bitstamp which is the default doesn't work for retrieving exchange rate, you can use Binance as primary exchange:
Primary exchange: https://api.binance.com/api/v3/ticker?symbol=BTCUSDT
Exchange rate JSON key: lastPrice

Hi, Thanks for the nice gadget which i am using for many years.
It stopped working.
I tried to change the primary exchange, which gives N/A

I checked in browser  https://api.binance.com/api/v3/ticker?symbol=BTCUSDT

It gives error

{
  "code": 0,
  "msg": "Service unavailable from a restricted location according to 'b. Eligibility' in https://www.binance.com/en/terms. Please contact customer service if you believe you received this message in error."
}
What to do?

Also your site to download mycoin gadget  gives 404 error.
https://domchi.cc/gadgets/MyBitcoins.gadget
sr. member
Activity: 529
Merit: 271
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

Also, if by any chance Bitstamp which is the default doesn't work for retrieving exchange rate, you can use Binance as primary exchange:
Primary exchange: https://api.binance.com/api/v3/ticker?symbol=BTCUSDT
Exchange rate JSON key: lastPrice
legendary
Activity: 3472
Merit: 3507
Crypto Swap Exchange
Hello dear dev, I haven't seen such a dedicated developer like you to be present when topic is bumped after 3 years.😉, I was wondering since you know stuff like that, is it possible to add something like an alarm, when a certain address is activated on the blockchain, we'd have an alarm going off, we could set a siren sound with max volume.

Because there are online services sending sms when there is any incoming/ outgoing transaction, but that requires registration.
You could actually get a wallet software with such a service. I don't know if it was jaxx liberty or exodus, but one of those wallet software programs would send me a sound notification when there was an incoming transaction. The only issue is you had to keep it open and completely synced.

Most of those service require registration because they at times charge a fee for the service or need an email to send the notifications.

Blocknomics can also send browser push notifications, but still requires one to sign up.

If you use Telegram, there is a bot https://t.me/tracktxbot just enable notification.
Although it shows me some errors with ETH addresses lately

Quote
TrackTX bot helps you to track your ETH / BTC / BNB / XRP / USDT transactions.
copper member
Activity: 2170
Merit: 1827
Top Crypto Casino
Hello dear dev, I haven't seen such a dedicated developer like you to be present when topic is bumped after 3 years.😉, I was wondering since you know stuff like that, is it possible to add something like an alarm, when a certain address is activated on the blockchain, we'd have an alarm going off, we could set a siren sound with max volume.

Because there are online services sending sms when there is any incoming/ outgoing transaction, but that requires registration.
You could actually get a wallet software with such a service. I don't know if it was jaxx liberty or exodus, but one of those wallet software programs would send me a sound notification when there was an incoming transaction. The only issue is you had to keep it open and completely synced.

Most of those service require registration because they at times charge a fee for the service or need an email to send the notifications.

Blocknomics can also send browser push notifications, but still requires one to sign up.
sr. member
Activity: 529
Merit: 271
Hello dear dev, I haven't seen such a dedicated developer like you to be present when topic is bumped after 3 years.😉, I was wondering since you know stuff like that, is it possible to add something like an alarm, when a certain address is activated on the blockchain, we'd have an alarm going off, we could set a siren sound with max volume.

Because there are online services sending sms when there is any incoming/ outgoing transaction, but that requires registration.

Thanks for your kind words.

I did think about adding sound alerts at one point, but then I decided against it as I couldn't think of a simple way to specify when it would trigger. However I'm not really looking to add this when gadget is basically obsolete; maybe if you asked ten years ago. Smiley
copper member
Activity: 1330
Merit: 899
🖤😏
Hello dear dev, I haven't seen such a dedicated developer like you to be present when topic is bumped after 3 years.😉, I was wondering since you know stuff like that, is it possible to add something like an alarm, when a certain address is activated on the blockchain, we'd have an alarm going off, we could set a siren sound with max volume.

Because there are online services sending sms when there is any incoming/ outgoing transaction, but that requires registration.
sr. member
Activity: 529
Merit: 271
Sure. I doubt it's related to OS, as long as the gadget is running. It's one of the APIs or values.

Glad you're sill finding it useful! Although today having Win7 connected to Internet is a bit risky simply from security standpoint. Smiley
newbie
Activity: 16
Merit: 0
hi,

thanks for the reply, just heading out to work so will pm you tomorrow if i dont get time tonight. I hope the balance is not zero  Shocked  (it does appear to be showing in Electrum)

hopefully this isnt an issue with my machine/os install, it is as you said getting on a bit now, might have to try a roll back on a restore point see if somethings gone wibble at some point.


EDIT:
and yes, i'm still using them, they are small, simple and do exactly what i need and are lightweight and effective, you hit the nail on the head without overloading them with features (i don't use half their features!) i also didn't believe or pay any attention to the bs microsoft put out as to why they closed the gadget store
sr. member
Activity: 529
Merit: 271
I'm not sure if the developer is even able to push a new version of the gadget... The gadget store has been dead for 10 years and I'm not aware of any method to download and install them manually.

But anyway, the other reason why it can stop working is if the server hosting the backend is brought down. In such a situation, nobody would be able to use the gadget anymore.

They can still be installed by downloading the .gadget file and running it even without the gadget store.

There is no gadget-specific backend for this gadget, but it does rely on a few other public APIs, like Bistamp API for exchange rate, blockchain.info API for wallet balance, and currencyconverterapi for fiat exchange rate, all of which miraculously still work.

I must admit that I'm a bit proud that someone is still running this and finding it useful even after the technology it was written in was deprecated decade ago, and the OS it was running on is EOLed and no longer supported by Microsoft. Smiley
sr. member
Activity: 529
Merit: 271
I use it to display my bitcoin balance and convert value to GBP, it's set to display balance and value in 2 lines/boxes.
the conversion is working fine, as if i set the pool adjustment to 1 it shows the value of 1 bitcoin in GBP, but, it's as if it can't get the wallet balance, because with the adjustment set to 0, both the balance and value show N/A

Has something changed/no longer available? or is the problem on my machine, i have tried deleting and re-installing it

I'm still using windows 7 btw, and version 4.4 of the gadget, i also use mycoins (v3.3) to just show the value of 1 bitcoin in GBP with the same conversion api key from currencyconverterapi.com which is working fine.

I'm still here. Smiley

I'm not aware that something specific has changed, but since both Windows gadgets as a technology and Win7 as an OS are deprecated, yeah, I'd definitely suggest that you try to upgrade. Smiley

If the gadget is showing N/A, that means the value you're getting is 0. APIs that are used are still working, at least on a first glance. Maybe the balance on the wallet address you're monitoring is 0? You can also send me your settings, here or in PM, provided they don't include any private API keys, and I can try to figure it out. Sorry about not being able to PM me, that setting obviously appeared at one point and was off by default - now I've allowed it.
Pages:
Jump to: