Transaction and Pool Analysis

/gethistoricaltimeseries

Retrieves the transactionHash, timestamp and the price of the token pair with regard to the first token.User can provide the startBlock and endBlock and fetch the data according to the same.

GET https://historicaltrade.api.expand.network/dex/gethistoricaltimeseries

Query Parameters

NameTypeDescription

dexId*

String

Refer to DEX ID page for details. Supported Dexs: Uniswap v2, Sushiswap, Pancakeswap, Uniswap v3.

endBlock

String

Last block of the range.

startBlock

String

Starting block of the range.

poolAddress*

String

Pool address whose time series is to be fetched.

{
    "status": 200,
    "msg": "success",
    "data": {
        "pair": "string",
        "priceData": [
            {
                "hash": "string",
                "timestamp": "integer",
                "price": "number"
            }
        ]
    }
}
https://historicaltrade.api.expand.network/dex/gethistoricaltimeseries?poolAddress=0x517f9dd285e75b599234f7221227339478d0fcc8&dexId=1000

/gethistoricaltransactions

Retrieves the transaction details of the Add Liquidity Events that have happened for the poolAddress.User can provide the startBlock and endBlock and fetch the data according to the same.

GET https://historicaltrade.api.expand.network/dex/gethistoricaltransactions

Query Parameters

NameTypeDescription

dexId*

String

Refer to DEX ID page for details. Supported Dexs: Uniswap v2, Sushiswap, Pancakeswap, Uniswap v3.

endBlock

String

Last block of the range.

startBlock

String

Starting block of the range.

poolAddress*

String

Pool address whose transactions is to be fetched.

{
    "status": 200,
    "msg": "success",
    "data": {
        "pair": "string",
        "transactions": [
            {
                "transactionHash": "string",
                "transactionDetails": {
                    "blockHash": "string",
                    "blockNumber": "string",
                    "from": "string",
                    "gas": "string",
                    "gasPrice": "string",
                    "maxFeePerGas": "string",
                    "maxPriorityFeePerGas": "string",
                    "hash":"string",
                    "input": "string",
                    "nonce": "string",
                    "to": "string",
                    "transactionIndex": "string",
                    "value": "string",
                    "type": "string",
                    "accessList": [],
                    "chainId": "string",
                    "v": "string",
                    "r": "string",
                    "s": "string",
                    "yParity": "string"
                }
            }
        ]
    }
}
https://historicaltrade.api.expand.network/dex/gethistoricaltransactions?poolAddress=0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc&dexId=1000

/getpoolchartdata

Retrieves the open, close, high and low price for the range of the blockNumbers along with the transaction details if any happened within the specified blockRange which includes blockNumber ,price and the amount of the first and second token for the 30 interval range for the given interval.

GET https://historicaltrade.api.expand.network/dex/getpoolchartdata

Query Parameters

NameTypeDescription

dexId*

String

Refer to DEX ID page for details. Supported Dexs: Uniswap v2, Sushiswap, Uniswap v3.

interval

String

15 mins(by default), 30 mins, 60 mins, and 90 mins.

poolAddress*

String

Pool address whose transactions is to be fetched.

{
    "status": 200,
    "msg": "success",
    "data": {
        "pair": "string",
        "chartData": {
            "blockRange": [
                {
                    "open_price": "string",
                    "close_price": "string",
                    "low_price": "string",
                    "high_price": "string",
                    "transactions": []
                }
            ]
        }
    }
}
https://historicaltrade.api.expand.network/dex/getpoolchartdata?dexId=1000&poolAddress=0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc&interval=60

/getpooltradedata

Retrieves the blockNumber,transactionHash, the values and the data for the given poolAddress and an event Type.User can provide the startBlock and endBlock along with the eventType and fetch the data according to the same.

GET https://historicaltrade.api.expand.network/dex/getpooltradedata

Query Parameters

NameTypeDescription

dexId*

String

Refer to DEX ID page for details. Supported Dexs: Uniswap v2, Sushiswap, Uniswap v3.

endBlock

String

Last block of the range.

startBlock

String

Starting block of the range.

poolAddress*

String

Pool address whose data is to be fetched.

eventType

String

Transfer, Swap, Burn or Mint(by default).

{
    "status": 200,
    "msg": "success",
    "data": {
        "pair": "string",
        "transactions": [
            {
                "blockNumber": "string",
                "transactionHash": "string",
                "values": {
                    "0": "string",
                    "1": "string",
                    "2": "string",
                    "3": "string",
                    "sender": "string",
                    "amount0": "string",
                    "amount1": "string",
                    "to": "string"
                },
                "eventType": "string",
                "data": {
                    "data": "string",
                    "topics": "array"
                }
            }
        ]
    }
}
https://historicaltrade.api.expand.network/dex/getpooltradedata?poolAddress=0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc&dexId=1000&eventType=Burn

Last updated