Logo
New RPC users get 35% off their first monthView the offer
OnFinality Learn
Integration & Development11 min read

Is the Polymarket API Free? Public Data, Auth, and Real Cost of Running a Bot

A practical breakdown of what the Polymarket API gives you for free, where authentication and rate limits change the picture, and how to measure your real cost before you scale a trading or analytics bot.

TL;DR

The Polymarket API is free to use: there is no subscription, no paid data tier, and no API key you have to buy. Public reads through the Gamma and CLOB APIs need no authentication, and trading endpoints use wallet-based authentication rather than a metered billing account. The costs that actually matter are indirect: rate limits, the engineering time to index historical data yourself, and the RPC infrastructure your bot needs to read chain state and submit transactions. This article separates documented free access from the costs you must measure, then gives you a reproducible procedure to estimate your own bill.

Direct answer and scope of this guide

Yes, the Polymarket API is free. Polymarket does not sell API access. There is no paid tier, no per-request invoice, and no API key to purchase. Public market data, order books, price history, and event metadata are readable without authentication, and order placement is authenticated with your wallet rather than a billing account.

That answer is short, but it is not the whole cost picture. The question "is the Polymarket API free" usually hides a second question: what will it cost me to run something on top of it? This guide separates three things that are easy to conflate: documented free access, the indirect costs of rate limits and self-managed indexing, and the infrastructure costs you must measure yourself. It does not publish invented benchmark numbers; it gives you a procedure to produce your own.

  • Free: public reads of markets, events, order books, and prices.
  • Free: order placement and cancellation, authenticated by wallet signature.
  • Not free: your time to build historical indexing, and the RPC or node capacity behind any on-chain reads or writes.
  • Not free: third-party data providers that resell indexed Polymarket history.

Assumptions and prerequisites

This article assumes you are a developer evaluating Polymarket as a data source or execution venue. You should be comfortable with HTTP, JSON, and one scripting language. The examples use curl and Python because they are the shortest path to a verifiable result.

You do not need an account to follow the read-only examples. For the trading example you need a funded wallet on Polygon and a clear understanding that placing an order is a real financial action. Treat every write example as production code, not a sandbox toy.

  • Python 3.9 or newer with the requests library.
  • curl for quick endpoint checks.
  • A Polygon wallet only if you intend to trade; never commit a private key.
  • An RPC endpoint if you plan to read chain state or submit transactions directly.

How the free access model actually works

Polymarket exposes several distinct surfaces, and they are free for different reasons. The Gamma API is the discovery layer: markets, events, tags, and metadata. It is public and does not require authentication for reads. The CLOB API is the trading layer: order books, prices, and order management. Its read endpoints are public, and its write endpoints authenticate the wallet that signs the order.

Because authentication is wallet-based rather than account-based, there is no billing relationship to meter. Polymarket is not charging you per call; it is protecting the venue with rate limits and signature checks. That distinction matters when you plan capacity: your ceiling is not a budget line, it is a request-rate ceiling and a signing workflow.

A useful mental model is a public library with a trading desk inside. Anyone can walk in and read the catalog and the shelves. To place an order at the desk you must prove who you are with a signature, but you still are not paying an entrance fee. What you pay for is the transport to get there and the staff you hire to work the shelves efficiently.

Verifying free public reads with curl

The fastest way to confirm that public reads are unauthenticated is to call a read endpoint with no headers beyond the defaults. If you get structured JSON back, the endpoint is open. Run these against the documented base hosts and inspect the status code and body shape.

The exact hostnames and paths are documented by Polymarket and can change; substitute the current documented base URL where the placeholder appears. The point of the exercise is the behavior, not a hardcoded URL.

# Confirm an unauthenticated read returns JSON
curl -sS -o /tmp/markets.json -w "%{http_code}\n" \
  "https://GAMMA_API_HOST/markets?limit=5"

# Inspect the shape without dumping the whole payload
python3 - <<'PY'
import json
with open('/tmp/markets.json') as f:
    data = json.load(f)
print(type(data).__name__, len(data) if hasattr(data, '__len__') else '')
first = data[0] if isinstance(data, list) and data else data
print(sorted(first.keys())[:12] if isinstance(first, dict) else first)
PY

Expected verification result

A successful unauthenticated read returns HTTP 200 and a JSON array or object. If you instead receive 401 or 403, you are either calling an authenticated endpoint or the host has changed. If you receive 429, you have hit a rate limit, which is the first real cost signal you will encounter.

Record the outcome in a small table so you can compare endpoints and later compare your own runs. Do not fill in numbers you did not observe; leave the cells blank until you run the check.

  • | Check | Expected | Observed |
  • | Public markets read | 200, JSON | (record your result) |
  • | Public order book read | 200, JSON | (record your result) |
  • | Authenticated order placement without signature | 401/403 | (record your result) |
  • | Burst of reads beyond your budget | 429 | (record your result) |

Where authentication changes the cost picture

Trading endpoints require a signed order. The signature proves the wallet controls the funds; it does not create a bill. The practical cost is operational: you must manage keys securely, sign correctly, and handle nonce and order-state errors. A bot that retries a failed signature can double-submit, and that is a financial loss, not an API fee.

The other authentication-adjacent cost is the RPC layer. If your bot reads on-chain state, checks balances, or submits transactions directly, you are consuming RPC capacity. That capacity is where a free API can still produce a monthly bill. For a broader treatment of endpoint selection, see the guide to RPC endpoints and the network directory.

  • Wallet signatures replace API keys for writes.
  • Key management and retry logic are your responsibility.
  • On-chain reads and transaction submission consume RPC capacity, which is a separate cost center.

Measuring your real cost with a reproducible load test

Because Polymarket does not publish a price list for API access, the only honest cost estimate is one you measure. Build a small harness that issues reads at a controlled rate, records status codes and latency, and stops when it sees 429. Run it against a staging copy of your logic, never against production order flow.

The script below is deliberately conservative. It ramps request rate in steps, records the first rate-limit response, and prints a table you can paste into your own notes. It does not invent a limit; it discovers the limit your client observes at that moment.

import time, statistics, requests

BASE = "https://GAMMA_API_HOST"  # replace with documented host
PATH = "/markets"

def probe(rate_per_sec, duration=10):
    interval = 1.0 / rate_per_sec
    latencies, codes = [], []
    start = time.time()
    while time.time() - start < duration:
        t0 = time.time()
        try:
            r = requests.get(BASE + PATH, params={"limit": 5}, timeout=5)
            codes.append(r.status_code)
        except requests.RequestException as e:
            codes.append(type(e).__name__)
        latencies.append((time.time() - t0) * 1000)
        time.sleep(max(0, interval - (time.time() - t0)))
    return codes, latencies

print("rate | n | 429s | p50_ms | p95_ms")
for rate in (1, 2, 5, 10):
    codes, lat = probe(rate)
    n429 = sum(1 for c in codes if c == 429)
    p50 = statistics.median(lat)
    p95 = sorted(lat)[int(len(lat) * 0.95) - 1]
    print(f"{rate:>4} | {len(codes):>3} | {n429:>4} | {p50:>6.1f} | {p95:>6.1f}")

Reading the results table without fooling yourself

Your table will show a rate at which 429s appear. That number is specific to your IP, your client, and the moment you ran the test. It is not a published quota and it may change. Use it as a planning input, not a contract.

The more useful column is p95 latency. If latency rises sharply before 429s appear, your client is already near a soft ceiling and should back off. A well-behaved client uses exponential backoff with jitter and caches responses that do not change often, such as market metadata. Caching is the cheapest rate-limit mitigation available and it costs nothing but a dictionary and a TTL.

  • Treat observed 429 thresholds as environment-specific, not universal.
  • Cache slow-changing metadata aggressively.
  • Back off on latency growth, not only on explicit 429s.
  • Re-run the harness after any change to your request pattern.

Troubleshooting common free-tier surprises

Most surprises are not billing surprises; they are behavior surprises. A read that worked yesterday returns 401 today because the path moved to an authenticated surface. A burst that was fine in development trips 429 in production because a second process shares the same egress IP. A historical query returns only a recent window because the public API is not a full archive.

Work through these in order: confirm the endpoint is documented as public, confirm you are not sharing an egress IP with a noisy process, confirm your client honors Retry-After, and confirm you are not expecting history the public surface does not serve.

  • 401/403: endpoint is authenticated or the host changed.
  • 429: rate limit; honor Retry-After and add jitter.
  • Empty history: the public API is not a full archive; you need your own indexing or a data provider.
  • Inconsistent order state: signature or nonce handling, not an API fee.

Limitations and tradeoffs of the free model

Free access is generous, but it is not a service-level agreement. There is no paid tier to buy priority, so your throughput is bounded by shared limits and your own engineering. If you need guaranteed capacity, cross-market aggregation, or long historical backfills, the honest answer is that you will pay someone, either in infrastructure or in a data subscription.

The tradeoff is straightforward. The free API is excellent for discovery, dashboards, and moderate-frequency trading. It is a poor fit for high-frequency strategies that need dedicated throughput, and it is not a substitute for an indexer if you need years of trade history. Plan for that gap explicitly rather than discovering it in production.

  • No paid tier means no purchased priority.
  • Historical depth is limited on public surfaces.
  • High-frequency strategies need dedicated infrastructure.
  • Third-party indexers fill the history gap at a real cost.

Next steps for a cost-aware build

Start with the free reads and a caching layer. Measure your observed rate ceiling with the harness above. Then decide whether your workload needs dedicated RPC capacity for on-chain reads and transaction submission. If it does, compare dedicated node options and review RPC pricing before you scale.

For concrete endpoint and provider choices, use the RPC Assistant rather than guessing. It keeps the recommendation short and current, while this guide stays focused on the method. A sensible sequence is: verify free reads, measure limits, add caching, then provision infrastructure only for the parts that actually need it.

  • Verify public reads and record your own results table.
  • Measure rate limits and latency with a controlled harness.
  • Add caching and backoff before adding infrastructure.
  • Provision dedicated RPC capacity only where on-chain access is required.

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started