Skip to content

fix(coins): drop totalVolumeUSD from /v1/coins response and spec - #1004

Merged
rickyrombo merged 1 commit into
mainfrom
mjp-remove-coins-total-volume-field
Aug 3, 2026
Merged

fix(coins): drop totalVolumeUSD from /v1/coins response and spec#1004
rickyrombo merged 1 commit into
mainfrom
mjp-remove-coins-total-volume-field

Conversation

@rickyrombo

Copy link
Copy Markdown
Contributor

What

Removes totalVolumeUSD from the /v1/coins response — the Go coin response struct field, its SELECT column, and the coin schema in the embedded swagger.

Why

The all-time volume stat was removed from the product (AudiusProject/apps#14542) as an unverifiable figure no other aggregator reports. Stop returning a value we don't stand behind.

Notes

  • Breaking change to the public /v1/coins response. Because the SDK is generated from the live /v1/swagger.yaml, the generated Coin model must be regenerated after this deploys (separate SDK PR).
  • The artist_coin_stats.total_volume_usd column is untouched (still written by the Birdeye CoinStatsJob), so the existing volume sort still functions — it orders by the joined column.
  • coin_insights still exposes the field: its handler uses SELECT artist_coin_stats.* + RowToStructByName, so removing it there means dropping/renaming the column or changing the query, and the column is still populated by Birdeye. Left for a separate change once CoinStatsJob is retired.

Test

go build ./api/... and go test -run Coins ./api/ pass; swagger validates as YAML.

🤖 Generated with Claude Code

The all-time volume stat was removed from the product; stop returning it from
the /v1/coins (coin) response and remove it from the swagger coin schema. The
underlying artist_coin_stats.total_volume_usd column is unchanged, so the
existing "volume" sort still works (it orders by the joined column).

Note: this is a breaking change to the public /v1/coins response. The generated
SDK Coin model must be regenerated from the served swagger after this deploys.
coin_insights still exposes the field (its handler uses SELECT * and the column
is still written by the Birdeye CoinStatsJob) — left for a separate change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rickyrombo
rickyrombo merged commit c20257d into main Aug 3, 2026
2 checks passed
@rickyrombo
rickyrombo deleted the mjp-remove-coins-total-volume-field branch August 3, 2026 22:59
rickyrombo added a commit to AudiusProject/apps that referenced this pull request Aug 4, 2026
## What
Regenerates the SDK `Coin` model after AudiusProject/api#1004 removed
`totalVolumeUSD` from the `/v1/coins` response — dropping the field from
the interface, `CoinFromJSONTyped`, and `CoinToJSON`.

## How
Ran `gen:prod` (openapi-generator against the deployed prod swagger).
Verified the change is live on prod first (`/v1/coins` no longer returns
the field). Scoped to `Coin.ts` only — the generator also surfaced
unrelated drift in `Event`/`TrackCollaboratorNotification*` models (the
committed SDK was behind prod there), which I reverted to keep this PR
focused.

## Safety
Backward-compatible. The field was optional and its generated
deserializer already handled absence (`!exists(json, 'totalVolumeUSD') ?
undefined`), so old SDK builds tolerate the missing field. The client
display usage was already removed in #14542 (merged), so no source
references the field.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant