Skip to content

eduardo-veras/debank-open-api

Repository files navigation

debank-open-api

DeBank | OpenAPI - Build for DeFi Developers

JavaScript client for DeBank | OpenAPI

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0
  • Package version: 1.0

Installation

npm

Install it via:

npm install debank-open-api --save

For browser

The library also works in the browser environment via npm and browserify. 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):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Getting Started

Please follow the installation instruction and execute the following JS code:

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 GET /v1/chain/list
DeBankOpenApi.ChainApi getChainR GET /v1/chain
DeBankOpenApi.ProtocolApi getProtocolListR GET /v1/protocol/list
DeBankOpenApi.ProtocolApi getProtocolR GET /v1/protocol
DeBankOpenApi.ProtocolApi getTvl GET /v1/protocol/tvl
DeBankOpenApi.TokenApi getTokenListByIdsR GET /v1/token/list_by_ids
DeBankOpenApi.TokenApi getTokenR GET /v1/token
DeBankOpenApi.UserApi getUserComplexProtocolList GET /v1/user/complex_protocol_list
DeBankOpenApi.UserApi getUserNftList GET /v1/user/nft_list
DeBankOpenApi.UserApi getUserProtocol GET /v1/user/protocol
DeBankOpenApi.UserApi getUserSimpleProtocolList GET /v1/user/simple_protocol_list
DeBankOpenApi.UserApi getUserToken GET /v1/user/token
DeBankOpenApi.UserApi getUserTokenAuthorizedList GET /v1/user/token_authorized_list
DeBankOpenApi.UserApi getUserTokenList GET /v1/user/token_list
DeBankOpenApi.UserApi getUserTokenSearch GET /v1/user/token_search
DeBankOpenApi.UserApi getUserTotalBalance GET /v1/user/chain_balance
DeBankOpenApi.UserApi getUserTotalBalance_0 GET /v1/user/total_balance
DeBankOpenApi.WalletApi getCheckOrigin GET /v1/wallet/check_origin
DeBankOpenApi.WalletApi getEns GET /v1/wallet/ens
DeBankOpenApi.WalletApi getExplainOrigin GET /v1/wallet/explain_origin
DeBankOpenApi.WalletApi getExplainTx GET /v1/wallet/get_tx
DeBankOpenApi.WalletApi getGasMarket GET /v1/wallet/gas_market
DeBankOpenApi.WalletApi getPendingTxCount GET /v1/wallet/pending_tx_count
DeBankOpenApi.WalletApi getRecommendChains GET /v1/wallet/recommend_chains
DeBankOpenApi.WalletApi getSupportChains GET /v1/wallet/supported_chains
DeBankOpenApi.WalletApi getUrlConfig GET /v1/wallet/config
DeBankOpenApi.WalletApi postCheckText POST /v1/wallet/check_text
DeBankOpenApi.WalletApi postCheckTx POST /v1/wallet/check_tx
DeBankOpenApi.WalletApi postEthCall POST /v1/wallet/eth_rpc
DeBankOpenApi.WalletApi postExplainText POST /v1/wallet/explain_text
DeBankOpenApi.WalletApi postExplainTx POST /v1/wallet/explain_tx
DeBankOpenApi.WalletApi postPushTx POST /v1/wallet/push_tx

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.