debank-open-api
Version:
JavaScript library for DeBank OpenAPI
98 lines (62 loc) • 2.13 kB
Markdown
//openapi.debank.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getTokenListByIdsR**](TokenApi.md
[**getTokenR**](TokenApi.md
<a name="getTokenListByIdsR"></a>
> [Token] getTokenListByIdsR(chainId, ids)
Bulk token fetching by address
```javascript
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);
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**chainId** | **String**| ChainID |
**ids** | [**[String]**](String.md)| List of token addresses, up to 100 |
[**[Token]**](Token.md)
No authorization required
- **Content-Type**: Not defined
- **Accept**: application/json
<a name="getTokenR"></a>
> Token getTokenR(chainId, id)
Get token by address
### Example
```javascript
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);
});
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**chainId** | **String**| ChainID |
**id** | **String**| Ethereum Address or native token id |
[**Token**](Token.md)
No authorization required
- **Content-Type**: Not defined
- **Accept**: application/json
All URIs are relative to *https: