API文档
1.获取通证余额接口 描述:获取通证余额接口 方式: GET 示例URL: http://qkiscan.cn/api/get-token-balance?address=0x16543062385673b637d7ce16efb0dd56a1a832bc&contract_address=0xf20a1b8f61a186f8485a037549149079c0f3b493
传参说明:1.address(钱包地址,必选),2.contract_address(合约地址,必选
返回结构示例:
{
    code: 0,
    message: "OK",
    data: "499.000000000000000000"
}
            
2.qki余额接口 描述:qki余额接口 方式: GET 示例URL: http://qkiscan.cn/api/get-qki-balance?address=0x16543062385673b637d7ce16efb0dd56a1a832bc
传参说明:1.address(钱包地址,必选
返回结构示例:
{
    code: 0,
    message: "OK",
    data: 815.9659506824692
}
3.获取通证转账记录接口 描述:获取通证转账记录接口 方式: GET 示例URL: http://qkiscan.cn/api/get-token-tx?address=0x16543062385673b637d7ce16efb0dd56a1a832bc&contract_address=0xf20a1b8f61a186f8485a037549149079c0f3b493&page=1&pageSize=20
传参说明:1.address(钱包地址,必选),2.contract_address(合约地址,必选),3.page(分页,可选,默认1),4.pageSize(每页数量,可选,默认20
返回结构示例:
{
    code: 0,
    message: "OK",
    data: [
        {
            amount: "-500.00000000",//数量,正为转入,负为转出
            created_at: "2018-11-02 06:07:37",//转账时间
            hash: "0x1e85805466fbdaa001caffa0a0e3c0e806db7264f01d16cff650a55cab4700c2"//hash
            tx_status:"1"交易状态,1成功,0失败
        },
        {
            amount: "1000.00000000",
            created_at: "2018-10-24 02:57:57",
            hash: "0x77d939383c2fcd180488ed16465e806626d03ad1d4d7ec25ea61584c94edaaae",
            tx_status:"1"
        }
    ]
}
4.获取QKI转账记录接口 描述:获取QKI转账记录接口 方式: GET 示例URL: http://qkiscan.cn/api/get-qki-tx?address=0x16543062385673b637d7ce16efb0dd56a1a832bc&page=1&pageSize=20
传参说明:1.address(钱包地址,必选),2.page(分页,可选,默认1),3.pageSize(每页数量,可选,默认20
返回结构示例:
{
code: 0,
message: "OK",
data: [
        {
            amount: "0.000000000000000000", //数量,正为转入,负为转出
            created_at: "2018-11-02 06:07:37", //转账时间
            hash: "0x1e85805466fbdaa001caffa0a0e3c0e806db7264f01d16cff650a55cab4700c2" //hash
            tx_status: "1" 交易状态,1成功,0失败
            from: "0xf82a68006dff2e326f5815fb0d020215283e4144dcdfeac659b2e9e73e0bb11f" 转出地址
            to: "0xf82a68006dff2e326f5815fb0d020215283e4144dcdfeac659b2e9e73e0bb11f" 转入地址
        },
        {
            amount: "1.123456780000000000",
            created_at: "2018-10-26 08:05:23",
            hash: "0x708101347d561bd16213d4d66f03e3ea4207abbe250147ba237af8e4b8149ac1",
            tx_status: "1",
            from: "0xf82a68006dff2e326f5815fb0d020215283e4144dcdfeac659b2e9e73e0bb11f",
            to: "0xf82a68006dff2e326f5815fb0d020215283e4144dcdfeac659b2e9e73e0bb11f"
        },
        {
            amount: "1.000000000000000000",
            created_at: "2018-10-26 08:02:38",
            hash: "0x2de69364e23689edb610303ab4731d10b842d42c8da3523e7f9c78bda69f0837",
            tx_status: "1",
            from: "0xf82a68006dff2e326f5815fb0d020215283e4144dcdfeac659b2e9e73e0bb11f",
            to: "0xf82a68006dff2e326f5815fb0d020215283e4144dcdfeac659b2e9e73e0bb11f"
        },
        {
            amount: "0.000000000000001018",
            created_at: "2018-10-26 08:02:12",
            hash: "0xbcb991fc5ea7657dd8fb3f1ed3a36185931ee9ab53b5e2cba666e2d526cd0a0b",
            tx_status: "1",
            from: "0xf82a68006dff2e326f5815fb0d020215283e4144dcdfeac659b2e9e73e0bb11f",
            to: "0xf82a68006dff2e326f5815fb0d020215283e4144dcdfeac659b2e9e73e0bb11f"
        },
        ......
    ]
}
4.获取区块列表接口 描述:获取区块列表接口 方式: GET 示例URL: http://qkiscan.cn/api/get-block?page=1
传参说明:1.page(分页,可选,默认1
返回结构示例:
{
code: 0,
message: "OK",
data: [
        {
            height: "291527",//区块高度
            created_at: "2018-11-06 10:48:47",//出块时间
            tx_count: 0,//交易笔数
            hash : "0xf5afec27a7876c5226a81c1822abc8f67e6e2c4149e11067caaea38fdfd1e87a"//区块hash
        },
        {
            height: "291526",
            created_at: "2018-11-06 10:48:27",
            tx_count: 0,
            hash : "0x3f075b23442165a80bb0b896c5bfb37d5d85bbe8a7f74da0d4b41a633d6e91ac"
        },
        {
            height: "291525",
            created_at: "2018-11-06 10:47:46",
            tx_count: 0,
            hash : "0xdd3549eac6b08d0b18e08b62fb6389b6a0ac9df6532c7d4f9d9fdc90d39d5b61"
        },
        ......
    ]
}
5.获取区块详情接口 描述:获取区块详情接口 方式: GET 示例URL: http://qkiscan.cn/api/block?hash=0xc45a12819557c954e3edd0c8b72a387097c7b164fca2fe5a95a949367e862fad
传参说明:1.hash(区块hash,必选
返回结构示例:
{
code: 0,
message: "OK",
data: [
        hash: "0xc45a12819557c954e3edd0c8b72a387097c7b164fca2fe5a95a949367e862fad",//区块hash
        height: "261632",//区块高度
        created_at: "2018-11-02 14:13:01",//出块时间
        tx_count: 1,//交易笔数
        size: "0.720",//区块大小,单位kb
        miner: "0xb4f506094d257e0855cacb6f96a74d96a0c6e8a7",//出块方
        difficulty: "15254173",//难度
        transactions: [//交易
            {
                hash: "0x092c690c60ca346206fe97786e02c740a655b24a2dcb25686ccc7cc8a7f5e77a",//交易hash
                created_at: "2018-11-02 14:13:01",//时间
                amount: "0.000000000000000000"//交易数量
            },
            ......
        ]
    ]
}
6.获取通证交易详情接口 描述:获取通证交易详情接口 方式: GET 示例URL: http://qkiscan.cn/api/token-tx-info?hash=0x77d939383c2fcd180488ed16465e806626d03ad1d4d7ec25ea61584c94edaaae
传参说明:1.hash(交易hash,必选
返回结构示例:
{
code: 0,
message: "OK",
data: {
        from: "0x52f2b729fceb39a9d3411107c394658a455c45c5",//来源
        to: "0x16543062385673b637d7ce16efb0dd56a1a832bc",//接收
        gas_price: "0.000053388",//矿工费,单位QKI
        token_name: "erc_mm",//通证名称
        token_symbol: "erc_mm",//通证符号
        contract_address: "0xf20a1b8f61a186f8485a037549149079c0f3b493",//合约地址
        amount: "1000.00000000",//交易数量
        height: 207103,//区块高度
        created_at: "2018-10-24 02:57:57"//交易时间
    }
}
7.获取交易详情接口 描述:获取交易详情接口 方式: GET 示例URL: https://qkiscan.cn/api/get-tx?hash=0x3d3cb7333f5e39e0707dc0489fe6a629dd18b04f8c3ade15e7bcfda2628386f9
传参说明:1.hash(交易hash,必选
返回结构示例:
{
code: 0,
message: "OK",
data: {
        blockHash: "0x56b6c865ecf81d59da70a678f057341e6195aa7fd493a4e9d60e2ed0675e49ec",//区块Hash
        blockNumber: "652477",//高度
        from: "0xbe15892b305d1a21ce018073eee95205c5a58441",//来源
        gas: "52417",//使用gas
        gasPrice: "0.000000001",//gas价格
        hash: "0x3d3cb7333f5e39e0707dc0489fe6a629dd18b04f8c3ade15e7bcfda2628386f9",//交易Hash
        input: "0xa9059cbb000000000000000000000000a25911fdcd939d2d7c8456dd3d5886808afbd3e40000000000000000000000000000000000000000000000000000000022de6433",//input
        nonce: 16,//nonce
        to: "0x4175aa5d372015b67ef58514414086f0f36caa7a",//接收
        transactionIndex: "0x0",
        value: "0",//金额
        v: "0x267e1ce",
        r: "0xfdaca1fda979e8d78040f5f257480055bfccc9c942420ff5b91eb1e289b2c2eb",
        s: "0x41806f0008a33cb7143b52fb7a76dab4051f75c09f87015db641f3003c75e666",
        created_at: "2019-03-28 15:58:06",//交易时间
        tx_status: "交易成功",//状态
        contract_address: "",//合约地址
        is_token_tx: true//是否为合约交易
    }
}
8.获取地址详情 描述:获取地址详情接口 方式: GET 示例URL: https://qkiscan.cn/api/get-address-info?address=0xbe15892b305d1a21ce018073eee95205c5a58441
传参说明:1.address(地址,必选
返回结构示例:
{
code: 0,
message: "OK",
data: {
    jsonrpc: "2.0",
    id: 76,
    result: "9.999130721",//QKI余额
    address: "0xbe15892b305d1a21ce018073eee95205c5a58441",//地址
    //显示资产余额
    "balances": [
        {
            "name": "cct",
            "amount": "39.70000000"
        },
        {
            "name": "qki",
            "amount": "1.00013305"
        },
        {
            "name": "usdt",
            "amount": "0.00000000"
        }
    ],
    transactions: {
        current_page: 1,
        data: [
            {
                id: 16696,
                from: "0xbe15892b305d1a21ce018073eee95205c5a58441",//来源
                to: "0x4175aa5d372015b67ef58514414086f0f36caa7a",//接收
                hash: "0xd29d85d0a4d4c4acb93cab01a231774021ee118252be74248b15bbc866b1b11e",//交易hash
                block_hash: "0xc5e586c8c6205c519e55dfa704a9c990d8eaf2fe144963dbac11631c0418ce4c",//区块hash
                block_number: 656439,//高度
                gas_price: "0.000000001",//矿工费
                amount: "0.000000000000000000",//交易数量
                created_at: "2019-03-29 08:28:36",
                updated_at: "2019-03-29 08:30:05",
                tx_status: 1
            },
            ],
            first_page_url: "https://qkiscan.cn/api/get-address-info?page=1",
            from: 1,
            last_page: 1,
            last_page_url: "https://qkiscan.cn/api/get-address-info?page=1",
            next_page_url: null,
            path: "https://qkiscan.cn/api/get-address-info",
            per_page: 20,
            prev_page_url: null,
            to: 19,
            total: 19
            }
        }
    }
}
9.获取合约地址详情 描述:获取合约地址详情接口 方式: GET 示例URL: https://qkiscan.cn/api/get-contract-address-info?address=0x4175aa5d372015b67ef58514414086f0f36caa7a
传参说明:1.address(地址,必选
返回结构示例:
{
    code: 0,
    message: "OK",
    data: {
        token: {
                id: 3,
                token_name: "cct",//通证名称
                token_symbol: "cct",//通证符号
                contract_address: "0x4175aa5d372015b67ef58514414086f0f36caa7a",//合约地址
                created_at: "2019-03-27 10:10:35",
                updated_at: "2019-03-27 10:10:35"
            },
        decimals: 8,//小数位数
        result: "1000000000",//通证总量
        address: "0x4175aa5d372015b67ef58514414086f0f36caa7a",
        tx: {
            current_page: 1,
            data: [
            {
                id: 77,
                token_id: 3,
                to_address_id: 768,
                amount: "5.84999987",//交易数量
                tx_id: 16696,
                created_at: "2019-03-29 08:28:36",
                updated_at: "2019-03-29 08:30:05",
                from_address_id: 755,
                tx_status: 1,
                contract_address: "0x4175aa5d372015b67ef58514414086f0f36caa7a",
                token_symbol: "cct",
                from_address: "0xbe15892b305d1a21ce018073eee95205c5a58441",//来源
                to_address: "0x062be095a45acc1f7ec8ba9b7156a98b66ad3ea2",//接收
                hash: "0xd29d85d0a4d4c4acb93cab01a231774021ee118252be74248b15bbc866b1b11e"//交易Hash
            },
            ],
            first_page_url: "https://qkiscan.cn/api/get-address-info?page=1",
            from: 1,
            last_page: 1,
            last_page_url: "https://qkiscan.cn/api/get-address-info?page=1",
            next_page_url: null,
            path: "https://qkiscan.cn/api/get-address-info",
            per_page: 20,
            prev_page_url: null,
            to: 19,
            total: 19
        }
    }
}
10.搜索接口 描述:搜索接口 方式: GET 示例URL: https://qkiscan.cn/api/search?keyword=0x4175aa5d372015b67ef58514414086f0f36caa7a
传参说明:1.keyword(关键词,必选
返回结构示例:
{
    code: 0,
    msg: "OK",
    data: {
            type: address,//类型
            hash: "0x4175aa5d372015b67ef58514414086f0f36caa7a",//hash
        }
    }
}
11.合约资产Top100 描述:合约资产Top100 方式: GET 示例URL: https://qkiscan.cn/api/get-contract-address-top?address=0x4175aa5d372015b67ef58514414086f0f36caa7a
传参说明:1.address(合约地址,必选
返回结构示例:
{
    "code": 0,
    "message": "OK",
    "data": {
        "top": [
            {
                "name": "cct",
                "amount": "999938770.00000000",
                "address": {
                    "address": "0xdb53f8004ab20e70fccc885bff685dc353accfb3",
                    "amount": "0.00000000"
                }
            },
            {
                "name": "cct",
                "amount": "8819.38914550",
                "address": {
                    "address": "0x7a265cbf4e38a8c6a7380b6033bd075f460ea213",
                    "amount": "0.00000000"
                }
            },
            {
                "name": "cct",
                "amount": "2308.34574948",
                "address": {
                    "address": "0x1abf176877f86f0c3aaada1502ab604fbe0becd1",
                    "amount": "0.00000000"
                }
            }
        ]
    }
}