hyperliquid-dex / hyperliquid-python-sdk

SDK for Hyperliquid API trading with Python.
MIT License
238 stars 97 forks source link

feat(hl/types): Update `SpotTokenInfo` to reflect current API responses #47

Closed rtunazzz closed 3 months ago

rtunazzz commented 3 months ago

The /info endpoint while requesting spotMeta currently returns additional evmContract & fullName properties for tokens.

This adds the missing fields.

Example response:

{
  "universe": [
    ...
  ],
  "tokens": [
    ...,
    {
      "name": "MBAPPE",
      "szDecimals": 2,
      "weiDecimals": 7,
      "index": 50,
      "tokenId": "0x03e1ad7d4d6d82b3da89ac8d35cc917b",
      "isCanonical": false,
      "evmContract": null,
      "fullName": "MBENIVINI"
    }
  ]
}