Giter VIP home page Giter VIP logo

Comments (4)

Josh-McFarlin avatar Josh-McFarlin commented on July 25, 2024

Yes I've been working on adding the optional fields and limits, and the debugging is a good idea. I'll have this updated in the next few weeks.

from cryptocompareapi.

IanWorthington avatar IanWorthington commented on July 25, 2024

Here's a couple more things:

It might be best for the routine to return data guaranteed to be time-sequenced. I've modified my code above to use a TreeMap and also modified the rejection of duplicate timestamps to use that instead.

Also there's the possibility of loss of precision converting stringed numbers to doubles. Might it not be better to use BigDecimals or something similar?

from cryptocompareapi.

IanWorthington avatar IanWorthington commented on July 25, 2024

Cryptocompare is now sending null data tuplets for dates when it has no values. I've added this code:

`// CryptoCompare is now sending empty values instead of saying it has no data, eg:
// Data [time=1434664800 (2015-06-18T22:00:00Z), open=0.0, high=0.0, low=0.0, close=0.0, volumeFrom=0.0, volumeTo=0.0]
// Iterate through the time-sorted list deleting everything until we find the first real data.

	Iterator<Integer> iter = mapData.keySet().iterator();
	
	while (iter.hasNext()) {
		Integer k = iter.next();
		
		Data v = mapData.get(k);
		
		if (v.open == 0.0d
				&& v.high == 0.0d
				&& v.low == 0.0d
				&& v.close == 0.0d
				&& v.volumeFrom == 0.0d
				&& v.volumeTo == 0.0d) {
			iter.remove();
		} else {
			break; // stop when we reach first real value
		}

	}`

from cryptocompareapi.

Josh-McFarlin avatar Josh-McFarlin commented on July 25, 2024

After working on different projects for some time, I came back and implemented these features.

from cryptocompareapi.

Related Issues (5)

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.