Inspection API
This page discuss the integration APIs
User Transaction and Token Price History Endpoints
Overview
These endpoints are designed to retrieve detailed transaction information for a specific user on a given blockchain network and to provide historical price data for a specific token. Both endpoints offer extensive filtering options, allowing users to customize the results based on date ranges, sort orders, and more.
Endpoints
1. Get User Transaction Stats by Address
Endpoint: GET /inspection/wallet/:chain/:address/tx
Description: Retrieves transaction statistics for a specified user address on a given blockchain network. The data can be filtered and sorted by various parameters such as transaction type, date range, and more.
2. Get Token Price History
Endpoint: GET /inspection/token/:chain/:address/price/history
Description: Retrieves historical price data for a specific token on a given blockchain network. The data can be filtered by date range, grouped by time intervals, and sorted.
Endpoint 1: Get User Transaction Stats by Address
Request Parameters
URL Parameters
chain:
Type: Number
Description: The blockchain network chain ID. Supported chains:
1
: Ethereum Mainnet (default)56
: Binance Smart Chain800
: Solana Mainnet137
: Polygon Mainnet42161
: Arbitrum Mainnet
Required: Yes
address:
Type: String
Description: The wallet address of the user.
Required: Yes
Query Parameters
start:
Type: Number
Description: The start date filter in seconds (Unix timestamp). Defaults to 24 hours earlier.
Required: No
end:
Type: Number
Description: The end date filter in seconds (Unix timestamp). Defaults to the current date.
Required: No
sort:
Type: String
Description: Sort order of the results, either
asc
ordesc
. Defaults todesc
.Required: No
limit:
Type: Number
Description: The number of results per page. Defaults to
300
, maximum300
.Required: No
page:
Type: Number
Description: The page number for paginated results. Defaults to
1
.Required: No
time:
Type: String
Description: Type of results, either
realtime
orhistory
. Defaults torealtime
.Required: No
type:
Type: String
Description: Type of transactions to retrieve. Options are
contract
,transfer
, ortrade
. Defaults totrade
.Required: No
Success Response
Status Code:
200 OK
Response Body:
Error Responses
Missing Address
Status Code:
400 Bad Request
Response Body:
Unsupported Chain
Status Code:
400 Bad Request
Response Body:
Internal Server Error
Status Code:
500 Internal Server Error
Response Body:
Endpoint 2: Get Token Price History
Request Parameters
URL Parameters
chain:
Type: Number
Description: The blockchain network chain ID. Supported chains:
1
: Ethereum Mainnet (default)56
: Binance Smart Chain97
: Binance Smart Chain Testnet800
: Solana Mainnet137
: Polygon Mainnet8453
: Base Mainnet42161
: Arbitrum Mainnet
Required: Yes
address:
Type: String
Description: The address of the token.
Required: Yes
Query Parameters
start:
Type: Number
Description: The start date filter in seconds (Unix timestamp). Defaults to 24 hours earlier.
Required: No
end:
Type: Number
Description: The end date filter in seconds (Unix timestamp). Defaults to the current date.
Required: No
sort:
Type: String
Description: Sort order of the results, either
asc
ordesc
. Defaults todesc
.Required: No
limit:
Type: Number
Description: The number of results per page. Defaults to
300
, maximum300
.Required: No
page:
Type: Number
Description: The page number for paginated results. Defaults to
1
.Required: No
group:
Type: String
Description: Aggregates results by time interval. Options:
day
,min
,hr
,mon
,wk
,yr
. Defaults today
.Required: No
Success Response
Status Code:
200 OK
Response Body:
Error Responses
Missing Address
Status Code:
400 Bad Request
Response Body:
Unsupported Chain
Status Code:
400 Bad Request
Response Body:
Internal Server Error
Status Code:
500 Internal Server Error
Response Body:
This documentation covers two endpoints used to retrieve trade history and DEX trades for a given token. The endpoints allow you to fetch historical and real-time data across various supported blockchain networks.
Endpoints
1. Retrieve Token Trade History
Endpoint: GET /inspection/token/:chain/:address/trade/history
This endpoint retrieves the trade history for a specific token in USD.
Parameters:
Path Parameters:
chain
(Number): The network chain ID (e.g.,1
for Ethereum,900
for Solana Devnet,800
for Solana Mainnet).address
(String): The token's smart contract address.
Query Parameters:
start
(Number, optional): The start date in seconds since Unix epoch. Defaults to 24 hours before the current time.end
(Number, optional): The end date in seconds since Unix epoch. Defaults to the current time.sort
(String, optional): The sorting order of the results (asc
ordesc
). Defaults todesc
.limit
(Number, optional): The maximum number of results to return. Defaults to300
.page
(Number, optional): The page number for paginated results. Defaults to1
.time
(String, optional): The nature of the results (realtime
orhistory
). Defaults torealtime
.
Response:
Returns a JSON object containing the following:
status (Boolean): Indicates the success or failure of the request.
data (Object):
trades (Object):
buy
(Array): A list of buy trades.sell
(Array): A list of sell trades.
buyTotal (Object):
usd
(Number): The total USD value of buy trades.amount
(Number): The total amount of tokens bought.
sellTotal (Object):
usd
(Number): The total USD value of sell trades.amount
(Number): The total amount of tokens sold.
Example Request:
Example Response:
2. Retrieve DEX Trades by Token
Endpoint: GET /inspection/token/:chain/:address/dex/trades
This endpoint retrieves decentralized exchange (DEX) trades for a given token, with details on both buy and sell transactions.
Parameters:
Path Parameters:
chain
(Number): The network chain ID (e.g.,1
for Ethereum,900
for Solana Devnet,800
for Solana Mainnet).address
(String): The token's smart contract address.
Query Parameters:
start
(Number, optional): The start date in seconds since Unix epoch. Defaults to 24 hours before the current time.end
(Number, optional): The end date in seconds since Unix epoch. Defaults to the current time.sort
(String, optional): The sorting order of the results (asc
ordesc
). Defaults todesc
.limit
(Number, optional): The maximum number of results to return. Defaults to300
.page
(Number, optional): The page number for paginated results. Defaults to1
.time
(String, optional): The nature of the results (realtime
orhistory
). Defaults torealtime
.
Response:
Returns a JSON object containing the following:
status (Boolean): Indicates the success or failure of the request.
data (Object):
trades (Array): A list of trades including the following details:
action
(String): Indicates if the trade was aBUY
orSELL
.buyUsd
(Number): The USD value of the bought tokens.buyAmount
(Number): The amount of tokens bought.buyToken
(Object):name
(String): The name of the bought token.symbol
(String): The symbol of the bought token.address
(String): The contract address of the bought token.
sellUsd
(Number): The USD value of the sold tokens.sellAmount
(Number): The amount of tokens sold.sellToken
(Object):name
(String): The name of the sold token.symbol
(String): The symbol of the sold token.address
(String): The contract address of the sold token.
buyer
(String): The address of the buyer.seller
(String): The address of the seller.date
(String): The date of the transaction.hash
(String): The transaction hash.from
(String): The address from which the transaction originated.contract
(String): The contract address involved in the transaction.protocol
(String): The protocol used for the trade (e.g., Uniswap).
Example Request:
Example Response:
Supported Networks
Ethereum Mainnet (Chain ID: 1)
Binance Smart Chain (Chain ID: 56)
Solana Devnet (Chain ID: 900)
Solana Mainnet (Chain ID: 800)
Arbitrum (Chain ID: 42161)
Base (Chain ID: 8453)
Error Responses
400 Bad Request: When required parameters are missing or invalid.
500 Internal Server Error: When an unexpected error occurs.
Notes
The default time range for both endpoints is set to the last 24 hours if no
start
andend
parameters are provided.The
limit
parameter is capped at 300 to prevent excessive data load.The
time
parameter allows switching between real-time and archived data, providing flexibility in querying recent or historical trades.
Retrieve Token Transfer History
This API endpoint allows users to retrieve the transfer history of a specific token on supported blockchain networks. The transfer history includes details such as the sender, receiver, amount, and transaction metadata.
Endpoint
GET /inspection/token/:chain/:address/transfers
Description
This endpoint retrieves the transfer history for a specified token on a given blockchain. The history includes details of transactions involving the token, including transfers to and from other addresses.
Parameters
Path Parameters:
chain
(Number): The blockchain network ID where the token resides. Default is1
(Ethereum). Supported chains include:1
: Ethereum56
: Binance Smart Chain800
: Solana Devnet900
: Solana Mainnet42161
: Arbitrum8453
: Base
address
(String): The address of the token or wallet whose transfer history is to be retrieved.
Query Parameters:
start
(Number): The start date filter in seconds since epoch (timestamp). Defaults to0
(start from the beginning).end
(Number): The end date filter in seconds since epoch (timestamp). Defaults to the current timestamp.sort
(String): Sort order of the results. Acceptsasc
(ascending) ordesc
(descending). Defaults todesc
.limit
(Number): The maximum number of results to return. Defaults to300
. The maximum allowed value is300
.page
(Number): The page number for paginated results. Defaults to1
.time
(String): Specifies the nature of the results. Acceptsrealtime
(default) for current data orhistory
for archived data.
Response
Status Code:
200 OK
Response Body: JSON object containing the transfer history data.
Sample Response:
Error Responses
400 Bad Request: Returned if required parameters are missing or invalid.
500 Internal Server Error: Returned if there is an issue processing the request on the server.
Example Request
This example request fetches the transfer history for the token at address 0x1234abcd5678efgh9012ijkl3456mnop
on the Ethereum network, for transactions occurring between June 1, 2021
and July 1, 2021
, sorted in ascending order, with a limit of 100 results per page.
Notes
Ensure the chain parameter matches a supported network to avoid errors.
The default behavior provides a maximum of 300 results, but this can be adjusted by modifying the
limit
parameter.
Last updated