Token ATH API method reference

The two JSON-RPC methods of the Token ATH API — triport_getTokenATH (submit a job) and triport_getTokenATHResult (poll for the result) — with their parameters, the result schema, the job states and the errors.

Both methods are JSON-RPC 2.0 calls, POSTed to https://triport.io/rpc/{chain} where {chain} is one of eth, bsc, base, polygon, robinhood. Authenticate with the x-token header (or Authorization: Bearer). See the Token ATH API overview for how the computation works, access and timing.

The pair is asynchronous: submit once with triport_getTokenATH, keep the returned job_id, then poll triport_getTokenATHResult until the job is no longer pending.

Submit a job: triport_getTokenATH

Starts an ATH computation and returns immediately with a job handle. Counts against the ath_compute rate category.

Request parameters

A single object as params[0]:

FieldTypeRequiredDescription
chainstringyesEVM chain id: eth, bsc, base, polygon or robinhood. Must match the chain in the URL path.
tokenstringone of token / poolToken contract address (0x + 40 hex). Token mode — the API picks the token's most-liquid pool automatically (see below).
poolobjectone of token / poolPool mode — {"address":"0x…"}, the specific AMM pool to measure. The reliable path; use it when you know the pool.
budgetintegernoRPC-call budget for the search, 100–400. Default 400. Higher spends more work and is more likely to return status: exact; lower returns sooner.
quotestringnoOptional quote-asset hint (address or symbol) when a pool trades against more than one quote. Omit to let the API resolve it.

Supply exactly one of token or pool. The ATH is always computed in the resolved pool's quote asset; the API does not convert to USD.

What submit returns

{
  "job_id": "ath_01JBRK8Q0C7E3M9W2ZP",
  "status": "pending",
  "poll_after_s": 5
}
FieldTypeDescription
job_idstringOpaque handle to poll with.
statusstringpending at submit (a recently computed token may return a terminal status immediately).
poll_after_sintegerSeconds to wait before the first poll.

Poll for the result: triport_getTokenATHResult

Returns the current state of a job, and the ATH once it is ready. Counts against the ath_poll rate category. Poll no sooner than poll_after_s, then at a steady interval — not in a tight loop.

Poll parameters

The job_id, either positionally or as an object:

params: ["ath_01JBRK8Q0C7E3M9W2ZP"]
params: [{ "job_id": "ath_01JBRK8Q0C7E3M9W2ZP" }]

Result states

The status field is the first thing to read:

statusMeaningNext step
pendingStill computing.Poll again after a short wait.
estimatedDone. The peak comes from the sampled / TWAP search, not a direct log read — a heuristic, not a calibrated probability.Use it; check warnings.
exactDone. The peak trade was read directly from swap logs in the narrowed window.Use it.

A terminal result (estimated or exact) carries the full payload below. A failed job returns an error instead (see Errors).

Result schema

Illustrative shape of a terminal result (values differ per token; long fields shortened):

{
  "job_id": "ath_01JBRK8Q0C7E3M9W2ZP",
  "status": "exact",
  "chain": "eth",
  "scope": "configured factories; configured wrapped-native/stable quotes; gross token Swap volume creation to head",
  "pool": {
    "address": "0x…",
    "dex": "uniswap-v3",
    "factory": "0x…",
    "quote": "0x…"
  },
  "ath_trade": {
    "price": { "numerator": "…", "denominator": "…" },
    "block": 18650000,
    "timestamp": "2026-03-14T08:21:47Z",
    "tx": "0x…"
  },
  "snapshot": { "head_block": 21000000, "budget": 400, "total_calls": 318 },
  "warnings": ["not_token_global_ATH"]
}
FieldTypeDescription
statusstringestimated or exact (see Result states).
scopestringPlain-text statement of what was searched: which factories, which quote assets, and the volume basis. The peak is within this scope, not token-global.
poolobjectThe resolved pool: its address, dex family, factory and the quote asset the price is denominated in. In token mode this is the pool the API selected.
ath_trade.priceobjectThe peak price as an exact rational: numerator / denominator (strings). Keep them as strings and divide with arbitrary precision; a pre-divided float would lose precision.
ath_trade.blockintegerBlock of the peak trade.
ath_trade.timestampstringUTC timestamp of that block.
ath_trade.txstringTransaction hash of the peak trade.
snapshotobjectContext for the run: the head_block the search ended at, the budget used and the total_calls spent.
warningsarrayZero or more honesty flags, e.g. not_token_global_ATH (peak is per-pool, not cross-venue) and uncalibrated_sampling_estimate (present on estimated results).

Prices are strings/rationals, not numbers. Parse them with arbitrary precision.

Errors

JSON-RPC errors (in the error object) and the conditions that produce them:

ConditionerrorMeaningWhat to do
Token-mode pool selectionpool_selection_incompleteThe API found no pool it can identify on a supported DEX for this token.Retry in pool mode with an explicit pool.address.
Service busyath_busyATH compute capacity is saturated right now; the job was not accepted.Back off and retry later.
Chain unavailableath_chain_unavailableThe backing for this chain is temporarily unavailable.Retry later; try another supported chain if appropriate.
Bad inputinvalid_requestMissing/!EVM chain, both or neither of token/pool, budget out of 100–400, malformed address.Fix the request.
AuthunauthorizedMissing or invalid API key.Send a valid x-token.
Plantier_insufficientThe plan does not include the Token ATH API.Upgrade; see pricing.
Raterate_limitedOver the ath_compute or ath_poll per-second limit.Wait and retry; see rate limits and tiers.
Unknown jobnot_foundThe job_id is unknown or has expired.Submit a new job.

A job that fails after it was accepted reports its error through triport_getTokenATHResult rather than at submit. See code examples for a submit-then-poll loop that branches on these.

Terms on this page: JSON-RPC.