@blackcube/xgate-sdk 0.25.3 → 0.25.5
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 +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -5
- package/dist/index.d.ts +47 -5
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -480,10 +480,23 @@ declare function subscriptionLimitOf(xex: XgateEx): number | undefined;
|
|
|
480
480
|
*
|
|
481
481
|
* **aster** — 1500 ; non documenté, API de forme binance.
|
|
482
482
|
*
|
|
483
|
-
* **
|
|
484
|
-
* (`
|
|
485
|
-
*
|
|
486
|
-
*
|
|
483
|
+
* **pacifica** — **4 000**, et c'est SA DOCUMENTATION qui le dit : « `limit` : Capped at 4000; defaults to 4000
|
|
484
|
+
* if not provided » (`docs.pacifica.fi/api-documentation/api/rest-api/markets/get-candle-data`). Le plafond joue
|
|
485
|
+
* même sans `limit`, puisque 4 000 est aussi le défaut.
|
|
486
|
+
*
|
|
487
|
+
* ⚠️ AU-DELÀ, ELLE NE TRONQUE PAS : ELLE REND UN TABLEAU VIDE, avec `success: true`. Vérifié le 2026-08-24 sur
|
|
488
|
+
* SOL en 15m — 4 000 barres demandées rendent 3 883 bougies, 4 010 en rendent ZÉRO. Une fenêtre trop large ne
|
|
489
|
+
* coûte donc pas quelques barres perdues, elle coûte l'appel entier, en silence.
|
|
490
|
+
*
|
|
491
|
+
* ⚠️ CETTE ENTRÉE A VALU 500 PENDANT DES MOIS, sur la foi du commentaire ci-dessous qui affirmait que pacifica
|
|
492
|
+
* « n'accepte aucun limit ». C'est faux : son endpoint le documente. Huit fois trop d'appels, à quatre secondes
|
|
493
|
+
* de cadence chacun — mesuré le 2026-08-24, un backfill 15m sur ses 74 séries a coûté 1 026 appels et 72
|
|
494
|
+
* minutes là où il en fallait huit fois moins.
|
|
495
|
+
*
|
|
496
|
+
* **hyperliquid** n'accepte, elle, aucun `limit` : son SDK n'envoie que `startTime`/`endTime`
|
|
497
|
+
* (`get-candle-snapshot.ts`). Le nombre sert alors à dimensionner la FENÊTRE demandée, pas à remplir un
|
|
498
|
+
* paramètre. La venue borne d'elle-même à ~5 000 bougies par (coin, intervalle) — et l'horizon que ça couvre
|
|
499
|
+
* dépend de l'activité du coin, ce n'est donc pas une durée fixe.
|
|
487
500
|
*
|
|
488
501
|
* ⚠️ UNE VENUE ABSENTE DE CETTE TABLE N'A PAS DE PLAFOND DOCUMENTÉ — ce qui n'est pas « pas de plafond ». On ne
|
|
489
502
|
* devine aucun chiffre : le jour où l'une d'elles s'en approche, on lit sa documentation et on l'ajoute.
|
|
@@ -546,6 +559,35 @@ declare const REST_THROTTLE_MS: Partial<Record<XgateEx, number>>;
|
|
|
546
559
|
* plus vite que ce que la table annonce. C'est à lui de sérialiser par venue.
|
|
547
560
|
*/
|
|
548
561
|
declare function restThrottleOf(xex: XgateEx): number | undefined;
|
|
562
|
+
/**
|
|
563
|
+
* TOUT L'HISTORIQUE QU'UNE VENUE ACCEPTE DE SERVIR, en bougies par (marché, intervalle).
|
|
564
|
+
*
|
|
565
|
+
* ⚠️ CE N'EST PAS `CANDLES_PER_CALL`, ET LES CONFONDRE FAIT LIRE UN BACKFILL DE TRAVERS. Le premier plafond dit
|
|
566
|
+
* combien de bougies tiennent dans UN appel : binance en rend 1 500 à la fois et sert pourtant quarante-quatre
|
|
567
|
+
* mois, parce qu'on pagine. Celui-ci dit combien la venue en garde EN TOUT — au-delà, aucune pagination ne sert à
|
|
568
|
+
* rien, elle répond une liste vide.
|
|
569
|
+
*
|
|
570
|
+
* **hyperliquid** : « Only the most recent 5000 candles are available » (documentation officielle,
|
|
571
|
+
* `info` endpoint, `candleSnapshot`). La fenêtre GLISSE : ce qui sort des 5 000 dernières devient définitivement
|
|
572
|
+
* hors de portée. Sondé le 2026-08-16 sur dix symboles au 2024-09-14 en 15m — POL rend ~500 barres (coin peu
|
|
573
|
+
* traité, ses 5 000 bougies s'étalent sur deux ans), les neuf autres rendent ZÉRO.
|
|
574
|
+
*
|
|
575
|
+
* L'horizon couvert dépend donc de l'ACTIVITÉ du marché, jamais d'une durée fixe : en 1d et 1w la venue est
|
|
576
|
+
* complète, le plafond ne mord que sous le jour.
|
|
577
|
+
*
|
|
578
|
+
* ⚠️ UNE VENUE ABSENTE DE CETTE TABLE SERT SON HISTORIQUE COMPLET par pagination, pour autant qu'on sache. Ce
|
|
579
|
+
* n'est pas une valeur par défaut confortable : c'est ce qui a été constaté. Le jour où l'une d'elles s'arrête,
|
|
580
|
+
* on lit sa documentation et on l'ajoute — on ne devine aucun chiffre ici.
|
|
581
|
+
*/
|
|
582
|
+
declare const CANDLES_MAX_HISTORY: Partial<Record<XgateEx, number>>;
|
|
583
|
+
/**
|
|
584
|
+
* Combien de bougies une venue garde au total, ou `undefined` quand elle sert tout son historique.
|
|
585
|
+
*
|
|
586
|
+
* ⚠️ LA CLÉ EST LA VENUE, PAS LA LIGNE DE CATALOGUE DE L'APPELANT — même règle que `candlesPerCallOf` : un
|
|
587
|
+
* consommateur qui sépare le comptant du perpétuel (`binance` / `binance-spot`) résout vers la venue avant de
|
|
588
|
+
* demander, sinon il lit `undefined` et croit à un historique complet.
|
|
589
|
+
*/
|
|
590
|
+
declare function candlesMaxHistoryOf(xex: XgateEx): number | undefined;
|
|
549
591
|
|
|
550
592
|
/**
|
|
551
593
|
* UNE COTATION, TELLE QU'XGATE LA REND — quelle que soit la venue d'où elle vient.
|
|
@@ -1815,4 +1857,4 @@ declare function expiryOf(xtras?: Record<string, unknown>): Date | undefined;
|
|
|
1815
1857
|
*/
|
|
1816
1858
|
declare function isDated(xtras?: Record<string, unknown>): boolean;
|
|
1817
1859
|
|
|
1818
|
-
export { 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, candlesPerCallOf, canonicalFromBase, canonicalFromXex, expiryOf, isDated, multiplierFromXex, restThrottleOf, roundPrice, roundToStep, servesNatively, servesSpot, sourceFor, subscriptionLimitOf, timeframeMs };
|
|
1860
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -480,10 +480,23 @@ declare function subscriptionLimitOf(xex: XgateEx): number | undefined;
|
|
|
480
480
|
*
|
|
481
481
|
* **aster** — 1500 ; non documenté, API de forme binance.
|
|
482
482
|
*
|
|
483
|
-
* **
|
|
484
|
-
* (`
|
|
485
|
-
*
|
|
486
|
-
*
|
|
483
|
+
* **pacifica** — **4 000**, et c'est SA DOCUMENTATION qui le dit : « `limit` : Capped at 4000; defaults to 4000
|
|
484
|
+
* if not provided » (`docs.pacifica.fi/api-documentation/api/rest-api/markets/get-candle-data`). Le plafond joue
|
|
485
|
+
* même sans `limit`, puisque 4 000 est aussi le défaut.
|
|
486
|
+
*
|
|
487
|
+
* ⚠️ AU-DELÀ, ELLE NE TRONQUE PAS : ELLE REND UN TABLEAU VIDE, avec `success: true`. Vérifié le 2026-08-24 sur
|
|
488
|
+
* SOL en 15m — 4 000 barres demandées rendent 3 883 bougies, 4 010 en rendent ZÉRO. Une fenêtre trop large ne
|
|
489
|
+
* coûte donc pas quelques barres perdues, elle coûte l'appel entier, en silence.
|
|
490
|
+
*
|
|
491
|
+
* ⚠️ CETTE ENTRÉE A VALU 500 PENDANT DES MOIS, sur la foi du commentaire ci-dessous qui affirmait que pacifica
|
|
492
|
+
* « n'accepte aucun limit ». C'est faux : son endpoint le documente. Huit fois trop d'appels, à quatre secondes
|
|
493
|
+
* de cadence chacun — mesuré le 2026-08-24, un backfill 15m sur ses 74 séries a coûté 1 026 appels et 72
|
|
494
|
+
* minutes là où il en fallait huit fois moins.
|
|
495
|
+
*
|
|
496
|
+
* **hyperliquid** n'accepte, elle, aucun `limit` : son SDK n'envoie que `startTime`/`endTime`
|
|
497
|
+
* (`get-candle-snapshot.ts`). Le nombre sert alors à dimensionner la FENÊTRE demandée, pas à remplir un
|
|
498
|
+
* paramètre. La venue borne d'elle-même à ~5 000 bougies par (coin, intervalle) — et l'horizon que ça couvre
|
|
499
|
+
* dépend de l'activité du coin, ce n'est donc pas une durée fixe.
|
|
487
500
|
*
|
|
488
501
|
* ⚠️ UNE VENUE ABSENTE DE CETTE TABLE N'A PAS DE PLAFOND DOCUMENTÉ — ce qui n'est pas « pas de plafond ». On ne
|
|
489
502
|
* devine aucun chiffre : le jour où l'une d'elles s'en approche, on lit sa documentation et on l'ajoute.
|
|
@@ -546,6 +559,35 @@ declare const REST_THROTTLE_MS: Partial<Record<XgateEx, number>>;
|
|
|
546
559
|
* plus vite que ce que la table annonce. C'est à lui de sérialiser par venue.
|
|
547
560
|
*/
|
|
548
561
|
declare function restThrottleOf(xex: XgateEx): number | undefined;
|
|
562
|
+
/**
|
|
563
|
+
* TOUT L'HISTORIQUE QU'UNE VENUE ACCEPTE DE SERVIR, en bougies par (marché, intervalle).
|
|
564
|
+
*
|
|
565
|
+
* ⚠️ CE N'EST PAS `CANDLES_PER_CALL`, ET LES CONFONDRE FAIT LIRE UN BACKFILL DE TRAVERS. Le premier plafond dit
|
|
566
|
+
* combien de bougies tiennent dans UN appel : binance en rend 1 500 à la fois et sert pourtant quarante-quatre
|
|
567
|
+
* mois, parce qu'on pagine. Celui-ci dit combien la venue en garde EN TOUT — au-delà, aucune pagination ne sert à
|
|
568
|
+
* rien, elle répond une liste vide.
|
|
569
|
+
*
|
|
570
|
+
* **hyperliquid** : « Only the most recent 5000 candles are available » (documentation officielle,
|
|
571
|
+
* `info` endpoint, `candleSnapshot`). La fenêtre GLISSE : ce qui sort des 5 000 dernières devient définitivement
|
|
572
|
+
* hors de portée. Sondé le 2026-08-16 sur dix symboles au 2024-09-14 en 15m — POL rend ~500 barres (coin peu
|
|
573
|
+
* traité, ses 5 000 bougies s'étalent sur deux ans), les neuf autres rendent ZÉRO.
|
|
574
|
+
*
|
|
575
|
+
* L'horizon couvert dépend donc de l'ACTIVITÉ du marché, jamais d'une durée fixe : en 1d et 1w la venue est
|
|
576
|
+
* complète, le plafond ne mord que sous le jour.
|
|
577
|
+
*
|
|
578
|
+
* ⚠️ UNE VENUE ABSENTE DE CETTE TABLE SERT SON HISTORIQUE COMPLET par pagination, pour autant qu'on sache. Ce
|
|
579
|
+
* n'est pas une valeur par défaut confortable : c'est ce qui a été constaté. Le jour où l'une d'elles s'arrête,
|
|
580
|
+
* on lit sa documentation et on l'ajoute — on ne devine aucun chiffre ici.
|
|
581
|
+
*/
|
|
582
|
+
declare const CANDLES_MAX_HISTORY: Partial<Record<XgateEx, number>>;
|
|
583
|
+
/**
|
|
584
|
+
* Combien de bougies une venue garde au total, ou `undefined` quand elle sert tout son historique.
|
|
585
|
+
*
|
|
586
|
+
* ⚠️ LA CLÉ EST LA VENUE, PAS LA LIGNE DE CATALOGUE DE L'APPELANT — même règle que `candlesPerCallOf` : un
|
|
587
|
+
* consommateur qui sépare le comptant du perpétuel (`binance` / `binance-spot`) résout vers la venue avant de
|
|
588
|
+
* demander, sinon il lit `undefined` et croit à un historique complet.
|
|
589
|
+
*/
|
|
590
|
+
declare function candlesMaxHistoryOf(xex: XgateEx): number | undefined;
|
|
549
591
|
|
|
550
592
|
/**
|
|
551
593
|
* UNE COTATION, TELLE QU'XGATE LA REND — quelle que soit la venue d'où elle vient.
|
|
@@ -1815,4 +1857,4 @@ declare function expiryOf(xtras?: Record<string, unknown>): Date | undefined;
|
|
|
1815
1857
|
*/
|
|
1816
1858
|
declare function isDated(xtras?: Record<string, unknown>): boolean;
|
|
1817
1859
|
|
|
1818
|
-
export { 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, candlesPerCallOf, canonicalFromBase, canonicalFromXex, expiryOf, isDated, multiplierFromXex, restThrottleOf, roundPrice, roundToStep, servesNatively, servesSpot, sourceFor, subscriptionLimitOf, timeframeMs };
|
|
1860
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -2137,7 +2137,7 @@ var CANDLES_PER_CALL = {
|
|
|
2137
2137
|
blofin: 1440,
|
|
2138
2138
|
aster: 1500,
|
|
2139
2139
|
hyperliquid: 5e3,
|
|
2140
|
-
pacifica:
|
|
2140
|
+
pacifica: 4e3
|
|
2141
2141
|
};
|
|
2142
2142
|
function candlesPerCallOf(xex) {
|
|
2143
2143
|
return CANDLES_PER_CALL[xex];
|
|
@@ -2156,7 +2156,13 @@ var REST_THROTTLE_MS = {
|
|
|
2156
2156
|
function restThrottleOf(xex) {
|
|
2157
2157
|
return REST_THROTTLE_MS[xex];
|
|
2158
2158
|
}
|
|
2159
|
+
var CANDLES_MAX_HISTORY = {
|
|
2160
|
+
hyperliquid: 5e3
|
|
2161
|
+
};
|
|
2162
|
+
function candlesMaxHistoryOf(xex) {
|
|
2163
|
+
return CANDLES_MAX_HISTORY[xex];
|
|
2164
|
+
}
|
|
2159
2165
|
|
|
2160
|
-
export { 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, candlesPerCallOf, canonicalFromBase, canonicalFromXex, expiryOf, isDated, multiplierFromXex, restThrottleOf, roundPrice, roundToStep, servesNatively, servesSpot, sourceFor, subscriptionLimitOf, timeframeMs };
|
|
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 };
|
|
2161
2167
|
//# sourceMappingURL=index.js.map
|
|
2162
2168
|
//# sourceMappingURL=index.js.map
|