主链信息接口
-
主链信息接口
1 余额类
1. 主链余额接口
- 名称:balance
- 说明:获取FCH地址的FCH余额(单位为satoshi)和币天余额(单位为cd)。
- 请求参数
name type length description value range address string 34 FCH address - 返回参数
name type length description value range fchBalance int64 8 Fch balance in satoshi of the address. 0 ~ cdBalance int64 8 Coindays balance of the address. 0 ~ height int 4 The latest block height when getting the balance statusCode int 4 The state code returned to requester. See below statusMessage string 128 The description of the statusCode. 0 Success.<br>100 The address has not been used. 2. 含未确认交易余额接口
- 名称:balanceUnconfirmed
- 说明:获取某个地址的未确认交易信息。
- 请求参数
name type length description value range address string 34 FCH address - 返回参数
name type length description value range fchBalanceUnconfirmed int64 8 Fch balance including unconfirmed changes in satoshi. 0 ~ cdBalance int64 8 Coindays balance of the address. 0 ~ height int 4 The latest block height when getting the balance statusCode int 4 The state code returned to requester. See below statusMessage string 128 The description of the statusCode. 0 Success.<br>100 The address has not been used.
2 utxo类
3. 最小币天utxo接口
- 名称:utxoWithminCd
- 说明:获取满足支付金额,且销毁最小币天所需的utxo。
- 请求参数
name type length description value range address string 34 FCH address amount int64 8 The amount of fch to be paid in satoshi. - 返回参数
name type length description value range utxoCount int 4 The number of the UTXOs returned. The developer defines the maximum value. utxoList structure array The list of UTXOs returned in Compressed json format height int 4 The latest block height when getting the balance statusCode int 4 The state code returned to requester. See below statusMessage string 128 The description of the statusCode. 0 Success.<br>100 The address has not been used.<br>101 There is no UTXO at this address.<br>102 There is not enough balance.<br> 103 There are too many UTXOs required to pay this amount. Please merge UTXOs first. 4. 币天筛选utxo接口
- 名称:utxoFilteredByCd
- 说明:按照币天进行排序和筛选所需要的特定数量utxo。
- 请求参数
name type length description value range address string 34 FCH address cdAmount int64 8 The number of coindays as a filter condition filterMode int 4 The mode to choose UTXOs through coindays 1 < <br> 2 <= <br> 3 > <br> 4 >= - 返回参数
name type length description value range utxoCount int 4 The number of the UTXOs returned. The developer defines the maximum value. utxoList structure array The list of UTXOs returned in Compressed json format height int 4 The latest block height when getting the balance statusCode int 4 The state code returned to requester. See below statusMessage string 128 The description of the statusCode. 0 Success.<br>100 The address has not been used.<br>101 There is no UTXO at this address.<br>104 There is no UTXO that meets the conditions.
3 币天销毁类
5. 交易币天销毁接口
- 名称:cdDestroyedOfTx
- 说明:获得某笔交易的所有输入缩小会的币天之和。
- 请求参数
name type length description value range txid string 64 The ID of the transaction - 返回参数
name type length description value range cdDestroyed int64 8 The coindays destroyed in the transaction height int 4 The latest block height when getting the balance statusCode int 4 The state code returned to requester. See below statusMessage string 128 The description of the statusCode. 0 Success.<br>105 No such TXID. 6. 累计币天销毁接口
- 名称:cdDestroyedOfAddr
- 说明:获取某个地址累计销毁的所有币天的总和。
- 请求参数
name type length description value range address string 34 FCH address - 返回参数
name type length description value range cdDestroyed int64 8 The Cumulative destroyed coindays of the address height int 4 The latest block height when getting the balance statusCode int 4 The state code returned to requester. See below statusMessage string 128 The description of the statusCode. 0 Success.<br>100 The address has not been used.
4 交易记录类
7. 交易列表接口
- 名称:txList
- 说明:获取某个地址的未确认交易信息。
- 请求参数
name type length description value range address string 34 FCH address - 返回参数
name type length description value range txList stracture array The list of the confirmed transactions height int 4 The latest block height when getting the balance statusCode int 4 The state code returned to requester. See below statusMessage string 128 The description of the statusCode. 0 Success.<br>107 The address has not confirmed transaction. 8. 未确认交易列表接口
- 名称:UnconfermedTxList
- 说明:获取某个地址的未确认交易信息。
- 请求参数
name type length description value range address string 34 FCH address - 返回参数
name type length description value range unconfermedTxList stracture array The list of the unconfirmed transactions height int 4 The latest block height when getting the balance statusCode int 4 The state code returned to requester. See below statusMessage string 128 The description of the statusCode. 0 Success.<br>106 The address has not unconfirmed transaction. 5 关系类
9. 向导接口
- 名称:guide
- 说明:获取某个地址第一笔fch来源交易的第一个输入地址,作为将该地址引入应用的向导。
- 请求参数
name type length description value range address string 34 FCH address - 返回参数
name type length description value range guide string 34 The first input address of the first transaction in which requesting address get fch for the first time. height int 4 The latest block height when getting the balance statusCode int 4 The state code returned to requester. See below statusMessage string 128 The description of the statusCode. 0 Success.<br>100 The address has not been used.