exodusmovement / cryptocompare Goto Github PK
View Code? Open in Web Editor NEWCryptoCompare JavaScript API
License: MIT License
CryptoCompare JavaScript API
License: MIT License
Before i begin, what am about to say is not a bug or an issue, Am requesting if it could be possible to provide an option where we can parse a fiat currency amount and get the equivalent value in a crypto currency value, I think it would be pretty much helpful to us, a typical example of what am talking about is google crypto converter. "bitcoin to usd" <= making this GET request to google will tell better.
Attempting to run this via CLI and I get this: ReferenceError: fetch is not defined
.
I see that you closed an issue similar to this but did the package not get updated? I'm having to patch it now with:
'use strict'
/* global fetch */
global.fetch = require('isomorphic-fetch')
const baseUrl = 'https://min-api.cryptocompare.com/data/'
But that will break any builds that don't include my node_modules
directory. Am I missing something?
CoinSnapshot
Get data for a currency pair. It returns general block explorer information, aggregated data and individual data for each exchange available
CoinSnapshotFullById
Get the general, subs (used to connect to the streamer and to figure out what exchanges we have data for and what are the exact coin pairs of the coin) and the aggregated prices for all pairs available.
Thanks for adding them in advance
Hi, First of all, thank you for sharing this library.
I would like to know how to import it and use it in a React JS / ES6 project?
So far I have tried via:
import {CryptoCompare} from 'cryptocompare';
CryptoCompare.coinList(); // It returns undefined
Thank you!
I was wondering if you plan on writing the social queries?
I have them written out if that would be a helpful contribution?
Let me know!
CryptoCompare has requested this for troubleshooting purposes.
Probably it might be unrelated to cryptocompare package, as this route isn't included in this package, but fetching data from from "https://www.cryptocompare.com/api/data/coinsnapshotfullbyid/?id={id}" fails for me with this error:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
I did set a 'Access-Control-Allow-Origin': '*'
header for the request, but it still fails for me.
Does this route requires extra parameters that are not mentioned in docs?
Thanks
Need to have an API key on the CI server in order to run some tests there. Relevant code:
cryptocompare/test/cryptocompare.test.js
Lines 7 to 14 in 6b2cc44
cryptocompare/test/cryptocompare.test.js
Line 278 in 6b2cc44
Not to get any method for getting historical prices of any currency within a range of timestamp or date
Could I kindly ask someone to please share an example of calling one of the APIs with an example optional value using ES6 notation? I'm having a total mind block trying - for example with the histoDay API and limiting the results to 3? Thank you in advance!
Do you know what the value CCCAGG means?
Thank you for the module too
Would you be willing to simplify the code for npm install (production)
Uglify.js does not like your code for obvious reasons.
npm install does not work, since node-fetch is listed in dev-dependencies. Using Windows 👎 , so unless I give the dev flag it won't work. Suggest keeping it in dependencies.
I was faced with a problem where, with a many RPC, I exceeded the established limit. Can be added a lib for throttling request?
I can't find anywhere in CryptoCompares documentation about what FIAT currencies they support for price conversions?
If you have any idea that would be great..
It would be lovely to get typescript bindings for this library - has anyone done that already?
console.log(newsList)
//[
// {
// id: "708235"
// guid: "https://www.cryptoglobe.com/latest/2018/11/china-cryptocurrency-mining-machines-are-reportedly-being-sold-according-to-their-weight/"
// published_on: 1542886256
// imageurl: "https://images.cryptocompare.com/news/cryptoglobe/fwMg0080000.jpeg"
// title: "China: Cryptocurrency Mining Machines Reportedly Being Sold According to Their Weight"
// url: "https://www.cryptoglobe.com/latest/2018/11/china-cryptocurrency-mining-machines-are-reportedly-being-sold-according-to-their-weight/"
// source: "cryptoglobe"
// body: "Cryptocurrency mining machines are reportedly being sold in China according to their weight as miners who haven’t been able to make a profit are seemingly getting rid of their old models to get some of their investment back."
// tags: ""
// categories: "Mining|Asia|Business"
// upvotes: "0"
// downvotes: "0"
// lang: "EN"
// source_info: {
// name: "CryptoGlobe"
// lang: "EN"
// img: "https://images.cryptocompare.com/news/default/cryptoglobe.png"
// }
// }
// ....
//]
})
Thank you for sharing your code. Works great and looks clean, tidy, optimal. Very nice work, well done.
Would it be possible to show an example of return data being outputted to csv file instead of console.log ?
e.g. working from ...
cc.histoDay('BTC', 'USD', { limit: 'none' } ).then(data => { "output data to csv file" })
Standard csv format ...
Row 1 field headers ...
time, close, high, low, open, volumefrom, volumeto
Row 2 onwards ...
1485388800, 915.65, 917.71, 893.81, 893.97, 35494.93, 32333344.2
and so on
Hope that's clear, thank you for your consideration, Mark
Hello, trying to deploy a small app to Heroku include this wonderful library (thank you) and is is failing to minify the code at ./node_modules/cryptocompare/index.js:8 and pointing me toward here http://bit.ly/2tRViJ9.
Will it support subs via web sockets? We are really need it :)
when i run
cryptocompare.priceFull(["IOTA"], ["USD"], { tryConversion: true })
the result i get makes little sense
{ IOTA:
{ USD:
{ TYPE: '5',
MARKET: 'CCCAGG',
FROMSYMBOL: 'IOTA',
TOSYMBOL: 'USD',
FLAGS: '4',
PRICE: '0.6356',
LASTUPDATE: 1518458610,
LASTVOLUME: 0,
LASTVOLUMETO: 0,
LASTTRADEID: 0,
VOLUMEDAY: 0,
VOLUMEDAYTO: 0,
VOLUME24HOUR: 0,
VOLUME24HOURTO: 0,
OPENDAY: '0.6356',
HIGHDAY: '0.6356',
LOWDAY: '0.6356',
OPEN24HOUR: '0.6356',
HIGH24HOUR: '0.6356',
LOW24HOUR: '0.6356',
LASTMARKET: 'Binance',
CHANGE24HOUR: 0,
CHANGEPCT24HOUR: 0,
CHANGEDAY: 0,
CHANGEPCTDAY: 0,
SUPPLY: 0,
MKTCAP: 0,
TOTALVOLUME24H: 2393110.8526999997,
TOTALVOLUME24HTO: 1521061.2579761199 } } }
i guess im doing something wrong...
but help would be nice
Greetings.
I'm trying to do the following:
cc.priceMulti(['STEEM', 'SBD*', 'GOLOS', 'GBG', 'SCR*', 'VIT'], ['USD', 'BTC']).then(prices => {
console.log(prices.SBD*.USD);
console.log(prices.SCR*.USD);
} ).catch(console.error)
But because the SBD contains the star symbol javascript drops out with error:
SyntaxError: Unexpected token .
When I'm trying to add quotes like ' and ", or use backslash to protect the star like SBD*, it doesen't help either.
When I am trying to navigate inside the array like prices[0][1].USD; javascript drops out with error SyntaxError: missing ) after argument list
.
Is there any ways of using data about SBD and SCR cryptos?
Thanks.
Den
I am wondering if this library support < iOS 10 system? Safari on iOS 9.3 throws the error "Unexpected keyword 'const'. Const declarations are not supported in strict mode.".
I didn't realise that many people still use iOS 9.3, hence I am being asked to sort this issue out -- we happen to use your library for one of our products.
I can fork, fix, and use the module but I prefer if it's sorted out here -- so it's less of cost of ownership for everyone :-)
Thank you
Hi!
Are you planning to support CryptoCompare's streams?
Thanks!
I'm using the package to load pricing data into my graphs based on a ticker search. How exactly would i pull historic data all at once for one ticker?
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.