0

0x · Swap Allowance Holder Price

by 0x

GETBaseSolana

$0.01

per call · USD Coin on Base

Get the indicative price for a swap using Allowance Holder to set allowances

Endpoint

GET https://agent.api.0x.org/v1/x402/swap-allowance-holder-price/

143

Calls / 30d

3

Unique payers / 30d

Sep 10

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://agent.api.0x.org/v1/x402/swap-allowance-holder-price/", {
  method: "GET",
});
const data = await res.json();
cURL
curl -X GET \
  "https://agent.api.0x.org/v1/x402/swap-allowance-holder-price/" \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "allowanceTarget": "",
  "blockNumber": "",
  "buyAmount": "",
  "buyToken": "",
  "fees": {},
  "gas": "",
  "gasPrice": "",
  "issues": {},
  "liquidityAvailable": false,
  "minBuyAmount": "",
  "route": {},
  "sellAmount": "",
  "sellToken": "",
  "totalNetworkFee": "",
  "zid": ""
}

Payment details

Pay to0xb15a55e85fdf5edc41b6c1eaf7813e2c6e6def59
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Solana
Schemesexact

Is this your API?

Pin it to the top of Market Data and the homepage with a featured placement.

Get featured →

More from 0x & similar services