bkuhl / cryptometer Goto Github PK
View Code? Open in Web Editor NEWA Rainmeter widgetfor monitoring Cryptocurrencies
A Rainmeter widgetfor monitoring Cryptocurrencies
There is a problem with connection to API >> https://api.coinmarketcap.com/v1/ticker/ <<
Two options in my opinion:
a) switch to the new CoinMarketCap API with free account and pass key per user
b) change the API for different project. Bitstamp for example:
https://www.bitstamp.net/api/ticker/
or
https://www.bitstamp.net/api/v2/ticker/{currency_pair}/
Supported values for currency_pair: btcusd, btceur, eurusd, xrpusd, xrpeur, xrpbtc, ltcusd, ltceur, ltcbtc, ethusd, etheur, ethbtc, bchusd, bcheur, bchbtc
I was trying to add a new row in my attempts to add GBP instead of USD (in the hope of adding the option specify in the future into the core config of the plugin).
I have the additional row added no problem, and from the API docs, I know this returns the GBP value, but the regex does not work for some reason? (Sorry, I'm terrible with regex, but I thought it would work?)
https://api.coinmarketcap.com/v1/ticker/ethereum/?convert=GBP - Returns the gbp value, so I thought updating the regex to capture the following should work?
RegExp=(?siU)price_gbp": "(.*)".percent_change_1h": "(.)".percent_change_24h": "(.)".percent_change_7d": "(.)"
I get nothing returned? Any idea why? If I can sort this, I'll issue a PR and if you like it, can merge it.
solved.
cryptometer/Cryptometer-Medium.ini
Line 78 in e4a7b65
I cloned this repository and began using this great tool. Unforunately, Coinmarketcap's API is now producing several decimal digits of precision on prices and overlapping into the next column. Consider limiting the number of digits for example:
RegExp=(?siU)price_usd": "(\d*\.\d{0,4}?).*percent_change_1h": "(.*)".*percent_change_24h": "(.*)".*percent_change_7d": "(.*)"
This shows you how to use graviex.net's API with a coin called DXO (Dextro)
[MeasureDXO]
Measure=Plugin
Plugin=WebParser
URL=https://graviex.net/api/v2/tickers/dxobtc
#URL=https://api.coinmarketcap.com/v1/ticker/ethereum/
RegExp=(?siU)"buy":"(.)",.
The output for this does not show percentages of change, but can if desired./availble in Json : The format is explained here.
https://docs.rainmeter.net/tips/webparser-tutorial/
RegExp=(?siU)Search1(.)Search2.
So enclosed in quotes, you have:
(?siU) - Which is an "options modifier" for the regular expression, telling it how you want it to behave.
Search1 - Which will be some text you will search on to get you right up to the data you want.
(.) - The data you want returned in the array to use in your skin. The parentheses tell it to "capture" everything between "Search1" and "Search2". In our examples we are using the string "." in our captures, which simply means "." (any character) and "" (zero or more of them).
Search2 - Use this to tell RegExp what to look for to know it's time to "stop" capturing information.
. - This will contain data from the website which is between this set of search/return parameters and the next one. It will not be returned as you did not enclose the .* in parentheses, and will not use a StringIndex number. This is used to "skip" to the next search you want to do.
Hi guys,
Apologies for the non-technical explanation here. Each time I try to copy all relevant fields and modify to create a fourth coin line on my skin, it stops receiving the price data for the whole skin.
Is there something I am missing with adding more coins to the skin?
I created another column, I assume I just have to multiply the first column X my amount but idk how to, could you hekp ?
It appears CMC's API changed and inserted a few extra whitespace characters here and there. Current queries not working. #12 should address this.
Would it be possible to add a line displaying when the most recent update happened? If so, how would one go about it?
Thanks!
I do not see any change to the API result from Coinmarketcap that would cause this issue.
https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=CELR&convert=AUD
{"status":{"timestamp":"2021-08-30T23:53:28.953Z","error_code":0,"error_message":null,"elapsed":19,"credit_count":1,"notice":null},"data":{"CELR":{"id":3814,"name":"Celer Network","symbol":"CELR","slug":"celer-network","num_market_pairs":49,"date_added":"2019-03-25T00:00:00.000Z","tags":["platform","enterprise-solutions","scaling","state-channels","substrate","binance-smart-chain","polkadot-ecosystem","binance-launchpad","arrington-xrp-capital","pantera-capital-portfolio"],"max_supply":10000000000,"circulating_supply":5748480629.598,"total_supply":10000000000,"platform":{"id":1027,"name":"Ethereum","symbol":"ETH","slug":"ethereum","token_address":"0x4f9254c83eb525f9fcf346490bbb3ed28a81c667"},"is_active":1,"cmc_rank":173,"is_fiat":0,"last_updated":"2021-08-30T23:50:30.000Z","quote":{"AUD":{"price":0.06262168625701094,"volume_24h":87284537.78946541,"percent_change_1h":-3.63516147,"percent_change_24h":2.31350113,"percent_change_7d":-10.36312864,"percent_change_30d":39.10207445,"percent_change_60d":69.85106056,"percent_change_90d":4.62538518,"market_cap":359979550.44119066,"market_cap_dominance":0.0128,"fully_diluted_market_cap":626216862.5646241,"last_updated":"2021-08-30T23:52:29.000Z"}}}}}
Running regex test via regex101.com gives the expected matches for the following regex string:
(?siU)"price":\s*(\d*\.\d{0,4}?).*percent_change_1h":\s*([-+]?\d*\.\d{0,2}?).*percent_change_24h":\s*([-+]?\d*\.\d{0,2}?).*percent_change_7d":\s*([-+]?\d*\.\d{0,2}?)
Noting this here while I continue to investigate the root cause.
Debug logging of Rainmeter doesn't offer much assistance:
DBUG (10:17:27.029) Win10 Widgets\Cryptometer\Cryptometer-Medium.ini - [MeasureETH]: Fetching: Success!
DBUG (10:17:27.033) Win10 Widgets\Cryptometer\Cryptometer-Medium.ini - [MeasureETH]: Parsing data...
ERRO (10:17:27.033) Win10 Widgets\Cryptometer\Cryptometer-Medium.ini - [MeasureETH]: RegExp matching error (-1)
DBUG (10:17:27.033) Win10 Widgets\Cryptometer\Cryptometer-Medium.ini - [MeasureETH]: Parsing data...done!
Any chance you can add open, high and low values for bitcoin for 24h intervals?
Hi, I need some support. I installed the tool and created the API key, I also see on the API dashboards the requests are coming in.
When I refresh the skin the tickets are not being updated though.
In the error log i get these errors:
DBUG (10:17:14.987) Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini: Reading file: C:\Users\xxx\Documents\Rainmeter\Skins\Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini
DBUG (10:17:14.989) Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini: Reading file: C:\Users\xxx\Documents\Rainmeter\Skins\Win10 Widgets@Resources\variables.ini
DBUG (10:17:14.991) Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini: Reading file: C:\Users\xxx\Documents\Rainmeter\Skins\Win10 Widgets@Resources\styles.ini
DBUG (10:17:14.996) Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini: Reading file: C:\Users\xxx\Documents\Rainmeter\Skins\Win10 Widgets@Resources\background.ini
DBUG (10:17:15.018) : ProxyServer="/auto" (type=PRECONFIG, handle=0x0000000000CC0004) UserAgent=Rainmeter WebParser plugin
DBUG (10:17:15.028) Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini: !WriteKeyValue: Writing to: C:\Users\Imagine\AppData\Roaming\Rainmeter\Rainmeter.ini
DBUG (10:17:15.032) Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini - [MeasureBTC]: Fetching: https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=BTC
DBUG (10:17:15.033) Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini - [MeasureBCH]: Fetching: https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=ETH
DBUG (10:17:15.034) Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini - [MeasureBCH]: Fetching: https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=BCH
DBUG (10:17:15.035) Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini - [MeasureBTC]: Fetching: https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=XRP
DBUG (10:17:15.035) Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini - [MeasureBTC]: Fetching: https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=LTC
ERRO (10:17:15.215) Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini - [MeasureBTC]: RegExp matching error (-1)
ERRO (10:17:15.241) Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini - [MeasureETH]: RegExp matching error (-1)
ERRO (10:17:15.415) Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini - [MeasureLTC]: RegExp matching error (-1)
ERRO (10:17:15.575) Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini - [MeasureBCH]: RegExp matching error (-1)
ERRO (10:17:15.657) Win10 Widgets\Cryptometer\cryptometer-master\Cryptometer-Medium.ini - [MeasureXRP]: RegExp matching error (-1)
Am I missing something?
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.