Code Monkey home page Code Monkey logo

Comments (7)

kostyrin avatar kostyrin commented on June 2, 2024

suggestion: rename method to GetAssetMarkets or like that..

from coingecko.net.

JKorf avatar JKorf commented on June 2, 2024

Well this is a funny one. 8.708131176238499E+36 is larger than the max value of decimal in C#, so I'm not sure how to fix that atm

from coingecko.net.

kostyrin avatar kostyrin commented on June 2, 2024

@JKorf please check the api, there is precision filter. It might be helpful.
image

from coingecko.net.

JKorf avatar JKorf commented on June 2, 2024

Doesn't seem to help unfortunately

from coingecko.net.

0x3abc avatar 0x3abc commented on June 2, 2024

In my case the error was cause by the following JSON entry:

{
  "atl_change_percentage": 1.3041022457098233E+37
}

I solved the problem by changing the property type from decimal to double:

public double AllTimeLowChangePercentage { get; set; }

from coingecko.net.

0x3abc avatar 0x3abc commented on June 2, 2024

There can be also null values in the JSON response (for example "high_24h": null):

{
    "id": "saitama-inu",
    "symbol": "saitama",
    "name": "Saitama",
    "image": "https://assets.coingecko.com/coins/images/16353/large/SOIKDUWf_400x400.jpeg?1696515952",
    "current_price": 0.0024117,
    "market_cap": 108037051,
    "market_cap_rank": 492,
    "fully_diluted_valuation": 108075339,
    "total_volume": 377.5,
    "high_24h": null,
    "low_24h": null,
    "price_change_24h": null,
    "price_change_percentage_24h": null,
    "market_cap_change_24h": null,
    "market_cap_change_percentage_24h": null,
    "circulating_supply": 44797105328.77,
    "total_supply": 44812981146.0,
    "max_supply": 100000000000.0,
    "ath": 0.00433786,
    "ath_change_percentage": -44.40352,
    "ath_date": "2022-07-29T23:36:40.637Z",
    "atl": 2.605E-11,
    "atl_change_percentage": 9258115776.8141,
    "atl_date": "2021-07-07T19:28:30.496Z",
    "roi": null,
    "last_updated": "2024-03-07T18:30:08.505Z"
  }

from coingecko.net.

JKorf avatar JKorf commented on June 2, 2024

I've updated the model to reflect the nullable properties and changed the percentage fields to double type. Let me know if there are any issues

from coingecko.net.

Related Issues (4)

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.