chubin / rate.sx Goto Github PK
View Code? Open in Web Editor NEW:moneybag: curl cryptocurrencies exchange rates
Home Page: http://rate.sx
License: MIT License
:moneybag: curl cryptocurrencies exchange rates
Home Page: http://rate.sx
License: MIT License
Really love this system, but sad not to see any ALGO support out of "over 500 coins".
Hi there!
We met each other on Twitter. I would like to use this handy tool for stocks. I found a very good stock API:
For example, I use the ticker AAPL for the stock Apple, and MSFT for the stock MSFT. The query looks like this:
https://query1.finance.yahoo.com/v7/finance/quote?lang=en-US®ion=US&corsDomain=finance.yahoo.com&symbols=AAPL,MSFT
I get the data back in JSON format. So I'm trying to use that API in your rate.sx.
When looking on the codebase, it seems the script uses Coinmarketcap's API to collect the data.When I tried to collect the data from the API of coinmarketcap, with the URL https://api.coinmarketcap.com/v1/ticker/
or https://api.coinmarketcap.com/v1/ticker/ETH
I get an error
{"code": "410 Gone", "reason": "We no longer serving this endpoint here" }
But the script is still running fine however. Perhaps I'm missing something?
While I can do this with in bash
by simply using a paste
command (paste <(curl -s rate.sx/BTC) <(curl -s rate.sx/DOGE)
), the spacing between chart elements above and below the chart is lacking. For most part it's like a tab separation (probably because of paste
's default -d
option being set to the tab character)
I was wondering if there was anyway to move the information from the second chart to align with the second chart.
Hi, i just wanted to know if your API has a rate limit how much is it per month.
Hello, for a few weeks now I've noticed that December 14th has a strange and extraordinarily large value for multiple coins; in fact, every one that I've tested.
Is this something wrong on my end? I feel that this would have been brought up already if that wasn't the case.
I've tested this on an Arch and Gentoo installation, with several terminals, as well as on an iPhone.
Curious to see if this is affecting anyone else.
Hello,
I'm BM. A very nice and polite guy.
Feature requests:
Choosing which columns to display. For example I don't want the graph in the rightmost column.
Output as plain text. When I try to use curl rate.sx > rates.txt the valuable data gets obscured by all the formatting. It's currently not possible to do that. Please make it so that we can simply choose the data we want and output to plain text without coloring, lines, graphics etc. Example:
BTC. Price: 39000. Changes +1%
ETH. Price: 2000. Changes +2%
Thanks.
The TOP10 cryptocurrency has changed, so supported list should be updated:
https://github.com/chubin/rate.sx/blob/master/lib/currencies.py#L56
to support request like: /1ETH+1XRP+1ADA+1TRON
Ravencoin is in top 100
Can I get a graph for RVN?
curl rate.sx/rvn
prints out ERROR: Invalid coin/currency name: RVN
Hi! Awesome project!
Any reason why rate.sx can't graph currencies against currencies?
For example, the following doesn't work:
$ curl brl.rate.sx/usd@id
ERROR: Invalid coin/currency name: USD
While curl brl.rate.sx/btc@id
works fine.
Thank you.
Hi! Awesome project!
Any reason why rate.sx can't graph currencies against currencies?
For example, the following doesn't work:
$ curl brl.rate.sx/usd@1d
ERROR: Invalid coin/currency name: USD
While curl brl.rate.sx/btc@1d
and curl brl.rate.sx/1usd
work fine.
Thank you.
Hi,
since .. like 2 hours ago I get a $ sign instead of € sign when I query like this:
curl eur.rate.sx/xmr
... begin: $219.01 (Thu 27 00:10) // end: $205.60 (Fri 28 00:00)~
...
VET is currently ranked at #34
but not supported by rate.sx
:
curl rate.sx/\?n=40 | grep VET
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 26880 100 26880 0 0 30494 0 --:--:-- --:--:-- --:--:-- 30720
│ 34 │ VET │ 0.0165256 │ 3.31% │ 1.14% │ 1.198B │ ▁▃▁▂▇▂▂▃▂▇▁▅ │
When you try to get rate specific for VET
curl rate.sx/vet
ERROR: Invalid coin/currency name: VET
I have an excel sheet with statistics and I use rate.sx to perform calculations with updated prices, but it is not BETH
curl eur.rate.sx/xmr
returns
`
<title>500 Internal Server Error</title>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.
`Is it on my end, or is this the result for everyone?
Output of:
$ curl https://rate.sx
curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
Currently termdata is missing from Pypi so its not possible to source from requirements.txt. Has this dependency changed names? Punching it into search engines has turned up nothing, I can't seem to find an archive of it, or a description of what it did.
It would be cool if the rate.sx defaulted to HTTPS. AFAIK two ways of doing this would be 301 redirects or HSTS.
I really love your different APIs and tools. They are really reat.
I am trying to use it on my ncurses status window, but can't get output without ANSI colors:
http://rate.sx/?T
giving me this output:
same with: curl 'rate.sx/?qT&n=20'
which displays both footer and header, which seems to be a bug. the n
argument, however, works. It just seems to be "T" and "q". also would it be possible to add the "f" argument to rate.sx, much like on wttr.in, not that i don't want to subscribe to your twitter, but i don't need to be reminded when ever i am checking the weather.
Hope you have a possibility to fix it,
My usual http://rate.sx/btc@2w chart stopped working months ago. It started showing outdated data and later nothing. But now even @1d seems to be all wrong.
Hi,
There must be something wrong with my terminal configuration (maybe the fonts?), because this is how charts render:
I'm using alacritty with the hack font.
Let me know if there's any other config that could help debug the issue.
Pascal coin ticker isn't showing the correct price as on coinmarketcap
From the help page:
Supported currencies:
USD, AUD, CAD, CHF, CNY, EUR, GBP, IDR, JPY, KRW, RUB
It could be useful for other code that uses rate.sx if this list could be pulled from a URL, perhaps ideally with descriptions of currencies. If that were available then code like this wouldn't be necessary and third party code won't need to be updated any time you add another currency.
I was accidently found out that malformed request kills server with 504 Gateway Time-out error.
Request example ("h" char in place of number parameter):
curl rate.sx/btc@hh
Because everyone does.
Invoke-WebRequest rate.sx/eth
<html>
<head><title>rate.sx</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="/files/style.css" />
<link rel="stylesheet" type="text/css" href="/files/fonts/stylesheet.css" />
<style type="text/css">
.ef0,.f0 { color: #000000; } .eb0,.b0 { background-color: #000000; }
.ef1,.f1 { color: #CD0000; } .eb1,.b1 { background-color: #CD0000; }
.ef2,.f2 { color: #00CD00; } .eb2,.b2 { background-color: #00CD00; }
.ef3,.f3 { color: #CDCD00; } .eb3,.b3 { background-color: #CDCD00; }
.ef4,.f4 { color: #0000EE; } .eb4,.b4 { background-color: #0000EE; }
.ef5,.f5 { color: #CD00CD; } .eb5,.b5 { background-color: #CD00CD; }
.ef6,.f6 { color: #00CDCD; } .eb6,.b6 { background-color: #00CDCD; }
.ef7,.f7 { color: #E5E5E5; } .eb7,.b7 { background-color: #E5E5E5; }
PSVersionTable:
Name Value
---- -----
PSVersion 7.2.3
PSEdition Core
GitCommitId 7.2.3
OS Microsoft Windows 10.0.19043
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Would wish there was an option to remove decimals and all numbers after. I'm not interested in the whole number because I'm having this in my tmux config.
Didn't see any option for this if this maybe is easy to implement?
Accept a date (range) for specific values: https://rate.sx/0.1btc@2021-03-01
Expected answer would be the conversion of 0.1btc to usd with the end-price of that day ($49672 (Mon 01 23:50)) -> $4967.2.
I think it would be useful to have a single line summary for a given currency. I am interested in this so I can display cryptocurrency information in i3blocks. I was thinking it would have the current value of the coin and the 24 hour % change.
If this feature would be accepted, and it does not already exist, I can create a PR to add it.
"9.11701e-5" - таких значений во всех запросах полно.
Something like:
curl rate.sx/CAD
curl rate.sx/GBP
When someone visits http://rate.sx/ in a bowser, it might be an idea to have the mention of rate.sx/:help
at the bottom of the table be an actual link to rate.sx/:help.
Example:
curl rate.sx/1Nh7uHdvY6fNwtQtM1G5EZAFPLC33B59rB
Returns:
474.27659636 BTC
Instead of a user specifying the coin, you could check a bunch of chains.
curl rate.sx/1Nh7uHdvY6fNwtQtM1G5EZAFPLC33B59rB
474.27659636 BTC + 27.00474466 BCH
Like this service does: https://blockchair.com/search?q=1Nh7uHdvY6fNwtQtM1G5EZAFPLC33B59rB for BTC and BCH.
As described here chubin/wttr.in#151 (comment) the rate.sx
use codepage switching escape command to draw it boxes instead of simply using the unicode equivalent.
Could you draw the rate.sx table layout using unicode in both application ?
$ curl https://rate.sx/jpy
ERROR: No data found for your query. Wrong range?
$ curl https://rate.sx/eur
ERROR: No data found for your query. Wrong range?
For USD bug, see #60
$ curl rate.sx/1icp
8.5522898228
$ curl rate.sx/icp
ERROR: Invalid coin/currency name: ICP
curl -vvvv rate.sx
* Rebuilt URL to: rate.sx/
* Trying 5.9.243.188...
* TCP_NODELAY set
* connect to 5.9.243.188 port 443 failed: Connection refused
* Failed to connect to rate.sx port 443: Connection refused
* Closing connection 0
curl: (7) Failed to connect to rate.sx port 443: Connection refused
❯ curl --version
curl 7.55.1 (x86_64-pc-linux-gnu) libcurl/7.55.1 OpenSSL/1.0.2g zlib/1.2.11 libidn2/2.0.2 libpsl/0.18.0 (+libidn2/2.0.2) librtmp/2.3
Release-Date: 2017-08-14
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy PSL
Hi
I think it would be a good idea to allow the user to get the output in ASCII rather than Unicode (Some terminals are this dumb)
Thanks!
In the last days the call https return error 500 or goes in timeout.
Any reason?
I really like showing this program off to my financial friends. But this app is limited to crypto currencies.
Have you though about making this program usable for calling up CNBC's Quote Request Page
I was rather impressed with how it could pull up data, I recreated the CNBC Quote Request Page on CodePen even though the iframe doesn't work. (It works locally on my computer though.)
What do you think about adding this feature?
Does rate.sx support UNI and FIL?
I tried curl rate.sx/fil
and curl rate.sx/uni
, and I'm getting ERROR: Invalid coin/currency name
.
If there's no support, will it be possible to add it?
We often use rate.sx in the office and we got pretty used to the ease and smart design it provides. Now we need rate.sx services for the calculations, tracking and daily use for our own token that we released to the market which has a great project behind it. Can you please include UBXS in rate.sx?
since around 22:30 18th August 2022 it seems all the data is the same, nothing is updating?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.