Pages:
Author

Topic: Automatic BTC price indication on Bitcointalk threads (Read 494 times)

legendary
Activity: 2730
Merit: 7065
It was all a scam! My evil plan to make you look a bad poster!
Damn you, you scambag. That's part scammer and part scumbag - a scambag. Grin

But, now that I re-upgraded to 7.4, it works like a charm.  Smiley
Thanks for doing that. It now works just like it did before. Cheers!
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Any idea what is going on?
It was all a scam! My evil plan to make you look a bad poster!

Or I was stupid enough to change the php version of blackhatcoiner.com ignoring that this will cause a problem to this service as the imagecreatefrompng function won't work properly. But, now that I re-upgraded to 7.4, it works like a charm.  Smiley
legendary
Activity: 2730
Merit: 7065
Hi BlackHatCoiner

I wanted to make an edit to one of the sites in my thread and I noticed that all images are down. I am getting the usual 'Invalid Image' error that is often seen on Bitcointalk. Basically the same thing as we can see with the images posted in this thread.

Any idea what is going on?
legendary
Activity: 2730
Merit: 7065
Why did you decide to use the Binance exchange rate? I was thinking if you will use Bitstamp just like the default view of BTC/USD on Tradingview, its view worldwide.
I really don't think it matters that much. The price on one exchange will always be higher or lower than on other exchanges depending on the local market activity no matter which one you take. Even preev.com defaults to Bitstamp and Kraken, and Binance is not even offered among the alternatives. The most important thing is that it works and doesn't produce errors.
hero member
Activity: 1106
Merit: 912
Not Your Keys, Not Your Bitcoin
Yeah, I could have chosen Bitstamp, but answer me this: Why not Binance?

Perhaps they have been in the industry for long before binance was launched. Bitstamp was established in 2011 and Binance was launched in 2017.
Another reason I feel they used Bitstamp is, the two exchange are both centralized both may be one is more manipulative and self-centered to profits. They wouldn't want anything that will destabilize the entire market.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Your hands are good at typing out some magics.
Thanks for the compliment!

Why did you decide to use the Binance exchange rate?
It was an arbitrary choice. I was just searching for an exchange API and Binance was the one next to Coinbase. Yeah, I could have chosen Bitstamp, but answer me this: Why not Binance?
hero member
Activity: 1106
Merit: 912
Not Your Keys, Not Your Bitcoin
It calculates based on the Binance's exchange rate.

Your hands are good at typing out some magics.
Why did you decide to use the Binance exchange rate? I was thinking if you will use Bitstamp just like the default view of BTC/USD on Tradingview, its view worldwide.
copper member
Activity: 783
Merit: 710
Defend Bitcoin and its PoW: bitcoincleanup.com
...

That is true, but I was pointing out that BHC's images are dynamic and change value at refresh. But since the static amount is in BTC (in your case) and not the dollar amount it fits like a glove.  Tongue
 
Kudos again BlackHatCoiner for the implementation!
legendary
Activity: 2730
Merit: 7065
It's a dynamic image so saying "price at the time of writing" doesn't help  Tongue
Some casinos have a fixed value as a withdrawal amount, while others have dynamic. If they are dynamic, they obviously change every minute/hour/day/whatever. At the time I checked that particular casino, that's what the current withdrawal fees were like, and that's why I wrote that part that says "at the time of writing". Without that, someone could have made their own checks and said that the data in my table is incorrect.
copper member
Activity: 783
Merit: 710
Defend Bitcoin and its PoW: bitcoincleanup.com
Give me the USD equivalent of 1 BTC:

It calculates based on the Binance's exchange rate.

This is so cool ! Even updates at refresh Shocked Da bomb !



It's a dynamic image so saying "price at the time of writing" doesn't help  Tongue
legendary
Activity: 2730
Merit: 7065
There's always a way, hopefully.  Smiley

Alright, so to avoid having a fixed image size, I'll let you decide your width and height values. On the URL, you now have two additional parameters;
That worked perfectly! Wherever there is a BTC value, there is now an automatic price indication in USD thanks to you. Wink
Due to the amount of characters, I was afraid there wouldn't be enough space in OP to add your code. Luckily, it worked out just fine.

This issue is now resolved.
But I will not lock the thread. Maybe someone finds or knows about other ways to solve the same problems, so it might be interesting to hear additional feedback.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Do you think there is a way around that?
There's always a way, hopefully.  Smiley

Alright, so to avoid having a fixed image size, I'll let you decide your width and height values. On the URL, you now have two additional parameters;
Code:
https://blackhatcoiner.com/?USDof=1&width=VALUE&height=VALUE

Change them accordingly to your needs. If you don't enter them it'll show you an image with the default size (width=158, height=16). I hope this fixed your other issue too:
For example, let's say I wanted it to display how much 0.001 BTC and 0.00000010 BTC is in USD.
0.01 BTC - 0.02 BTC = -
legendary
Activity: 2730
Merit: 7065
Hi BlackHatCoiner,

Just wanted to let you know that I edited my thread and the automatic price indication works nicely!
But in columns where there is additional text or multiple BTC values, the size of the picture messes up the formatting. Do you think there is a way around that?

Let me show you what I mean.
Here is a picture of such an example if I were to add your code to Duelbits in my table:


Would it be possible to bring the "at the time of writing" closer to the image showing the USD value?
legendary
Activity: 2730
Merit: 7065
Easiest way would be to remove USD price completely...
No, I want to keep it. I think it's important to see a fiat value as well.

Other thing is that you don't know if they change withdrawal fees (in BTC) and this should be tracvked somehow if you want previse results.
Some casinos do depending on how the price of Bitcoin is moving. There have been instances where the sites have tied the withdrawal fees to a fixed price is USD, $10 for example. I am tracking the changes from time to time and making updates as needed. I get plenty of help from some members. Mahdirakib, for example. He has been very active in correcting the mistakes and changes he notices in the table. 

If you wanted to display two different values you would inserted two images.
I will play around with it to see how it works. Thanks!
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
That's so weird. It was positioned slightly above the text a few hours ago
As far as I can see, this happens in preview.

For example, let's say I wanted it to display how much 0.001 BTC and 0.00000010 BTC is in USD.
If you wanted to display two different values you would inserted two images.

0.001 BTC 0.00000010 BTC

Unless I didn't understand your question.

I asked you before but maybe something changed recently, is it possible to change colors for this images?
The problem is that the image can't know if you're using the dark theme or not. If there was a way I would have made it, but unfortunately I can't.
legendary
Activity: 2212
Merit: 7064
It displays data in BTC and its USD equivalent. But, since it’s tiring having to constantly update the USD values (especially after significant drops and increases in Bitcoin’s price), I thought there must be an easier way.
Easiest way would be to remove USD price completely, and I am not sure if all those betting websites are using Bitcoin and transactions fees to calculate withdrawal fees.
Other thing is that you don't know if they change withdrawal fees (in BTC) and this should be tracvked somehow if you want previse results.

So here's what uncle BlackHatCoiner made you.
I asked you before but maybe something changed recently, is it possible to change colors for this images?
It's not working so good in dark themes, and maybe you can add inverted image option as simple solution for this issue (if that is even possible).

example how it looks in one dark theme:




legendary
Activity: 2730
Merit: 7065
It isn't. Is it to you?
That's so weird. It was positioned slightly above the text a few hours ago, but now it's almost in the same line. It even looks like it has dropped slightly below the text in front of the USD amount.
Is it possible to configure it to display two or three different BTC values in the same line. For example, let's say I wanted it to display how much 0.001 BTC and 0.00000010 BTC is in USD.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
1. Do you think the forum will be able to handle all those different data sets in one place? I think there are around 100 different BTC amounts in my thread.
The images aren't large in size. The forum has handled many images in one page. See this monster for instance. I'm still not sure if it can handle 100 image tags, though.

2. Have you ever noticed that it fails, shows errors, wrong values, etc.?
I've noticed that it sometimes returns the known error of bitcointalk's proxy. With a refresh it should be fixed. It must does this arbitrarily.

3. Not a big issue, but why is the USD amount positioned slightly higher than the text before it?
It isn't. Is it to you?



4. How often does the price update?
Reasonably every moment, I can't know exactly. The average Binance's exchange rate changes too often.
legendary
Activity: 2730
Merit: 7065
That's really useful, thanks a lot!
I like that it's customizable and that I can add any preceding text that I want like in the example below which will fit nicely in my thread:

0.0005 BTC:

Three Four questions though:
1. Do you think the forum will be able to handle all those different data sets in one place? I think there are around 100 different BTC amounts in my thread.
2. Have you ever noticed that it fails, shows errors, wrong values, etc.?  
3. Not a big issue, but why is the USD amount positioned slightly higher than the text before it?
4. How often does the price update?
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
So here's what uncle BlackHatCoiner made you.

Give me the USD equivalent of 0.25 BTC:

Give me the USD equivalent of 0.0001 BTC:

Give me the USD equivalent of 69 BTC:

Code:
[abbr=BlackHatCoiner's Blockchain Stats BBCode Depicter][url=https://bitcointalksearch.org/topic/shut-down-blackhatcoiners-blockchain-stats-bbcode-depicter-5366056][img]https://blackhatcoiner.com/?USDof=VALUE_IN_BTC[/img][/url][/abbr]

It calculates based on the Binance's exchange rate.

BlackHatCoiner.com — Copyright © 2021 2022 all rights reserved.
Pages:
Jump to: