Coder Social home page Coder Social logo

cryptocompare's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cryptocompare's Issues

No option for fiat currency amount to btc value

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.

ReferenceError: fetch is not defined

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?

2 functions are missing

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

Question: How to query via ES6 / React JS

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!

Social

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!

Fetching from '/coinsnapshotfullbyid/?id={id}' route fails with CORS error

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

Example on calling an optional parameter

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!

es6 -> commonjs

Would you be willing to simplify the code for npm install (production)

Uglify.js does not like your code for obvious reasons.

node-fetch should be a dependency

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.

Request throttling

I was faced with a problem where, with a many RPC, I exceeded the established limit. Can be added a lib for throttling request?

List of FIAT currencies

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..

Typescript bindings

It would be lovely to get typescript bindings for this library - has anyone done that already?

Is:cryptocompare/cosole.log(newsList)

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"
// }
// }
// ....
//]
})

Example of data parsed to csv

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

npm run build fails to minify

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.

having trouble retrieving IOTA data

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

How to handle SBD* (Steem Dollars) and SCR* (Scorum)

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

iOS 9.x = Unexpected keyword 'const'. Const declarations are not supported in strict mode.

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.