Author

Topic: Bitcoin Price Image Generator (Read 7057 times)

legendary
Activity: 3038
Merit: 1032
RIP Mommy
vh
hero member
Activity: 699
Merit: 666
June 17, 2017, 05:08:38 PM
#28
"This tool relies on the global weighted average from BitcoinAverage."

https://api.bitcoinaverage.com is down.
legendary
Activity: 3038
Merit: 1032
RIP Mommy
legendary
Activity: 3038
Merit: 1032
RIP Mommy
July 06, 2015, 05:08:17 PM
#26
I didn't really document it, but you can now pin the image to any currency supported by BitcoinAverage here: https://api.bitcoinaverage.com/ticker/global/
Code:
/advimg?price=10EUR
hero member
Activity: 546
Merit: 500
January 25, 2015, 07:05:55 AM
#25
I changed address to
Code:
[img] http://pravicar.comyr.com/generateImage/index.php/?VALUE=10&CUR=USD&TYPE=24h_avg&TIMESTAMP=YES&PRECISION=7&COLOR=00FFFF&SIZE=12&FONT=calibri [/img]

because they closed my previous free hosting.

legendary
Activity: 1316
Merit: 1003
December 02, 2014, 03:20:40 PM
#24
Finally somebody has made the effort.
THX man.
hero member
Activity: 546
Merit: 500
December 01, 2014, 08:53:03 PM
#23
I made this:

But it is hosted on free server so I would really appreciate some donation or access to any server.
Link is:
Code:
[img] http://amacar.hostei.com/generateImage/index.php/?VALUE=10&CUR=USD&TYPE=24h_avg&TIMESTAMP=YES&PRECISION=7&COLOR=00FFFF&SIZE=12&FONT=calibri [/img]

Parameter VALUE is just amount you want to convert to BTC
Parameter CUR is currency and could be any value from: https://bitcoinaverage.com ('USD', 'EUR', 'GBP', 'CAD'...), default is USD.
Parameter TYPE could be 'ask', 'bid', '24h_avg', 'last', default is last.
If parameter TIMESTAMP is 'yes', then timestamp is added to image, otherwise no. Default is no timestamp added.
Parameter PRECISION allows you to round calculated value to decimals. Default is 5.
Parameter COLOR will change text color. Accept HEX values, default is black.
Parameter SIZE is size of text, default is 11.
FONT is font of text, default is arial.

Currently supported fonts (can add more):
legendary
Activity: 1316
Merit: 1003
October 01, 2014, 02:35:12 AM
#22
Could you add EUR support?
legendary
Activity: 3038
Merit: 1032
RIP Mommy
August 17, 2014, 03:20:30 PM
#21
And it's not following BitcoinAverage last; around 1.8 BTC short on a $21328 conversion right now. This is like the third or fourth unreliable ticker I've gone through.
legendary
Activity: 3038
Merit: 1032
RIP Mommy
August 14, 2014, 07:31:10 PM
#20
It's fixed.

I wanted a little weekend project and it seemed like there was a need for this!

The bitcoin price image generator is a simple tool that creates a dynamic image of a price in BTC, based on a fixed USD price.
Please let me know what you think! Any suggestions?

Security Alert!

this device shares your web usage data with the owner of fizzisist.com for every page you embed the widget in.

I don't think it can do that on here through the new bitcointalk image proxy.
legendary
Activity: 3038
Merit: 1032
RIP Mommy
August 13, 2014, 06:37:22 PM
#19
http://btc-priceimg.herokuapp.com/img/100

Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Code:
[img]http://btc-priceimg.herokuapp.com/img/100[/img]
sr. member
Activity: 280
Merit: 257
bluemeanie
December 12, 2013, 02:01:27 PM
#18
I wanted a little weekend project and it seemed like there was a need for this!

The bitcoin price image generator is a simple tool that creates a dynamic image of a price in BTC, based on a fixed USD price.
Please let me know what you think! Any suggestions?

Security Alert!

this device shares your web usage data with the owner of fizzisist.com for every page you embed the widget in.
hero member
Activity: 720
Merit: 528
December 12, 2013, 07:53:53 AM
#17
Something's going wrong Sad Now the images aren't showing up.
Error: Mt Gox error

Yeah, it looks like the Mt Gox API was down for a bit. I'm thinking about switching to a different exchange, or maybe even making it an average of a few. Any suggestions of which one(s) I should use?

It would also be possible to let the user specify the exchange to use when generating the image.

Thoughts?
legendary
Activity: 1316
Merit: 1003
December 12, 2013, 05:22:08 AM
#16
Something's going wrong Sad Now the images aren't showing up.
I see the images just fine.
Its just that the forum is caching images through a third party now, which yields wrong results for quotes already cached.
legendary
Activity: 1078
Merit: 1003
December 11, 2013, 06:58:09 PM
#15
Something's going wrong Sad Now the images aren't showing up.
legendary
Activity: 1316
Merit: 1003
August 14, 2013, 12:58:36 AM
#14
Could you provide 24h average?
sr. member
Activity: 252
Merit: 250
April 28, 2013, 12:51:08 AM
#13
Any Chance you could make one similar but for the popular alt coins, I would definitely give you a nice tip for that Cheesy

I'll gladly do that. All I need is an API to get exchange rates. Got a link?
https://btc-e.com/api/documentation

Ok, done! I added it at a separate URL (advimg). It accepts arguments as a GET request. Please test!

Example image:



Code:
http://fizzisist.com/priceimg/advimg?price=10.00¤cy=LTC

Explanation is on the main page: http://fizzisist.com/priceimg
A tip is headed your way fine dir, I thank you
hero member
Activity: 720
Merit: 528
April 27, 2013, 04:11:39 PM
#12
Any Chance you could make one similar but for the popular alt coins, I would definitely give you a nice tip for that Cheesy

I'll gladly do that. All I need is an API to get exchange rates. Got a link?
https://btc-e.com/api/documentation

Ok, done! I added it at a separate URL (advimg). It accepts arguments as a GET request. Please test!

Example image:



Code:
http://fizzisist.com/priceimg/advimg?price=10.00¤cy=LTC

Explanation is on the main page: http://fizzisist.com/priceimg
sr. member
Activity: 252
Merit: 250
April 26, 2013, 12:18:10 PM
#11
Any Chance you could make one similar but for the popular alt coins, I would definitely give you a nice tip for that Cheesy

I'll gladly do that. All I need is an API to get exchange rates. Got a link?
https://btc-e.com/api/documentation
hero member
Activity: 720
Merit: 528
April 26, 2013, 10:47:41 AM
#10
Any Chance you could make one similar but for the popular alt coins, I would definitely give you a nice tip for that Cheesy

I'll gladly do that. All I need is an API to get exchange rates. Got a link?
sr. member
Activity: 252
Merit: 250
April 25, 2013, 07:38:04 PM
#9
Any Chance you could make one similar but for the popular alt coins, I would definitely give you a nice tip for that Cheesy
hero member
Activity: 720
Merit: 528
March 11, 2013, 01:37:56 PM
#8
I wanted a little weekend project and it seemed like there was a need for this!

There sure is!

Nice work.

This one is decent too:
 - http://btcticker.appspot.com/mtgox/1btc2usd.png


 - http://btcticker.appspot.com/mtgox/100.00gbp.png


Oh, cool! I hadn't seen that. Some pretty cool features in that one. I think mine does a better job at blending in as text (although that still needs more work), but I'm glad to see there's another option for people wanting to do more sophisticated things!
legendary
Activity: 2506
Merit: 1010
March 11, 2013, 06:54:14 AM
#7
I wanted a little weekend project and it seemed like there was a need for this!

There sure is!

Nice work.

This one is decent too:
 - http://btcticker.appspot.com/mtgox/1btc2usd.png


 - http://btcticker.appspot.com/mtgox/100.00gbp.png
Vod
legendary
Activity: 3668
Merit: 3010
Licking my boob since 1970
March 10, 2013, 05:28:21 PM
#6
Some users may not want precision to 4 decimal places.

You could add a variable to let the price auto round up(down?) to the nearest precision wanted.

It would add a bit more stability when the price fluctuates so much.
hero member
Activity: 720
Merit: 528
March 10, 2013, 04:26:09 PM
#5
Middle link in your sig is broken - missing the .com

Thanks Smiley
edd
donator
Activity: 1414
Merit: 1002
March 10, 2013, 04:25:25 PM
#4
Middle link in your sig is broken - missing the .com
hero member
Activity: 720
Merit: 528
March 10, 2013, 03:32:41 PM
#3
Shows up great on my thread!  Thanks for this Smiley

On this note, the prices seem to come out a tad higher than what MT Gox is saying...hrmmm

Cool! One thing (to be safe) might be to put the USD price there in text too, just in case something goes wrong with my tool. Either if the image won't load or the price is wrong because of some error on my part. I wouldn't want you to feel obligated to sell something at a crazy low price if I screwed up!

The price could differ from Mt Gox slightly because it uses the 24 hour average, or because I'm caching the exchange rate for five minutes. Hopefully this never causes a significant discrepancy.
legendary
Activity: 1078
Merit: 1003
March 10, 2013, 03:25:13 PM
#2
Shows up great on my thread!  Thanks for this Smiley

On this note, the prices seem to come out a tad higher than what MT Gox is saying...hrmmm
hero member
Activity: 720
Merit: 528
March 10, 2013, 03:19:04 PM
#1
I wanted a little weekend project and it seemed like there was a need for this!

The bitcoin price image generator is a simple tool that creates a dynamic image of a price in BTC, based on a fixed USD price. The resulting image can be embedded in a forum post, for example, and it will always show an up-to-date BTC equivalent price. This is useful when you want to show a price for something in BTC, but you want the price to be pinned to a USD value (and not have to update your post every day as the BTC/USD exchange rate fluctuates). This tool relies on the ticker from BitcoinAverage.com.

Usage
Simply build a URL of the form:

Code:
http://btc-priceimg.herokuapp.com/img/

Where is the price you want in USD.

You can also add an optional color argument to change the color of the text:

Code:
http://btc-priceimg.herokuapp.com/img//

The color code should be an html-like hex code (for black: '000000' or '000' or simply '0'). The background of the image will be transparent.

Example
Say you want to sell an item for $10. You can generate an image using:
http://btc-priceimg.herokuapp.com/img/10.00

Which will yield the image:

If you want to change the color (to more closely match the text in your forum post, for example), use:
http://btc-priceimg.herokuapp.com/img/10.00/00f

Which yields:

You can then embed the image in your post using that URL. In BBCode, this would be:

Code:
[img]http://btc-priceimg.herokuapp.com/img/10.00[/img]

Please let me know what you think! Any suggestions?
Jump to: