Skip to content

Latest commit

 

History

History
97 lines (62 loc) · 2.08 KB

TokenApi.md

File metadata and controls

97 lines (62 loc) · 2.08 KB

DeBankOpenApi.TokenApi

All URIs are relative to https://openapi.debank.com

Method HTTP request Description
getTokenListByIdsR GET /v1/token/list_by_ids
getTokenR GET /v1/token

getTokenListByIdsR

[Token] getTokenListByIdsR(chainId, ids)

Bulk token fetching by address

Example

const DeBankOpenApi = require('debank-open-api');

let apiInstance = new DeBankOpenApi.TokenApi();
let chainId = "chainId_example"; // String | ChainID
let ids = ["ids_example"]; // [String] | List of token addresses, up to 100

apiInstance.getTokenListByIdsR(chainId, ids).then((response) => {
  console.log(response);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
chainId String ChainID
ids [String] List of token addresses, up to 100

Return type

[Token]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTokenR

Token getTokenR(chainId, id)

Get token by address

Example

const DeBankOpenApi = require('debank-open-api');

let apiInstance = new DeBankOpenApi.TokenApi();
let chainId = "chainId_example"; // String | ChainID
let id = "id_example"; // String | Ethereum Address or native token id

apiInstance.getTokenR(chainId, id).then((response) => {
  console.log(response);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
chainId String ChainID
id String Ethereum Address or native token id

Return type

Token

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json