Documentation ¶
Index ¶
- Constants
- type ApplyNewAddressResp
- type Cactus
- func (c *Cactus) ApplyNewAddress(bId string, walletCode string, coinName constants.CactusToken, addressNum int, ...) (*ApplyNewAddressResp, error)
- func (c *Cactus) CancelOrder(bId string, orderNo string, level constants.ReplaceByFeeLevel, ...) (*CancelOrderResp, error)
- func (c *Cactus) CreateContractOrder(bId string, req CreateContractOrderReq) (*CreateContractOrderResp, error)
- func (c *Cactus) CreateSignOrder(bId string, walletCode string, req CreateSignOrderReq) (*CreateSignOrderResp, error)
- func (c *Cactus) CreateWallet(bId string, walletType string, number int) (*CreateWalletResp, error)
- func (c *Cactus) CreateWithdrawOrder(bId string, req WithdrawalArgsFeeReq) (*CreateWithdrawalOrderResp, error)
- func (c *Cactus) EditAddressDescription(bId string, walletCode string, address string, description string) (*EditAccountDescriptionResp, error)
- func (c *Cactus) EditTransactionRemark(bId string, walletCode string, id string, remark string) (*EditTransactionRemarkResp, error)
- func (c *Cactus) EstimateWithdrawalFee(bId string, req WithdrawalArgsFeeReq) (*EstimateWithdrawalFeeResp, error)
- func (c *Cactus) GetAddressList(bId string, walletCode string, coinName constants.CactusToken, ...) (*GetAddressListResp, error)
- func (c *Cactus) GetChainInfo(chain string, fullName string) (*GetChainInfoResp, error)
- func (c *Cactus) GetCoinInfo(cactusToken string, token string) (*GetCoinInfoResp, error)
- func (c *Cactus) GetCurrentAssetNotionalValue(bId string) (*GetCurrentAssetNotionalValueResp, error)
- func (c *Cactus) GetDefiTransactionDetails(bId string, walletCode string, orderNo string) (*GetDefiTransactionDetailsResp, error)
- func (c *Cactus) GetFilteredOrder(bId string, applicant []string, coinName []constants.CactusToken, ...) (*GetFilteredOrderResp, error)
- func (c *Cactus) GetOrderDetails(bId string, orderNo string) (*GetOrderDetailsResp, error)
- func (c *Cactus) GetSingleAddress(bId string, walletCode string, coinName constants.CactusToken, address string) (*GetSingleAddressResp, error)
- func (c *Cactus) GetSingleWalletInfo(bId string, walletCode string, coinName constants.CactusToken) (*GetSingleWalletInfoResp, error)
- func (c *Cactus) GetTotalAssetNotionalValue(bId string) (*GetTotalAssetNotionalValueResp, error)
- func (c *Cactus) GetTransactionDetails(bId string, walletCode string, coinName constants.CactusToken, ...) (*GetTransactionDetailsResp, error)
- func (c *Cactus) GetTransactionHistory(bId string, walletCode string, keyword string, sortByTime string, ...) (*GetTransactionHistoryResp, error)
- func (c *Cactus) GetWalletList(bId string, walletFilterType constants.WalletFilterType, hideNoCoinWallet bool, ...) (*GetWalletListResp, error)
- func (c *Cactus) GetWalletTransactionHistory(bId string, walletCode string, coinName constants.CactusToken, ...) (*GetWalletTransactionSummaryResp, error)
- func (c *Cactus) GetWithdrawalFeeRange(coinName constants.CactusToken) (*GetWithdrawalFeeRangeResp, error)
- func (c *Cactus) GetWithdrawalRate(coinName constants.CactusToken) (*GetWithdrawalRateResp, error)
- func (c *Cactus) Log(level int, message string)
- func (c *Cactus) ReplaceByFee(bId string, orderNo string, level constants.ReplaceByFeeLevel, ...) (*ReplaceByFeeResp, error)
- func (c *Cactus) VerifyAddress(coinName constants.CactusToken, addresses []string) (*VerifyAddressResp, error)
- type CancelOrderResp
- type CreateContractOrderReq
- type CreateContractOrderResp
- type CreateSignOrderReq
- type CreateSignOrderResp
- type CreateWalletResp
- type CreateWithdrawalOrderResp
- type DestAddressItem
- type EditAccountDescriptionResp
- type EditTransactionRemarkResp
- type EstimateWithdrawalFeeResp
- type GetAddressListResp
- type GetChainInfoResp
- type GetCoinInfoResp
- type GetCurrentAssetNotionalValueResp
- type GetDefiTransactionDetailsResp
- type GetFilteredOrderResp
- type GetOrderDetailsResp
- type GetSingleAddressResp
- type GetSingleWalletInfoResp
- type GetTotalAssetNotionalValueResp
- type GetTransactionDetailsResp
- type GetTransactionHistoryResp
- type GetWalletListResp
- type GetWalletTransactionSummaryResp
- type GetWithdrawalFeeRangeResp
- type GetWithdrawalRateResp
- type ReplaceByFeeResp
- type VerifyAddressResp
- type WithdrawalArgsFeeReq
Constants ¶
const ( ApplyNewAddressUrl = "/custody/v1/api/projects/%s/wallets/%s/addresses/apply" GetSingleAddressUrl = "/custody/v1/api/projects/%s/wallets/%s/addresses/%s" GetAddressListUrl = "/custody/v1/api/projects/%s/wallets/%s/addresses" EditAddressDescriptionUrl = "/custody/v1/api/projects/%s/wallets/%s/addresses/%s" VerifyAddressFormat = "/custody/v1/api/addresses/type/check" )
const ( GetTotalAssetNotionalValueUrl = "/custody/v1/api/history-asset" GetCurrentAssetNotionalValueUrl = "/custody/v1/api/asset" )
const ( CreateContractOrderUrl = "/custody/v1/api/projects/%s/contract/call" CreateSignOrderUrl = "/custody/v1/api/projects/%s/wallets/%s/signatures" GetDefiTransactionHistoryUrl = "/custody/v1/api/projects/%s/wallets/%s/contract/orders" GetDefiTransactionDetailsUrl = "/custody/v1/api/projects/%s/wallets/%s/contract/orders/%s" )
const ( GetFilteredOrderUrl = "/custody/v1/api/projects/%s/orders" GetOrderDetailsUrl = "/custody/v1/api/projects/%s/orders/%s" ReplaceByFeeUrl = "/custody/v1/api/projects/%s/orders/%s/accelerate" CancelOrderUrl = "/custody/v1/api/projects/%s/orders/%s/cancel" )
const ( GetWalletTransactionSummaryUrl = "/custody/v1/api/projects/%s/wallets/%s/tx-summaries" GetTransactionDetailsUrl = "/custody/v1/api/projects/%s/wallets/%s/tx-details" EditTransactionRemarkUrl = "/custody/v1/api/projects/%s/wallets/%s/details/%s" )
const ( GetSingleWalletInfoUri = "/custody/v1/api/projects/%s/wallets/%s" GetWalletListUrl = "/custody/v1/api/wallets" GetCoinInfoUrl = "/custody/v1/api/coin-infos" GetChainInfoUrl = "/custody/v1/api/chain-infos" CreateWalletUrl = "/custody/v1/api/projects/%s/wallets/create" )
const ( EstimateWithdrawalFeeUrl = "/custody/v1/api/projects/%s/estimate-miner-fee" CreateWithdrawalOrderUrl = "/custody/v1/api/projects/%s/order/create" GetWithdrawalFeeRangeUrl = "/custody/v1/api/customize-fee-rate/range" GetWithdrawalRateUrl = "/custody/v1/api/recommend-fee-rate/list" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyNewAddressResp ¶
type ApplyNewAddressResp struct { Code int `json:"code"` Message string `json:"message"` Data []string `json:"data"` Successful bool `json:"successful"` }
ApplyNewAddressResp is the response of ApplyNewAddress Data is an array of addresses
type Cactus ¶
type Cactus struct { BaseUri string XApiKey string ApiKeyID string PrivateKey *ecdsa.PrivateKey HttpClient *http.Client LogLevel int }
func (*Cactus) ApplyNewAddress ¶
func (c *Cactus) ApplyNewAddress(bId string, walletCode string, coinName constants.CactusToken, addressNum int, addressType string) (*ApplyNewAddressResp, error)
ApplyNewAddress applies new address for a wallet bId: business id walletCode: wallet code coinName: coin name, optional addressNum: number of addresses to apply addressType: address type, only accept "NORMAL_ADDRESS"
func (*Cactus) CancelOrder ¶
func (c *Cactus) CancelOrder(bId string, orderNo string, level constants.ReplaceByFeeLevel, gasPrice float64) (*CancelOrderResp, error)
CancelOrder cancels the order bId: business id orderNo: order no level: replace by fee level gasPrice: gas price, required if level is custom
func (*Cactus) CreateContractOrder ¶
func (c *Cactus) CreateContractOrder(bId string, req CreateContractOrderReq) (*CreateContractOrderResp, error)
CreateContractOrder creates a contract order bId: business id req: request body
func (*Cactus) CreateSignOrder ¶
func (c *Cactus) CreateSignOrder(bId string, walletCode string, req CreateSignOrderReq) (*CreateSignOrderResp, error)
func (*Cactus) CreateWallet ¶
CreateWallet creates a defi wallet bId: the business id walletType: the wallet type, only "DEFI" is allowed number: the number of wallets to create
func (*Cactus) CreateWithdrawOrder ¶
func (c *Cactus) CreateWithdrawOrder(bId string, req WithdrawalArgsFeeReq) (*CreateWithdrawalOrderResp, error)
CreateWithdrawOrder creates the withdrawal order bId: business id req: request body
func (*Cactus) EditAddressDescription ¶
func (c *Cactus) EditAddressDescription(bId string, walletCode string, address string, description string) (*EditAccountDescriptionResp, error)
EditAddressDescription edits the address description bId: business id walletCode: wallet code address: address description: description
func (*Cactus) EditTransactionRemark ¶
func (c *Cactus) EditTransactionRemark(bId string, walletCode string, id string, remark string) (*EditTransactionRemarkResp, error)
EditTransactionRemark edits the transaction remark bId: business id walletCode: wallet code id: wallet detail item id remark: remark
func (*Cactus) EstimateWithdrawalFee ¶
func (c *Cactus) EstimateWithdrawalFee(bId string, req WithdrawalArgsFeeReq) (*EstimateWithdrawalFeeResp, error)
EstimateWithdrawalFee estimates the withdrawal fee bId: business id req: request body
func (*Cactus) GetAddressList ¶
func (c *Cactus) GetAddressList(bId string, walletCode string, coinName constants.CactusToken, hideNoCoinAddress bool, keyword string, offset int, limit int) (*GetAddressListResp, error)
GetAddressList gets the address list bId: business id walletCode: wallet code coinName: coin name, optional hideNoCoinAddress: hide addresses with no coin, optional keyword: keyword, optional offset: offset, optional, default 0 limit: limit, optional, default 10
func (*Cactus) GetChainInfo ¶
func (c *Cactus) GetChainInfo(chain string, fullName string) (*GetChainInfoResp, error)
GetChainInfo gets the chain info
func (*Cactus) GetCoinInfo ¶
func (c *Cactus) GetCoinInfo(cactusToken string, token string) (*GetCoinInfoResp, error)
func (*Cactus) GetCurrentAssetNotionalValue ¶
func (c *Cactus) GetCurrentAssetNotionalValue(bId string) (*GetCurrentAssetNotionalValueResp, error)
func (*Cactus) GetDefiTransactionDetails ¶
func (*Cactus) GetFilteredOrder ¶
func (c *Cactus) GetFilteredOrder( bId string, applicant []string, coinName []constants.CactusToken, chainName []constants.ChainName, walletName []string, status []string, keyword string, sortByTime constants.OrderType, startTime int, endTime int, offset int, limit int, ) (*GetFilteredOrderResp, error)
GetFilteredOrder gets the filtered order bId: business id startTime: start time, optional endTime: end time, optional keyword: keyword, optional limit: limit, optional, default 10 offset: offset, optional, default 0 sortByTime: sort by time, optional, default desc applicant: applicant who made the request, optional coinName: coin name, optional chainName: chain name, optional walletName: wallet name, optional status: status, optional
func (*Cactus) GetOrderDetails ¶
func (c *Cactus) GetOrderDetails(bId string, orderNo string) (*GetOrderDetailsResp, error)
func (*Cactus) GetSingleAddress ¶
func (c *Cactus) GetSingleAddress(bId string, walletCode string, coinName constants.CactusToken, address string) (*GetSingleAddressResp, error)
GetSingleAddress gets the single address info bId: business id walletCode: wallet code coinName: coin name, optional address: address
func (*Cactus) GetSingleWalletInfo ¶
func (c *Cactus) GetSingleWalletInfo(bId string, walletCode string, coinName constants.CactusToken) (*GetSingleWalletInfoResp, error)
GetSingleWalletInfo gets the single wallet info bId: the business id walletCode: the wallet code coinName: the coin name, optional, see constants/tokens.go
func (*Cactus) GetTotalAssetNotionalValue ¶
func (c *Cactus) GetTotalAssetNotionalValue(bId string) (*GetTotalAssetNotionalValueResp, error)
GetTotalAssetNotionalValue gets total asset notional value bId: business id, optional, query all if not provided
func (*Cactus) GetTransactionDetails ¶
func (c *Cactus) GetTransactionDetails( bId string, walletCode string, coinName constants.CactusToken, txTypes []constants.TxType, addresses []string, id string, txId string, orderNo string, offset int, limit int, createTimeOrder constants.OrderType, startTime int64, endTime int64, ) (*GetTransactionDetailsResp, error)
GetTransactionDetails gets the transaction details bId: business id walletCode: wallet code coinName: coin name, optional txTypes: transaction types, optional addresses: addresses, optional id: wallet detail item id, optional txId: transaction hash, optional orderNo: order number, optional
func (*Cactus) GetTransactionHistory ¶
func (c *Cactus) GetTransactionHistory(bId string, walletCode string, keyword string, sortByTime string, status string, chain constants.ChainName, startTime int64, limit int, offset int) (*GetTransactionHistoryResp, error)
GetTransactionHistory gets the transaction history bId: business id walletCode: wallet code keyword: keyword, optional sortByTime: ASC or DESC, optional status: status, optional chain: chain startTime: start time, optional limit: limit, optional offset: offset, optional
func (*Cactus) GetWalletList ¶
func (c *Cactus) GetWalletList(bId string, walletFilterType constants.WalletFilterType, hideNoCoinWallet bool, coinNames []constants.CactusToken, walletTypes constants.WalletType, keyword string, defiWalletCode string, mainWalletCode string, chain constants.ChainName, totalMarketOrder constants.OrderType, createTimeOrder constants.OrderType, offset int, limit int) (*GetWalletListResp, error)
GetWalletList gets the wallet list All args are optional
func (*Cactus) GetWalletTransactionHistory ¶
func (c *Cactus) GetWalletTransactionHistory( bId string, walletCode string, coinName constants.CactusToken, txTypes []constants.TxType, addresses []string, offset int, limit int, createTimeOrder constants.OrderType, startTime int64, endTime int64, ) (*GetWalletTransactionSummaryResp, error)
GetWalletTransactionHistory gets the wallet transaction history bId: business id walletCode: wallet code coinName: coin name txTypes: transaction types, see TxType, optional addresses: addresses, optional offset: offset, optional, default 0 limit: limit, optional, default 10 createTimeOrder: create time order, optional, default desc startTime: start time, optional endTime: end time, optional
func (*Cactus) GetWithdrawalFeeRange ¶
func (c *Cactus) GetWithdrawalFeeRange(coinName constants.CactusToken) (*GetWithdrawalFeeRangeResp, error)
func (*Cactus) GetWithdrawalRate ¶
func (c *Cactus) GetWithdrawalRate(coinName constants.CactusToken) (*GetWithdrawalRateResp, error)
func (*Cactus) ReplaceByFee ¶
func (c *Cactus) ReplaceByFee(bId string, orderNo string, level constants.ReplaceByFeeLevel, gasPrice float64) (*ReplaceByFeeResp, error)
ReplaceByFee replaces the order by fee bId: business id orderNo: order no level: replace by fee level gasPrice: gas price, required if level is custom
func (*Cactus) VerifyAddress ¶
func (c *Cactus) VerifyAddress(coinName constants.CactusToken, addresses []string) (*VerifyAddressResp, error)
VerifyAddress verifies the address format coinName: coin name addresses: address list
type CancelOrderResp ¶
type CreateContractOrderReq ¶
type CreateContractOrderReq struct { OrderNo string `json:"order_no"` FromWalletCode string `json:"from_wallet_code"` FromAddress string `json:"from_address"` ToAddress string `json:"to_address"` Amount string `json:"amount"` Chain constants.ChainName `json:"chain"` ContractData string `json:"contract_data"` GasPriceLevel string `json:"gas_price_level,omitempty"` GasPrice int64 `json:"gas_price,omitempty"` MaxFeePerGas int64 `json:"max_fee_per_gas,omitempty"` MaxPriorityFeePerGas int64 `json:"max_priority_fee_per_gas,omitempty"` GasLimit int `json:"gas_limit"` Description string `json:"description"` }
type CreateContractOrderResp ¶
type CreateSignOrderReq ¶
type CreateSignOrderResp ¶
type CreateWalletResp ¶
type DestAddressItem ¶
type GetAddressListResp ¶
type GetAddressListResp struct { Code int `json:"code"` Message string `json:"message"` Successful bool `json:"successful"` Data struct { Limit int `json:"limit"` Offset int `json:"offset"` Total int `json:"total"` List []struct { Address string `json:"address"` AddressStorage string `json:"address_storage"` AddressType string `json:"address_type"` AvailableAmount interface{} `json:"available_amount"` CoinName string `json:"coin_name"` BchAddressFormat interface{} `json:"bch_address_format"` BId string `json:"b_id"` Description string `json:"description"` DomainId string `json:"domain_id"` FreezeAmount interface{} `json:"freeze_amount"` TotalAmount int `json:"total_amount"` WalletCode string `json:"wallet_code"` WalletType string `json:"wallet_type"` } `json:"list"` } `json:"data"` }
type GetChainInfoResp ¶
type GetChainInfoResp struct { Code int `json:"code"` Message string `json:"message"` Data []struct { Chain string `json:"chain"` FullName string `json:"full_name"` MainCoin string `json:"main_coin"` EvmChain bool `json:"evm_chain"` SupportEip1559 bool `json:"support_eip1559"` ConfirmBlockNumber int `json:"confirm_block_number"` MinerBlockNumber int `json:"miner_block_number"` } `json:"data"` Successful bool `json:"successful"` }
type GetCoinInfoResp ¶
type GetCoinInfoResp struct { Code int `json:"code"` Message string `json:"message"` Data []struct { CactusSymbol string `json:"cactus_symbol"` Symbol string `json:"symbol"` Chain string `json:"chain"` CactusChain string `json:"cactus_chain"` Decimals string `json:"decimals"` ContractAddress string `json:"contract_address"` DepositBlockNumber string `json:"deposit_block_number"` ConfirmBlockNumber string `json:"confirm_block_number"` } `json:"data"` Successful bool `json:"successful"` }
type GetCurrentAssetNotionalValueResp ¶
type GetCurrentAssetNotionalValueResp struct { Code int `json:"code"` Message string `json:"message"` Data struct { ColdMarketValue float64 `json:"cold_market_value"` ColdMarketValueCny float64 `json:"cold_market_value_cny"` HotMarketValue float64 `json:"hot_market_value"` HotMarketValueCny float64 `json:"hot_market_value_cny"` TotalMarketValue float64 `json:"total_market_value"` TotalMarketValueCny float64 `json:"total_market_value_cny"` Coins []struct { CoinName string `json:"coin_name"` Amount int64 `json:"amount"` Value float64 `json:"value"` ValueCny float64 `json:"value_cny"` StoreType string `json:"store_type"` } `json:"coins"` } `json:"data"` Successful interface{} `json:"successful"` }
type GetDefiTransactionDetailsResp ¶
type GetDefiTransactionDetailsResp struct { Code int `json:"code"` Message string `json:"message"` Data struct { TimeStamp int64 `json:"time_stamp"` MinerFee int64 `json:"miner_fee"` OrderNo string `json:"order_no"` ContractAddress string `json:"contract_address"` ContractFunction string `json:"contract_function"` GasPrice int64 `json:"gas_price"` GasLimit int `json:"gas_limit"` ContractData string `json:"contract_data"` Applicant string `json:"applicant"` Status string `json:"status"` Amount int `json:"amount"` TxId string `json:"tx_id"` Description interface{} `json:"description"` DepositTrans []struct { Amount int64 `json:"amount"` CoinName string `json:"coin_name"` } `json:"deposit_trans"` WithdrawTrans []interface{} `json:"withdraw_trans"` } `json:"data"` Successful bool `json:"successful"` }
type GetFilteredOrderResp ¶
type GetFilteredOrderResp struct { Code int `json:"code"` Message string `json:"message"` Data struct { Offset int `json:"offset"` Limit int `json:"limit"` List []struct { DomainId string `json:"domain_id"` ExchangeRate float64 `json:"exchange_rate"` TimeStamp int64 `json:"time_stamp"` OrderNo string `json:"order_no"` Applicant string `json:"applicant"` BusinessName string `json:"business_name"` CoinName string `json:"coin_name"` StorageType string `json:"storage_type"` WalletName string `json:"wallet_name"` WalletCode string `json:"wallet_code"` Amount int `json:"amount"` OriginalAmount int `json:"original_amount"` MinerFeeRate int `json:"miner_fee_rate"` Description string `json:"description"` FromAddress string `json:"from_address"` GasPrice interface{} `json:"gas_price"` GasLimit interface{} `json:"gas_limit"` OrderDestAddressInfoVoList []struct { DestAddress string `json:"dest_address"` MemoType string `json:"memo_type"` Memo string `json:"memo"` OriginBalance int `json:"origin_balance"` Balance int `json:"balance"` Remark string `json:"remark"` } `json:"order_dest_address_info_vo_list"` Status string `json:"status"` InnerStatus string `json:"inner_status"` Bid string `json:"bid"` } `json:"list"` Total int `json:"total"` } `json:"data"` Successful bool `json:"successful"` }
type GetOrderDetailsResp ¶
type GetOrderDetailsResp struct { Code int `json:"code"` Message string `json:"message"` Data struct { OrderWalletInfo struct { BusinessName string `json:"business_name"` CoinName string `json:"coin_name"` WalletType string `json:"wallet_type"` StorageType string `json:"storage_type"` WalletName string `json:"wallet_name"` WalletCode string `json:"wallet_code"` Timestamp int64 `json:"timestamp"` OrderNo string `json:"order_no"` Applicant string `json:"applicant"` Amount int `json:"amount"` ExchangeRate int `json:"exchange_rate"` Value interface{} `json:"value"` MinerFeeRate interface{} `json:"miner_fee_rate"` Description string `json:"description"` Status string `json:"status"` InnerStatus string `json:"inner_status"` MinerFee int64 `json:"miner_fee"` FromAddress string `json:"from_address"` GasPrice int64 `json:"gas_price"` GasLimit int `json:"gas_limit"` OrderDestAddressInfoVoList []struct { DestAddress string `json:"dest_address"` MemoType string `json:"memo_type"` Memo string `json:"memo"` OriginBalance int `json:"origin_balance"` Balance int `json:"balance"` Remark string `json:"remark"` } `json:"order_dest_address_info_vo_list"` Bid string `json:"bid"` } `json:"order_wallet_info"` TxInfoModels []struct { TxType string `json:"tx_type"` BlockHeight int `json:"block_height"` TxSize int `json:"tx_size"` TxHash string `json:"tx_hash"` GasPrice int64 `json:"gas_price"` GasLimit int `json:"gas_limit"` MinerFee string `json:"miner_fee"` } `json:"tx_info_models"` ConsolidationTxInfoModels []struct { TxType string `json:"tx_type"` BlockHeight int `json:"block_height"` TxSize int `json:"tx_size"` TxHash string `json:"tx_hash"` GasPrice int64 `json:"gas_price"` GasLimit int `json:"gas_limit"` MinerFee string `json:"miner_fee"` } `json:"consolidation_tx_info_models"` MinerFeeTxInfoModels []struct { TxType string `json:"tx_type"` BlockHeight int `json:"block_height"` TxSize int `json:"tx_size"` TxHash string `json:"tx_hash"` GasPrice int64 `json:"gas_price"` GasLimit interface{} `json:"gas_limit"` MinerFee string `json:"miner_fee"` } `json:"miner_fee_tx_info_models"` PartialFailed []interface{} `json:"partial_failed"` PartialSuccess []interface{} `json:"partial_success"` } `json:"data"` Successful bool `json:"successful"` }
type GetSingleAddressResp ¶
type GetSingleAddressResp struct { Code int `json:"code"` Message string `json:"message"` Successful bool `json:"successful"` Data struct { Address string `json:"address"` AddressStorage string `json:"address_storage"` AddressType string `json:"address_type"` AvailableAmount interface{} `json:"available_amount"` CoinName string `json:"coin_name"` BchAddressFormat interface{} `json:"bch_address_format"` BId string `json:"b_id"` Description string `json:"description"` DomainId string `json:"domain_id"` FreezeAmount interface{} `json:"freeze_amount"` TotalAmount int `json:"total_amount"` WalletCode string `json:"wallet_code"` WalletType string `json:"wallet_type"` } `json:"data"` }
type GetSingleWalletInfoResp ¶
type GetSingleWalletInfoResp struct { Code int `json:"code"` Message string `json:"message"` Successful bool `json:"successful"` Data struct { DomainId string `json:"domain_id"` BId string `json:"b_id"` WalletCode string `json:"wallet_code"` WalletName string `json:"wallet_name"` CoinName string `json:"coin_name"` WalletType constants.WalletType `json:"wallet_type"` StorageType string `json:"storage_type"` AvailableAmount int `json:"available_amount"` FreezeAmount int `json:"freeze_amount"` TotalAmount int `json:"total_amount"` UsdTotalMarket float64 `json:"usd_total_market"` CnyTotalMarket float64 `json:"cny_total_market"` CoinStatus string `json:"coin_status"` ChineseReasonOfStatus string `json:"chinese_reason_of_status"` EnglishReasonOfStatus string `json:"english_reason_of_status"` NormalAddressLimit int `json:"normal_address_limit"` NormalAddressNum int `json:"normal_address_num"` CreateTime int64 `json:"create_time"` } `json:"data"` }
type GetTotalAssetNotionalValueResp ¶
type GetTotalAssetNotionalValueResp struct { Code int `json:"code"` Message string `json:"message"` Successful interface{} `json:"successful"` Data struct { HistoryAssetResult []struct { CreateTime string `json:"create_time"` MarketValue string `json:"market_value"` MarketValueCny string `json:"market_value_cny"` } `json:"history_asset_result"` } `json:"data"` }
type GetTransactionDetailsResp ¶
type GetTransactionDetailsResp struct { Code int `json:"code"` Message string `json:"message"` Data struct { Offset int `json:"offset"` Limit int `json:"limit"` List []struct { Id int `json:"id"` DomainId string `json:"domain_id"` DomainName interface{} `json:"domain_name"` DomainCode interface{} `json:"domain_code"` KycNumber interface{} `json:"kyc_number"` ServiceType interface{} `json:"service_type"` WalletCode string `json:"wallet_code"` WalletType constants.WalletType `json:"wallet_type"` CoinName string `json:"coin_name"` OrderNo interface{} `json:"order_no"` BlockHeight int `json:"block_height"` ConfirmRatio interface{} `json:"confirm_ratio"` TxId string `json:"tx_id"` TxSize int `json:"tx_size"` TxType constants.TxType `json:"tx_type"` WithdrawAmount interface{} `json:"withdraw_amount"` GasPrice interface{} `json:"gas_price"` GasLimit interface{} `json:"gas_limit"` TxFee int `json:"tx_fee"` TxFeeRate interface{} `json:"tx_fee_rate"` TxFeeType interface{} `json:"tx_fee_type"` MinerReward interface{} `json:"miner_reward"` MinerFee interface{} `json:"miner_fee"` DepositAmount int `json:"deposit_amount"` WalletBalance int `json:"wallet_balance"` ExtendedInfo struct { DomainCoinBalance int64 `json:"domain_coin_balance"` Attachments interface{} `json:"attachments"` } `json:"extended_info"` TxStatus string `json:"tx_status"` RemarkDetail interface{} `json:"remark_detail"` Vins []struct { Address string `json:"address"` Idx int `json:"idx"` Tag interface{} `json:"tag"` Amount interface{} `json:"amount"` Balance interface{} `json:"balance"` IsChange int `json:"is_change"` Desc interface{} `json:"desc"` } `json:"vins"` Vouts []struct { Address string `json:"address"` Idx int `json:"idx"` Tag interface{} `json:"tag"` Amount int `json:"amount"` Balance int `json:"balance"` IsChange int `json:"is_change"` Desc string `json:"desc"` } `json:"vouts"` TxTimeStamp int64 `json:"tx_time_stamp"` CreateTimeStamp int64 `json:"create_time_stamp"` Bid string `json:"bid"` } `json:"list"` Total int `json:"total"` } `json:"data"` Successful bool `json:"successful"` }
type GetTransactionHistoryResp ¶
type GetTransactionHistoryResp struct { Code int `json:"code"` Message string `json:"message"` Data struct { Offset int `json:"offset"` Limit int `json:"limit"` List []struct { TimeStamp int64 `json:"time_stamp"` MinerFee int64 `json:"miner_fee"` OrderNo string `json:"order_no"` ContractAddress string `json:"contract_address"` GasPrice int64 `json:"gas_price"` GasLimit int `json:"gas_limit"` ContractData string `json:"contract_data"` Applicant string `json:"applicant"` Status string `json:"status"` Amount int64 `json:"amount"` Description interface{} `json:"description"` TxId string `json:"tx_id"` DepositTrans []struct { Amount int64 `json:"amount"` CoinName string `json:"coin_name"` } `json:"deposit_trans"` WithdrawTrans []struct { Amount int64 `json:"amount"` CoinName string `json:"coin_name"` } `json:"withdraw_trans"` } `json:"list"` Total int `json:"total"` } `json:"data"` Successful bool `json:"successful"` }
type GetWalletListResp ¶
type GetWalletListResp struct { Code int `json:"code"` Message string `json:"message"` Successful bool `json:"successful"` Data struct { Offset int `json:"offset"` Limit int `json:"limit"` List []struct { DomainId string `json:"domain_id"` BId string `json:"b_id"` WalletCode string `json:"wallet_code"` WalletName string `json:"wallet_name"` CoinName string `json:"coin_name"` ContractAddress interface{} `json:"contract_address"` WalletType constants.WalletType `json:"wallet_type"` StorageType constants.StorageType `json:"storage_type"` AvailableAmount int `json:"available_amount"` FreezeAmount int `json:"freeze_amount"` TotalAmount int `json:"total_amount"` UsdTotalMarket float64 `json:"usd_total_market"` CnyTotalMarket float64 `json:"cny_total_market"` CoinStatus string `json:"coin_status"` ChineseReasonOfStatus string `json:"chinese_reason_of_status"` EnglishReasonOfStatus string `json:"english_reason_of_status"` NormalAddressLimit int `json:"normal_address_limit"` NormalAddressNum int `json:"normal_address_num"` CreateTime int64 `json:"create_time"` } `json:"list"` Total int `json:"total"` } `json:"data"` }
type GetWalletTransactionSummaryResp ¶
type GetWalletTransactionSummaryResp struct { Code int `json:"code"` Message string `json:"message"` Successful interface{} `json:"successful"` Data struct { Offset int `json:"offset"` Limit int `json:"limit"` List []struct { WalletCode string `json:"wallet_code"` WalletType string `json:"wallet_type"` CoinName string `json:"coin_name"` OrderNo string `json:"order_no"` BlockHeight int `json:"block_height"` TxId string `json:"tx_id"` TxType string `json:"tx_type"` Amount int `json:"amount"` WalletBalance int `json:"wallet_balance"` RemarkDetail string `json:"remark_detail"` TxTimeStamp int64 `json:"tx_time_stamp"` CreateTimeStamp int64 `json:"create_time_stamp"` } `json:"list"` Total int `json:"total"` } `json:"data"` }
type GetWithdrawalRateResp ¶
type ReplaceByFeeResp ¶
type VerifyAddressResp ¶
type VerifyAddressResp struct { Code int `json:"code"` Message string `json:"message"` Successful bool `json:"successful"` Data []string `json:"data"` }
VerifyAddressResp verifies the address format data: bad address list
type WithdrawalArgsFeeReq ¶
type WithdrawalArgsFeeReq struct { FromAddress string `json:"from_address,omitempty"` FromWalletCode string `json:"from_wallet_code"` CoinName constants.CactusToken `json:"coin_name,omitempty"` OrderNo string `json:"order_no,omitempty"` Description string `json:"description,omitempty"` FeeRateLevel constants.FeeLevelType `json:"fee_rate_level,omitempty"` FeeRate float64 `json:"fee_rate,omitempty"` DestAddressItemList DestAddressItem `json:"dest_address_item_list"` }