krunkosaurus / bettertouchtool-crypto Goto Github PK
View Code? Open in Web Editor NEWCrypto stock market prices for your Macbook Pro touch bar! (Bitcoin, Ethereum, Litecoin, Neo, and Civic)
Crypto stock market prices for your Macbook Pro touch bar! (Bitcoin, Ethereum, Litecoin, Neo, and Civic)
How about displaying BTC-prices optional?
I made that work on a modified version of btt-crypto, it was very easy, but I'm not sure if there's the possibility to offer an option to the user to choose the currency the want to see their chosen crypto-currencies in.
Hi,
Love your work! The only suggestion that I hope is possible, is to remove the decimal places from the price, in order to save space on the Touchbar. I don't need to know that Bitcoin is "$16176.29" just "$16,176" will be perfect.
Also adding a "," after the thousands place would make it easier to read at higher prices.
Thank you very much, you're doing great work.
Not quite sure how apple scripting & BTT work, but based on the update interval, BTTTouchBarButtonColor should flash green/red depending on the price change (up/down) before returning back to the set BTTTouchBarButtonColor.
Hello @krunkosaurus ! I love this project. Thanks for it. But I noticed, "coinbase" now ask you to also provide api version in the headers (otherwise it throws an error). Even after it adding it, it sometimes throws warnings in the response, due to which results are not as per required. I am suggesting the following changes, that I made to get it working.
set json to do shell script "curl -H 'CB-VERSION: 2015-04-08' https://api.coinbase.com/v2/prices/BTC-USD/spot"
set json to do shell script "sed s/warnings.*//g <<< " & json
set value to do shell script "sed s/[a-zA-Z:{},]//g <<< " & json
return "$" & value
Have a look at the regex to remove everything after "warnings", and added header in the curl request. Please update your jsons as per. Thanks for this project!
set coin to do shell script "curl -s 'https://min-api.cryptocompare.com/data/price?fsym=(TickerChar)&tsyms=USD' | sed 's/[^0-9\\.]*//g'"
return "$" & coin
This is a little cleaner and quicker to return. As well it aggregates data. Good for coins with low volume, or that are not on bittrex. Also would allow quick exchange to localized currency as well (GBP, EUR, etc...)
Examples
HUSH
ENJ
set coin to do shell script "curl -s 'https://min-api.cryptocompare.com/data/price?fsym=HUSH&tsyms=USD' | sed 's/[^0-9\\.]*//g'"
return "$" & coin
set coin to do shell script "curl -s 'https://min-api.cryptocompare.com/data/price?fsym=ENJ&tsyms=USD' | sed 's/[^0-9\\.]*//g'"
return "$" & coin
I am doing a project for myself and I want to get Images of the tokens. Is there a way to get images from coinmarketcap api ?
Hey to help us to keep a possible stable version, and downloaded in others places would be nice to have a tag release.
That also could help you to keep track of what could be wrong with that version, correct it and release a new one with fixes.
You could follow this version system to help you out.
Neat tool at the moment.
Sparklines would be great.
I.e. if I want to fetch the price from the coinmarketcap API for the ticker Monero, I can use this link to get the price in EUR: https://api.coinmarketcap.com/v1/ticker/monero/?convert=EUR
It returns a JSON body which includes the price. The only thing I don't understand is how to parse that from the JSON using the apple scripting language. Would it be possible to receive an example? I can write the documentation for people how to add any ticker this way using coinmarketcap.
Thank you for making this! Will feature it on Cryptominded.com as Resource of the day next week.
Touch bar is cool!
Price API:
https://bityep.com/api/1/ticker
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.