Skip to content
Fourohtwo

1gateway.dev/v1/onchain/prices/batch

Use when a trading agent needs many token prices at once plus the price impact of a buy. Input: tokens (≤25, base:0x… or sol:<mint>, ≤10 Solana), amount_usd (default 1000) or amounts (up to 5 USD sizes). Output: per token priceUsd, confidence, pool, depth and buy estimates: tokensOut, effectivePriceUsd, priceImpactPct (Uniswap v3 QuoterV2 / Aerodrome, Orca CLMM). Example: ?tokens=base:0x4200000000

BaseMonadPolygonArbitrumSolanaAnswering
GEThttps://1gateway.dev/v1/onchain/prices/batch

Uptime100% of 3 checks in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://1gateway.dev/v1/onchain/prices/batch?amount_usd=5000&amounts=1000%2C100000&tokens=base%3A0x4200000000000000000000000000000000000006%2Cbase%3A0x940181a94A35A4569E4529A3CDfB74e38FD98631");
console.log(await res.json());

Example input

{
  "amount_usd": 5000,
  "amounts": "1000,100000",
  "tokens": "base:0x4200000000000000000000000000000000000006,base:0x940181a94A35A4569E4529A3CDfB74e38FD98631"
}