Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token info price sometimes object others boolean #160

Open
JoaquimLey opened this issue Aug 10, 2019 · 1 comment
Open

Token info price sometimes object others boolean #160

JoaquimLey opened this issue Aug 10, 2019 · 1 comment

Comments

@JoaquimLey
Copy link

JoaquimLey commented Aug 10, 2019

e.g:
https://api.ethplorer.io/getAddressInfo/0xf31ad26905f8d6a02873846d9e413a83f72271cf?apiKey=freekey

(...)

tokenInfo: {
  address: "0x3cc83c2400e00a54fa1e588d62bc28bf15d5def5",
  name: "OPTICAL NETWORK",
  decimals: "18",
  symbol: "OPTC",
  totalSupply: "3600000000000000000000000000",
  owner: "0x608b5732b663a0a5583ea9d24ef7fc83e275035b",
  lastUpdated: 1565423714,
  issuancesCount: 0,
  holdersCount: 37484,
  ethTransfersCount: 0,
  price: false <--------- bool
},
(...)

tokenInfo: {
   address: "0x6ff313fb38d53d7a458860b1bf7512f54a03e968",
   name: "Mero Currency",
   decimals: "18",
   symbol: "MRO",
   totalSupply: "20944933921894861838596537",
   owner: "",
   lastUpdated: 1565420438,
   issuancesCount: 0,
   holdersCount: 56078,
   price: { <--------- Object
      rate: 0.00420529425481,
      diff: 11.51,
      diff7d: -26.69,
      ts: 1565423831,
      marketCapUsd: 49570.52992128411,
      availableSupply: 11787648.3588718,
      volume24h: 498.651515495915,
      currency: "USD"
  }
}
(...)

I was wondering if this is by design or not, also if so why? :)
For some context, I'm working on a mobile app and parsing this dynamic response is not as easy and elegant as I wished, but there might be an actual reason for this data to be served like this.

I've read the wiki where it states: token price (false, if not available) but wouldn't make sense to just return null instead of another type?

@mikeygbooth99
Copy link

https://api.ethplorer.io/getAddressInfo/0xf31ad26905f8d6a02873846d9e413a83f72271cf?apiKey=freekey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@JoaquimLey @mikeygbooth99 and others