Skip to content

[Medium] --token vs --symbol naming inconsistency breaks perp endpoint discovery #170

@Nicolai1205

Description

@Nicolai1205

Summary

Perp endpoints (token perp-trades, token perp-positions) require --symbol while every other token subcommand uses --token. There is no indication of this in the help or schema.

Repro

# Works fine for most token commands:
nansen research token indicators --token EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v --chain solana

# Fails for perp commands with --token (which appears correct by analogy):
nansen research token perp-trades --token BTC --limit 2

Error output:

{"success":false,"error":"Required field 'body -> token_symbol' is missing","code":"INVALID_TOKEN"}

The error exposes the internal API field name (body -> token_symbol) and gives zero hint that --symbol is the correct flag.

Correct call:

nansen research token perp-trades --symbol BTC --limit 2  # works

Impact

Medium. Agents and users reasoning by analogy from other token subcommands will always use --token. The error provides no corrective signal. An agent would need to read the schema carefully to discover --symbol exists.

Options

  1. Accept both --token and --symbol as aliases for perp endpoints (preferred for agent compatibility)
  2. Rename --symbol to --token on perp endpoints for consistency
  3. At minimum: update the error message to mention --symbol explicitly

Found during

Clawfooding session on v1.10.1. Referenced in PR #167.

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