Skip to content

feat(api): add displayName and keywords to perpAnnotation#123

Merged
nktkas merged 1 commit into
nktkas:mainfrom
metro-xyz:feat/perp-annotation-display-keywords
Mar 26, 2026
Merged

feat(api): add displayName and keywords to perpAnnotation#123
nktkas merged 1 commit into
nktkas:mainfrom
metro-xyz:feat/perp-annotation-display-keywords

Conversation

@damjankuznar
Copy link
Copy Markdown
Contributor

@damjankuznar damjankuznar commented Mar 24, 2026

Updates setPerpAnnotation based on the HL API changes as posted in https://t.me/hyperliquid_api/302:

For HIP-3 deployers: setPerpAnnotation now allows specifying displayName and keywords. Display name allows deployers to indicate a different name for frontends to use, and is not permanent. The L1 name is immutable and can never be changed. All API endpoints still use the L1 name, but interfaces may substitute the display name. hl.xyz will respect the display name if it reasonably represents the tracked asset (as determined by the L1 name), only includes visible ASCII characters, does not contain colons, and starts with an alphanumeric character. The key motivation is that the L1 name and display name should be consistent enough so as to not be misleading for users. Other interfaces may apply different rules. Keywords can be used as hints to match against searches. hl.xyz will respect keywords that reasonably represent the asset being tracked.

Note for deployers: setPerpAnnotation must set all fields on each edit. Previous settings are not persisted. Deployers should set displayName: null or keywords: [] to ignore the respective field. See https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/hip-3-deployer-actions for details.

Summary

  • Add displayName (nullable string) and keywords (string array) to setPerpAnnotation action in perpDeploy exchange method
  • Add optional displayName and keywords fields to PerpAnnotationResponse info type
  • Update tests to cover the new fields

@nktkas
Copy link
Copy Markdown
Owner

nktkas commented Mar 26, 2026

LGTM

@nktkas nktkas merged commit cb891be into nktkas:main Mar 26, 2026
1 check passed
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.

2 participants