Wallet
The Wallet API allows you to easily get some wallet abilities.
Get gas prices
Method
get
Path
/v1/wallet/gas_market
Parameters
chain_id
: required, chain id, eg:eth
,bsc
,xdai
, for more info.
Returns
Array
of Object
- An object with following fields:
level
:string
- The gas price level. (eg. slow, normal, fast)price
:integer
- Gas price.
Request
Result
Enhanced transaction pre-execution
The chain list that currently supports this feature:eth, bsc, matic, avax, boba, op, hmy, ftm, cro, xdai, mobm, movr, metis, astar, sdn, nova
Method
post
Path
/v1/wallet/pre_exec_tx
Parameters
tx
: required, for more info.pending_tx_list
: pending tx list. Transaction Pre-Execute API supports simulating the execution of multiple transactions at the same time. A common use case happens when swapping on dex, where the ERC20 token needs to be approved before the swap.Simulation of the swap transaction will fail unless multiple transactions can be pre-executed simultaneously.So you just need to put the transaction you want to execute in advance into the pending_tx_list,
and we will execute the transactions in the pending_tx_list before the main transaction.
Returns
Request
Result
An object with following fields:
balance_change
- balance change infosuccess: whether the balance change detection is success or not.
error: return error msg, if the balance change detection is fail, otherwise is null.
send_token_list: list of send token info.
receive_token_list: list of receive token info.
send_nft_list: list of send nft info.
receiver_nft_list: list of receive nft info.
usd_value_change: change in the value of the dollar.
gas
- gas estimate info.success: whether the gas estimate is success or not.
error: return error msg, if the gas estimate is fail, otherwise is null.
gas_used: gas used.
pre_exec
- pre exec infosuccess: whether pre exec is success or not.
error: return error msg, if the pre exec is fail, otherwise is null.
is_multisig
- whether it is a multisig txmultisig
- if it is a multisig tx, it will return info which include the same format as the above info.
Explain Tx
Method
post
Path
/v1/wallet/explain_tx
Parameters
tx
: required, for more info.
Returns
Request
Result
An object with following fields:
abi - abi info
func : string - Method of call function name
params: list - call params
actions: list - action list, for more info
Last updated