Author

Topic: Bitcoin & Altcoins Live Price Image generator (Read 529 times)

full member
Activity: 560
Merit: 108
That's a great bitcoin and Altcoins live image generator you have made. I like it. You have done a great job by making it. Thanks for your effort. You have nailed it. Smiley
sr. member
Activity: 1064
Merit: 382
Hurrah for Karamazov!
Update

I have shifted the project to openshift, and the updated the post with the new URL
http://liveimage-liveimage.193b.starter-ca-central-1.openshiftapps.com/image.php?coin=NAME

It is too long to be remembered ATM, will update with a domain soon.
Added an option of currency too, /image.php?coin=COIN¤cy=CURRENCY
Currency can be usd,aud,inr,cad,gbp,krw,jpy,rub, etcetra. PM me if you can't generate image using your currency.
You can even use btc(for bitcoin); eth(ether) as currency.

You can view the code here https://github.com/edgycorner/Coin-Price-Image-generator/

The price is now fetched from coingecko.

Please let me know, if you find any problem.Thanks!




legendary
Activity: 1792
Merit: 1283
This is something really useful and I've been looking for something like this to use in my Steemit posts.
Looking forward to you setting up a decent website to offer this as a service!

Too bad I can't see the images, wish someone would have posted a screenshot Tongue
sr. member
Activity: 1064
Merit: 382
Hurrah for Karamazov!
Looks like I have exhausted my free 300$ google credits .-.

Will git the project and will add the domain, once I get time(4~5 days).
legendary
Activity: 2688
Merit: 3983
Good work I've noticed the image's insensitivity to the case of characters:
1. You can add currency shortcuts like BTC, ETH, and LTC.
2. The image appearance time is relatively long, maybe because of my browser.
3. Edit the problem of negative values []
4. add colors if the price goes up or down.
I do not know, but it may be possible to update values using the script rather than manually updating
sr. member
Activity: 1064
Merit: 382
Hurrah for Karamazov!
This is really cool! I just tried my first image generation at http://35.226.164.123/image.php?coin=bitcoin&amount=123.So if you don't mind revealing your secret stash,how did you make it ? Does the image transformations happen on the fly or you fetch them from a server?
Either way,I'm happy to see such projects in this board.

It's probably pretty simple.

Just fetch the Bitcoin price from an API (i.e CoinMarketCap) and calculate how much the amount is worth, then create an image with this method1] or similar.

[1] http://php.net/manual/en/function.imagettftext.php
Ahh..I see! Never been a fan of PHP but this does sound extremely simple.So the 3rd party package is where all the magic happens. Great! Also I don't see the data being fetched from the server which actually confused me. Usually, my console or my terminal records all the API calls but when I opened the URL with the given params,I didn't see any network calls happening so I was a doubtful if it's happening on the fly. Thanks for the clarification.
Yup, it is as easy as it sounds.

I'd like the new updates, now the text seems pretty clear.
Thanks :>


Why you didn't make it as an open source project in the first place. I believe making it open source would do easily the job.


The source code is very messy ATM.Even though it has just 100 lines, still it's hard to understand.
I will create a rep at github after tidying the code, as soon as I can.

Thanks for following the project guys, appreciate it!


legendary
Activity: 1932
Merit: 1273
1.) Changed background color & text color of the image.
4.) Make it open source once everything is built & final.
I'd like the new updates, now the text seems pretty clear.

Why you didn't make it as an open source project in the first place. I believe making it open source would do easily the job.
legendary
Activity: 2758
Merit: 6830
Ahh..I see! Never been a fan of PHP but this does sound extremely simple.So the 3rd party package is where all the magic happens. Great! Also I don't see the data being fetched from the server which actually confused me. Usually, my console or my terminal records all the API calls but when I opened the URL with the given params,I didn't see any network calls happening so I was a doubtful if it's happening on the fly. Thanks for the clarification.
Because it's made with PHP. The API calls are happening on the server-side and not on the user's browser.

The user only sees the already rendered image.
legendary
Activity: 1988
Merit: 1317
Get your game girl
This is really cool! I just tried my first image generation at http://35.226.164.123/image.php?coin=bitcoin&amount=123.So if you don't mind revealing your secret stash,how did you make it ? Does the image transformations happen on the fly or you fetch them from a server?
Either way,I'm happy to see such projects in this board.

It's probably pretty simple.

Just fetch the Bitcoin price from an API (i.e CoinMarketCap) and calculate how much the amount is worth, then create an image with this method1] or similar.

[1] http://php.net/manual/en/function.imagettftext.php
Ahh..I see! Never been a fan of PHP but this does sound extremely simple.So the 3rd party package is where all the magic happens. Great! Also I don't see the data being fetched from the server which actually confused me. Usually, my console or my terminal records all the API calls but when I opened the URL with the given params,I didn't see any network calls happening so I was a doubtful if it's happening on the fly. Thanks for the clarification.
legendary
Activity: 2758
Merit: 6830
This is really cool! I just tried my first image generation at http://35.226.164.123/image.php?coin=bitcoin&amount=123.So if you don't mind revealing your secret stash,how did you make it ? Does the image transformations happen on the fly or you fetch them from a server?
Either way,I'm happy to see such projects in this board.

It's probably pretty simple.

Just fetch the Bitcoin price from an API (i.e CoinMarketCap) and calculate how much the amount is worth, then create an image with this method1] or similar.

[1] http://php.net/manual/en/function.imagettftext.php
legendary
Activity: 1988
Merit: 1317
Get your game girl
This is really cool! I just tried my first image generation at http://35.226.164.123/image.php?coin=bitcoin&amount=123.So if you don't mind revealing your secret stash,how did you make it ? Does the image transformations happen on the fly or you fetch them from a server?
Either way,I'm happy to see such projects in this board.
sr. member
Activity: 1064
Merit: 382
Hurrah for Karamazov!
Updated a few things:

1.) Changed background color & text color of the image.
2.) Only values till 4th decimal places will be printed.
3.) The width of the image is now dynamic, depending upon the length of the string.



Things to do:
1.) Build the homepage and a link generator, with options like changing the font,color,currency,decimal place, etcetra
2.) Add a short domain name.
3.) Will try to reduce the time taken to generate images.
4.) Make it open source once everything is built & final.
sr. member
Activity: 1064
Merit: 382
Hurrah for Karamazov!
Domain Name?
cryptocapture
cryptotracker



Any information about the sources you gathered prices data?

adding an option to show the converted result in Bitcoin would be good.
It is using worldcoinindex.com for price.Yup, I will add that option too in the next update.


Really good work mate. I would like to find the more information like adding name details to show on the page and if you design the webpage with any good template you can gather for the more information designers over here.
Check vod signature, she really made good work to find the various details about this forum one page.

Since I like this work, I have merited you as well mate.
I will update the front page with a bootstrap design.Thanks for the merit.

I am busy with my college exams ATM :/ Will update everything once my exams are over .-.
sr. member
Activity: 826
Merit: 263
I have created a simple project, which will generates image with live price of any crypto-currency.It can embedded in posts as an image.

By using this simple URL:

Code:
http://35.226.164.123/image.php?coin=NAME&amount=AMOUNT

Replace "NAME" with the coin name( ex:bitcoin,litecoin,ripple,etheruem,bitcoincash,eos,etcetra) and "AMOUNT" with a number.



Examples:

Code:
[img]http://35.226.164.123/image.php?coin=bitcoin&amount=3[/img]
will generate:

Similarly,

3250 IOST Tokens:

1000 Tron:

1 Bitcoincash:



Domain Name?

Not yet decided.If you have anything in mind, then feel free to reply here Cheesy



Let me know, what you think about it.

Looks like after one load the cached image is showing up :c Can this be solved?
Update:The caching issue has been fixed Cheesy The images will be updated with live price after every reload.

You can see it working here: https://bitcointalksearch.org/topic/ios-token-speculation-thread-3485867




Really good work mate. I would like to find the more information like adding name details to show on the page and if you design the webpage with any good template you can gather for the more information designers over here.
Check vod signature, she really made good work to find the various details about this forum one page.

Since I like this work, I have merited you as well mate.
legendary
Activity: 1932
Merit: 1273
Domain Name?
cryptocapture
cryptotracker


Any information about the sources you gathered prices data?

adding an option to show the converted result in Bitcoin would be good.
sr. member
Activity: 1064
Merit: 382
Hurrah for Karamazov!
Hey,

this is actually very nice!

I see the image width is set to fixed - I suggest to calculate the image width after your script know the price.

Something like:
Image width = number of digits * 10px + 50px

1 digit is ~10px wide.
'USD' + some margins is ~50px.

Or you could limit the decimal.

I will keep my eye on your project Smiley
I wish you the best of luck!

Thank you so much for being so generous.
Yes, I will work upon your suggestion.I will limit the decimals plus will change the width accordingly.Need to fix few other things too.

Thanks again Cheesy

legendary
Activity: 2212
Merit: 1199
Hey,

this is actually very nice!

I see the image width is set to fixed - I suggest to calculate the image width after your script know the price.

Something like:
Image width = number of digits * 10px + 50px

1 digit is ~10px wide.
'USD' + some margins is ~50px.

Or you could limit the decimal.

I will keep my eye on your project Smiley
I wish you the best of luck!
sr. member
Activity: 1064
Merit: 382
Hurrah for Karamazov!
I have created a simple project, which will generates image with live price of any crypto-currency.It can embedded in posts as an image.

By using this simple URL:

Code:
http://liveimage-liveimage.193b.starter-ca-central-1.openshiftapps.com/image.php?coin=NAME

With amount:
Code:
http://liveimage-liveimage.193b.starter-ca-central-1.openshiftapps.com/image.php?coin=NAME&amount=AMOUNT

With currency and amount:
Code:
http://liveimage-liveimage.193b.starter-ca-central-1.openshiftapps.com/image.php?coin=NAME&amount=AMOUNT¤cy=CURRENCY

Currency:usd/aud/inr etcetra

Replace "NAME" with the coin name( ex:bitcoin,litecoin,ripple,etheruem,bitcoincash,eos,etcetra) and "AMOUNT" with a number.



Examples:

Code:
[img]http://liveimage-liveimage.193b.starter-ca-central-1.openshiftapps.com/image.php?coin=bitcoin[/img]
will generate:

Similarly,

3250 IOST Tokens:

1000 Tron:

1 Bitcoin in INR:



Domain Name?

Not yet decided.If you have anything in mind, then feel free to reply here Cheesy



Let me know, what you think about it.

Looks like after one load the cached image is showing up :c Can this be solved?
Update:The caching issue has been fixed Cheesy The images will be updated with live price after every reload.

You can see it working here: https://bitcointalksearch.org/topic/ios-token-speculation-thread-3485867



https://github.com/edgycorner/Coin-Price-Image-generator/
Jump to: