# GBLIN Just-In-Time USDC Atomic Swap Calldata

> GBLIN Just-In-Time USDC Atomic Swap Calldata is a paid API for AI agents from gblin.digital, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Returns ready-to-broadcast atomic-swap calldata sized to cover a requested USDC amount by converting GBLIN tokens to USDC just-in-time.

## Facts

- Endpoint: GET https://gblin.digital/api/x402/jit
- Price: $0.005/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-17f5b5e6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vp2QWoo6g8W7lTxgB4feQ

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-17f5b5e6
```

Example prompt: Generate just-in-time GBLIN→USDC atomic swap calldata to cover 50.00 USDC for my wallet at 0xAbC1234567890abcdef1234567890abcdef123456 so I can broadcast it immediately.

## When to prefer this

Use this endpoint when an autonomous agent needs to liquidate GBLIN holdings into USDC just-in-time to cover a specific payment or expenditure. Prefer this over the USDC→GBLIN accumulation endpoint when the direction is GBLIN→USDC (selling, not buying). Choose this over a generic DEX swap when operating within the GBLIN protocol ecosystem and needing MEV-safe, protocol-native calldata.

## Known failure modes

- Insufficient GBLIN balance in the specified wallet — swap cannot be sized to cover requested USDC
- Wallet address fails cooldown check — wallet recently performed a swap and must wait
- Invalid or malformed wallet address — returns error
- USDC amount is zero, negative, or unparseable decimal string — returns validation error
- Protocol NAV or liquidity conditions prevent sizing the swap accurately — returns error

## How this service works

Just-In-Time GBLIN→USDC calldata. Returns two ready-to-broadcast steps (sellGBLINForEth + WETH→USDC swap) sized to cover the requested USDC amount; smart accounts can batch them in one UserOp.

## Output

Ready-to-broadcast atomic swap calldata that, when submitted on-chain, will convert enough GBLIN tokens to cover the requested USDC amount. The calldata is sized precisely to match the requested USDC value and is safe to broadcast immediately.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "usdc": "50.00",
   "wallet": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045"
  }
 }
}
```

## 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": [
      "usdc",
      "wallet"
     ],
     "properties": {
      "usdc": {
       "type": "string",
       "description": "USDC amount needed (decimal string)"
      },
      "wallet": {
       "type": "string",
       "description": "Agent EOA / smart-account 0x address (for cooldown check)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "value": "0",
  "action": "single_atomic_tx",
  "params": {
   "pool_fee": 500,
   "gblin_amount": "0.412345",
   "min_usdc_out": "0.487500",
   "target_token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
  },
  "calldata": "0x5d2e1ca7…",
  "expected": {
   "usdc_out": "0.500000",
   "nav_used_usd": 1.234567,
   "slippage_reason": "normal",
   "slippage_buffer_pct": 2.5
  },
  "gas_hint": 600000,
  "compatibility": {
   "eoa": true,
   "eip7702": true,
   "erc4337": true
  },
  "target_contract": "0x36C81d7E1966310F305eA637e761Cf77F90852f0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gblin-digital-17f5b5e6/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)
