# Goldsky Edge: RPC, Wallets, Tokens, Polymarket, Blocks (`goldsky/goldsky-edge`) Actor

Blockchain data API for agents and apps. EVM JSON-RPC on 150+ chains, wallet balances, transfers, token prices, Polymarket and block data. Pay per call, no Goldsky account.

- **URL**: https://apify.com/goldsky/goldsky-edge.md
- **Developed by:** [Goldsky](https://apify.com/goldsky) (community)
- **Categories:** Developer tools, AI, Agents
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.44 / 1,000 feeds: wallets and tokens requests

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Goldsky Edge: RPC, Wallets, Tokens, Polymarket, Blocks

Call Goldsky's pay-per-request onchain data APIs over HTTP, billed per event through Apify, with no Goldsky account of your own. The Actor holds two Goldsky API keys as secrets: a Feeds key for Feeds and dataset calls, and a separate Edge RPC key for `/erpc/request`.

This Actor runs in [Standby mode](https://docs.apify.com/actors/running/standby.md). It does not run as a batch job. Call its Standby URL directly. See [Call the Actor](#call-the-actor) below. You pay the Apify platform usage of your own Standby requests, in addition to the event price. See [the cost rule](#the-cost-rule). The normal "start a run" flow in Apify Console does not serve Goldsky requests.

### What it does

It covers three Goldsky product classes, each as a set of HTTP endpoints:

- **Edge RPC**: EVM JSON-RPC calls on 150+ chains. One call, or a batch of up to 2 calls on the same chain, in one HTTP request (`POST /erpc/request`).
- **Goldsky Feeds: Wallets and Tokens**: wallet balances, wallet transfers, and token metadata and prices (`GET /feeds/wallets/balances`, `GET /feeds/wallets/transfers`, `GET /feeds/tokens`).
- **Goldsky Feeds: Prediction markets and Chain datasets**: Polymarket activity, positions, and balances, plus chain blocks and chain head. Each has a single-request `GET` endpoint and a batch `POST` endpoint that accepts up to 10 requests in one HTTP call, convenience only, billed per successful request (`/polymarket/activity`, `/polymarket/positions`, `/polymarket/balances`, `/blocks/{chain}`, `/blocks/{chain}/head`, `/blocks`, `/blocks/head`).

The Actor checks every REST request against Goldsky's live OpenAPI spec (`https://edge.goldsky.com/data/openapi.json`) before it sends the request. A bad parameter fails fast and for free, with no Goldsky charge. A response returns the Goldsky JSON directly. The Actor writes nothing to a dataset.

### Call the Actor

Find the Actor's Standby URL on its **Server** tab in Apify Console, next to the interactive endpoint list generated from this Actor's OpenAPI schema. Authenticate with your Apify API token, either as a `Bearer` `Authorization` header (recommended) or a `token` query parameter. The **Input** tab is empty. Standby requests ignore Actor input. The **Output** tab links to the running Standby server, not a dataset.

```bash
curl -H "Authorization: Bearer <your_apify_token>" \
    "https://<your-standby-url>/blocks/ethereum/head"
```

See [Authenticate requests](https://docs.apify.com/actors/running/standby.md#authenticate-requests) for details, including scoped tokens.

#### Edge RPC

Single call:

```bash
curl -X POST "https://<your-standby-url>/erpc/request" \
    -H "Authorization: Bearer <your_apify_token>" \
    -H "content-type: application/json" \
    -d '{ "chainId": 1, "method": "eth_blockNumber", "params": [] }'
```

Batch of up to 2 calls on the same chain, forwarded to Edge RPC as one JSON-RPC batch:

```bash
curl -X POST "https://<your-standby-url>/erpc/request" \
    -H "Authorization: Bearer <your_apify_token>" \
    -H "content-type: application/json" \
    -d '{
        "chainId": 1,
        "calls": [
            { "method": "eth_blockNumber" },
            { "method": "eth_chainId" }
        ]
    }'
```

`chainId` is the EVM chain ID (`1` for Ethereum, `8453` for Base, `42161` for Arbitrum, ...). Every call in a batch uses the same `chainId`. `method` is any supported JSON-RPC method (`eth_call`, `eth_getLogs`, `debug_traceTransaction`, ...). `params` is that method's JSON-RPC params array.

A single call responds with one JSON-RPC object. A batch responds with an array of JSON-RPC objects, in the same order as `calls`.

#### Goldsky Feeds: Wallets and Tokens

```bash
curl -H "Authorization: Bearer <your_apify_token>" \
    "https://<your-standby-url>/feeds/wallets/balances?address=0x28C6c06298d514Db089934071355E5743bf21d60"

curl -H "Authorization: Bearer <your_apify_token>" \
    "https://<your-standby-url>/feeds/wallets/transfers?address=0x28C6c06298d514Db089934071355E5743bf21d60&chains=base,ethereum"

curl -H "Authorization: Bearer <your_apify_token>" \
    "https://<your-standby-url>/feeds/tokens?tokens=base:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
```

#### Goldsky Feeds: Prediction markets and Chain datasets

Single request:

```bash
curl -H "Authorization: Bearer <your_apify_token>" \
    "https://<your-standby-url>/polymarket/positions?address=0x0000000000002d4249a9b7976dc47d3cff1a54a2"

curl -H "Authorization: Bearer <your_apify_token>" \
    "https://<your-standby-url>/blocks/ethereum/head"
```

Batch of up to 10 requests in one HTTP call, run with bounded concurrency. The batch is a convenience; it charges one event per successful request, the same as 10 single requests:

```bash
curl -X POST "https://<your-standby-url>/polymarket/positions" \
    -H "Authorization: Bearer <your_apify_token>" \
    -H "content-type: application/json" \
    -d '{ "requests": [
        { "address": "0x0000000000002d4249a9b7976dc47d3cff1a54a2" },
        { "address": "0x1111111111111111111111111111111111111111" }
    ] }'

curl -X POST "https://<your-standby-url>/blocks/head" \
    -H "Authorization: Bearer <your_apify_token>" \
    -H "content-type: application/json" \
    -d '{ "requests": [ { "chain": "ethereum" }, { "chain": "base" } ] }'
```

`/blocks` and `/blocks/head` take each item's `chain` from the item itself, not the URL, since a batch may mix chains. The response is an array in request order. A failed item carries `{ "error": { "kind": "...", "message": "..." } }` instead of data. A failed item is never charged.

See each endpoint's full parameter list at the [Goldsky Feeds OpenAPI spec](https://edge.goldsky.com/data/openapi.json) and the [Feeds API docs](https://docs.goldsky.com/feeds/api/overview). The [Edge RPC docs](https://docs.goldsky.com/edge-rpc) list every Edge RPC method.

### Errors

`error.kind` is one of `invalid-input`, `unauthorized`, `forbidden`, `payment-required`, `not-found`, `rate-limited`, `upstream-error`, mapped to HTTP `400`, `401`, `403`, `402`, `404`, `429`, `502`. `forbidden` on `/erpc/request` means the key in `GOLDSKY_ERPC_API_KEY` is wrong or missing; Edge RPC needs its own key, separate from the Feeds key in `GOLDSKY_API_KEY`. A failed request is never charged. A request body over 1 MiB gets a connection reset, not an HTTP error response. This is well under the size of any legal batch, so it only affects a malformed or abusive client.

### Pricing (pay per event)

The Actor charges by product class:

| Event | Product class | Price | Charged |
| --- | --- | --- | --- |
| `erpc-request` | Edge RPC | $0.00001 per batch of up to 2 calls | Once per `/erpc/request` call, whatever the batch size up to 2 |
| `feeds-request` | Goldsky Feeds: Wallets and Tokens | $0.00044 per request | Once per request. Not batched. |
| `data-request` | Prediction markets and Chain datasets | $0.00001 per request | Once per successful request, whether sent singly or in a batch. A failed item is never charged. |

See the pull request that introduced this Actor, and its batching follow-up, for the price derivation from Goldsky's own per-call and per-request prices. Apify Console is the source of truth for live prices. `.actor/pay_per_event.json` is a committed reference only, and Apify does not read it.

### The cost rule

This Actor is pay-per-event only, with no separate platform-usage charge to Goldsky. In Standby mode, Apify always bills the caller for the platform usage of their own Standby requests, in addition to the event price:

> If you monetize your Actor in Standby mode using the pay-per-event pricing model only, you're not responsible for covering platform usage costs of your users' runs.

Source: [Actor pricing and costs](https://docs.apify.com/actors/monetize/pricing-and-costs.md#calculate-platform-usage-costs).

### Support

Questions about the underlying data or this Actor: <support@goldsky.com>.

# Actor input Schema

## Actor input object example

```json
{}
```

# Actor output Schema

## `standbyServer` (type: `string`):

URL of the running HTTP server that answers Goldsky Edge RPC, Feeds, and Chain dataset requests for this run. See .actor/web_server_openapi.json for the endpoint list and request/response schemas.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("goldsky/goldsky-edge").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("goldsky/goldsky-edge").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call goldsky/goldsky-edge --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,goldsky/goldsky-edge"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/zlvLSMTev2qnh2br5/builds/OI9kL4uMAASkDgteu/openapi.json
