# GBLIN Swap Quote

> GBLIN Swap Quote is a paid API for AI agents from gblin.digital, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns a preview quote for a GBLIN swap (buy ETH→GBLIN or sell GBLIN→ETH) with dynamic slippage and MEV-safe minimum output amount.

## Facts

- Endpoint: GET https://gblin.digital/api/x402/quote
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gblin-digital-b98a0117
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GuDBc4AZxaTcVxAFlOYvZ

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 gblin-digital-b98a0117
```

Example prompt: Can you get me a GBLIN buy quote for 0.25 ETH — show me how much GBLIN I'd receive and what the MEV-safe minimum output is?

## When to prefer this

Use this endpoint when you need a read-only, non-executing price preview for a GBLIN↔ETH swap with built-in MEV protection parameters. Prefer this over executing a swap directly when you want to check slippage, confirm expected output, or build a transaction with a safe minOut before committing funds.

## Known failure modes

- Missing required query parameter 'direction' or 'amount' → 400 Bad Request
- Amount is zero or negative → validation error
- Amount is not a valid decimal string → parse error
- Network congestion or RPC failure may delay response
- Extremely large amounts may hit liquidity limits

## How this service works

Preview a GBLIN swap (buy ETH→GBLIN or sell GBLIN→ETH) with dynamic slippage and a MEV-safe minOut.

## Output

A swap preview including the expected output amount of GBLIN (for buy) or ETH (for sell), computed dynamic slippage, and a MEV-safe minOut value that can be used when constructing the actual swap transaction.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "amount": "0.25",
   "direction": "buy"
  }
 }
}
```

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "direction",
      "amount"
     ],
     "properties": {
      "amount": {
       "type": "string",
       "description": "Input amount as a decimal string (ETH for buy, GBLIN for sell)"
      },
      "direction": {
       "enum": [
        "buy",
        "sell"
       ],
       "type": "string",
       "description": "Swap direction: buy = ETH→GBLIN, sell = GBLIN→ETH"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "fees": {
   "founder_eth": "0.000005",
   "stability_eth": "0.000005",
   "total_fee_bps": 10
  },
  "direction": "buy",
  "next_step": "Call contract.buyGBLIN(safe_min_gblin_out) with msg.value = amount_in_eth.",
  "amount_in_eth": "0.01",
  "slippage_reason": "normal",
  "expected_gblin_out": "27.853214",
  "safe_min_gblin_out": "27.156885",
  "slippage_buffer_bps": 250
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gblin-digital-b98a0117/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gblin.digital](https://www.zero.xyz/host/gblin.digital/llms.txt)
