APIs

This page shows the APIs supported by Phalcon Explorer

Phalcon Explorer supports APIs that can be integrated into the user's internal system to understand a transaction better.

Authentication

The Access Key is needed to access the API. Please contact us (contact@blocksec.com) for the Access Key.

Get Transaction Balance Change

Request

Request Sample
curl --location 'https://api.phalcon.blocksec.com/v1/explorer/{chian}/transaction/{transaction}/balance-change' \
--header 'Access-Key: YOUR_API_KEY'
Request Parameters

chain: chain name.

transaction: transaction hash.

'eth' is the only currently supported chain name parameter.

Response

Response Sample
{
    "code": 0,
    "message": "ok",
    "data": {
        "status": true,
        "balanceChange": [
            {
                "account": "0x8ed4c607f2e2795f86a9e24180421f4a9eb1d4b1",
                "assets": [
                    {
                        "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                        "amount": "0.828480947756106932",
                        "isERC1155": false,
                        "isERC721": false,
                        "rawAmount": "828480947756106932",
                        "sign": false,
                        "value": "2419.7691586678940152"
                    },
                    {
                        "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
                        "amount": "0.828480947756106932",
                        "isERC1155": false,
                        "isERC721": false,
                        "rawAmount": "828480947756106932",
                        "sign": true,
                        "value": "2420.2828168555299246"
                    }
                ]
            },
            {
                "account": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                "assets": [
                    {
                        "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
                        "amount": "0.828480947756106932",
                        "isERC1155": false,
                        "isERC721": false,
                        "rawAmount": "828480947756106932",
                        "sign": false,
                        "value": "2420.2828168555299246"
                    },
                    {
                        "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                        "amount": "0.828480947756106932",
                        "isERC1155": false,
                        "isERC721": false,
                        "rawAmount": "828480947756106932",
                        "sign": true,
                        "value": "2419.7691586678940152"
                    }
                ]
            }
        ]
    }
}
Response Data Fields Description

status: Transaction status. (bool)

address: token address. (string)

rawAmount: The raw amount of tokens transferred. (string)

amount: The actual token transfer amount processed by token decimals. This value is an empty string when the token decimals can not be obtained. (string)

sign: Denote the net inflow or outflow of tokens from an account. (bool)

value: The value in USD. (string)

Get Transaction Invocation Flow

Request

Request Sample
curl --location 'https://api.phalcon.blocksec.com/v1/explorer/{chian}/transaction/{transaction}/invocation-flow' \
--header 'Access-Key: YOUR_API_KEY'
Request Parameters

chain: Chain name.

transaction: Transaction hash.

'eth' is the only currently supported chain name parameter.

Response

Response Sample
{
    "code": 0,
    "message": "ok",
    "data": {
        "status": true,
        "dataMap": {
            "-1": {
                "invocation": {
                    "address": "0x8ed4c607f2e2795f86a9e24180421f4a9eb1d4b1",
                    "callData": "",
                    "decodedMethod": null,
                    "errorInfo": "",
                    "fromAddress": "",
                    "gasUsed": 0,
                    "id": -1,
                    "methodDecoded": false,
                    "operation": "",
                    "output": "",
                    "revert": false,
                    "revertMessage": "",
                    "selector": "",
                    "status": false,
                    "value": ""
                },
                "nodeType": 0
            },
            "0": {
                "invocation": {
                    "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "callData": "0x0000000000000000000000000000000000000000000000000b7f5b08522e84b4",
                    "decodedMethod": {
                        "callParams": [
                            {
                                "name": "wad",
                                "type": "uint256",
                                "value": "828,480,947,756,106,932"
                            }
                        ],
                        "constructorArguments": "",
                        "name": "withdraw",
                        "returnParams": [],
                        "signature": "withdraw(uint256)"
                    },
                    "errorInfo": "",
                    "fromAddress": "0x8ed4c607f2e2795f86a9e24180421f4a9eb1d4b1",
                    "gasUsed": 30428,
                    "id": 0,
                    "methodDecoded": true,
                    "operation": "CALL",
                    "output": "",
                    "revert": false,
                    "revertMessage": "",
                    "selector": "0x2e1a7d4d",
                    "status": true,
                    "value": "0"
                },
                "nodeType": 0
            },
            "1": {
                "invocation": {
                    "address": "0x8ed4c607f2e2795f86a9e24180421f4a9eb1d4b1",
                    "callData": "0x",
                    "decodedMethod": null,
                    "errorInfo": "",
                    "fromAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "gasUsed": 0,
                    "id": 1,
                    "methodDecoded": false,
                    "operation": "CALL",
                    "output": "",
                    "revert": false,
                    "revertMessage": "",
                    "selector": "fallback",
                    "status": true,
                    "value": "0.828480947756106932"
                },
                "nodeType": 0
            },
            "2": {
                "event": {
                    "contract": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "decodedLog": {
                        "name": "Withdrawal",
                        "params": [
                            {
                                "name": "src",
                                "type": "address",
                                "value": "0x8ed4c607f2e2795f86a9e24180421f4a9eb1d4b1"
                            },
                            {
                                "name": "wad",
                                "type": "uint256",
                                "value": "828,480,947,756,106,932"
                            }
                        ],
                        "signature": "Withdrawal(address,uint256)"
                    },
                    "id": 2,
                    "logData": "0x0000000000000000000000000000000000000000000000000b7f5b08522e84b4",
                    "logDecoded": true,
                    "operation": "EVENT",
                    "revert": false,
                    "status": true,
                    "topics": [
                        "0x7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65",
                        "0x0000000000000000000000008ed4c607f2e2795f86a9e24180421f4a9eb1d4b1"
                    ]
                },
                "nodeType": 1
            }
        },
        "trace": [
            {
                "children": [
                    {
                        "children": [
                            {
                                "children": [],
                                "depth": 1,
                                "id": 1
                            },
                            {
                                "children": [],
                                "depth": 1,
                                "id": 2
                            }
                        ],
                        "depth": 0,
                        "id": 0
                    }
                ],
                "depth": -1,
                "id": -1
            }
        ]
    }
}
Response Data Fields Description

status: Transaction status. (bool)

trace: The invocation flow tree structure.

  • id: Trace node id. (int)

  • depth: Call depth. (int)

  • children: Nested invocation flow tree structure.

dataMap: Data details of the invocation or event. [key] - trace node id. [value] - invocation data or event data.

  • invocation: Decoded call data.

    • fromAddress: The address of the caller. (string)

    • address: The address of the callee. (string)

    • operation: Call type, such as CALL, DELEGATECALL, and so on. (string)

    • value: The amount of native token transferred. (string)

    • decodedMethod: Decoded call data.

  • event: Decoded log data.

    • contract: The contract address that triggered this event. (string)

    • operation: EVENT. (string)

    • decodedLog: Decoded log data.

Last updated