Skip to main content
The API Reference is generated from an OpenAPI 3.0 document, and so is every code sample on it. That same document is what you point a generator at, so your client’s types stay in step with the API instead of drifting from a hand-written wrapper.
Both generators below take that URL directly. Point them at a local copy instead if you want the spec pinned in your repo — regenerating then becomes a reviewable diff.

TypeScript

@hey-api/openapi-ts emits typed request functions plus the models behind them. Install it and the fetch client:
Configure it at the root of your project:
openapi-ts.config.ts
Each operation becomes a function named after its operationIdlistPositionsActive, listActivity, listSmartMoneyGlobal, and so on. Set the base URL and your API key once:
Prefer something smaller? openapi-typescript generates types only — no runtime — and pairs with openapi-fetch for the calls. Good when you already have a fetch wrapper you like.

Python

openapi-python-client generates an httpx-based package with attrs models and full type hints. By default the package is named after the spec title, which gives you data_dash_analytics_api_client. Override it:
openapi-python-client.yaml
Use AuthenticatedClient for the X-Api-Key header. It defaults to Authorization: Bearer, so set the header name and clear the prefix:
Operations live under datadash_client.api.<tag>, where the tag is the section it appears under in the reference — positions, activity, holders, profiles, signals, smart_money, cohorts. Each exposes sync, sync_detailed, asyncio and asyncio_detailed.

Things worth knowing before you generate

Responses are a root-level JSON array of rows, not an envelope. Generated return types are Row[] / list[Row] — there is no data or results field to unwrap. Pagination is driven entirely by the page you send.
tokenId is declared as type: string with format: big-integer. That format is not one OpenAPI defines, so generators fall back to plain strings — which is what you want, since a 256-bit value can’t round-trip through a JSON number. Parse it with BigInt or int() if you need arithmetic. See Position IDs for the 32-bit alternative.
Each endpoint’s filter is a union of condition shapes — numeric, text, ID, boolean, time — so the operators a generated type accepts depend on the field. If your generator flattens the union awkwardly, build the filter as a plain object literal and let the request type check the outer shape. Filtering documents the full grammar.

Next steps

API Keys

Authenticate your generated client.

Filtering

The condition and group grammar every list endpoint accepts.