@nightlylabs/dex-sdk 0.3.35 → 0.3.36
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 +18 -4
- package/dist/index.d.cts +43 -10
- package/dist/index.d.ts +43 -10
- package/dist/index.js +18 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -23578,6 +23578,7 @@ var EndpointsV1 = /* @__PURE__ */ ((EndpointsV12) => {
|
|
|
23578
23578
|
EndpointsV12["GetIndexPrices"] = "/v1/get_index_prices";
|
|
23579
23579
|
EndpointsV12["GetAccountValueRanking"] = "/v1/get_account_value_ranking";
|
|
23580
23580
|
EndpointsV12["GetUserAccountValueRanking"] = "/v1/get_user_account_value_ranking";
|
|
23581
|
+
EndpointsV12["GetExchangeStatsHistory"] = "/v1/get_exchange_stats_history";
|
|
23581
23582
|
return EndpointsV12;
|
|
23582
23583
|
})(EndpointsV1 || {});
|
|
23583
23584
|
var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
|
|
@@ -24090,11 +24091,24 @@ var Client = class _Client {
|
|
|
24090
24091
|
const response = await this.sendGetJson("/v1/get_borrow_lending_data" /* GetBorrowLendingData */);
|
|
24091
24092
|
return response;
|
|
24092
24093
|
};
|
|
24093
|
-
this.getChartCandlesInRange = async (
|
|
24094
|
-
|
|
24095
|
-
|
|
24094
|
+
this.getChartCandlesInRange = async ({
|
|
24095
|
+
interval,
|
|
24096
|
+
marketName,
|
|
24097
|
+
timestampStartMs = Math.round((/* @__PURE__ */ new Date()).getTime()),
|
|
24098
|
+
timestampEndMs = Math.round((/* @__PURE__ */ new Date()).getTime() - 24 * 60 * 60 * 1e3),
|
|
24099
|
+
// default 24 back
|
|
24100
|
+
cursor
|
|
24101
|
+
}) => {
|
|
24102
|
+
if (timestampEndMs && timestampStartMs && timestampEndMs > timestampStartMs) {
|
|
24103
|
+
throw new Error("timestampEndMs must be lower than timestampStartMs");
|
|
24096
24104
|
}
|
|
24097
|
-
const response = await this.sendGetJson("/v1/public/chart_candles_in_range" /* GetChartCandlesInRange */,
|
|
24105
|
+
const response = await this.sendGetJson("/v1/public/chart_candles_in_range" /* GetChartCandlesInRange */, {
|
|
24106
|
+
marketName,
|
|
24107
|
+
interval,
|
|
24108
|
+
startTimestamp: timestampStartMs.toString(),
|
|
24109
|
+
endTimestamp: timestampEndMs.toString(),
|
|
24110
|
+
paginationCursor: cursor
|
|
24111
|
+
});
|
|
24098
24112
|
return response;
|
|
24099
24113
|
};
|
|
24100
24114
|
this.getPriceIndexes = async () => {
|
package/dist/index.d.cts
CHANGED
|
@@ -3682,6 +3682,7 @@ interface TokenConfigEntry {
|
|
|
3682
3682
|
contractAddress: string;
|
|
3683
3683
|
tokenDecimals: number;
|
|
3684
3684
|
vaultId?: string;
|
|
3685
|
+
createdAt?: string;
|
|
3685
3686
|
}
|
|
3686
3687
|
interface MarginStep {
|
|
3687
3688
|
initialMarginRatio: string;
|
|
@@ -3709,6 +3710,7 @@ interface PerpMarketConfigEntry {
|
|
|
3709
3710
|
fundingRate: FundingRate;
|
|
3710
3711
|
basicMakerFee: string;
|
|
3711
3712
|
basicTakerFee: string;
|
|
3713
|
+
createdAt?: string;
|
|
3712
3714
|
}
|
|
3713
3715
|
interface SpotMarketConfigEntry {
|
|
3714
3716
|
marketName: string;
|
|
@@ -3718,6 +3720,7 @@ interface SpotMarketConfigEntry {
|
|
|
3718
3720
|
tickSize: string;
|
|
3719
3721
|
basicMakerFee: string;
|
|
3720
3722
|
basicTakerFee: string;
|
|
3723
|
+
createdAt?: string;
|
|
3721
3724
|
}
|
|
3722
3725
|
interface FeeData {
|
|
3723
3726
|
feeToVaultAccount: string;
|
|
@@ -3731,6 +3734,19 @@ interface ExchangeConfig {
|
|
|
3731
3734
|
feeData: FeeData;
|
|
3732
3735
|
systemHaircut: string;
|
|
3733
3736
|
}
|
|
3737
|
+
interface TvlTokenEntry {
|
|
3738
|
+
tokenAddress: string;
|
|
3739
|
+
amount: string;
|
|
3740
|
+
valueUsd: string;
|
|
3741
|
+
}
|
|
3742
|
+
interface ExchangeStatsEntry {
|
|
3743
|
+
timestampOpen: string;
|
|
3744
|
+
timestampClose: string;
|
|
3745
|
+
tvlBreakdown: TvlTokenEntry[];
|
|
3746
|
+
perpVolumeUsd: string;
|
|
3747
|
+
spotVolumeUsd: string;
|
|
3748
|
+
openInterestUsd: string;
|
|
3749
|
+
}
|
|
3734
3750
|
interface FeeTier {
|
|
3735
3751
|
volume: string;
|
|
3736
3752
|
cashback: string;
|
|
@@ -3762,13 +3778,6 @@ interface GetAccountValueRankingResponse {
|
|
|
3762
3778
|
usersRanking: AccountValueRankingEntry[];
|
|
3763
3779
|
paginationCursor?: PaginationCursor;
|
|
3764
3780
|
}
|
|
3765
|
-
interface GetUserAccountValueRankingRequest {
|
|
3766
|
-
userId?: string;
|
|
3767
|
-
userAddress?: string;
|
|
3768
|
-
}
|
|
3769
|
-
interface GetUserAccountValueRankingResponse {
|
|
3770
|
-
usersRanking: AccountValueRankingEntry[];
|
|
3771
|
-
}
|
|
3772
3781
|
interface GetAllVaultsIdsResponse {
|
|
3773
3782
|
vaultsIds: string[];
|
|
3774
3783
|
}
|
|
@@ -3811,6 +3820,15 @@ interface GetChartCandlesInRangeResponse {
|
|
|
3811
3820
|
chartCandles: ChartCandle[];
|
|
3812
3821
|
paginationCursor?: PaginationCursor;
|
|
3813
3822
|
}
|
|
3823
|
+
interface GetExchangeStatsHistoryRequest {
|
|
3824
|
+
olderTimestampMs?: string;
|
|
3825
|
+
newerTimestampMs?: string;
|
|
3826
|
+
paginationCursor?: PaginationCursor;
|
|
3827
|
+
}
|
|
3828
|
+
interface GetExchangeStatsHistoryResponse {
|
|
3829
|
+
data: ExchangeStatsEntry[];
|
|
3830
|
+
paginationCursor?: PaginationCursor;
|
|
3831
|
+
}
|
|
3814
3832
|
interface GetIndexPriceHistoryRequest {
|
|
3815
3833
|
priceIndex: string;
|
|
3816
3834
|
olderTimestampMs?: string;
|
|
@@ -4154,6 +4172,13 @@ interface PointsRankingEntry {
|
|
|
4154
4172
|
interface GetTopPointsRankingResponse {
|
|
4155
4173
|
usersRanking: PointsRankingEntry[];
|
|
4156
4174
|
}
|
|
4175
|
+
interface GetUserAccountValueRankingRequest {
|
|
4176
|
+
userId?: string;
|
|
4177
|
+
userAddress?: string;
|
|
4178
|
+
}
|
|
4179
|
+
interface GetUserAccountValueRankingResponse {
|
|
4180
|
+
usersRanking: AccountValueRankingEntry[];
|
|
4181
|
+
}
|
|
4157
4182
|
interface GetUserAggregatedBoxRewardsStatsRequest {
|
|
4158
4183
|
userId: string;
|
|
4159
4184
|
}
|
|
@@ -5159,7 +5184,8 @@ declare enum EndpointsV1 {
|
|
|
5159
5184
|
GetUserPersonalPointsRanking = "/v1/get_user_personal_points_ranking",
|
|
5160
5185
|
GetIndexPrices = "/v1/get_index_prices",
|
|
5161
5186
|
GetAccountValueRanking = "/v1/get_account_value_ranking",
|
|
5162
|
-
GetUserAccountValueRanking = "/v1/get_user_account_value_ranking"
|
|
5187
|
+
GetUserAccountValueRanking = "/v1/get_user_account_value_ranking",
|
|
5188
|
+
GetExchangeStatsHistory = "/v1/get_exchange_stats_history"
|
|
5163
5189
|
}
|
|
5164
5190
|
type Topic = {
|
|
5165
5191
|
type: "PerpMarket";
|
|
@@ -5571,6 +5597,13 @@ interface WithdrawTokenParams {
|
|
|
5571
5597
|
max: boolean;
|
|
5572
5598
|
recipient: Address;
|
|
5573
5599
|
}
|
|
5600
|
+
interface IGetChartCandlesInRange {
|
|
5601
|
+
marketName: string;
|
|
5602
|
+
interval: ChartInterval;
|
|
5603
|
+
timestampStartMs?: number;
|
|
5604
|
+
timestampEndMs?: number;
|
|
5605
|
+
cursor?: PaginationCursor;
|
|
5606
|
+
}
|
|
5574
5607
|
interface PlaceMultiplePerpOrdersParams {
|
|
5575
5608
|
userId: string;
|
|
5576
5609
|
perpOrders: PerpOrderData[];
|
|
@@ -5868,7 +5901,7 @@ declare class Client {
|
|
|
5868
5901
|
getPerpMarketsData: (markets: string[]) => Promise<GetPerpMarketsDataResponse>;
|
|
5869
5902
|
getSpotMarketsData: (markets: string[]) => Promise<GetSpotMarketsDataResponse>;
|
|
5870
5903
|
getBorrowLendingData: () => Promise<GetBorrowLendingDataResponse>;
|
|
5871
|
-
getChartCandlesInRange: (
|
|
5904
|
+
getChartCandlesInRange: ({ interval, marketName, timestampStartMs, timestampEndMs, cursor, }: IGetChartCandlesInRange) => Promise<GetChartCandlesInRangeResponse>;
|
|
5872
5905
|
getPriceIndexes: () => Promise<GetPriceIndexesResponse>;
|
|
5873
5906
|
getUsersByAddress: (payload: GetUsersByAddressRequest) => Promise<GetUsersByAddressResponse>;
|
|
5874
5907
|
getPerpRecentTrades: (request: GetPerpRecentTradesRequest) => Promise<GetPerpRecentTradesResponse>;
|
|
@@ -5947,4 +5980,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
5947
5980
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
5948
5981
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
5949
5982
|
|
|
5950
|
-
export { ABIs, type AccountValueRankingEntry, type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type BoxOpeningEvent, type BoxReward, BoxRewardTier, type CancelAllPerpOrdersParams, type CancelAllSpotOrdersParams, type CancelPerpOrdersParams, type CancelSpotOrdersParams, type CanceledPerpOrderData, type CanceledPerpOrders, type CanceledPerpTriggerOrderData, type CanceledPerpTriggerOrders, type CanceledSpotOrderData, type CanceledSpotOrders, type ChangePerpOrderParams, type ChangeSpotOrderParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeData, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetAccountValueRankingRequest, type GetAccountValueRankingResponse, type GetAllVaultsIdsResponse, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexPricesResponse, type GetIndexerStatusResponse, type GetOrderBookDataRequest, type GetOrderBookDataResponse, type GetPerpMarketsConfigResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpUserTriggerOrdersRequest, type GetPerpUserTriggerOrdersResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetSpotMarketsConfigResponse, type GetSpotMarketsDataRequest, type GetSpotMarketsDataResponse, type GetSpotRecentTradesRequest, type GetSpotRecentTradesResponse, type GetSpotUserFillsRequest, type GetSpotUserFillsResponse, type GetSpotUserOrdersRequest, type GetSpotUserOrdersResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetTopPointsRankingResponse, type GetUserAccountValueRankingRequest, type GetUserAccountValueRankingResponse, type GetUserAggregatedBoxRewardsStatsRequest, type GetUserAggregatedBoxRewardsStatsResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserBoxRewardsStatsHistoryRequest, type GetUserBoxRewardsStatsHistoryResponse, type GetUserBoxesHistoryRequest, type GetUserBoxesHistoryResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFullLiquidationsHistoryRequest, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsCancelHistoryResponse, type GetUserLiquidationsCancelOrdersHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPartialLiquidationsHistoryRequest, type GetUserPartialLiquidationsHistoryResponse, type GetUserPersonalPointsRankingRequest, type GetUserPersonalPointsRankingResponse, type GetUserPointsHistoryRequest, type GetUserPointsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserRewardsValueRequest, type GetUserRewardsValueResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserVolumeForReferralRequest, type GetUserVolumeForReferralResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type GetVaultWithdrawalsRequest, type GetVaultWithdrawalsResponse, type GlobalLiquidation, type GlobalPartialLiquidation, type HistoricBoxReward, type HistoricalBoxRewardsStats, type HistoricalDeposit, type HistoricalFullLiquidation, type HistoricalFunding, type HistoricalLiquidatedBorrow, type HistoricalLiquidatedCollateral, type HistoricalLiquidatedLend, type HistoricalLiquidatedPosition, type HistoricalLiquidationCancelOrders, type HistoricalPartialLiquidatedPosition, type HistoricalPartialLiquidation, type HistoricalPerpOrder, type HistoricalPoints, type HistoricalReferralStats, type HistoricalSpotOrder, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IndexPriceHistory, type IndexPriceLive, type Lend, type LendTokenParams, type Liquidation, type LiquidationCancelledOrderData, type LiquidationCancelledTriggerOrderData, MAINNET_CONFIG, type MarginStep, Network, type NetworkConfig, type NetworkMode, type NodeStatus, type OpenBoxesRequest, type OpenBoxesResponse, type OpenBoxesSignRequest, type OracleUpdate, type OracleUpdates, type OrderBookData, OrderSide, OrderStatus, OrderType, type PaginationCursor, type PartialLiquidation, type PerpFill, type PerpMarketConfigEntry, type PerpMarketData, type PerpOrder, type PerpOrderData, type PerpOrderDataForMarket, type PerpOrderFills, type PerpOrderbookState, type PerpOrderbookUpdate, type PerpPosition, type PerpTrade, type PerpTradesUpdate, type PerpTriggerOrder, type PerpTriggerOrderTriggered, type PlaceMultiplePerpOrdersParams, type PlaceMultipleSpotOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PlacePerpTriggerOrder, type PlacePerpTriggerOrderParams, type PlaceSpotLimitOrder, type PlaceSpotMarketOrder, type PlaceSpotOrderParams, type PointsRankingEntry, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type ReplaceMultipleSpotOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, type SpotFill, type SpotMarketConfigEntry, type SpotMarketData, type SpotOrder, type SpotOrderData, type SpotOrderDataForMarket, type SpotOrderFills, type SpotOrderbookState, type SpotOrderbookUpdate, type SpotTrade, type SpotTradesUpdate, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TESTNET_CONFIG, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, TransferAction, type TransferToUserParams, type TriggerOrder, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedBoxRewardsStats, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserBoxOpeningEvent, type UserPointsBreakdown, type UserPortfolioValue, type UserRewardsValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WithdrawTokenParams, type WsBorrowLendUpdate, type WsBoxOpeningUpdate, type WsCommand, type WsFill, type WsLiquidatedBorrow, type WsLiquidatedCollateral, type WsLiquidatedLend, type WsLiquidatedPosition, type WsLiquidationUpdate, type WsMessage, type WsOracleUpdates, type WsPartialLiquidatedPosition, type WsPerpMarketUpdates, type WsSpotMarketUpdates, type WsUserUpdates, createAptosClient, createAptosClientFromEnv, generateApiKey, getABIsForNetwork, getNetworkConfig, getNetworkModeFromEnv, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
|
5983
|
+
export { ABIs, type AccountValueRankingEntry, type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type BoxOpeningEvent, type BoxReward, BoxRewardTier, type CancelAllPerpOrdersParams, type CancelAllSpotOrdersParams, type CancelPerpOrdersParams, type CancelSpotOrdersParams, type CanceledPerpOrderData, type CanceledPerpOrders, type CanceledPerpTriggerOrderData, type CanceledPerpTriggerOrders, type CanceledSpotOrderData, type CanceledSpotOrders, type ChangePerpOrderParams, type ChangeSpotOrderParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type ExchangeStatsEntry, type FeeData, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetAccountValueRankingRequest, type GetAccountValueRankingResponse, type GetAllVaultsIdsResponse, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetExchangeStatsHistoryRequest, type GetExchangeStatsHistoryResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexPricesResponse, type GetIndexerStatusResponse, type GetOrderBookDataRequest, type GetOrderBookDataResponse, type GetPerpMarketsConfigResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpUserTriggerOrdersRequest, type GetPerpUserTriggerOrdersResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetSpotMarketsConfigResponse, type GetSpotMarketsDataRequest, type GetSpotMarketsDataResponse, type GetSpotRecentTradesRequest, type GetSpotRecentTradesResponse, type GetSpotUserFillsRequest, type GetSpotUserFillsResponse, type GetSpotUserOrdersRequest, type GetSpotUserOrdersResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetTopPointsRankingResponse, type GetUserAccountValueRankingRequest, type GetUserAccountValueRankingResponse, type GetUserAggregatedBoxRewardsStatsRequest, type GetUserAggregatedBoxRewardsStatsResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserBoxRewardsStatsHistoryRequest, type GetUserBoxRewardsStatsHistoryResponse, type GetUserBoxesHistoryRequest, type GetUserBoxesHistoryResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFullLiquidationsHistoryRequest, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsCancelHistoryResponse, type GetUserLiquidationsCancelOrdersHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPartialLiquidationsHistoryRequest, type GetUserPartialLiquidationsHistoryResponse, type GetUserPersonalPointsRankingRequest, type GetUserPersonalPointsRankingResponse, type GetUserPointsHistoryRequest, type GetUserPointsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserRewardsValueRequest, type GetUserRewardsValueResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserVolumeForReferralRequest, type GetUserVolumeForReferralResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type GetVaultWithdrawalsRequest, type GetVaultWithdrawalsResponse, type GlobalLiquidation, type GlobalPartialLiquidation, type HistoricBoxReward, type HistoricalBoxRewardsStats, type HistoricalDeposit, type HistoricalFullLiquidation, type HistoricalFunding, type HistoricalLiquidatedBorrow, type HistoricalLiquidatedCollateral, type HistoricalLiquidatedLend, type HistoricalLiquidatedPosition, type HistoricalLiquidationCancelOrders, type HistoricalPartialLiquidatedPosition, type HistoricalPartialLiquidation, type HistoricalPerpOrder, type HistoricalPoints, type HistoricalReferralStats, type HistoricalSpotOrder, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type IndexPriceLive, type Lend, type LendTokenParams, type Liquidation, type LiquidationCancelledOrderData, type LiquidationCancelledTriggerOrderData, MAINNET_CONFIG, type MarginStep, Network, type NetworkConfig, type NetworkMode, type NodeStatus, type OpenBoxesRequest, type OpenBoxesResponse, type OpenBoxesSignRequest, type OracleUpdate, type OracleUpdates, type OrderBookData, OrderSide, OrderStatus, OrderType, type PaginationCursor, type PartialLiquidation, type PerpFill, type PerpMarketConfigEntry, type PerpMarketData, type PerpOrder, type PerpOrderData, type PerpOrderDataForMarket, type PerpOrderFills, type PerpOrderbookState, type PerpOrderbookUpdate, type PerpPosition, type PerpTrade, type PerpTradesUpdate, type PerpTriggerOrder, type PerpTriggerOrderTriggered, type PlaceMultiplePerpOrdersParams, type PlaceMultipleSpotOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PlacePerpTriggerOrder, type PlacePerpTriggerOrderParams, type PlaceSpotLimitOrder, type PlaceSpotMarketOrder, type PlaceSpotOrderParams, type PointsRankingEntry, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type ReplaceMultipleSpotOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, type SpotFill, type SpotMarketConfigEntry, type SpotMarketData, type SpotOrder, type SpotOrderData, type SpotOrderDataForMarket, type SpotOrderFills, type SpotOrderbookState, type SpotOrderbookUpdate, type SpotTrade, type SpotTradesUpdate, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TESTNET_CONFIG, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, TransferAction, type TransferToUserParams, type TriggerOrder, type TvlTokenEntry, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedBoxRewardsStats, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserBoxOpeningEvent, type UserPointsBreakdown, type UserPortfolioValue, type UserRewardsValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WithdrawTokenParams, type WsBorrowLendUpdate, type WsBoxOpeningUpdate, type WsCommand, type WsFill, type WsLiquidatedBorrow, type WsLiquidatedCollateral, type WsLiquidatedLend, type WsLiquidatedPosition, type WsLiquidationUpdate, type WsMessage, type WsOracleUpdates, type WsPartialLiquidatedPosition, type WsPerpMarketUpdates, type WsSpotMarketUpdates, type WsUserUpdates, createAptosClient, createAptosClientFromEnv, generateApiKey, getABIsForNetwork, getNetworkConfig, getNetworkModeFromEnv, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -3682,6 +3682,7 @@ interface TokenConfigEntry {
|
|
|
3682
3682
|
contractAddress: string;
|
|
3683
3683
|
tokenDecimals: number;
|
|
3684
3684
|
vaultId?: string;
|
|
3685
|
+
createdAt?: string;
|
|
3685
3686
|
}
|
|
3686
3687
|
interface MarginStep {
|
|
3687
3688
|
initialMarginRatio: string;
|
|
@@ -3709,6 +3710,7 @@ interface PerpMarketConfigEntry {
|
|
|
3709
3710
|
fundingRate: FundingRate;
|
|
3710
3711
|
basicMakerFee: string;
|
|
3711
3712
|
basicTakerFee: string;
|
|
3713
|
+
createdAt?: string;
|
|
3712
3714
|
}
|
|
3713
3715
|
interface SpotMarketConfigEntry {
|
|
3714
3716
|
marketName: string;
|
|
@@ -3718,6 +3720,7 @@ interface SpotMarketConfigEntry {
|
|
|
3718
3720
|
tickSize: string;
|
|
3719
3721
|
basicMakerFee: string;
|
|
3720
3722
|
basicTakerFee: string;
|
|
3723
|
+
createdAt?: string;
|
|
3721
3724
|
}
|
|
3722
3725
|
interface FeeData {
|
|
3723
3726
|
feeToVaultAccount: string;
|
|
@@ -3731,6 +3734,19 @@ interface ExchangeConfig {
|
|
|
3731
3734
|
feeData: FeeData;
|
|
3732
3735
|
systemHaircut: string;
|
|
3733
3736
|
}
|
|
3737
|
+
interface TvlTokenEntry {
|
|
3738
|
+
tokenAddress: string;
|
|
3739
|
+
amount: string;
|
|
3740
|
+
valueUsd: string;
|
|
3741
|
+
}
|
|
3742
|
+
interface ExchangeStatsEntry {
|
|
3743
|
+
timestampOpen: string;
|
|
3744
|
+
timestampClose: string;
|
|
3745
|
+
tvlBreakdown: TvlTokenEntry[];
|
|
3746
|
+
perpVolumeUsd: string;
|
|
3747
|
+
spotVolumeUsd: string;
|
|
3748
|
+
openInterestUsd: string;
|
|
3749
|
+
}
|
|
3734
3750
|
interface FeeTier {
|
|
3735
3751
|
volume: string;
|
|
3736
3752
|
cashback: string;
|
|
@@ -3762,13 +3778,6 @@ interface GetAccountValueRankingResponse {
|
|
|
3762
3778
|
usersRanking: AccountValueRankingEntry[];
|
|
3763
3779
|
paginationCursor?: PaginationCursor;
|
|
3764
3780
|
}
|
|
3765
|
-
interface GetUserAccountValueRankingRequest {
|
|
3766
|
-
userId?: string;
|
|
3767
|
-
userAddress?: string;
|
|
3768
|
-
}
|
|
3769
|
-
interface GetUserAccountValueRankingResponse {
|
|
3770
|
-
usersRanking: AccountValueRankingEntry[];
|
|
3771
|
-
}
|
|
3772
3781
|
interface GetAllVaultsIdsResponse {
|
|
3773
3782
|
vaultsIds: string[];
|
|
3774
3783
|
}
|
|
@@ -3811,6 +3820,15 @@ interface GetChartCandlesInRangeResponse {
|
|
|
3811
3820
|
chartCandles: ChartCandle[];
|
|
3812
3821
|
paginationCursor?: PaginationCursor;
|
|
3813
3822
|
}
|
|
3823
|
+
interface GetExchangeStatsHistoryRequest {
|
|
3824
|
+
olderTimestampMs?: string;
|
|
3825
|
+
newerTimestampMs?: string;
|
|
3826
|
+
paginationCursor?: PaginationCursor;
|
|
3827
|
+
}
|
|
3828
|
+
interface GetExchangeStatsHistoryResponse {
|
|
3829
|
+
data: ExchangeStatsEntry[];
|
|
3830
|
+
paginationCursor?: PaginationCursor;
|
|
3831
|
+
}
|
|
3814
3832
|
interface GetIndexPriceHistoryRequest {
|
|
3815
3833
|
priceIndex: string;
|
|
3816
3834
|
olderTimestampMs?: string;
|
|
@@ -4154,6 +4172,13 @@ interface PointsRankingEntry {
|
|
|
4154
4172
|
interface GetTopPointsRankingResponse {
|
|
4155
4173
|
usersRanking: PointsRankingEntry[];
|
|
4156
4174
|
}
|
|
4175
|
+
interface GetUserAccountValueRankingRequest {
|
|
4176
|
+
userId?: string;
|
|
4177
|
+
userAddress?: string;
|
|
4178
|
+
}
|
|
4179
|
+
interface GetUserAccountValueRankingResponse {
|
|
4180
|
+
usersRanking: AccountValueRankingEntry[];
|
|
4181
|
+
}
|
|
4157
4182
|
interface GetUserAggregatedBoxRewardsStatsRequest {
|
|
4158
4183
|
userId: string;
|
|
4159
4184
|
}
|
|
@@ -5159,7 +5184,8 @@ declare enum EndpointsV1 {
|
|
|
5159
5184
|
GetUserPersonalPointsRanking = "/v1/get_user_personal_points_ranking",
|
|
5160
5185
|
GetIndexPrices = "/v1/get_index_prices",
|
|
5161
5186
|
GetAccountValueRanking = "/v1/get_account_value_ranking",
|
|
5162
|
-
GetUserAccountValueRanking = "/v1/get_user_account_value_ranking"
|
|
5187
|
+
GetUserAccountValueRanking = "/v1/get_user_account_value_ranking",
|
|
5188
|
+
GetExchangeStatsHistory = "/v1/get_exchange_stats_history"
|
|
5163
5189
|
}
|
|
5164
5190
|
type Topic = {
|
|
5165
5191
|
type: "PerpMarket";
|
|
@@ -5571,6 +5597,13 @@ interface WithdrawTokenParams {
|
|
|
5571
5597
|
max: boolean;
|
|
5572
5598
|
recipient: Address;
|
|
5573
5599
|
}
|
|
5600
|
+
interface IGetChartCandlesInRange {
|
|
5601
|
+
marketName: string;
|
|
5602
|
+
interval: ChartInterval;
|
|
5603
|
+
timestampStartMs?: number;
|
|
5604
|
+
timestampEndMs?: number;
|
|
5605
|
+
cursor?: PaginationCursor;
|
|
5606
|
+
}
|
|
5574
5607
|
interface PlaceMultiplePerpOrdersParams {
|
|
5575
5608
|
userId: string;
|
|
5576
5609
|
perpOrders: PerpOrderData[];
|
|
@@ -5868,7 +5901,7 @@ declare class Client {
|
|
|
5868
5901
|
getPerpMarketsData: (markets: string[]) => Promise<GetPerpMarketsDataResponse>;
|
|
5869
5902
|
getSpotMarketsData: (markets: string[]) => Promise<GetSpotMarketsDataResponse>;
|
|
5870
5903
|
getBorrowLendingData: () => Promise<GetBorrowLendingDataResponse>;
|
|
5871
|
-
getChartCandlesInRange: (
|
|
5904
|
+
getChartCandlesInRange: ({ interval, marketName, timestampStartMs, timestampEndMs, cursor, }: IGetChartCandlesInRange) => Promise<GetChartCandlesInRangeResponse>;
|
|
5872
5905
|
getPriceIndexes: () => Promise<GetPriceIndexesResponse>;
|
|
5873
5906
|
getUsersByAddress: (payload: GetUsersByAddressRequest) => Promise<GetUsersByAddressResponse>;
|
|
5874
5907
|
getPerpRecentTrades: (request: GetPerpRecentTradesRequest) => Promise<GetPerpRecentTradesResponse>;
|
|
@@ -5947,4 +5980,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
5947
5980
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
5948
5981
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
5949
5982
|
|
|
5950
|
-
export { ABIs, type AccountValueRankingEntry, type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type BoxOpeningEvent, type BoxReward, BoxRewardTier, type CancelAllPerpOrdersParams, type CancelAllSpotOrdersParams, type CancelPerpOrdersParams, type CancelSpotOrdersParams, type CanceledPerpOrderData, type CanceledPerpOrders, type CanceledPerpTriggerOrderData, type CanceledPerpTriggerOrders, type CanceledSpotOrderData, type CanceledSpotOrders, type ChangePerpOrderParams, type ChangeSpotOrderParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeData, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetAccountValueRankingRequest, type GetAccountValueRankingResponse, type GetAllVaultsIdsResponse, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexPricesResponse, type GetIndexerStatusResponse, type GetOrderBookDataRequest, type GetOrderBookDataResponse, type GetPerpMarketsConfigResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpUserTriggerOrdersRequest, type GetPerpUserTriggerOrdersResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetSpotMarketsConfigResponse, type GetSpotMarketsDataRequest, type GetSpotMarketsDataResponse, type GetSpotRecentTradesRequest, type GetSpotRecentTradesResponse, type GetSpotUserFillsRequest, type GetSpotUserFillsResponse, type GetSpotUserOrdersRequest, type GetSpotUserOrdersResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetTopPointsRankingResponse, type GetUserAccountValueRankingRequest, type GetUserAccountValueRankingResponse, type GetUserAggregatedBoxRewardsStatsRequest, type GetUserAggregatedBoxRewardsStatsResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserBoxRewardsStatsHistoryRequest, type GetUserBoxRewardsStatsHistoryResponse, type GetUserBoxesHistoryRequest, type GetUserBoxesHistoryResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFullLiquidationsHistoryRequest, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsCancelHistoryResponse, type GetUserLiquidationsCancelOrdersHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPartialLiquidationsHistoryRequest, type GetUserPartialLiquidationsHistoryResponse, type GetUserPersonalPointsRankingRequest, type GetUserPersonalPointsRankingResponse, type GetUserPointsHistoryRequest, type GetUserPointsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserRewardsValueRequest, type GetUserRewardsValueResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserVolumeForReferralRequest, type GetUserVolumeForReferralResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type GetVaultWithdrawalsRequest, type GetVaultWithdrawalsResponse, type GlobalLiquidation, type GlobalPartialLiquidation, type HistoricBoxReward, type HistoricalBoxRewardsStats, type HistoricalDeposit, type HistoricalFullLiquidation, type HistoricalFunding, type HistoricalLiquidatedBorrow, type HistoricalLiquidatedCollateral, type HistoricalLiquidatedLend, type HistoricalLiquidatedPosition, type HistoricalLiquidationCancelOrders, type HistoricalPartialLiquidatedPosition, type HistoricalPartialLiquidation, type HistoricalPerpOrder, type HistoricalPoints, type HistoricalReferralStats, type HistoricalSpotOrder, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IndexPriceHistory, type IndexPriceLive, type Lend, type LendTokenParams, type Liquidation, type LiquidationCancelledOrderData, type LiquidationCancelledTriggerOrderData, MAINNET_CONFIG, type MarginStep, Network, type NetworkConfig, type NetworkMode, type NodeStatus, type OpenBoxesRequest, type OpenBoxesResponse, type OpenBoxesSignRequest, type OracleUpdate, type OracleUpdates, type OrderBookData, OrderSide, OrderStatus, OrderType, type PaginationCursor, type PartialLiquidation, type PerpFill, type PerpMarketConfigEntry, type PerpMarketData, type PerpOrder, type PerpOrderData, type PerpOrderDataForMarket, type PerpOrderFills, type PerpOrderbookState, type PerpOrderbookUpdate, type PerpPosition, type PerpTrade, type PerpTradesUpdate, type PerpTriggerOrder, type PerpTriggerOrderTriggered, type PlaceMultiplePerpOrdersParams, type PlaceMultipleSpotOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PlacePerpTriggerOrder, type PlacePerpTriggerOrderParams, type PlaceSpotLimitOrder, type PlaceSpotMarketOrder, type PlaceSpotOrderParams, type PointsRankingEntry, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type ReplaceMultipleSpotOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, type SpotFill, type SpotMarketConfigEntry, type SpotMarketData, type SpotOrder, type SpotOrderData, type SpotOrderDataForMarket, type SpotOrderFills, type SpotOrderbookState, type SpotOrderbookUpdate, type SpotTrade, type SpotTradesUpdate, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TESTNET_CONFIG, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, TransferAction, type TransferToUserParams, type TriggerOrder, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedBoxRewardsStats, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserBoxOpeningEvent, type UserPointsBreakdown, type UserPortfolioValue, type UserRewardsValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WithdrawTokenParams, type WsBorrowLendUpdate, type WsBoxOpeningUpdate, type WsCommand, type WsFill, type WsLiquidatedBorrow, type WsLiquidatedCollateral, type WsLiquidatedLend, type WsLiquidatedPosition, type WsLiquidationUpdate, type WsMessage, type WsOracleUpdates, type WsPartialLiquidatedPosition, type WsPerpMarketUpdates, type WsSpotMarketUpdates, type WsUserUpdates, createAptosClient, createAptosClientFromEnv, generateApiKey, getABIsForNetwork, getNetworkConfig, getNetworkModeFromEnv, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
|
5983
|
+
export { ABIs, type AccountValueRankingEntry, type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type BoxOpeningEvent, type BoxReward, BoxRewardTier, type CancelAllPerpOrdersParams, type CancelAllSpotOrdersParams, type CancelPerpOrdersParams, type CancelSpotOrdersParams, type CanceledPerpOrderData, type CanceledPerpOrders, type CanceledPerpTriggerOrderData, type CanceledPerpTriggerOrders, type CanceledSpotOrderData, type CanceledSpotOrders, type ChangePerpOrderParams, type ChangeSpotOrderParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type ExchangeStatsEntry, type FeeData, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetAccountValueRankingRequest, type GetAccountValueRankingResponse, type GetAllVaultsIdsResponse, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetExchangeStatsHistoryRequest, type GetExchangeStatsHistoryResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexPricesResponse, type GetIndexerStatusResponse, type GetOrderBookDataRequest, type GetOrderBookDataResponse, type GetPerpMarketsConfigResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpUserTriggerOrdersRequest, type GetPerpUserTriggerOrdersResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetSpotMarketsConfigResponse, type GetSpotMarketsDataRequest, type GetSpotMarketsDataResponse, type GetSpotRecentTradesRequest, type GetSpotRecentTradesResponse, type GetSpotUserFillsRequest, type GetSpotUserFillsResponse, type GetSpotUserOrdersRequest, type GetSpotUserOrdersResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetTopPointsRankingResponse, type GetUserAccountValueRankingRequest, type GetUserAccountValueRankingResponse, type GetUserAggregatedBoxRewardsStatsRequest, type GetUserAggregatedBoxRewardsStatsResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserBoxRewardsStatsHistoryRequest, type GetUserBoxRewardsStatsHistoryResponse, type GetUserBoxesHistoryRequest, type GetUserBoxesHistoryResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFullLiquidationsHistoryRequest, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsCancelHistoryResponse, type GetUserLiquidationsCancelOrdersHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPartialLiquidationsHistoryRequest, type GetUserPartialLiquidationsHistoryResponse, type GetUserPersonalPointsRankingRequest, type GetUserPersonalPointsRankingResponse, type GetUserPointsHistoryRequest, type GetUserPointsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserRewardsValueRequest, type GetUserRewardsValueResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserVolumeForReferralRequest, type GetUserVolumeForReferralResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type GetVaultWithdrawalsRequest, type GetVaultWithdrawalsResponse, type GlobalLiquidation, type GlobalPartialLiquidation, type HistoricBoxReward, type HistoricalBoxRewardsStats, type HistoricalDeposit, type HistoricalFullLiquidation, type HistoricalFunding, type HistoricalLiquidatedBorrow, type HistoricalLiquidatedCollateral, type HistoricalLiquidatedLend, type HistoricalLiquidatedPosition, type HistoricalLiquidationCancelOrders, type HistoricalPartialLiquidatedPosition, type HistoricalPartialLiquidation, type HistoricalPerpOrder, type HistoricalPoints, type HistoricalReferralStats, type HistoricalSpotOrder, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type IndexPriceLive, type Lend, type LendTokenParams, type Liquidation, type LiquidationCancelledOrderData, type LiquidationCancelledTriggerOrderData, MAINNET_CONFIG, type MarginStep, Network, type NetworkConfig, type NetworkMode, type NodeStatus, type OpenBoxesRequest, type OpenBoxesResponse, type OpenBoxesSignRequest, type OracleUpdate, type OracleUpdates, type OrderBookData, OrderSide, OrderStatus, OrderType, type PaginationCursor, type PartialLiquidation, type PerpFill, type PerpMarketConfigEntry, type PerpMarketData, type PerpOrder, type PerpOrderData, type PerpOrderDataForMarket, type PerpOrderFills, type PerpOrderbookState, type PerpOrderbookUpdate, type PerpPosition, type PerpTrade, type PerpTradesUpdate, type PerpTriggerOrder, type PerpTriggerOrderTriggered, type PlaceMultiplePerpOrdersParams, type PlaceMultipleSpotOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PlacePerpTriggerOrder, type PlacePerpTriggerOrderParams, type PlaceSpotLimitOrder, type PlaceSpotMarketOrder, type PlaceSpotOrderParams, type PointsRankingEntry, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type ReplaceMultipleSpotOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, type SpotFill, type SpotMarketConfigEntry, type SpotMarketData, type SpotOrder, type SpotOrderData, type SpotOrderDataForMarket, type SpotOrderFills, type SpotOrderbookState, type SpotOrderbookUpdate, type SpotTrade, type SpotTradesUpdate, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TESTNET_CONFIG, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, TransferAction, type TransferToUserParams, type TriggerOrder, type TvlTokenEntry, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedBoxRewardsStats, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserBoxOpeningEvent, type UserPointsBreakdown, type UserPortfolioValue, type UserRewardsValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WithdrawTokenParams, type WsBorrowLendUpdate, type WsBoxOpeningUpdate, type WsCommand, type WsFill, type WsLiquidatedBorrow, type WsLiquidatedCollateral, type WsLiquidatedLend, type WsLiquidatedPosition, type WsLiquidationUpdate, type WsMessage, type WsOracleUpdates, type WsPartialLiquidatedPosition, type WsPerpMarketUpdates, type WsSpotMarketUpdates, type WsUserUpdates, createAptosClient, createAptosClientFromEnv, generateApiKey, getABIsForNetwork, getNetworkConfig, getNetworkModeFromEnv, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
package/dist/index.js
CHANGED
|
@@ -23536,6 +23536,7 @@ var EndpointsV1 = /* @__PURE__ */ ((EndpointsV12) => {
|
|
|
23536
23536
|
EndpointsV12["GetIndexPrices"] = "/v1/get_index_prices";
|
|
23537
23537
|
EndpointsV12["GetAccountValueRanking"] = "/v1/get_account_value_ranking";
|
|
23538
23538
|
EndpointsV12["GetUserAccountValueRanking"] = "/v1/get_user_account_value_ranking";
|
|
23539
|
+
EndpointsV12["GetExchangeStatsHistory"] = "/v1/get_exchange_stats_history";
|
|
23539
23540
|
return EndpointsV12;
|
|
23540
23541
|
})(EndpointsV1 || {});
|
|
23541
23542
|
var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
|
|
@@ -24048,11 +24049,24 @@ var Client = class _Client {
|
|
|
24048
24049
|
const response = await this.sendGetJson("/v1/get_borrow_lending_data" /* GetBorrowLendingData */);
|
|
24049
24050
|
return response;
|
|
24050
24051
|
};
|
|
24051
|
-
this.getChartCandlesInRange = async (
|
|
24052
|
-
|
|
24053
|
-
|
|
24052
|
+
this.getChartCandlesInRange = async ({
|
|
24053
|
+
interval,
|
|
24054
|
+
marketName,
|
|
24055
|
+
timestampStartMs = Math.round((/* @__PURE__ */ new Date()).getTime()),
|
|
24056
|
+
timestampEndMs = Math.round((/* @__PURE__ */ new Date()).getTime() - 24 * 60 * 60 * 1e3),
|
|
24057
|
+
// default 24 back
|
|
24058
|
+
cursor
|
|
24059
|
+
}) => {
|
|
24060
|
+
if (timestampEndMs && timestampStartMs && timestampEndMs > timestampStartMs) {
|
|
24061
|
+
throw new Error("timestampEndMs must be lower than timestampStartMs");
|
|
24054
24062
|
}
|
|
24055
|
-
const response = await this.sendGetJson("/v1/public/chart_candles_in_range" /* GetChartCandlesInRange */,
|
|
24063
|
+
const response = await this.sendGetJson("/v1/public/chart_candles_in_range" /* GetChartCandlesInRange */, {
|
|
24064
|
+
marketName,
|
|
24065
|
+
interval,
|
|
24066
|
+
startTimestamp: timestampStartMs.toString(),
|
|
24067
|
+
endTimestamp: timestampEndMs.toString(),
|
|
24068
|
+
paginationCursor: cursor
|
|
24069
|
+
});
|
|
24056
24070
|
return response;
|
|
24057
24071
|
};
|
|
24058
24072
|
this.getPriceIndexes = async () => {
|