API Migration
When part of the API is scheduled for removal or replacement, we announce it ahead of time and signal it on the wire so your integration never breaks without warning. This page explains each deprecation signal, lists everything that is currently deprecated, and shows how to migrate.
New deprecations and removals are announced in the API Changelog. Deprecated fields remain accepted during their migration window. For deprecated endpoints, any scheduled sunset is at least 90 days after deprecation begins.
Deprecated endpoints: Deprecation, Sunset and Link headers
Responses from a deprecated endpoint carry a Deprecation header and may include other standard lifecycle headers:
Deprecation: @1768435200
Sunset: Tue, 30 Jun 2026 00:00:00 GMT
Link: <https://docs.nansen.ai/api-migration>; rel="deprecation"Sunset only appears once a removal date has been decided, and Link only appears when migration documentation is configured. An endpoint can be deprecated without either one. All three headers are readable from browser-based clients.
Deprecated request fields: the Warning header
Some endpoints have individual request fields that were replaced by better alternatives. The old field keeps working, but if your request includes one, the response carries a Warning: 299 header telling you what to use instead:
Warning: 299 - "The 'date_range' parameter is deprecated. Use 'date' instead."The warning only appears when your request actually sends the deprecated field — requests that omit it are unaffected. If a request uses several deprecated fields, the warnings are comma-separated in a single header:
Warning: 299 - "The 'date' parameter is deprecated. Use 'timeframe' instead.", 299 - "The 'filters.only_smart_money' parameter is deprecated. Use 'trader_type' instead."Deprecated fields are also marked deprecated: true in the OpenAPI specification, so generated clients and API tooling flag them at build time.
Currently deprecated request fields
POST /api/v1/token-screener
date
timeframe
POST /api/v1/token-screener
filters.only_smart_money
filters.trader_type
POST /api/v1/perp-screener
filters.only_smart_money
filters.trader_type
POST /api/v1/tgm/token-ohlcv
date_range
date
POST /api/v1/prediction-market/market-screener
sort_by
order_by
POST /api/v1/prediction-market/event-screener
sort_by
order_by
POST /api/v1/prediction-market/ohlcv
sort
order_by
POST /api/v1/prediction-market/top-holders
sort
order_by
POST /api/v1beta1/token-screener/historical
only_smart_money
trader_type
only_smart_money → trader_type
Map only_smart_money: true to trader_type: "sm"; when it is false, omit trader_type to keep the default behavior. trader_type also supports endpoint-specific cohorts such as whale, public_figure, trending, and high_winrate_hl_perps_trader — check the endpoint schema for its accepted values. When both fields are sent, trader_type wins.
Before:
After:
date → timeframe (Token Screener)
Use a named window (5m, 10m, 1h, 6h, 24h, 7d, 30d) instead of an explicit date range. The two fields cannot be combined in one request.
Before:
After:
date_range → date (Token OHLCV)
The replacement uses from/to keys instead of start/end. Sending both fields is rejected with a validation error.
Before:
After:
sort / sort_by → order_by (Prediction Markets)
order_by takes a list of sort criteria, each with a field and a direction. For the OHLCV and Top Holders endpoints, sort already had this shape — only the name changes.
Before:
After:
Recommended migration process
Watch the API Changelog — new deprecations and removals are announced there.
Log deprecation signals in your client. Check responses for
Warning,DeprecationandSunsetheaders and surface them in your logs or monitoring. This turns a future removal into a routine ticket instead of an outage.Migrate to the replacement shown in the
Warningmessage or the table above.Confirm the signal is gone. Once your requests no longer use a deprecated field, the
Warningheader disappears.
Last updated
Was this helpful?