@blackcube/xgate-sdk 0.25.4 → 0.56.0
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.
- package/dist/index.cjs +55 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -5
- package/dist/index.d.ts +61 -5
- package/dist/index.js +55 -2
- package/dist/index.js.map +1 -1
- package/package.json +11 -11
package/dist/index.d.cts
CHANGED
|
@@ -39,6 +39,37 @@ declare enum XgateEx {
|
|
|
39
39
|
/** Toutes les venues connues, dans l'ordre de déclaration. */
|
|
40
40
|
declare const XGATE_EXCHANGES: readonly XgateEx[];
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* CE QUE COTE UNE PAIRE — de la crypto, ou autre chose.
|
|
44
|
+
*
|
|
45
|
+
* Les venues perpétuelles ne listent plus seulement des cryptos : bybit publie 164 actions, 43 ETF et
|
|
46
|
+
* quatre matières premières, binance ouvre des `TRADIFI_PERPETUAL` sur NVDA et l'or, extended range
|
|
47
|
+
* ses actions en `RWA`. Le catalogue les rendait toutes indistinctes.
|
|
48
|
+
*
|
|
49
|
+
* ⚠️ CE N'EST PAS UNE COMMODITÉ DE CLASSEMENT. Le 2026-08-24, `PURR` cotait 11 $ chez bybit et
|
|
50
|
+
* 0,13 $ chez hyperliquid : le premier est une ACTION, le second le memecoin natif d'Hyperliquid.
|
|
51
|
+
* Même ticker, deux actifs — et un consommateur qui médiane « le prix de PURR » entre venues
|
|
52
|
+
* publiait un nombre qui n'était le prix d'aucun des deux. Le rapport n'était même pas constant
|
|
53
|
+
* (71 à 116 sur douze jours), ce qui excluait une échelle de cotation.
|
|
54
|
+
*
|
|
55
|
+
* ⚠️ ET CE N'EST PAS DÉDUCTIBLE DU TICKER. `SPX` est le memecoin SPX6900 chez binance, bybit et
|
|
56
|
+
* extended — qui le disent tous les trois (`underlyingSubType: ["Meme"]`, `subCategory: "Meme"`) —
|
|
57
|
+
* alors que l'indice S&P 500 s'appelle `SP500` chez pacifica. Une règle sur le nom aurait classé les
|
|
58
|
+
* deux à l'envers.
|
|
59
|
+
*/
|
|
60
|
+
type AssetClass = 'crypto' | 'stock' | 'commodity' | 'index' | 'etf' | 'forex';
|
|
61
|
+
/**
|
|
62
|
+
* LA CLASSE D'ACTIF D'UNE PAIRE, ou `undefined` quand la venue ne se prononce pas.
|
|
63
|
+
*
|
|
64
|
+
* ⚠️ `undefined` N'EST PAS « CRYPTO ». hyperliquid et pacifica cotent NVDA, TSLA, XAU et PLTR sans
|
|
65
|
+
* publier la moindre catégorie : les classer d'office en crypto reproduirait exactement l'erreur
|
|
66
|
+
* qu'on corrige ici. « On ne sait pas » est une information ; une valeur inventée n'en est pas une.
|
|
67
|
+
*
|
|
68
|
+
* Une catégorie inconnue rend `undefined` plutôt que de retomber sur `crypto` — le jour où une venue
|
|
69
|
+
* en ajoute une, on veut le voir, pas l'absorber.
|
|
70
|
+
*/
|
|
71
|
+
declare function assetClassOf(xex: XgateEx, xtras?: Record<string, unknown>): AssetClass | undefined;
|
|
72
|
+
|
|
42
73
|
/** Type de marché. */
|
|
43
74
|
type MarketKind = 'perp' | 'spot';
|
|
44
75
|
/**
|
|
@@ -77,6 +108,18 @@ interface IPair {
|
|
|
77
108
|
* ramène toutes les venues à la même unité.
|
|
78
109
|
*/
|
|
79
110
|
multiplier: number;
|
|
111
|
+
/**
|
|
112
|
+
* CE QUE LA PAIRE COTE — `undefined` quand la venue ne le dit pas.
|
|
113
|
+
*
|
|
114
|
+
* Les venues perpétuelles ne listent plus que de la crypto : bybit publie 164 actions, 43 ETF et
|
|
115
|
+
* quatre matières premières, binance ouvre des `TRADIFI_PERPETUAL` sur NVDA et l'or. Sans ce
|
|
116
|
+
* champ, un consommateur mélange deux actifs qui partagent un ticker — `PURR` valait 11 $ chez
|
|
117
|
+
* bybit (une ACTION) et 0,13 $ chez hyperliquid (le memecoin) le 2026-08-24.
|
|
118
|
+
*
|
|
119
|
+
* ⚠️ `undefined` NE VEUT PAS DIRE « crypto ». hyperliquid et pacifica cotent NVDA, TSLA et XAU
|
|
120
|
+
* sans publier de catégorie : les supposer crypto referait l'erreur qu'on corrige.
|
|
121
|
+
*/
|
|
122
|
+
assetClass?: AssetClass;
|
|
80
123
|
/**
|
|
81
124
|
* ÉCHÉANCE du contrat. `undefined` pour un perpétuel — l'immense majorité.
|
|
82
125
|
*
|
|
@@ -480,10 +523,23 @@ declare function subscriptionLimitOf(xex: XgateEx): number | undefined;
|
|
|
480
523
|
*
|
|
481
524
|
* **aster** — 1500 ; non documenté, API de forme binance.
|
|
482
525
|
*
|
|
483
|
-
* **
|
|
484
|
-
* (`
|
|
485
|
-
*
|
|
486
|
-
*
|
|
526
|
+
* **pacifica** — **4 000**, et c'est SA DOCUMENTATION qui le dit : « `limit` : Capped at 4000; defaults to 4000
|
|
527
|
+
* if not provided » (`docs.pacifica.fi/api-documentation/api/rest-api/markets/get-candle-data`). Le plafond joue
|
|
528
|
+
* même sans `limit`, puisque 4 000 est aussi le défaut.
|
|
529
|
+
*
|
|
530
|
+
* ⚠️ AU-DELÀ, ELLE NE TRONQUE PAS : ELLE REND UN TABLEAU VIDE, avec `success: true`. Vérifié le 2026-08-24 sur
|
|
531
|
+
* SOL en 15m — 4 000 barres demandées rendent 3 883 bougies, 4 010 en rendent ZÉRO. Une fenêtre trop large ne
|
|
532
|
+
* coûte donc pas quelques barres perdues, elle coûte l'appel entier, en silence.
|
|
533
|
+
*
|
|
534
|
+
* ⚠️ CETTE ENTRÉE A VALU 500 PENDANT DES MOIS, sur la foi du commentaire ci-dessous qui affirmait que pacifica
|
|
535
|
+
* « n'accepte aucun limit ». C'est faux : son endpoint le documente. Huit fois trop d'appels, à quatre secondes
|
|
536
|
+
* de cadence chacun — mesuré le 2026-08-24, un backfill 15m sur ses 74 séries a coûté 1 026 appels et 72
|
|
537
|
+
* minutes là où il en fallait huit fois moins.
|
|
538
|
+
*
|
|
539
|
+
* **hyperliquid** n'accepte, elle, aucun `limit` : son SDK n'envoie que `startTime`/`endTime`
|
|
540
|
+
* (`get-candle-snapshot.ts`). Le nombre sert alors à dimensionner la FENÊTRE demandée, pas à remplir un
|
|
541
|
+
* paramètre. La venue borne d'elle-même à ~5 000 bougies par (coin, intervalle) — et l'horizon que ça couvre
|
|
542
|
+
* dépend de l'activité du coin, ce n'est donc pas une durée fixe.
|
|
487
543
|
*
|
|
488
544
|
* ⚠️ UNE VENUE ABSENTE DE CETTE TABLE N'A PAS DE PLAFOND DOCUMENTÉ — ce qui n'est pas « pas de plafond ». On ne
|
|
489
545
|
* devine aucun chiffre : le jour où l'une d'elles s'en approche, on lit sa documentation et on l'ajoute.
|
|
@@ -1844,4 +1900,4 @@ declare function expiryOf(xtras?: Record<string, unknown>): Date | undefined;
|
|
|
1844
1900
|
*/
|
|
1845
1901
|
declare function isDated(xtras?: Record<string, unknown>): boolean;
|
|
1846
1902
|
|
|
1847
|
-
export { CANDLES_MAX_HISTORY, CANDLES_PER_CALL, CandlesService, CandlesStreamRegistry, CandlesStreamService, CatalogService, type Direction, type IAccountState, type IBalance, type ICandle, type ICandlesQuery, type IEntryWithProtection, type IEquityPoint, type IFundingPaid, type IMoveStop, type IMovement, type IOrder, type IPair, type IPosition, type IPrice, type IProtection, type IProtectionInput, type IProtectionLeg, type IPublicTrade, type ITarget, type ITrade, type ITradingAccess, type IWalletAccess, type IXexAccess, type IXexSpotSource, type MarketKind, type MovementKind, type MovementStatus, ORDER_STATUSES, type OrderStatus, type OrderType, PricesService, REST_THROTTLE_MS, SPOT_XEXES, type Side, SpotCandlesService, SpotCatalogService, SpotPricesService, SpotWsCandlesService, TIMEFRAME_MINUTES, type TimeInForce, Timeframe, TradingService, type Unsubscribe, WALLET_XEXES, WS_SUBSCRIPTION_LIMITS, WalletService, WsCandlesService, WsTradesService, XGATE_EXCHANGES, XgateEx, XgateModule, buildLevels, buildProtection, candlesMaxHistoryOf, candlesPerCallOf, canonicalFromBase, canonicalFromXex, expiryOf, isDated, multiplierFromXex, restThrottleOf, roundPrice, roundToStep, servesNatively, servesSpot, sourceFor, subscriptionLimitOf, timeframeMs };
|
|
1903
|
+
export { type AssetClass, CANDLES_MAX_HISTORY, CANDLES_PER_CALL, CandlesService, CandlesStreamRegistry, CandlesStreamService, CatalogService, type Direction, type IAccountState, type IBalance, type ICandle, type ICandlesQuery, type IEntryWithProtection, type IEquityPoint, type IFundingPaid, type IMoveStop, type IMovement, type IOrder, type IPair, type IPosition, type IPrice, type IProtection, type IProtectionInput, type IProtectionLeg, type IPublicTrade, type ITarget, type ITrade, type ITradingAccess, type IWalletAccess, type IXexAccess, type IXexSpotSource, type MarketKind, type MovementKind, type MovementStatus, ORDER_STATUSES, type OrderStatus, type OrderType, PricesService, REST_THROTTLE_MS, SPOT_XEXES, type Side, SpotCandlesService, SpotCatalogService, SpotPricesService, SpotWsCandlesService, TIMEFRAME_MINUTES, type TimeInForce, Timeframe, TradingService, type Unsubscribe, WALLET_XEXES, WS_SUBSCRIPTION_LIMITS, WalletService, WsCandlesService, WsTradesService, XGATE_EXCHANGES, XgateEx, XgateModule, assetClassOf, buildLevels, buildProtection, candlesMaxHistoryOf, candlesPerCallOf, canonicalFromBase, canonicalFromXex, expiryOf, isDated, multiplierFromXex, restThrottleOf, roundPrice, roundToStep, servesNatively, servesSpot, sourceFor, subscriptionLimitOf, timeframeMs };
|
package/dist/index.d.ts
CHANGED
|
@@ -39,6 +39,37 @@ declare enum XgateEx {
|
|
|
39
39
|
/** Toutes les venues connues, dans l'ordre de déclaration. */
|
|
40
40
|
declare const XGATE_EXCHANGES: readonly XgateEx[];
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* CE QUE COTE UNE PAIRE — de la crypto, ou autre chose.
|
|
44
|
+
*
|
|
45
|
+
* Les venues perpétuelles ne listent plus seulement des cryptos : bybit publie 164 actions, 43 ETF et
|
|
46
|
+
* quatre matières premières, binance ouvre des `TRADIFI_PERPETUAL` sur NVDA et l'or, extended range
|
|
47
|
+
* ses actions en `RWA`. Le catalogue les rendait toutes indistinctes.
|
|
48
|
+
*
|
|
49
|
+
* ⚠️ CE N'EST PAS UNE COMMODITÉ DE CLASSEMENT. Le 2026-08-24, `PURR` cotait 11 $ chez bybit et
|
|
50
|
+
* 0,13 $ chez hyperliquid : le premier est une ACTION, le second le memecoin natif d'Hyperliquid.
|
|
51
|
+
* Même ticker, deux actifs — et un consommateur qui médiane « le prix de PURR » entre venues
|
|
52
|
+
* publiait un nombre qui n'était le prix d'aucun des deux. Le rapport n'était même pas constant
|
|
53
|
+
* (71 à 116 sur douze jours), ce qui excluait une échelle de cotation.
|
|
54
|
+
*
|
|
55
|
+
* ⚠️ ET CE N'EST PAS DÉDUCTIBLE DU TICKER. `SPX` est le memecoin SPX6900 chez binance, bybit et
|
|
56
|
+
* extended — qui le disent tous les trois (`underlyingSubType: ["Meme"]`, `subCategory: "Meme"`) —
|
|
57
|
+
* alors que l'indice S&P 500 s'appelle `SP500` chez pacifica. Une règle sur le nom aurait classé les
|
|
58
|
+
* deux à l'envers.
|
|
59
|
+
*/
|
|
60
|
+
type AssetClass = 'crypto' | 'stock' | 'commodity' | 'index' | 'etf' | 'forex';
|
|
61
|
+
/**
|
|
62
|
+
* LA CLASSE D'ACTIF D'UNE PAIRE, ou `undefined` quand la venue ne se prononce pas.
|
|
63
|
+
*
|
|
64
|
+
* ⚠️ `undefined` N'EST PAS « CRYPTO ». hyperliquid et pacifica cotent NVDA, TSLA, XAU et PLTR sans
|
|
65
|
+
* publier la moindre catégorie : les classer d'office en crypto reproduirait exactement l'erreur
|
|
66
|
+
* qu'on corrige ici. « On ne sait pas » est une information ; une valeur inventée n'en est pas une.
|
|
67
|
+
*
|
|
68
|
+
* Une catégorie inconnue rend `undefined` plutôt que de retomber sur `crypto` — le jour où une venue
|
|
69
|
+
* en ajoute une, on veut le voir, pas l'absorber.
|
|
70
|
+
*/
|
|
71
|
+
declare function assetClassOf(xex: XgateEx, xtras?: Record<string, unknown>): AssetClass | undefined;
|
|
72
|
+
|
|
42
73
|
/** Type de marché. */
|
|
43
74
|
type MarketKind = 'perp' | 'spot';
|
|
44
75
|
/**
|
|
@@ -77,6 +108,18 @@ interface IPair {
|
|
|
77
108
|
* ramène toutes les venues à la même unité.
|
|
78
109
|
*/
|
|
79
110
|
multiplier: number;
|
|
111
|
+
/**
|
|
112
|
+
* CE QUE LA PAIRE COTE — `undefined` quand la venue ne le dit pas.
|
|
113
|
+
*
|
|
114
|
+
* Les venues perpétuelles ne listent plus que de la crypto : bybit publie 164 actions, 43 ETF et
|
|
115
|
+
* quatre matières premières, binance ouvre des `TRADIFI_PERPETUAL` sur NVDA et l'or. Sans ce
|
|
116
|
+
* champ, un consommateur mélange deux actifs qui partagent un ticker — `PURR` valait 11 $ chez
|
|
117
|
+
* bybit (une ACTION) et 0,13 $ chez hyperliquid (le memecoin) le 2026-08-24.
|
|
118
|
+
*
|
|
119
|
+
* ⚠️ `undefined` NE VEUT PAS DIRE « crypto ». hyperliquid et pacifica cotent NVDA, TSLA et XAU
|
|
120
|
+
* sans publier de catégorie : les supposer crypto referait l'erreur qu'on corrige.
|
|
121
|
+
*/
|
|
122
|
+
assetClass?: AssetClass;
|
|
80
123
|
/**
|
|
81
124
|
* ÉCHÉANCE du contrat. `undefined` pour un perpétuel — l'immense majorité.
|
|
82
125
|
*
|
|
@@ -480,10 +523,23 @@ declare function subscriptionLimitOf(xex: XgateEx): number | undefined;
|
|
|
480
523
|
*
|
|
481
524
|
* **aster** — 1500 ; non documenté, API de forme binance.
|
|
482
525
|
*
|
|
483
|
-
* **
|
|
484
|
-
* (`
|
|
485
|
-
*
|
|
486
|
-
*
|
|
526
|
+
* **pacifica** — **4 000**, et c'est SA DOCUMENTATION qui le dit : « `limit` : Capped at 4000; defaults to 4000
|
|
527
|
+
* if not provided » (`docs.pacifica.fi/api-documentation/api/rest-api/markets/get-candle-data`). Le plafond joue
|
|
528
|
+
* même sans `limit`, puisque 4 000 est aussi le défaut.
|
|
529
|
+
*
|
|
530
|
+
* ⚠️ AU-DELÀ, ELLE NE TRONQUE PAS : ELLE REND UN TABLEAU VIDE, avec `success: true`. Vérifié le 2026-08-24 sur
|
|
531
|
+
* SOL en 15m — 4 000 barres demandées rendent 3 883 bougies, 4 010 en rendent ZÉRO. Une fenêtre trop large ne
|
|
532
|
+
* coûte donc pas quelques barres perdues, elle coûte l'appel entier, en silence.
|
|
533
|
+
*
|
|
534
|
+
* ⚠️ CETTE ENTRÉE A VALU 500 PENDANT DES MOIS, sur la foi du commentaire ci-dessous qui affirmait que pacifica
|
|
535
|
+
* « n'accepte aucun limit ». C'est faux : son endpoint le documente. Huit fois trop d'appels, à quatre secondes
|
|
536
|
+
* de cadence chacun — mesuré le 2026-08-24, un backfill 15m sur ses 74 séries a coûté 1 026 appels et 72
|
|
537
|
+
* minutes là où il en fallait huit fois moins.
|
|
538
|
+
*
|
|
539
|
+
* **hyperliquid** n'accepte, elle, aucun `limit` : son SDK n'envoie que `startTime`/`endTime`
|
|
540
|
+
* (`get-candle-snapshot.ts`). Le nombre sert alors à dimensionner la FENÊTRE demandée, pas à remplir un
|
|
541
|
+
* paramètre. La venue borne d'elle-même à ~5 000 bougies par (coin, intervalle) — et l'horizon que ça couvre
|
|
542
|
+
* dépend de l'activité du coin, ce n'est donc pas une durée fixe.
|
|
487
543
|
*
|
|
488
544
|
* ⚠️ UNE VENUE ABSENTE DE CETTE TABLE N'A PAS DE PLAFOND DOCUMENTÉ — ce qui n'est pas « pas de plafond ». On ne
|
|
489
545
|
* devine aucun chiffre : le jour où l'une d'elles s'en approche, on lit sa documentation et on l'ajoute.
|
|
@@ -1844,4 +1900,4 @@ declare function expiryOf(xtras?: Record<string, unknown>): Date | undefined;
|
|
|
1844
1900
|
*/
|
|
1845
1901
|
declare function isDated(xtras?: Record<string, unknown>): boolean;
|
|
1846
1902
|
|
|
1847
|
-
export { CANDLES_MAX_HISTORY, CANDLES_PER_CALL, CandlesService, CandlesStreamRegistry, CandlesStreamService, CatalogService, type Direction, type IAccountState, type IBalance, type ICandle, type ICandlesQuery, type IEntryWithProtection, type IEquityPoint, type IFundingPaid, type IMoveStop, type IMovement, type IOrder, type IPair, type IPosition, type IPrice, type IProtection, type IProtectionInput, type IProtectionLeg, type IPublicTrade, type ITarget, type ITrade, type ITradingAccess, type IWalletAccess, type IXexAccess, type IXexSpotSource, type MarketKind, type MovementKind, type MovementStatus, ORDER_STATUSES, type OrderStatus, type OrderType, PricesService, REST_THROTTLE_MS, SPOT_XEXES, type Side, SpotCandlesService, SpotCatalogService, SpotPricesService, SpotWsCandlesService, TIMEFRAME_MINUTES, type TimeInForce, Timeframe, TradingService, type Unsubscribe, WALLET_XEXES, WS_SUBSCRIPTION_LIMITS, WalletService, WsCandlesService, WsTradesService, XGATE_EXCHANGES, XgateEx, XgateModule, buildLevels, buildProtection, candlesMaxHistoryOf, candlesPerCallOf, canonicalFromBase, canonicalFromXex, expiryOf, isDated, multiplierFromXex, restThrottleOf, roundPrice, roundToStep, servesNatively, servesSpot, sourceFor, subscriptionLimitOf, timeframeMs };
|
|
1903
|
+
export { type AssetClass, CANDLES_MAX_HISTORY, CANDLES_PER_CALL, CandlesService, CandlesStreamRegistry, CandlesStreamService, CatalogService, type Direction, type IAccountState, type IBalance, type ICandle, type ICandlesQuery, type IEntryWithProtection, type IEquityPoint, type IFundingPaid, type IMoveStop, type IMovement, type IOrder, type IPair, type IPosition, type IPrice, type IProtection, type IProtectionInput, type IProtectionLeg, type IPublicTrade, type ITarget, type ITrade, type ITradingAccess, type IWalletAccess, type IXexAccess, type IXexSpotSource, type MarketKind, type MovementKind, type MovementStatus, ORDER_STATUSES, type OrderStatus, type OrderType, PricesService, REST_THROTTLE_MS, SPOT_XEXES, type Side, SpotCandlesService, SpotCatalogService, SpotPricesService, SpotWsCandlesService, TIMEFRAME_MINUTES, type TimeInForce, Timeframe, TradingService, type Unsubscribe, WALLET_XEXES, WS_SUBSCRIPTION_LIMITS, WalletService, WsCandlesService, WsTradesService, XGATE_EXCHANGES, XgateEx, XgateModule, assetClassOf, buildLevels, buildProtection, candlesMaxHistoryOf, candlesPerCallOf, canonicalFromBase, canonicalFromXex, expiryOf, isDated, multiplierFromXex, restThrottleOf, roundPrice, roundToStep, servesNatively, servesSpot, sourceFor, subscriptionLimitOf, timeframeMs };
|
package/dist/index.js
CHANGED
|
@@ -677,6 +677,57 @@ CandlesService = __decorateClass([
|
|
|
677
677
|
Injectable()
|
|
678
678
|
], CandlesService);
|
|
679
679
|
|
|
680
|
+
// src/helpers/asset-class.ts
|
|
681
|
+
var BINANCE = {
|
|
682
|
+
COIN: "crypto",
|
|
683
|
+
EQUITY: "stock",
|
|
684
|
+
CN_EQUITY: "stock",
|
|
685
|
+
HK_EQUITY: "stock",
|
|
686
|
+
KR_EQUITY: "stock",
|
|
687
|
+
PREMARKET: "stock",
|
|
688
|
+
COMMODITY: "commodity",
|
|
689
|
+
INDEX: "index"
|
|
690
|
+
};
|
|
691
|
+
var BYBIT = {
|
|
692
|
+
"": "crypto",
|
|
693
|
+
innovation: "crypto",
|
|
694
|
+
stock: "stock",
|
|
695
|
+
commodity: "commodity",
|
|
696
|
+
ETF: "etf"
|
|
697
|
+
};
|
|
698
|
+
var EXTENDED = {
|
|
699
|
+
Equity: "stock",
|
|
700
|
+
Commodity: "commodity",
|
|
701
|
+
"ETF/Index": "index",
|
|
702
|
+
FX: "forex",
|
|
703
|
+
"Pre-market": "stock"
|
|
704
|
+
};
|
|
705
|
+
function assetClassOf(xex, xtras) {
|
|
706
|
+
if (xtras === void 0) {
|
|
707
|
+
return void 0;
|
|
708
|
+
}
|
|
709
|
+
if (xex === "binance") {
|
|
710
|
+
const brut = xtras.underlyingType;
|
|
711
|
+
return typeof brut === "string" ? BINANCE[brut] : void 0;
|
|
712
|
+
}
|
|
713
|
+
if (xex === "bybit") {
|
|
714
|
+
const brut = xtras.symbolType;
|
|
715
|
+
return typeof brut === "string" ? BYBIT[brut] : void 0;
|
|
716
|
+
}
|
|
717
|
+
if (xex === "extended") {
|
|
718
|
+
const categorie = xtras.category;
|
|
719
|
+
if (typeof categorie !== "string") {
|
|
720
|
+
return void 0;
|
|
721
|
+
}
|
|
722
|
+
if (categorie !== "RWA") {
|
|
723
|
+
return "crypto";
|
|
724
|
+
}
|
|
725
|
+
const sous = xtras.subCategory;
|
|
726
|
+
return typeof sous === "string" ? EXTENDED[sous] : void 0;
|
|
727
|
+
}
|
|
728
|
+
return void 0;
|
|
729
|
+
}
|
|
730
|
+
|
|
680
731
|
// src/helpers/contract-expiry.ts
|
|
681
732
|
var DATED_CONTRACT_TYPES = /* @__PURE__ */ new Set([
|
|
682
733
|
// binance : les trimestriels (`BTCUSDT_260925`, `ETHUSDT_261225`).
|
|
@@ -759,6 +810,7 @@ var CatalogService = class {
|
|
|
759
810
|
xex,
|
|
760
811
|
kind: pair.kind,
|
|
761
812
|
multiplier: multiplierFromXex(pair.name),
|
|
813
|
+
assetClass: assetClassOf(xex, pair.xtras),
|
|
762
814
|
expiresAt: expiryOf(pair.xtras),
|
|
763
815
|
ref: pair.ref ?? null,
|
|
764
816
|
szDecimals: pair.szDecimals,
|
|
@@ -947,6 +999,7 @@ var SpotCatalogService = class {
|
|
|
947
999
|
// Le comptant porte les mêmes échelles que le perp : `SATSUSDT` (×1) et `1000SATSUSDT`
|
|
948
1000
|
// coexistent, et c'est justement entre eux que la comparaison serait fausse.
|
|
949
1001
|
multiplier: multiplierFromXex(pair.name),
|
|
1002
|
+
assetClass: assetClassOf(xex, pair.xtras),
|
|
950
1003
|
ref: pair.ref ?? null,
|
|
951
1004
|
szDecimals: pair.szDecimals,
|
|
952
1005
|
tickSize: pair.tickSize,
|
|
@@ -2137,7 +2190,7 @@ var CANDLES_PER_CALL = {
|
|
|
2137
2190
|
blofin: 1440,
|
|
2138
2191
|
aster: 1500,
|
|
2139
2192
|
hyperliquid: 5e3,
|
|
2140
|
-
pacifica:
|
|
2193
|
+
pacifica: 4e3
|
|
2141
2194
|
};
|
|
2142
2195
|
function candlesPerCallOf(xex) {
|
|
2143
2196
|
return CANDLES_PER_CALL[xex];
|
|
@@ -2163,6 +2216,6 @@ function candlesMaxHistoryOf(xex) {
|
|
|
2163
2216
|
return CANDLES_MAX_HISTORY[xex];
|
|
2164
2217
|
}
|
|
2165
2218
|
|
|
2166
|
-
export { CANDLES_MAX_HISTORY, CANDLES_PER_CALL, CandlesService, CandlesStreamRegistry, CandlesStreamService, CatalogService, ORDER_STATUSES, PricesService, REST_THROTTLE_MS, SPOT_XEXES, SpotCandlesService, SpotCatalogService, SpotPricesService, SpotWsCandlesService, TIMEFRAME_MINUTES, Timeframe, TradingService, WALLET_XEXES, WS_SUBSCRIPTION_LIMITS, WalletService, WsCandlesService, WsTradesService, XGATE_EXCHANGES, XgateEx, XgateModule, buildLevels, buildProtection, candlesMaxHistoryOf, candlesPerCallOf, canonicalFromBase, canonicalFromXex, expiryOf, isDated, multiplierFromXex, restThrottleOf, roundPrice, roundToStep, servesNatively, servesSpot, sourceFor, subscriptionLimitOf, timeframeMs };
|
|
2219
|
+
export { CANDLES_MAX_HISTORY, CANDLES_PER_CALL, CandlesService, CandlesStreamRegistry, CandlesStreamService, CatalogService, ORDER_STATUSES, PricesService, REST_THROTTLE_MS, SPOT_XEXES, SpotCandlesService, SpotCatalogService, SpotPricesService, SpotWsCandlesService, TIMEFRAME_MINUTES, Timeframe, TradingService, WALLET_XEXES, WS_SUBSCRIPTION_LIMITS, WalletService, WsCandlesService, WsTradesService, XGATE_EXCHANGES, XgateEx, XgateModule, assetClassOf, buildLevels, buildProtection, candlesMaxHistoryOf, candlesPerCallOf, canonicalFromBase, canonicalFromXex, expiryOf, isDated, multiplierFromXex, restThrottleOf, roundPrice, roundToStep, servesNatively, servesSpot, sourceFor, subscriptionLimitOf, timeframeMs };
|
|
2167
2220
|
//# sourceMappingURL=index.js.map
|
|
2168
2221
|
//# sourceMappingURL=index.js.map
|