@syldel/hl-shared-types 0.0.12 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,34 @@
1
+ import { DecimalString, HexString } from '../common';
2
+ /** Request payload pour récupérer les données d'un actif actif */
3
+ export interface HlActiveAssetDataRequest {
4
+ /** Type de l'action, doit être 'activeAssetData' */
5
+ type: 'activeAssetData';
6
+ /** Adresse publique de l'utilisateur (format hexadécimal) */
7
+ user: HexString;
8
+ /** Symbole de l'actif (ex: "ETH" ou "xyz:XYZ100") */
9
+ coin: string;
10
+ }
11
+ /** Configuration du levier appliqué à l'actif */
12
+ export interface HlActiveAssetLeverage {
13
+ /** Mode de marge utilisé ('cross' ou 'isolated') */
14
+ type: 'cross' | 'isolated';
15
+ /** Valeur multiplicatrice du levier */
16
+ value: number;
17
+ /** Marge actuelle en USD (uniquement en mode 'isolated') */
18
+ rawUsd?: DecimalString;
19
+ }
20
+ /** Données de l'actif actif renvoyées par Hyperliquid */
21
+ export interface HlActiveAssetData {
22
+ /** Adresse publique de l'utilisateur */
23
+ user: HexString;
24
+ /** Symbole de l'actif */
25
+ coin: string;
26
+ /** Configuration et état actuel du levier */
27
+ leverage: HlActiveAssetLeverage;
28
+ /** Taille maximale de trade autorisée [long, short] */
29
+ maxTradeSzs: [DecimalString, DecimalString];
30
+ /** Capital disponible immédiatement pour trader [long, short] */
31
+ availableToTrade: [DecimalString, DecimalString];
32
+ /** Prix mark actuel de l'actif */
33
+ markPx: DecimalString;
34
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
1
  export * from './candle.interfaces';
2
2
  export * from './portfolio.interfaces';
3
3
  export * from './l2Book.interfaces';
4
+ export * from './active-asset.interfaces';
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./candle.interfaces"), exports);
18
18
  __exportStar(require("./portfolio.interfaces"), exports);
19
19
  __exportStar(require("./l2Book.interfaces"), exports);
20
+ __exportStar(require("./active-asset.interfaces"), exports);
@@ -1,4 +1,4 @@
1
- import { DecimalString, HLOid } from '../common';
1
+ import { DecimalString, HLTif, HLOid } from '../common';
2
2
  export type HLOrderSize = {
3
3
  type: 'base';
4
4
  sz: DecimalString;
@@ -14,6 +14,7 @@ export interface InstantOrderParams {
14
14
  isBuy: boolean;
15
15
  size: HLOrderSize;
16
16
  reduceOnly?: boolean;
17
+ tif?: HLTif;
17
18
  isTestnet?: boolean;
18
19
  maxRetries?: number;
19
20
  delayMs?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syldel/hl-shared-types",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "Shared TypeScript interfaces and types for Hyperliquid integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",