Skip to content

URGENT: 'public, no auth' endpoint claims are wrong across the entire SDK suite #9

@pimfeltkamp

Description

@pimfeltkamp

Iter-52 ran an end-to-end smoke test against the live API and discovered that none of the endpoints documented as "public, no auth needed" across the SDK suite actually accept anonymous calls. Every request to api.cryptohopper.com/v1/* with no/invalid Authorization header is rejected by the AWS API Gateway in front of the API.

This affects published SDKs, freshly-merged wiki content, and pending PRs. Filing as urgent because it's a correctness bug that will bite the first user who tries to call exchange.ticker without a real OAuth token.

Reproduction

$ curl -sS -o /dev/null -w "HTTP %{http_code}\n" \
    "https://api.cryptohopper.com/v1/exchange/ticker?exchange=binance&market=BTC/USDT"
HTTP 405

$ curl -sS \
    "https://api.cryptohopper.com/v1/exchange/ticker?exchange=binance&market=BTC/USDT"
{"status":400,"error":1,"message":"Missing Authentication Token"}

405 + "Missing Authentication Token" is the AWS API Gateway boilerplate response when no valid auth is provided to a route gated by an authorizer. The Cryptohopper application never sees the request — the gateway rejects it first.

With a placeholder Authorization: Bearer xxx...xxx, the gateway falls through to AWS SigV4 parsing and returns:

{"status":400,"error":1,"message":"Invalid key=value pair (missing equal-sign) in Authorization header (hashed with SHA-256 and encoded with Base64): 'A1uOw8utuISJ8z773lvbGk9w/aFfOrmJz9/ParLb8YU='."}

That's a definitive signal the gateway expects a token mapped to AWS IAM, not a stand-alone bearer.

Endpoints I documented as "public" that don't actually work

Endpoint Documented as Actual behaviour
/exchange/ticker public 405 without token
/exchange/markets public 405 without token
/exchange/exchanges public 405 without token
/exchange/candle public 405 without token
/exchange/orderbook public 405 without token
/exchange/forex-rates public 405 without token
/market/homepage public "Missing required request parameters: [access-token]"
/market/items public likely same
/market/signals public likely same
/tournaments/active public likely same
/platform/* public likely same

Where the wrong claim has shipped

This is the painful part. The wrong "public, no auth" claim is in:

  1. Every SDK README — installed by anyone running pip install cryptohopper, npm i @cryptohopper/sdk, etc.
  2. Every SDK wikiRecipes.md has "public ticker" snippets that won't run; Comparison.md (which I just rolled out to all 9 wikis in iter 50 + 51) has a public-endpoint anonymity note.
  3. CLI README — claims cryptohopper ticker binance BTC/USDT works without auth.
  4. Pending PR Add docs/sdks.md — public overview of the SDK suite #3 (docs/sdks.md) — likely mentions it.
  5. Pending PR Add Developer SDKs and CLI section to main README #5 (main README SDK section) — fine, doesn't make this claim.
  6. Node SDK examples folder (PR Enable CodeQL on 6 SDK repos (default-setup, no workflow file needed) #8)public-ticker.ts claims to need no token. Won't actually work.

Why this slipped through

  • SDK CI uses mocks (vitest/pytest-httpx/wiremock/MockClient/etc.) for transport tests. Unit tests passed with green.
  • The original plan (reference) wrote down "public endpoints accept anonymous calls" based on the swagger 2.0 file in public_html/CryptohopperAPI_1.0.0_swagger.json — the swagger doesn't model the AWS gateway authorizer that actually fronts production.
  • No SDK or CLI release has been smoke-tested end-to-end against the live API.

What needs to happen

1. Stop the bleed

Remove the "public, no auth" claim from:

I can put up a sweep PR per repo if you signal go. Wiki side is direct push (no PR queue impact).

2. Confirm what (if anything) is actually anonymous

Worth asking the API team directly: are there ANY paths on api.cryptohopper.com/v1/* that are gateway-public? If yes, list them; if no, the SDKs should be honest about it.

3. Add a real e2e smoke test to the suite

Even a single integration test per SDK that makes ONE authenticated call against the live API (using a CI-stored test token) would have caught this in seconds. Worth adding to the release workflow.

My current recommendation

Treat this as a doc bug, not a code bug. The SDK transport is correct (sends Authorization: Bearer <token> like the docs say). The only thing broken is the claim that some endpoints can be hit without that token.

Easiest path:

  1. Now: I push wiki updates (no PR) striking the "public, no auth" claim from every Recipes + Comparison page. ~9 commits, no review.
  2. PR pass per SDK: small PR to each SDK README + Recipes page corrections. (Adds to queue but they're 1-3 line edits each.)
  3. Decision before next release: do we want any actual anonymous endpoints? If yes, the API team needs to configure the gateway accordingly. If no, every SDK example needs a real token.

Going to wait for your signal before sweeping. Wanted to surface this fast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions