{
  "x402Version": 2,
  "id": 15401,
  "slug": "15401",
  "resource": "https://x402-agent-pay.com/labs/api/energy/buy",
  "description": "Buy agent energy (kWh) up to a max price — matches cheapest resting sellers, settles USDC to seller wallets on Base L2",
  "type": "http",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x367F1b3D8Ca90D1e087481a9A40d585Bf3451a03",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "20000",
      "maxTimeoutSeconds": 300
    },
    {
      "scheme": "exact",
      "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",
      "payTo": "6aCEuwH3PYx99cEmRz45otfxk39uF7ewGhqmvxfXisSG",
      "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "amount": "20000",
      "maxTimeoutSeconds": 60
    }
  ],
  "outputSchema": {
    "bazaar": {
      "category": "AI",
      "description": "Buy agent energy (kWh) up to a max price — matches cheapest resting sellers, settles USDC to seller wallets on Base L2",
      "info": {
        "description": "Buy kilowatt-hours from the agent energy market at a stated price.",
        "input": {
          "bodyType": "json",
          "method": "POST",
          "schema": {
            "properties": {
              "agent": {
                "description": "buyer agent id",
                "type": "string"
              },
              "kwh": {
                "description": "energy to buy in kWh",
                "type": "number"
              },
              "max_price_usd_per_kwh": {
                "description": "max USDC per kWh",
                "type": "number"
              }
            },
            "required": [
              "agent",
              "kwh",
              "max_price_usd_per_kwh"
            ],
            "type": "object"
          },
          "type": "http"
        },
        "inputSchema": {
          "properties": {
            "agent": {
              "type": "string"
            },
            "kwh": {
              "type": "number"
            },
            "metadata": {
              "type": "object"
            },
            "price_usd_per_kwh": {
              "type": "number"
            },
            "site_slug": {
              "type": "string"
            },
            "wallet": {
              "type": "string"
            }
          },
          "required": [
            "agent",
            "kwh"
          ],
          "type": "object"
        },
        "name": "AgentPay Energy Market - Buy kWh",
        "output": {
          "example": {
            "data": {},
            "settlement_tx": "0x0000000000000000000000000000000000000000000000000000000000000000",
            "success": true
          },
          "schema": {
            "properties": {
              "data": {
                "description": "Response payload",
                "type": "object"
              },
              "settlement_tx": {
                "description": "On-chain settlement transaction hash",
                "type": "string"
              },
              "success": {
                "type": "boolean"
              }
            },
            "type": "object"
          }
        },
        "outputSchema": {
          "description": "JSON receipt for this action. Fields vary by outcome, so the shape is described rather than enumerated.",
          "type": "object"
        }
      },
      "name": "Agent Energy Market — buy",
      "networks": [
        "Base"
      ],
      "provider": "AgentPay",
      "providerUrl": "https://x402-agent-pay.com",
      "schema": {
        "properties": {
          "data": {
            "description": "Response payload",
            "type": "object"
          },
          "settlement_tx": {
            "description": "On-chain settlement transaction hash",
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "tags": [
        "energy",
        "market",
        "labs",
        "trade"
      ]
    }
  },
  "tags": [
    "bazaar"
  ],
  "sourceHost": "x402-agent-pay.com",
  "lastUpdated": "2026-09-04T02:52:33.112Z",
  "quality": {
    "calls30d": 2,
    "uniquePayers30d": 1,
    "lastCalledAt": "2026-09-04T02:52:32.768Z"
  },
  "liveness": {},
  "verified": false,
  "featured": false,
  "provider": {
    "host": "x402-agent-pay.com",
    "manifest_name": "x402-agent-pay.com",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-09-18T22:00:31.484Z"
  }
}