debank-open-api
Version:
JavaScript library for DeBank OpenAPI
100 lines (72 loc) • 5.41 kB
Markdown
# debank-open-api
[DeBank | OpenAPI - Build for DeFi Developers](https://open.debank.com/)
JavaScript client for [DeBank | OpenAPI](https://open.debank.com/)
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
- API version: 1.0
- Package version: 1.0
## Installation
### For [Node.js](https://nodejs.org/)
#### npm
Install it via:
```shell
npm install debank-open-api --save
```
### For browser
The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following the above steps with Node.js and installing browserify with `npm install -g browserify`, perform the following (assuming *main.js* is your entry file):
```shell
browserify main.js > bundle.js
```
Then include *bundle.js* in the HTML pages.
## Getting Started
Please follow the [installation](#installation) instruction and execute the following JS code:
```javascript
var DeBankOpenApi = require('debank-open-api');
var api = new DeBankOpenApi.ChainApi()
api.getChainList().then(function(response) {
console.log('API called successfully. Returned data: ' + response.data);
}, function(error) {
console.error(error);
});
```
## Documentation for API Endpoints
All URIs are relative to *//openapi.debank.com*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DeBankOpenApi.ChainApi* | [**getChainList**](docs/ChainApi.md#getChainList) | **GET** /v1/chain/list |
*DeBankOpenApi.ChainApi* | [**getChainR**](docs/ChainApi.md#getChainR) | **GET** /v1/chain |
*DeBankOpenApi.ProtocolApi* | [**getProtocolListR**](docs/ProtocolApi.md#getProtocolListR) | **GET** /v1/protocol/list |
*DeBankOpenApi.ProtocolApi* | [**getProtocolR**](docs/ProtocolApi.md#getProtocolR) | **GET** /v1/protocol |
*DeBankOpenApi.ProtocolApi* | [**getTvl**](docs/ProtocolApi.md#getTvl) | **GET** /v1/protocol/tvl |
*DeBankOpenApi.TokenApi* | [**getTokenListByIdsR**](docs/TokenApi.md#getTokenListByIdsR) | **GET** /v1/token/list_by_ids |
*DeBankOpenApi.TokenApi* | [**getTokenR**](docs/TokenApi.md#getTokenR) | **GET** /v1/token |
*DeBankOpenApi.UserApi* | [**getUserComplexProtocolList**](docs/UserApi.md#getUserComplexProtocolList) | **GET** /v1/user/complex_protocol_list |
*DeBankOpenApi.UserApi* | [**getUserNftList**](docs/UserApi.md#getUserNftList) | **GET** /v1/user/nft_list |
*DeBankOpenApi.UserApi* | [**getUserProtocol**](docs/UserApi.md#getUserProtocol) | **GET** /v1/user/protocol |
*DeBankOpenApi.UserApi* | [**getUserSimpleProtocolList**](docs/UserApi.md#getUserSimpleProtocolList) | **GET** /v1/user/simple_protocol_list |
*DeBankOpenApi.UserApi* | [**getUserToken**](docs/UserApi.md#getUserToken) | **GET** /v1/user/token |
*DeBankOpenApi.UserApi* | [**getUserTokenAuthorizedList**](docs/UserApi.md#getUserTokenAuthorizedList) | **GET** /v1/user/token_authorized_list |
*DeBankOpenApi.UserApi* | [**getUserTokenList**](docs/UserApi.md#getUserTokenList) | **GET** /v1/user/token_list |
*DeBankOpenApi.UserApi* | [**getUserTokenSearch**](docs/UserApi.md#getUserTokenSearch) | **GET** /v1/user/token_search |
*DeBankOpenApi.UserApi* | [**getUserTotalBalance**](docs/UserApi.md#getUserTotalBalance) | **GET** /v1/user/chain_balance |
*DeBankOpenApi.UserApi* | [**getUserTotalBalance_0**](docs/UserApi.md#getUserTotalBalance_0) | **GET** /v1/user/total_balance |
*DeBankOpenApi.WalletApi* | [**getCheckOrigin**](docs/WalletApi.md#getCheckOrigin) | **GET** /v1/wallet/check_origin |
*DeBankOpenApi.WalletApi* | [**getEns**](docs/WalletApi.md#getEns) | **GET** /v1/wallet/ens |
*DeBankOpenApi.WalletApi* | [**getExplainOrigin**](docs/WalletApi.md#getExplainOrigin) | **GET** /v1/wallet/explain_origin |
*DeBankOpenApi.WalletApi* | [**getExplainTx**](docs/WalletApi.md#getExplainTx) | **GET** /v1/wallet/get_tx |
*DeBankOpenApi.WalletApi* | [**getGasMarket**](docs/WalletApi.md#getGasMarket) | **GET** /v1/wallet/gas_market |
*DeBankOpenApi.WalletApi* | [**getPendingTxCount**](docs/WalletApi.md#getPendingTxCount) | **GET** /v1/wallet/pending_tx_count |
*DeBankOpenApi.WalletApi* | [**getRecommendChains**](docs/WalletApi.md#getRecommendChains) | **GET** /v1/wallet/recommend_chains |
*DeBankOpenApi.WalletApi* | [**getSupportChains**](docs/WalletApi.md#getSupportChains) | **GET** /v1/wallet/supported_chains |
*DeBankOpenApi.WalletApi* | [**getUrlConfig**](docs/WalletApi.md#getUrlConfig) | **GET** /v1/wallet/config |
*DeBankOpenApi.WalletApi* | [**postCheckText**](docs/WalletApi.md#postCheckText) | **POST** /v1/wallet/check_text |
*DeBankOpenApi.WalletApi* | [**postCheckTx**](docs/WalletApi.md#postCheckTx) | **POST** /v1/wallet/check_tx |
*DeBankOpenApi.WalletApi* | [**postEthCall**](docs/WalletApi.md#postEthCall) | **POST** /v1/wallet/eth_rpc |
*DeBankOpenApi.WalletApi* | [**postExplainText**](docs/WalletApi.md#postExplainText) | **POST** /v1/wallet/explain_text |
*DeBankOpenApi.WalletApi* | [**postExplainTx**](docs/WalletApi.md#postExplainTx) | **POST** /v1/wallet/explain_tx |
*DeBankOpenApi.WalletApi* | [**postPushTx**](docs/WalletApi.md#postPushTx) | **POST** /v1/wallet/push_tx |
## Documentation for Models
- [DeBankOpenApi.Chain](docs/Chain.md)
- [DeBankOpenApi.Protocol](docs/Protocol.md)
- [DeBankOpenApi.Token](docs/Token.md)
## Documentation for Authorization
All endpoints do not require authorization.