trustwallet / blockatlas

Clean and lightweight cross-chain transaction API
MIT License
371 stars 230 forks source link

Implement fetching list of tokens #173

Closed vikmeup closed 5 years ago

vikmeup commented 5 years ago

Binance DEX

Docs: https://docs.binance.org/api-reference/dex-api/paths.html#apiv1accountaddress Example: https://dex.binance.org/api/v1/account/bnb1jxfh2g85q3v0tdq56fnevx6xcxtcnhtsmcu64m

Ethereum - Using Trust Ray

trust-ray/tokens?address=0xBBf52Eb09f0254AeFcC45675Bd2Eed4F38745aC8

Generalize into the universal model:

{
   name: string,
   symbol: string,
   decimals: int,
   tokenID: String,
   coin: int // slip44 id
}

Expected result for the REST API

/v1/ethereum/tokens/:address /v1/binance/tokens/:address

{
   docs: [ {
      name: "Token1",
      symbol: "HEL",
      decimals: 8,
      tokenID: "UND-EBC",
      coin: 714
      } 
  ]
}
kolya182 commented 5 years ago

Fixed in https://github.com/TrustWallet/blockatlas/commit/930b6c0ba935b37b0c3a68516b6fa7acadb9ee34