Skip to content

Do currency conversion on the client side #103

@davidyuk

Description

@davidyuk

Currently, some endpoints return prices as

    "current": {
      "ae": "0.001615696732425552",
      "usd": "0.0000072824298820616905296",
      "eur": "0.00000625269788358491347344",
      "aud": "0.00001115911646487623574288",
      "brl": "0.00003959242223054561218272",
      "cad": "0.00001001735205497307091104",
      "chf": "0.00000588625786467079827984",
      "gbp": "0.00000541424822125999751856",
      "xau": "2.14887665412598416e-9"
    },

https://mainnet.api.wordcraft.fun/api/tokens/ct_i4snWcikpnCNdxGsG5EoipAJSWHsGVVisoVo9jyBYxvz8W4Za/performance

It would be better to keep api simple, returning only the price in AE, and to convert it to the selected currency using CoinGecko on the client side. Or is it because the above prices were converted not by the current price, but by the historical price? @ifaouibadi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions