
# Point de terminaison info {#info-endpoint}

Le point de terminaison info est utilisé pour récupérer des informations sur l'échange et des utilisateurs spécifiques. Les différents corps de requête entraînent différents schémas de corps de réponse correspondants.

### Pagination

Les réponses qui prennent une plage de temps ne renvoient que des éléments 500 ou des blocs de données distincts. Pour interroger de plus grandes plages, utilisez le dernier horodatage retourné comme prochaine `startTime` pour la pagination.

### Contrats perpétuels et marché au comptant {#perpetuals-vs-spot}

Les points de terminaison de cette section ainsi que les abonnements websocket fonctionnent à la fois pour Perpetuals et Spot. Pour les perpétuels `coin` est le nom retourné dans la réponse `meta`. Pour Spot, coin devrait être `PURR/USDC` pour PURR, et `@{index}` par exemple `@1` pour tous les autres jetons spot où index est l'index de la paire spot dans le champ `universe` de la réponse `spotMeta`. Par exemple, l'indice de spot pour HYPE sur le réseau principal est `@107` parce que l'indice de jeton de HYPE est 150 et la paire de spot `@107` a des jetons `[150, 0]`. Notez que certaines ressources peuvent être remappées sur les interfaces utilisateur. Par exemple, `BTC/USDC` sur app.hyperliquid.xyz correspond à `UBTC/USDC` sur le réseau principal HyperCore. Le nom L1 sur le [Détails du jeton page](https://app.hyperliquid.xyz/explorer/token/0x8f254b963e8468305d409b33aa137c67) peut être utilisé pour détecter les remappages.

### Adresse de l’utilisateur {#user-address}

Pour interroger les données de compte associées à un compte principal ou secondaire, vous devez transmettre l'adresse réelle de ce compte. Un piège courant consiste à utiliser l'adresse d'un portefeuille d'agent qui conduit à un résultat vide.

## Récupérer les mids pour toutes les pièces {#retrieve-mids-for-all-coins}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

Notez que si le livre est vide, le dernier prix de transaction sera utilisé comme repli.

#### En-têtes {#headers}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "allMids" |
| dex                                    | String | Nom de dex perp. Par défaut, la chaîne vide représente le premier dex perp. Les mids spots ne sont inclus qu'avec le premier dex perp. |


**200: OK Réponse réussie**


```json
{
    "APE": "4.33245",
    "ARB": "1.21695"
}
```


## Récupérer les commandes ouvertes d'un utilisateur {#retrieve-a-users-open-orders}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

Voir les commandes ouvertes d'un utilisateur

#### En-têtes {#headers_1}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_1}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "openOrders" |
| user<mark style="color:red;">\*</mark> | String | Adresse au format 42-caractère hexadécimal; par exemple 0x0000000000000000000000000000000000000000. |
| dex                                    | String | Nom du dex perp. Valeur par défaut de la chaîne vide qui représente le premier dex perp. Les commandes ponctuelles ouvertes ne sont incluses qu'avec le premier dex perp. |


**200: OK Réussir R**


```json
[
    {
        "coin": "BTC",
        "limitPx": "29792.0",
        "oid": 91490942,
        "side": "A",
        "sz": "0.0",
        "timestamp": 1681247412573
    }
]
```


## Récupérer les commandes ouvertes d'un utilisateur avec des informations frontales supplémentaires {#retrieve-a-users-open-orders-with-additional-frontend-info}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_2}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_2}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "frontendOpenOrders" |
| user<mark style="color:red;">\*</mark> | String | Adresse au format 42-caractère hexadécimal; par exemple 0x0000000000000000000000000000000000000000. |
| dex                                    | String | Nom du dex perp. Valeur par défaut de la chaîne vide qui représente le premier dex perp. Les commandes ponctuelles ouvertes ne sont incluses qu'avec le premier dex perp. |


**200: OK**


```json
[
    {
        "coin": "BTC",
        "isPositionTpsl": false,
        "isTrigger": false,
        "limitPx": "29792.0",
        "oid": 91490942,
        "orderType": "Limit",
        "origSz": "5.0",
        "reduceOnly": false,
        "side": "A",
        "sz": "5.0",
        "timestamp": 1681247412573,
        "triggerCondition": "N/A",
        "triggerPx": "0.0",
    }
]
```


## Récupérer les remplissages d'un utilisateur {#retrieve-a-users-fills}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

Retourne au plus 2000 remplissages les plus récents

#### En-têtes {#headers_3}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_3}

| Nom | Type | Description |
| -------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "userFills" |
| user<mark style="color:red;">\*</mark> | String | Adresse au format 42-caractère hexadécimal; par exemple 0x0000000000000000000000000000000000000000. |
| aggregateByTime                        | bool   | Lorsque true, les remplissages partiels sont combinés lorsqu'un ordre de croisement est rempli par plusieurs ordres de repos différents. Les ordres de repos remplis par plusieurs ordres de croisement ne sont agrégés que si dans le même bloc. |


**200: OK**


```json
[
    // Perp fill (first perp dex)
    {
        "closedPnl": "0.0",
        "coin": "AVAX",
        "crossed": false,
        "dir": "Open Long",
        "hash": "0xa166e3fa63c25663024b03f2e0da011a00307e4017465df020210d3d432e7cb8",
        "oid": 90542681,
        "px": "18.435",
        "side": "B",
        "startPosition": "26.86",
        "sz": "93.53",
        "time": 1681222254710,
        "fee": "0.01", // the total fee, inclusive of builderFee below
        "feeToken": "USDC",
        "builderFee": "0.01", // this is optional and will not be present if 0
        "tid": 118906512037719
    },
    // Perp Fill (HIP-3)
    {
        "coin": "xyz:XYZ100", // For HIP-3, the asset has the dex name as a prefix
        "px": "25372.0",
        "sz": "0.0353",
        "side": "B",
        "time": 1767651180109,
        "startPosition": "0.7045",
        "dir": "Open Long",
        "closedPnl": "0.0",
        "hash": "0xa166e3fa63c25663024b03f2e0da011a00307e4017465df020210d3d432e7cb9",
        "oid": 287286372177,
        "crossed": false,
        "fee": "0.026868",
        "tid": 164087028129848,
        "feeToken":" USDC"
    },
    // Spot fill - note the difference in the "coin" format. Refer to 
    // https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/asset-ids
    // for more information on how spot asset IDs work
    {
        "coin": "@107",
        "px": "18.62041381",
        "sz": "43.84",
        "side": "A",
        "time": 1735969713869,
        "startPosition": "10659.65434798",
        "dir": "Sell",
        "closedPnl": "8722.988077",
        "hash": "0x2222138cc516e3fe746c0411dd733f02e60086f43205af2ae37c93f6a792430b",
        "oid": 59071663721,
        "crossed": true,
        "fee": "0.304521",
        "tid": 907359904431134,
        "feeToken": "USDC"
    }
]
```


## Récupérer les remplissages d'un utilisateur par temps {#retrieve-a-users-fills-by-time}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

Retourne au plus 2000 remplit par réponse et seulement les remplissages les plus récents de 10000 sont disponibles

#### En-têtes {#headers_4}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_4}

| Nom | Type | Description |
| ------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark>      | String | userFillsByTime |
| user<mark style="color:red;">\*</mark>      | String | Adresse au format 42-caractère hexadécimal; par exemple 0x0000000000000000000000000000000000000000. |
| startTime<mark style="color:red;">\*</mark> | int    | Heure de début en millisecondes, inclusivement |
| endTime                                     | int    | Heure de fin en millisecondes, inclusive. Par défaut, heure actuelle. |
| aggregateByTime                             | bool   | Lorsque true, les remplissages partiels sont combinés lorsqu'un ordre de croisement est rempli par plusieurs ordres de repos différents. Les ordres de repos remplis par plusieurs ordres de croisement ne sont agrégés que si dans le même bloc. |


**200: OK Le nombre de remplissages est limité à 2000**


```json
[
    // Perp fill (first perp dex)
    {
        "closedPnl": "0.0",
        "coin": "AVAX",
        "crossed": false,
        "dir": "Open Long",
        "hash": "0xa166e3fa63c25663024b03f2e0da011a00307e4017465df020210d3d432e7cb8",
        "oid": 90542681,
        "px": "18.435",
        "side": "B",
        "startPosition": "26.86",
        "sz": "93.53",
        "time": 1681222254710,
        "fee": "0.01", // the total fee, inclusive of builderFee below
        "feeToken": "USDC",
        "builderFee": "0.01", // this is optional and will not be present if 0
        "tid": 118906512037719
    },
    // Perp Fill (HIP-3)
    {
        "coin": "xyz:XYZ100", // For HIP-3, the asset has the dex name as a prefix
        "px": "25372.0",
        "sz": "0.0353",
        "side": "B",
        "time": 1767651180109,
        "startPosition": "0.7045",
        "dir": "Open Long",
        "closedPnl": "0.0",
        "hash": "0xa166e3fa63c25663024b03f2e0da011a00307e4017465df020210d3d432e7cb9",
        "oid": 287286372177,
        "crossed": false,
        "fee": "0.026868",
        "tid": 164087028129848,
        "feeToken":" USDC"
    },
    // Spot fill - note the difference in the "coin" format. Refer to 
    // https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/asset-ids
    // for more information on how spot asset IDs work
    {
        "coin": "@107",
        "px": "18.62041381",
        "sz": "43.84",
        "side": "A",
        "time": 1735969713869,
        "startPosition": "10659.65434798",
        "dir": "Sell",
        "closedPnl": "8722.988077",
        "hash": "0x2222138cc516e3fe746c0411dd733f02e60086f43205af2ae37c93f6a792430b",
        "oid": 59071663721,
        "crossed": true,
        "fee": "0.304521",
        "tid": 907359904431134,
        "feeToken": "USDC"
    }
]
```


## Interroger les limites de taux des utilisateurs {#query-user-rate-limits}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### Corps de la requête {#request-body_5}

| Nom | Type | Description |
| ---- | ------ | ------------------------------------------------------------------------------------------- |
| user | String | Adresse au format 42-caractère hexadécimal; par exemple 0x0000000000000000000000000000000000000000 |
| type | String | userRateLimit |


**200: OK Une réponse réussie**


```json
{
  "cumVlm": "2854574.593578",
  "nRequestsUsed": 2890, // max(0, cumulative_used minus reserved)
  "nRequestsCap": 2864574, 
  "nRequestsSurplus": 0, // max(0, reserved minus cumulative_used)
}
```


## Statut de l'ordre d'interrogation par oid ou cloid {#query-order-status-by-oid-or-cloid}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### Corps de la requête {#request-body_6}

| Nom | Type | Description |
| -------------------------------------- | ---------------- | -------------------------------------------------------------------------------------------- |
| user<mark style="color:red;">\*</mark> | String           | Adresse au format 42-caractère hexadécimal; par exemple 0x0000000000000000000000000000000000000000. |
| type<mark style="color:red;">\*</mark> | String           | "orderStatus" |
| oid<mark style="color:red;">\*</mark>  | uint64 or string | Soit u64 représentant l'identifiant d'ordre, soit 16-octet hexadécimal représentant l'identifiant d'ordre client. |

Les \<status> string retourné a les valeurs possibles suivantes :

| Statut de la commande | Explication |
| ----------------------------------------- | --------------------------------------------------------------------------------- |
| ouvert | Placé avec succès |
| remplie | Remplis |
| Annulé | Annulé par l'utilisateur |
| déclenché | Ordre de déclenchement déclenché |
| rejeté | Rejeté au moment du placement |
| marginCanceled | Annulé parce que la marge est insuffisante pour remplir |
| vaultWithdrawalCanceled | Vaults uniquement. Annulé en raison du retrait d'un utilisateur du coffre |
| openInterestCapCanceled | Annulé en raison d'une commande trop agressive lorsque l'intérêt ouvert était au plafond |
| selfTradeCanceled | Annulé en raison de la prévention de l'auto-commerce |
| reduceOnlyCanceled | Ordre réduit-seulement annulé qui ne réduit pas la position |
| siblingFilledCanceled | TP/SL uniquement. Annulé en raison de la commande de frères et sœurs en cours de remplissage |
| delistedCanceled | Annulé en raison de la radiation des actifs |
| liquidatedCanceled | Annulé en raison de la liquidation |
| scheduledCancel | API uniquement. Annulé en raison du dépassement de la date limite d'annulation prévue (interrupteur de l'homme mort) |
| tickRejected | Rejeté en raison d'un prix de tick invalide |
| minTradeNtlRejected | Rejeté en raison d'une commande théorique inférieure au minimum |
| perpMarginRejected | Rejeté en raison d'une marge insuffisante |
| reduceOnlyRejected | Rejeté en raison de réduire seulement |
| badAloPxRejected | Rejeté en raison d'un match immédiat |
| iocCancelRejected | Rejeté en raison de IOC pas en mesure de correspondre |
| badTriggerPxRejected | Rejeté en raison d'un prix TP/SL invalide |
| marketOrderNoLiquidityRejected | Rejeté en raison d'un manque de liquidité pour l'ordre au marché |
| positionIncreaseAtOpenInterestCapRejected | Rejeté en raison d'un plafond d'intérêt ouvert |
| positionFlipAtOpenInterestCapRejected | Rejeté en raison d'un plafond d'intérêt ouvert |
| tooAggressiveAtOpenInterestCapRejected | Rejeté en raison du prix trop agressif au plafond d'intérêt ouvert |
| openInterestIncreaseRejected | Rejeté en raison d'un plafond d'intérêt ouvert |
| insufficientSpotBalanceRejected | Rejeté en raison d'un solde insuffisant |
| oracleRejected | Rejeté à cause du prix trop éloigné de l'oracle |
| perpMaxPositionRejected | Rejeté en raison du dépassement de la limite de niveau de marge à l'effet de levier actuel |


**200: OK Une réponse réussie**


```json
{
  "status": "order",
  "order": {
    "order": {
      "coin": "ETH",
      "side": "A",
      "limitPx": "2412.7",
      "sz": "0.0",
      "oid": 1,
      "timestamp": 1724361546645,
      "triggerCondition": "N/A",
      "isTrigger": false,
      "triggerPx": "0.0",
      "children": [],
      "isPositionTpsl": false,
      "reduceOnly": true,
      "orderType": "Market",
      "origSz": "0.0076",
      "tif": "FrontendMarket",
      "cloid": null
    },
    "status": <status>,
    "statusTimestamp": 1724361546645
  }
}
```



**200: OK Ordre manquant**


```json
{
  "status": "unknownOid"
}
```


## L2 livre instantané {#l2-book-snapshot}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

Retourne au plus 20 niveaux par côté

**En-têtes**

| Nom | Valeur |
| ---------------------------------------------- | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | "application/json" |

**Corps**

| Nom | Type | Description |
| -------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "l2Book" |
| coin<mark style="color:red;">\*</mark> | String | pièce |
| nSigFigs                               | Number | Champ facultatif pour agréger les niveaux à `nSigFigs` Les valeurs valides sont 2, 3, 4, 5, et `null`, ce qui signifie une précision totale |
| mantissa                               | Number | Champ facultatif pour agréger les niveaux. Ce champ n'est autorisé que si nSigFigs vaut 5. Accepte les valeurs de 1, 2 ou 5. |

**Réponse**


**200: OK**


```json
{
  "coin": "BTC",
  "time": 1754450974231,
  "levels": [
    [
      {
        "px": "113377.0",
        "sz": "7.6699",
        "n": 17 // number of levels
      },
      {
        "px": "113376.0",
        "sz": "4.13714",
        "n": 8
      },
    ],
    [
      {
        "px": "113397.0",
        "sz": "0.11543",
        "n": 3
      }
    ]
  ]
}
```


## Bougie instantané {#candle-snapshot}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

Les bougies 5000 les plus récentes sont disponibles

Intervalles pris en charge: "1m", "3m", "5m", "15m", "30m", "1h", "2h", "4h", "8h", "12h", "1d", "3d", "1w", "1M"

**En-têtes**

| Nom | Valeur |
| ---------------------------------------------- | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | "application/json" |

**Corps**

| Nom | Type | Description |
| -------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "candleSnapshot" |
| req<mark style="color:red;">\*</mark>  | Object | <p>{"coin": \<coin>, "interval": "15m", "startTime": \<epoch millis>, "endTime": \<epoch millis>}<br>Pour HIP-3, vous devez préfixer avec le nom de dex, par exemple "xyz:XYZ100"</p> |

**Réponse**


**200: OK**


```json
[
  {
    "T": 1681924499999,
    "c": "29258.0",
    "h": "29309.0",
    "i": "15m",
    "l": "29250.0",
    "n": 189,
    "o": "29295.0",
    "s": "BTC",
    "t": 1681923600000,
    "v": "0.98639"
  }
]
```


## Vérifiez l'approbation des frais de construction {#check-builder-fee-approval}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

**En-têtes**

| Nom | Valeur |
| ---------------------------------------------- | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | "application/json" |

**Corps**

| Nom | Type | Description |
| ----------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark>    | String | "maxBuilderFee" |
| user<mark style="color:red;">\*</mark>    | String | Adresse au format 42-caractère hexadécimal; par exemple 0x0000000000000000000000000000000000000000. |
| builder<mark style="color:red;">\*</mark> | String | Adresse au format 42-caractère hexadécimal; par exemple 0x0000000000000000000000000000000000000000. |

**Réponse**


**200: OK**


```json
1 // maximum fee approved in tenths of a basis point i.e. 1 means 0.001%
```


## Récupérer les commandes historiques d'un utilisateur {#retrieve-a-users-historical-orders}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

Retourne au plus 2000 commandes historiques les plus récentes

#### En-têtes {#headers_5}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_7}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "historicalOrders" |
| user<mark style="color:red;">\*</mark> | String | Adresse au format 42-caractère hexadécimal; par exemple 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
[
  {
    "order": {
      "coin": "ETH",
      "side": "A",
      "limitPx": "2412.7",
      "sz": "0.0",
      "oid": 1,
      "timestamp": 1724361546645,
      "triggerCondition": "N/A",
      "isTrigger": false,
      "triggerPx": "0.0",
      "children": [],
      "isPositionTpsl": false,
      "reduceOnly": true,
      "orderType": "Market",
      "origSz": "0.0076",
      "tif": "FrontendMarket",
      "cloid": null
    },
    "status": "filled" | "open" | "canceled" | "triggered" | "rejected" | "marginCanceled",
    "statusTimestamp": 1724361546645
  }
]
```


## Récupérer les remplissages de tranche TWAP d'un utilisateur {#retrieve-a-users-twap-slice-fills}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

Retourne au plus 2000 le plus récent TWAP

#### En-têtes {#headers_6}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_8}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "userTwapSliceFills" |
| user<mark style="color:red;">\*</mark> | String | Adresse au format 42-caractère hexadécimal; par exemple 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
[
    {
        "fill": {
            "closedPnl": "0.0",
            "coin": "AVAX",
            "crossed": true,
            "dir": "Open Long",
            "hash": "0x0000000000000000000000000000000000000000000000000000000000000000", // TWAP fills have a hash of 0
            "oid": 90542681,
            "px": "18.435",
            "side": "B",
            "startPosition": "26.86",
            "sz": "93.53",
            "time": 1681222254710,
            "fee": "0.01",
            "feeToken": "USDC",
            "tid": 118906512037719
        },
        "twapId": 3156
    }
]
```


## Récupérer les sous-comptes d'un utilisateur {#retrieve-a-users-subaccounts}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_7}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_9}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "subAccounts" |
| user<mark style="color:red;">\*</mark> | String | Adresse au format 42-caractère hexadécimal; par exemple 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
[
  {
    "name": "Test",
    "subAccountUser": "0x035605fc2f24d65300227189025e90a0d947f16c",
    "master": "0x8c967e73e6b15087c42a10d344cff4c96d877f1d",
    "clearinghouseState": {
      "marginSummary": {
        "accountValue": "29.78001",
        "totalNtlPos": "0.0",
        "totalRawUsd": "29.78001",
        "totalMarginUsed": "0.0"
      },
      "crossMarginSummary": {
        "accountValue": "29.78001",
        "totalNtlPos": "0.0",
        "totalRawUsd": "29.78001",
        "totalMarginUsed": "0.0"
      },
      "crossMaintenanceMarginUsed": "0.0",
      "withdrawable": "29.78001",
      "assetPositions": [],
      "time": 1733968369395
    },
    "spotState": {
      "balances": [
        {
          "coin": "USDC",
          "token": 0,
          "total": "0.22",
          "hold": "0.0",
          "entryNtl": "0.0"
        }
      ]
    }
  }
]
```


## Récupérer les détails d'un coffre {#retrieve-details-for-a-vault}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_8}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_10}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark>         | String | "vaultDetails" |
| vaultAddress<mark style="color:red;">\*</mark> | String | Adresse au format 42-caractère hexadécimal; par exemple 0x0000000000000000000000000000000000000000. |
| user                                           | String | Adresse au format 42-caractère hexadécimal; par exemple 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
{
  "name": "Test",
  "vaultAddress": "0xdfc24b077bc1425ad1dea75bcb6f8158e10df303",
  "leader": "0x677d831aef5328190852e24f13c46cac05f984e7",
  "description": "This community-owned vault provides liquidity to Hyperliquid through multiple market making strategies, performs liquidations, and accrues platform fees.",
  "portfolio": [
    [
      "day",
      {
        "accountValueHistory": [
          [
            1734397526634,
            "329265410.90790099"
          ]
        ],
        "pnlHistory": [
          [
            1734397526634,
            "0.0"
          ],
        ],
        "vlm": "0.0"
      }
    ],
    [
      "week" | "month" | "allTime" | "perpDay" | "perpWeek" | "perpMonth" | "perpAllTime",
      {...}
    ]
  ],
  "apr": 0.36387129259090006,
  "followerState": null,
  "leaderFraction": 0.0007904828725729887,
  "leaderCommission": 0,
  "followers": [
    {
      "user": "0x005844b2ffb2e122cf4244be7dbcb4f84924907c",
      "vaultEquity": "714491.71026243",
      "pnl": "3203.43026143",
      "allTimePnl": "79843.74476743",
      "daysFollowing": 388,
      "vaultEntryTime": 1700926145201,
      "lockupUntil": 1734824439201
    }
  ],
  "maxDistributable": 94856870.164485,
  "maxWithdrawable": 742557.680863,
  "isClosed": false,
  "relationship": {
    "type": "parent",
    "data": {
      "childAddresses": [
        "0x010461c14e146ac35fe42271bdc1134ee31c703a",
        "0x2e3d94f0562703b25c83308a05046ddaf9a8dd14",
        "0x31ca8395cf837de08b24da3f660e77761dfb974b"
      ]
    }
  },
  "allowDeposits": true,
  "alwaysCloseOnWithdraw": false
}  
```


## Récupérer les dépôts de voûte d'un utilisateur {#retrieve-a-users-vault-deposits}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_9}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_11}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "userVaultEquities" |
| user<mark style="color:red;">\*</mark> | String | Adresse au format 42-caractère hexadécimal; par exemple 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
[
  {
    "vaultAddress": "0xdfc24b077bc1425ad1dea75bcb6f8158e10df303",
    "equity": "742500.082809",
  }
]
```


## Interroger le rôle d'un utilisateur {#query-a-users-role}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_10}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_12}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "userRole" |
| user<mark style="color:red;">\*</mark> | String | Adresse au format 42-caractère hexadécimal; par exemple 0x0000000000000000000000000000000000000000. |


**Utilisateur**


```
{"role":"user"} # "missing", "user", "agent", "vault", or "subAccount"
```



**Agent**


```
{"role":"agent", "data": {"user": "0x..."}}
```



**Vault**


```
{"role":"vault"}
```



**Sous-compte**


```
{"role":"subAccount", "data":{"master":"0x..."}}
```



**Manquant**


```
{"role":"missing"}
```


## Interroger le portfolio d'un utilisateur {#query-a-users-portfolio}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_11}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_13}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "portfolio" |
| user<mark style="color:red;">\*</mark> | String | format hexadécimal; p. ex. 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
[
  [
    "day",
    {
      "accountValueHistory": [
        [
          1741886630493,
          "0.0"
        ],
        [
          1741895270493,
          "0.0"
        ],
        ...
      ],
      "pnlHistory": [
        [
          1741886630493,
          "0.0"
        ],
        [
          1741895270493,
          "0.0"
        ],
        ...
      ],
      "vlm": "0.0"
    }
  ],
  ["week", { ... }],
  ["month", { ... }],
  ["allTime", { ... }],
  ["perpDay", { ... }],
  ["perpWeek", { ... }],
  ["perpMonth", { ... }],
  ["perpAllTime", { ... }]
]
```


## Interroger les informations de référence d'un utilisateur {#query-a-users-referral-information}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_12}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_14}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "referral" |
| user<mark style="color:red;">\*</mark> | String | format hexadécimal; p. ex. 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
{
    "referredBy": {
        "referrer": "0x5ac99df645f3414876c816caa18b2d234024b487",
        "code": "TESTNET"
    },
    "cumVlm": "149428030.6628420055", // USDC Only
    "unclaimedRewards": "11.047361", // USDC Only
    "claimedRewards": "22.743781", // USDC Only
    "builderRewards": "0.027802", // USDC Only
    "tokenToState":[
      0,
      {
         "cumVlm":"149428030.6628420055",
         "unclaimedRewards":"11.047361",
         "claimedRewards":"22.743781",
         "builderRewards":"0.027802"
      }
   ],
    "referrerState": {
        "stage": "ready",
        "data": {
            "code": "TEST",
            "referralStates": [
                {
                    "cumVlm": "960652.017122",
                    "cumRewardedFeesSinceReferred": "196.838825",
                    "cumFeesRewardedToReferrer": "19.683748",
                    "timeJoined": 1679425029416,
                    "user": "0x11af2b93dcb3568b7bf2b6bd6182d260a9495728"
                },
                {
                    "cumVlm": "438278.672653",
                    "cumRewardedFeesSinceReferred": "97.628107",
                    "cumFeesRewardedToReferrer": "9.762562",
                    "timeJoined": 1679423947882,
                    "user": "0x3f69d170055913103a034a418953b8695e4e42fa"
                }
            ]
        }
    },
    "rewardHistory": []
}
```


Notez que rewardHistory est pour les récompenses héritées. Les récompenses réclamées sont maintenant retournées dans nonFundingLedgerUpdate

## Interroger les frais d'un utilisateur {#query-a-users-fees}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_13}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_15}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "userFees" |
| user<mark style="color:red;">\*</mark> | String | format hexadécimal; p. ex. 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
{
  "dailyUserVlm": [
    {
      "date": "2025-05-23",
      "userCross": "0.0",
      "userAdd": "0.0",
      "exchange": "2852367.0770729999"
    },
    ...
  ],
  "feeSchedule": {
    "cross": "0.00045",
    "add": "0.00015",
    "spotCross": "0.0007",
    "spotAdd": "0.0004",
    "tiers": {
      "vip": [
        {
          "ntlCutoff": "5000000.0",
          "cross": "0.0004",
          "add": "0.00012",
          "spotCross": "0.0006",
          "spotAdd": "0.0003"
        },
        ...
      ],
      "mm": [
        {
          "makerFractionCutoff": "0.005",
          "add": "-0.00001"
        },
        ...
      ]
    },
    "referralDiscount": "0.04",
    "stakingDiscountTiers": [
      {
        "bpsOfMaxSupply": "0.0",
        "discount": "0.0"
      },
      {
        "bpsOfMaxSupply": "0.0001",
        "discount": "0.05"
      },
      ...
    ]
  },
  "userCrossRate": "0.000315",
  "userAddRate": "0.000105",
  "userSpotCrossRate": "0.00049",
  "userSpotAddRate": "0.00028",
  "activeReferralDiscount": "0.0",
  "trial": null,
  "feeTrialReward": "0.0",
  "nextTrialAvailableTimestamp": null,
  "stakingLink": {
    "type": "tradingUser",
    "stakingUser": "0x54c049d9c7d3c92c2462bf3d28e083f3d6805061"
  },
  "activeStakingDiscount": {
    "bpsOfMaxSupply": "4.7577998927",
    "discount": "0.3"
  }
}
```


## Interroger les délégations de jalonnement d'un utilisateur {#query-a-users-staking-delegations}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_14}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_16}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "delegations" |
| user<mark style="color:red;">\*</mark> | String | format hexadécimal; p. ex. 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
[
    {
        "validator":"0x5ac99df645f3414876c816caa18b2d234024b487",
        "amount":"12060.16529862",
        "lockedUntilTimestamp":1735466781353
    },
    ...
]
```


## Interroger le résumé de jalonnement d'un utilisateur {#query-a-users-staking-summary}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_15}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_17}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "delegatorSummary" |
| user<mark style="color:red;">\*</mark> | String | format hexadécimal; p. ex. 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
{
    "delegated": "12060.16529862",
    "undelegated": "0.0",
    "totalPendingWithdrawal": "0.0",
    "nPendingWithdrawals": 0
}
```


## Interroger l'historique de jalonnement d'un utilisateur {#query-a-users-staking-history}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_16}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_18}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "delegatorHistory" |
| user<mark style="color:red;">\*</mark> | String | format hexadécimal; p. ex. 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
[
    {
        "time": 1735380381353,
        "hash": "0x55492465cb523f90815a041a226ba90147008d4b221a24ae8dc35a0dbede4ea4",
        "delta": {
            "delegate": {
                "validator": "0x5ac99df645f3414876c816caa18b2d234024b487",
                "amount": "10000.0",
                "isUndelegate": false
            }
        }
    },
    ...
]
```


## Interroger les récompenses de staking d'un utilisateur {#query-a-users-staking-rewards}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_17}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_19}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "delegatorRewards" |
| user<mark style="color:red;">\*</mark> | String | format hexadécimal; p. ex. 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
[
    {
        "time": 1736726400073,
        "source": "delegation",
        "totalAmount": "0.73117184"
    },
    {
        "time": 1736726400073,
        "source": "commission",
        "totalAmount": "130.76445876"
    },
    ...
]
```


## Interroger l'état d'abstraction HIP-3 DEX d'un utilisateur {#query-a-users-hip-3-dex-abstraction-state}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_18}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_20}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "userDexAbstraction" |
| user<mark style="color:red;">\*</mark> | String | format hexadécimal; p. ex. 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
true
```


## Interroger l'état d'abstraction d'un utilisateur {#query-a-users-abstraction-state}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_19}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_21}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "userAbstraction" |
| user<mark style="color:red;">\*</mark> | String | format hexadécimal; p. ex. 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
"unifiedAccount" | "portfolioMargin" | "disabled" | "default" | "dexAbstraction"
```


## Requête emprunte/prête l'état utilisateur {#query-borrowlend-user-state}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_20}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_22}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "borrowLendUserState" |
| user<mark style="color:red;">\*</mark> | String | format hexadécimal; p. ex. 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
{
    "tokenToState":[
        [
            0,
            {
                "borrow":{
                    "basis": "0.0",
                    "value": "0.0"
                },
                "supply":{
                    "basis": "44.69295862",
                    "value": "44.69692314"
                }
            }
        ],
        [
            1105,
            {
                "borrow":{
                    "basis": "0.0",
                    "value": "0.0"
                },
                "supply":{
                    "basis": "0.0",
                    "value": "0.0"
                }
            }
        ],
    ],
    "health":"healthy",
    "healthFactor":null
}
```


## Demande d'emprunt/prêt État de réserve {#query-borrowlend-reserve-state}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_21}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_23}

| Nom | Type | Description |
| --------------------------------------- | ------ | ------------------------ |
| type<mark style="color:red;">\*</mark>  | String | "borrowLendReserveState" |
| token<mark style="color:red;">\*</mark> | Number | index token |


**200: OK**


```json
{
    "borrowYearlyRate": "0.05",
    "supplyYearlyRate": "0.0008245002",
    "balance": "3245939.4732256099",
    "utilization": "0.018322226",
    "oraclePx": "1.0",
    "ltv": "0.0",
    "totalSupplied": "3306509.7335290499",
    "totalBorrowed": "60582.61869494"
}
```


## Demander tous les emprunts/prêts des états de réserve {#query-all-borrowlend-reserve-states}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_22}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_24}

| Nom | Type | Description |
| -------------------------------------- | ------ | ---------------------------- |
| type<mark style="color:red;">\*</mark> | String | "allBorrowLendReserveStates" |


**200: OK**


```json
[
    [
        0,
        {
            "borrowYearlyRate": "0.05",
            "supplyYearlyRate": "0.0008244951",
            "balance": "3245960.0596176102",
            "utilization": "0.0183221137",
            "oraclePx": "1.0",
            "ltv": "0.0",
            "totalSupplied": "3306530.3251102199",
            "totalBorrowed": "60582.62446067"
        }
    ],
    [
        150,
        {
            "borrowYearlyRate": "0.05",
            "supplyYearlyRate": "0.0",
            "balance": "11318.09684696",
            "utilization": "0.0",
            "oraclePx": "23.99",
            "ltv": "0.5",
            "totalSupplied": "11318.09684696",
            "totalBorrowed": "0.0"
        }
    ]
]
```


## Constructeurs approuvés pour l'utilisateur {#query-approved-builders-for-user}

<mark style="color:green;">`POST`</mark> `https://api.hyperliquid.xyz/info`

#### En-têtes {#headers_23}

| Nom | Type | Description |
| ---------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark> | String | "application/json" |

#### Corps de la requête {#request-body_25}

| Nom | Type | Description |
| -------------------------------------- | ------ | -------------------------------------------------------------------- |
| type<mark style="color:red;">\*</mark> | String | "approvedBuilders" |
| user<mark style="color:red;">\*</mark> | String | format hexadécimal; p. ex. 0x0000000000000000000000000000000000000000. |


**200: OK**


```json
["0x476fa87b4d3818f437f38f1263bee508d7672d82"]
```
