Skip to main content
GET
/
explorer
/
near-earnings
NEAR-ecosystem affiliate earnings
curl --request GET \
  --url https://api.leokit.dev/explorer/near-earnings
{
  "data": {
    "generated_at": "2023-11-07T05:31:56Z",
    "total_usd": 123,
    "tokens": [
      {
        "token": "<string>",
        "contract": "<string>",
        "amount": 123,
        "decimals": 123,
        "usd_value": 123,
        "tx_count": 123,
        "latest_tx": "<string>",
        "latest_date": "2023-11-07T05:31:56Z"
      }
    ],
    "total_incoming_txs": 123
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.leokit.dev/llms.txt

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

Endpoint

GET /leokit/explorer/near-earnings
No authentication required. Cached for 10 minutes.

Overview

leodex.near is the LeoFinance fee-collection account for NEAR Intents. Incoming fungible-token (FT) transfers from intents.near to leodex.near represent affiliate fee payments. This endpoint aggregates all such transfers from NearBlocks (paginated until exhausted) and groups them by token contract. USD value is computed for stablecoin contracts (USDT, USDC). Other tokens have usd_value: 0 since their on-chain price is not resolved here.

Response

{
  "data": {
    "generated_at": "2026-04-28T12:00:00.000Z",
    "total_usd": 18230.55,
    "tokens": [
      {
        "token": "USDT",
        "contract": "usdt.tether-token.near",
        "amount": 12480.55,
        "decimals": 6,
        "usd_value": 12480.55,
        "tx_count": 482,
        "latest_tx": "abc123...",
        "latest_date": "2026-04-28T11:32:11.000Z"
      },
      {
        "token": "USDC",
        "contract": "17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1",
        "amount": 5750.00,
        "decimals": 6,
        "usd_value": 5750.00,
        "tx_count": 215,
        "latest_tx": "def456...",
        "latest_date": "2026-04-28T11:30:01.000Z"
      }
    ],
    "total_incoming_txs": 697
  }
}

Field Reference

FieldDescription
generated_atWhen this snapshot was built (ISO-8601)
total_usdSum of usd_value across all token entries
total_incoming_txsCount of qualifying FT transfers (across all tokens)
tokens[]Per-token aggregation, sorted by usd_value descending

tokens[i]

FieldDescription
tokenToken symbol from NearBlocks metadata
contractNEAR account ID of the token contract
amountTotal received in human-readable units
decimalsToken decimals
usd_valueUSD value (only computed for stablecoins; 0 otherwise)
tx_countTransfer count for this token
latest_txMost recent transaction hash
latest_dateTimestamp of latest_tx (ISO-8601)

Caching

X-Cache: HIT|MISS. TTL 10 minutes.

Errors

StatusDescription
500NearBlocks API failure

Notes

  • The cache key is shared with /leokit/explorer/stats (near_ecosystem_fees_usd) and /leokit/explorer/analytics (summary.near_ecosystem_fees_usd).
  • Pagination uses NearBlocks’ page parameter; the loop stops when a page returns fewer than 100 results.
  • Only cause === "TRANSFER" events from involved_account_id === "intents.near" are counted as fee transfers.

Response

200 - application/json

Aggregated FT transfers from intents.near to leodex.near.

data
object
required