Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.nexfi.robert.dpdns.org/llms.txt

Use this file to discover all available pages before exploring further.

Wallet Transactions and Risk

This page covers history, chain transaction views, gas estimation, and address/domain/transaction risk checks.

GET /api/v1/history/{address}

Purpose

Returns aggregated cross-chain history for the wallet home activity feed and transaction history list.

Path / Query Parameters

ParameterTypeRequiredDescriptionExample
addressStringYesWallet address.0xabc...
chainIdsStringNoChain filter.8453,1
cursorStringNoPagination cursor.cursor_20
limitStringNoPage size.20
statusEnumNosuccess, pending, or failed.success
kindEnumNosend, receive, approval, or contract_interaction.send

Example Request

GET /api/v1/history/0xabc...?chainIds=8453&limit=20&status=success&kind=send

Response Fields

FieldTypeDescriptionExample
data.itemsArrayHistory rows.[]
data.items[].hashStringTransaction hash.0x123
data.items[].chainIdIntegerChain ID.8453
data.items[].fromStringSender address.0xabc...
data.items[].toStringRecipient address.0xdef...
data.items[].valueStringRaw transfer amount.1000000000000000000
data.items[].tokenAddressStringnative or token contract address.native
data.items[].symbolStringAsset symbol.ETH
data.items[].statusStringTransaction status.success
data.items[].timestampStringTransaction timestamp.2026-05-11T10:00:00.000Z
data.items[].kindStringTransaction type.send
data.items[].blockNumberIntegerBlock number.29123456
data.items[].explorerUrlStringExplorer link.https://basescan.org/tx/0x123
data.nextCursorString | NullCursor for next page.cursor_20

Example Response

{
  "code": 0,
  "msg": "ok",
  "data": {
    "items": [
      {
        "hash": "0x123",
        "chainId": 8453,
        "from": "0xabc...",
        "to": "0xdef...",
        "value": "1000000000000000000",
        "tokenAddress": "native",
        "symbol": "ETH",
        "status": "success",
        "timestamp": "2026-05-11T10:00:00.000Z",
        "kind": "send",
        "blockNumber": 29123456,
        "explorerUrl": "https://basescan.org/tx/0x123"
      }
    ],
    "nextCursor": "cursor_20"
  }
}

GET /api/v1/transactions/{chainId}/{address}

Purpose

Returns transaction history scoped to a single chain, useful for chain-detail views or filtered activity screens.

Path / Query Parameters

ParameterTypeRequiredDescriptionExample
chainIdIntegerYesTarget chain ID.8453
addressStringYesWallet address.0xabc...
cursorStringNoPagination cursor.cursor_40
limitStringNoPage size.20

Response Notes

The response payload matches /api/v1/history/{address}, but only includes one chain.

GET /api/v1/transactions/{chainId}/hash/{hash}

Purpose

Returns a single transaction detail by chain ID and hash.

Path Parameters

ParameterTypeRequiredDescriptionExample
chainIdIntegerYesTarget chain ID.8453
hashStringYesTransaction hash.0x123...

Response Notes

Returns one TransactionItem object with the same fields used in history rows.

Error Notes

  • Returns HTTP 404 if the transaction is not found.
  • Backend may return a business error if the explorer or index source is temporarily unavailable.

POST /api/v1/transactions/estimate-gas

Purpose

Estimates gas for a transfer before signature confirmation.

Request Body

ParameterTypeRequiredDescriptionExample
chainIdIntegerYesChain ID.8453
fromStringYesSender address.0xabc...
toStringYesRecipient address.0xdef...
amountStringYesTransfer amount.0.1
tokenAddressStringNoToken address. Omit for native transfers.0x8335...

Example Request

{
  "chainId": 8453,
  "from": "0xabc...",
  "to": "0xdef...",
  "amount": "0.1"
}

Response Fields

FieldTypeDescriptionExample
data.chainIdIntegerChain ID.8453
data.gasLimitIntegerEstimated gas limit.21000
data.gasPriceGweiNumberGas price in gwei.1.2
data.estimatedFeeNativeNumberFee in native token.0.0000252
data.estimatedFeeUsdNumber | NullFee in USD if price is available.0.09
data.confidenceStringConfidence level of the estimate.high
data.updatedAtStringEstimation timestamp.2026-05-11T10:00:00.000Z

Example Response

{
  "code": 0,
  "msg": "ok",
  "data": {
    "chainId": 8453,
    "gasLimit": 21000,
    "gasPriceGwei": 1.2,
    "estimatedFeeNative": 0.0000252,
    "estimatedFeeUsd": 0.09,
    "confidence": "high",
    "updatedAt": "2026-05-11T10:00:00.000Z"
  }
}

POST /api/v1/risk/check-address

Purpose

Checks whether a destination address is risky before transfer or address-book usage.

Request Body

ParameterTypeRequiredDescriptionExample
chainIdIntegerYesChain ID.8453
addressStringYesAddress to inspect.0xdef...

Response Fields

FieldTypeDescriptionExample
data.riskLevelStringRisk level.low
data.labelsString[]Risk labels.[]
data.reasonsString[]Human-readable reasons.[]
data.sourceStringRisk intelligence source.internal

Example Response

{
  "code": 0,
  "msg": "ok",
  "data": {
    "riskLevel": "low",
    "labels": [],
    "reasons": [],
    "source": "internal"
  }
}

POST /api/v1/risk/check-domain

Purpose

Checks whether a DApp origin is suspicious, phishing-like, or otherwise known risky.

Request Body

ParameterTypeRequiredDescriptionExample
originStringYesDApp origin or domain.https://app.uniswap.org

Response Fields

FieldTypeDescriptionExample
data.riskLevelStringRisk level.low
data.labelsString[]Domain labels.["dex"]
data.reasonsString[]Risk reason list.[]

POST /api/v1/risk/check-transaction

Purpose

Runs a pre-signature risk check for contract interactions, approvals, and suspicious transfers.

Request Body

ParameterTypeRequiredDescriptionExample
chainIdIntegerYesChain ID.8453
fromStringYesSender address.0xabc...
toStringYesContract or recipient address.0xrouter...
valueStringYesNative token value attached to the transaction.0
dataStringNoTransaction calldata.0xa9059cbb...
originStringNoRequest origin or DApp domain.https://app.uniswap.org

Response Fields

FieldTypeDescriptionExample
data.riskLevelStringRisk level.medium
data.warningsArrayWarning list.[]
data.warnings[].typeStringWarning type.approval_unlimited
data.warnings[].messageStringWarning message.Unlimited approval detected
data.decodedObject | NullHuman-readable decoded transaction summary.{ "method": "approve" }

Example Response

{
  "code": 0,
  "msg": "ok",
  "data": {
    "riskLevel": "medium",
    "warnings": [
      {
        "type": "approval_unlimited",
        "message": "Unlimited approval detected"
      }
    ],
    "decoded": {
      "method": "approve",
      "token": "USDC",
      "spender": "0xrouter..."
    }
  }
}