# Goldsky Polymarket Balances Feed

> Goldsky Polymarket Balances Feed is a paid API for AI agents from edge.goldsky.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-31).

Returns token balances for a given wallet address on Polymarket, including position tokens and USDC holdings, with optional filtering and pagination

## Facts

- Endpoint: GET https://edge.goldsky.com/data/polymarket/balances?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/goldsky-polymarket-balances-feed-0113502b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VIziWQws-dANUWtaVknYl

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 goldsky-polymarket-balances-feed-0113502b
```

Example prompt: What token balances does the Polymarket wallet 0x1234...abcd hold right now? Show me up to 50 results and include the block timestamp.

## When to prefer this

Use this endpoint when you need onchain token balance data specifically for Polymarket wallet addresses — particularly for querying outcome token positions, filtering by minimum balance, or paginating through a large number of holdings. Prefer this over generic blockchain RPC calls when you want a structured REST response without raw EVM decoding. Best suited for agents doing portfolio analysis, leaderboard construction, or position monitoring on Polymarket.

## Known failure modes

- Missing required 'address' query parameter returns a 400 or validation error
- Invalid wallet address format may return empty data or an error
- as_of_block set too far in the past may not be available in the indexed dataset
- Payment not included or prepaid balance exhausted returns HTTP 402 Payment Required
- Cursor from a previous query becomes stale if data has been re-indexed
- Rate limiting or network issues at edge may cause transient 5xx errors

## How this service works

Goldsky Feeds: onchain data over REST. Formerly Edge Data / Data APIs; existing URLs and keys keep working.

- **Wallet feeds**: one wallet's token transfers or balances across chains, with USD values (`/feeds/wallets/transfers`, `/feeds/wallets/balances`).
- **Tokens**: metadata and current USD price for up to 100 `chain:token_address` pairs per request (`/feeds/tokens`).
- **Prediction markets** (Polymarket, on Polygon): Activity, Positions and Balances (`/polymarket/*`).
- **Chain datasets**: Blocks and Chain head for each supported chain (`/blocks/{chain}`, `/blocks/{chain}/head`).

Base URL: `https://edge.goldsky.com/data`. Every endpoint is a `GET` that returns JSON.

## Authentication

Send your Feeds API key in the `x-api-key` header, as the `?key=` query parameter, or as `Authorization: Bearer <key>`. Get it at [app.goldsky.com](https://app.goldsky.com) under **Feeds → API keys**. One key works for every endpoint; an invalid key gets `401`.

## Billing

Requests made with a key bill compute units (CUs) at $10 per million:

- Wallet feeds and Tokens: 35 CUs per request.
- Prediction markets and Chain datasets: 1 CU per row returned. Chain head is 1 CU per call.

Errors are not billed, and a Prediction markets or Chain datasets request that returns no rows costs nothing. Rate limits are set per plan (`429` when exceeded); Goldsky support can raise them.

## Pay per request with x402

No account or key needed. A request without a key gets `402` with an x402 v2 challenge in the `PAYMENT-REQUIRED` header (base64 JSON; the body carries the same challenge). Pay in USDC through Circle Gateway and retry. Each payment is a $0.005 prepaid top-up, tied to the paying wallet and shared with Edge RPC, that later requests spend down:

- Wallet feeds and Tokens: $0.00035 (350 atomic USDC) per request.
- Prediction markets and Chain datasets: $0.00001 (10 atomic USDC) per request, whatever the row count.

The payment flow is in [x402 nanopayments](https://docs.goldsky.com/edge-rpc/capabilities/x402).

## Output

A paginated JSON object containing an array of token balance records (each with address, token_id, balance, optional token_type, block_number, block_timestamp, contract_address), a limit integer, and a next_cursor string for fetching the next page (null if no more results).

## 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",
     "required": [
      "address"
     ],
     "properties": {
      "sort": {
       "type": [
        "string",
        "null"
       ]
      },
      "limit": {
       "type": [
        "integer",
        "null"
       ]
      },
      "cursor": {
       "type": [
        "string",
        "null"
       ]
      },
      "address": {
       "type": "string"
      },
      "token_id": {
       "type": [
        "string",
        "null"
       ]
      },
      "token_type": {
       "type": [
        "string",
        "null"
       ]
      },
      "as_of_block": {
       "type": [
        "integer",
        "null"
       ]
      },
      "min_balance": {
       "type": [
        "string",
        "null"
       ]
      },
      "contract_address": {
       "type": [
        "string",
        "null"
       ]
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "data",
      "limit"
     ],
     "properties": {
      "data": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "address",
         "token_id",
         "balance"
        ],
        "properties": {
         "address": {
          "type": "string"
         },
         "balance": {
          "type": "string"
         },
         "token_id": {
          "type": "string"
         },
         "token_type": {
          "type": [
           "string",
           "null"
          ]
         },
         "block_number": {
          "type": [
           "integer",
           "null"
          ]
         },
         "block_timestamp": {
          "type": [
           "integer",
           "null"
          ]
         },
         "contract_address": {
          "type": [
           "string",
           "null"
          ]
         }
        }
       }
      },
      "limit": {
       "type": "integer"
      },
      "next
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "schema": {
  "type": "object",
  "properties": {
   "data": {
    "type": "array"
   },
   "limit": {
    "type": "integer"
   },
   "next_cursor": {
    "type": [
     "string",
     "null"
    ]
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/goldsky-polymarket-balances-feed-0113502b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from edge.goldsky.com](https://www.zero.xyz/host/edge.goldsky.com/llms.txt)
