Author

Topic: Use this BBCode to insert historical BTC quote in your post (Read 200 times)

copper member
Activity: 42
Merit: 67
For everyone's information: use "&" to combine multiple queries like color and date at once.

Right, I'll update the OP to be clearer on that, thanks!

Also, I'll add some examples on other formating options.


copper member
Activity: 42
Merit: 67
... Can you retrieve prices with a shorter time history for no date query (eg closing price in the last 1 hour). ...

Sure, [img]https://ztt.se/btc:quote[/img] (and all other no-date queries) now yields the real-time XBT average (disregarding forum image proxy caches).


hero member
Activity: 1764
Merit: 694
[Nope]No hype delivers more than hope
Loved this, exactly what I was hoping for in my request in another tool. Can you retrieve prices with a shorter time history for no date query (eg closing price in the last 1 hour).

For everyone's information: use "&" to combine multiple queries like color and date at once. Example (BTC price per 2017-12-27)

Code:
[img]https://ztt.se/btc:quote?img=col:blue&date=2017-12-27[/img]
legendary
Activity: 1694
Merit: 4687
**In BTC since 2013**
But it should be optional, don't you think? After all, we're not Apple; we actually let people decide things for themselves.  Cheesy

There it is true.  Cheesy
But at least the indication that the value is in dollars, I think it made sense. Here's the suggestion.
copper member
Activity: 42
Merit: 67
But it should be optional, don't you think? After all, we're not Apple; we actually let people decide things for themselves.  Cheesy
legendary
Activity: 1694
Merit: 4687
**In BTC since 2013**
But taking into account that the information is always in dollars and, in this case, from a specific date, it would be better for the image itself to include this information to avoid misinterpretations, if whoever makes the post does not include all the information.
copper member
Activity: 42
Merit: 67
Thanks! And you're right, but as it is, you can choose if and how to include a date using normal text, so that you could write "The price in dollars was for one (1) BTC at 9 november 2022" quite fluidly (that's why I also don't include a $ sign).

legendary
Activity: 1694
Merit: 4687
**In BTC since 2013**
Interesting information, good job.

In the image that sets the price based on a date, I think you should also include the date.
Thus, it is easier for the reader to understand what price that value refers to.
copper member
Activity: 42
Merit: 67
Thanks, I'll check them out.
hero member
Activity: 1428
Merit: 836
Top Crypto Casino
There is an existing thread made by TryNinja[1]. Here's also the reference thread[2] but seems both are not working now. So i suggest you to create a thread for this on Project Development[3], maybe you can create it as version 3 with some conversions too? Idk.
But anyway this is a useful site, especially to sellers in Marketplace and those who are active in auctions who usually use a dynamic price in USD, BTC or EUR.

[1] https://bitcointalksearch.org/topic/bitcoin-price-image-v2-supporting-segwit-addresses-5160033
[2] https://bitcointalksearch.org/topic/bitcoin-price-image-generator-151565
[3] https://bitcointalk.org/index.php?board=12.0
copper member
Activity: 42
Merit: 67
It should work on its own  Smiley
copper member
Activity: 1330
Merit: 899
🖤😏
Do we need to do it ourselves or is this for the Boss theymos to add to the forum? I'm going back editing my posts adding BTCBTC.🙃 thanks for the work done.👍
copper member
Activity: 42
Merit: 67
When I fooled around with the BTC value at msg date demo, I implemented a simple API to get the BTC price in dollars at a specific date, as an image.


For dates between 2010-10-17 and 2023-01-27, I'm using the closing quotes from a static list, downloaded from https://coincodex.com.

From 2023-01-28, I'm appending this list daily, with the XBX average from https://www.coindesk.com.

Queries specifying dates before 2010-10-17 yield 0. Queries with dates in the future yield the latest known quote (this limitation will be removed in a future version Wink).

I store each quote in whole dollars - queries with large quantities (specified with nof) may suffer from rounding errors.

Because of time zones and daily volatility, the quotes should be considered approximate; in any case, I take no responsibility for the accuracy, performance or longevity of this service.


Syntax examples

[img]https://ztt.se/btc:quote[/img]  =>      No date equals today.
[img]https://ztt.se/btc:quote?date=2013-06-09[/img]  =>      Specific date.
[img]https://ztt.se/btc:quote?date=2013-06-09&nof=2[/img]  =>      Number of coins.
[img]https://ztt.se/btc:quote?img=col:green[/img]  =>      Image colour.

Here's a long one with date and nof parameters and an img parameter with options pointsize, colour, background colour (semi-transparent), font and border (remove white-space):
Code:
[img]
  https://ztt.se/btc:quote ?
    date=2021-11-09 &
    nof=1.5 &
    img=ps:24 + col:DeepSkyBlue4 + bcol:$FECC0280 + font:Snap-ITC + border:10x4
[/img]



The basic URI is https://ztt.se/btc:quote which yields a PNG image with text on a transparent background.

Append a questionmark ? to this if you want to add parameters.

Separate multiple parameters with ampersand &.

Separate multiple parameter options with plus +.

A parameter can be a singleton, or a name-value pair; use the equal sign = to separate name and value.

A parameter option can be a singleton, or a name-value pair; use a colon : to separate name and value.

Dates must be specified in YYYY-MM-DD format.


Note: This gives the price in dollars for bitcoin (1 coin or as many as specified with the nof parameter) at a specific date (specified with the date parameter). On its own, it does not show address balancies or anything else.


Jump to: