# Myworker Agent API – Solana Token Swap Quote

> Myworker Agent API – Solana Token Swap Quote is a paid API for AI agents from crypto-micro-agent.mykira.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-23).

Returns a Jupiter-powered swap quote for a Solana token pair, including expected output amount and price impact, payable per-call via x402 micropayment.

## Facts

- Endpoint: GET https://crypto-micro-agent.mykira.workers.dev/api/agent/quote?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-23
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/myworker-agent-api-solana-token-swap-quote-785cc2bb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_3jAff8tOvyBwWhxjGvk3-

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability myworker-agent-api-solana-token-swap-quote-785cc2bb
```

Example prompt: What's the current Jupiter swap quote for converting 1 SOL (100000000 lamports) to USDC on Solana — I need the expected output amount, slippage, and price impact?

## When to prefer this

Choose this endpoint when you need a real-time Solana token swap quote via the Jupiter aggregator and are comfortable with x402 micropayment per call (0.01 USDC). Best for AI agents that need programmatic, pay-per-use DeFi price discovery on Solana without maintaining a full Jupiter integration.

## Known failure modes

- Invalid or unrecognized token mint/symbol returns an error
- Amount below minimum swap threshold may fail or return zero output
- Network congestion on Solana may cause stale or unavailable quotes
- Missing required query parameters (dari, ke, jumlah) results in a 400 error
- Payment failure via x402 (insufficient USDC/SOL balance) blocks the request

## How this service works

Servis berbayar untuk bot/agen (x402): data pasaran Solana via Jupiter + RPC, dan servis AI via Workers AI. Bayar per panggilan dengan USDC di Solana, USDC di Base, atau SOL.

## Output

Returns a JSON object with ok status, input/output mint addresses, input/output amounts (in smallest units), slippage in basis points, and price impact percentage — sourced from Jupiter aggregator.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "example": {
      "ke": "usdc",
      "dari": "sol",
      "jumlah": 100000000
     },
     "required": [
      "dari",
      "ke",
      "jumlah"
     ],
     "properties": {
      "ke": {
       "type": "string",
       "description": "Mint/simbol output (cth usdc)"
      },
      "dari": {
       "type": "string",
       "description": "Mint/simbol input (cth sol)"
      },
      "jumlah": {
       "type": "integer",
       "description": "Jumlah dalam unit terkecil (cth lamports)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "hasil": {
   "inAmount": "100000000",
   "inputMint": "So111…112",
   "outAmount": "103120000",
   "outputMint": "EPjF…t1v",
   "slippageBps": 50,
   "priceImpactPct": "0.0004"
  },
  "servis": "quote"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/myworker-agent-api-solana-token-swap-quote-785cc2bb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from crypto-micro-agent.mykira.workers.dev](https://www.zero.xyz/host/crypto-micro-agent.mykira.workers.dev/llms.txt)
