1.0.1 • Published 2 years ago

debank-open-api v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

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

For Node.js

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

ClassMethodHTTP requestDescription
DeBankOpenApi.ChainApigetChainListGET /v1/chain/list
DeBankOpenApi.ChainApigetChainRGET /v1/chain
DeBankOpenApi.ProtocolApigetProtocolListRGET /v1/protocol/list
DeBankOpenApi.ProtocolApigetProtocolRGET /v1/protocol
DeBankOpenApi.ProtocolApigetTvlGET /v1/protocol/tvl
DeBankOpenApi.TokenApigetTokenListByIdsRGET /v1/token/list_by_ids
DeBankOpenApi.TokenApigetTokenRGET /v1/token
DeBankOpenApi.UserApigetUserComplexProtocolListGET /v1/user/complex_protocol_list
DeBankOpenApi.UserApigetUserNftListGET /v1/user/nft_list
DeBankOpenApi.UserApigetUserProtocolGET /v1/user/protocol
DeBankOpenApi.UserApigetUserSimpleProtocolListGET /v1/user/simple_protocol_list
DeBankOpenApi.UserApigetUserTokenGET /v1/user/token
DeBankOpenApi.UserApigetUserTokenAuthorizedListGET /v1/user/token_authorized_list
DeBankOpenApi.UserApigetUserTokenListGET /v1/user/token_list
DeBankOpenApi.UserApigetUserTokenSearchGET /v1/user/token_search
DeBankOpenApi.UserApigetUserTotalBalanceGET /v1/user/chain_balance
DeBankOpenApi.UserApigetUserTotalBalance_0GET /v1/user/total_balance
DeBankOpenApi.WalletApigetCheckOriginGET /v1/wallet/check_origin
DeBankOpenApi.WalletApigetEnsGET /v1/wallet/ens
DeBankOpenApi.WalletApigetExplainOriginGET /v1/wallet/explain_origin
DeBankOpenApi.WalletApigetExplainTxGET /v1/wallet/get_tx
DeBankOpenApi.WalletApigetGasMarketGET /v1/wallet/gas_market
DeBankOpenApi.WalletApigetPendingTxCountGET /v1/wallet/pending_tx_count
DeBankOpenApi.WalletApigetRecommendChainsGET /v1/wallet/recommend_chains
DeBankOpenApi.WalletApigetSupportChainsGET /v1/wallet/supported_chains
DeBankOpenApi.WalletApigetUrlConfigGET /v1/wallet/config
DeBankOpenApi.WalletApipostCheckTextPOST /v1/wallet/check_text
DeBankOpenApi.WalletApipostCheckTxPOST /v1/wallet/check_tx
DeBankOpenApi.WalletApipostEthCallPOST /v1/wallet/eth_rpc
DeBankOpenApi.WalletApipostExplainTextPOST /v1/wallet/explain_text
DeBankOpenApi.WalletApipostExplainTxPOST /v1/wallet/explain_tx
DeBankOpenApi.WalletApipostPushTxPOST /v1/wallet/push_tx

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.