@nightlylabs/dex-sdk 0.1.26 → 0.1.27
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 +5 -0
- package/dist/index.d.cts +41 -17
- package/dist/index.d.ts +41 -17
- package/dist/index.js +5 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -757,6 +757,7 @@ var EndpointsV1 = /* @__PURE__ */ ((EndpointsV12) => {
|
|
|
757
757
|
EndpointsV12["GetIndexerStatus"] = "/v1/get_indexer_status";
|
|
758
758
|
EndpointsV12["GetVaultWithdrawals"] = "/v1/get_vault_withdrawals";
|
|
759
759
|
EndpointsV12["GetVaultDeposits"] = "/v1/get_vault_deposits";
|
|
760
|
+
EndpointsV12["GetUserVolumeForReferral"] = "/v1/get_required_volume_for_referral";
|
|
760
761
|
return EndpointsV12;
|
|
761
762
|
})(EndpointsV1 || {});
|
|
762
763
|
var SpotMarketStatus = /* @__PURE__ */ ((SpotMarketStatus2) => {
|
|
@@ -1447,6 +1448,10 @@ var Client = class _Client {
|
|
|
1447
1448
|
const response = await this.sendGetJson("/v1/get_vault_withdrawals" /* GetVaultWithdrawals */, request);
|
|
1448
1449
|
return response;
|
|
1449
1450
|
};
|
|
1451
|
+
this.getUserRequiredVolumeForReferral = async (request) => {
|
|
1452
|
+
const response = await this.sendGetJson("/v1/get_required_volume_for_referral" /* GetUserVolumeForReferral */, request);
|
|
1453
|
+
return response;
|
|
1454
|
+
};
|
|
1450
1455
|
// Meta
|
|
1451
1456
|
this.getTime = async () => {
|
|
1452
1457
|
const response = await this.sendGetJson("/time" /* Time */);
|
package/dist/index.d.cts
CHANGED
|
@@ -715,13 +715,6 @@ interface GetUserVaultDepositsRequest {
|
|
|
715
715
|
newerTimestampMs?: string;
|
|
716
716
|
paginationCursor?: PaginationCursor;
|
|
717
717
|
}
|
|
718
|
-
interface HistoricalVaultDeposit {
|
|
719
|
-
vaultId: string;
|
|
720
|
-
usdDepositAmount: string;
|
|
721
|
-
sharesReceived: string;
|
|
722
|
-
tokensReceived: string;
|
|
723
|
-
timestamp: string;
|
|
724
|
-
}
|
|
725
718
|
interface GetUserVaultDepositsResponse {
|
|
726
719
|
vaultDeposits: HistoricalVaultDeposit[];
|
|
727
720
|
paginationCursor?: PaginationCursor;
|
|
@@ -733,18 +726,17 @@ interface GetUserVaultWithdrawsRequest {
|
|
|
733
726
|
newerTimestampMs?: string;
|
|
734
727
|
paginationCursor?: PaginationCursor;
|
|
735
728
|
}
|
|
736
|
-
interface HistoricalVaultWithdraw {
|
|
737
|
-
userId: string;
|
|
738
|
-
vaultId: string;
|
|
739
|
-
usdWithdrawAmount: string;
|
|
740
|
-
sharesReceived: string;
|
|
741
|
-
tokensReceived: string;
|
|
742
|
-
timestamp: string;
|
|
743
|
-
}
|
|
744
729
|
interface GetUserVaultWithdrawsResponse {
|
|
745
730
|
vaultWithdraws: HistoricalVaultWithdraw[];
|
|
746
731
|
paginationCursor?: PaginationCursor;
|
|
747
732
|
}
|
|
733
|
+
interface GetUserVolumeForReferralRequest {
|
|
734
|
+
userId: string;
|
|
735
|
+
}
|
|
736
|
+
interface GetUserVolumeForReferralResponse {
|
|
737
|
+
requiredVolume: string;
|
|
738
|
+
userVolume: string;
|
|
739
|
+
}
|
|
748
740
|
interface GetUserWithdrawalsRequest {
|
|
749
741
|
userId: string;
|
|
750
742
|
paginationCursor?: PaginationCursor;
|
|
@@ -804,6 +796,36 @@ interface GetVaultWithdrawalsResponse {
|
|
|
804
796
|
vaultWithdrawals: HistoricalVaultWithdraw[];
|
|
805
797
|
paginationCursor?: PaginationCursor;
|
|
806
798
|
}
|
|
799
|
+
interface HistoricalVaultDeposit {
|
|
800
|
+
userId: string;
|
|
801
|
+
vaultId: string;
|
|
802
|
+
usdDepositAmount: string;
|
|
803
|
+
sharesReceived: string;
|
|
804
|
+
tokensReceived: string;
|
|
805
|
+
timestamp: string;
|
|
806
|
+
}
|
|
807
|
+
interface HistoricalVaultDeposit {
|
|
808
|
+
vaultId: string;
|
|
809
|
+
usdDepositAmount: string;
|
|
810
|
+
sharesReceived: string;
|
|
811
|
+
tokensReceived: string;
|
|
812
|
+
timestamp: string;
|
|
813
|
+
}
|
|
814
|
+
interface HistoricalVaultWithdraw {
|
|
815
|
+
userId: string;
|
|
816
|
+
vaultId: string;
|
|
817
|
+
usdWithdrawAmount: string;
|
|
818
|
+
sharesReceived: string;
|
|
819
|
+
tokensReceived: string;
|
|
820
|
+
timestamp: string;
|
|
821
|
+
}
|
|
822
|
+
interface HistoricalVaultWithdraw {
|
|
823
|
+
vaultId: string;
|
|
824
|
+
usdAmount: string;
|
|
825
|
+
burntShares: string;
|
|
826
|
+
burntTokens: string;
|
|
827
|
+
timestamp: string;
|
|
828
|
+
}
|
|
807
829
|
interface Lend {
|
|
808
830
|
userId: string;
|
|
809
831
|
tokenAddress: string;
|
|
@@ -1019,7 +1041,8 @@ declare enum EndpointsV1 {
|
|
|
1019
1041
|
GetUserLiquidations = "/v1/get_user_liquidations",
|
|
1020
1042
|
GetIndexerStatus = "/v1/get_indexer_status",
|
|
1021
1043
|
GetVaultWithdrawals = "/v1/get_vault_withdrawals",
|
|
1022
|
-
GetVaultDeposits = "/v1/get_vault_deposits"
|
|
1044
|
+
GetVaultDeposits = "/v1/get_vault_deposits",
|
|
1045
|
+
GetUserVolumeForReferral = "/v1/get_required_volume_for_referral"
|
|
1023
1046
|
}
|
|
1024
1047
|
declare enum SpotMarketStatus {
|
|
1025
1048
|
Halted = "halted",
|
|
@@ -1555,6 +1578,7 @@ declare class Client {
|
|
|
1555
1578
|
getIndexerStatus: () => Promise<GetIndexerStatusResponse>;
|
|
1556
1579
|
getVaultHistoricalDeposits: (request: GetVaultDepositsRequest) => Promise<GetVaultDepositsResponse>;
|
|
1557
1580
|
getVaultWithdrawals: (request: GetVaultWithdrawalsRequest) => Promise<GetVaultWithdrawalsResponse>;
|
|
1581
|
+
getUserRequiredVolumeForReferral: (request: GetUserVolumeForReferralRequest) => Promise<GetUserVolumeForReferralResponse>;
|
|
1558
1582
|
getTime: () => Promise<string>;
|
|
1559
1583
|
}
|
|
1560
1584
|
|
|
@@ -1586,4 +1610,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
1586
1610
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
1587
1611
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
1588
1612
|
|
|
1589
|
-
export { 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 CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, 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 GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexerStatusResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type GetVaultWithdrawalsRequest, type GetVaultWithdrawalsResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalLiquidation, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
|
1613
|
+
export { 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 CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, 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 GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexerStatusResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, 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 HistoricalDeposit, type HistoricalFunding, type HistoricalLiquidation, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -715,13 +715,6 @@ interface GetUserVaultDepositsRequest {
|
|
|
715
715
|
newerTimestampMs?: string;
|
|
716
716
|
paginationCursor?: PaginationCursor;
|
|
717
717
|
}
|
|
718
|
-
interface HistoricalVaultDeposit {
|
|
719
|
-
vaultId: string;
|
|
720
|
-
usdDepositAmount: string;
|
|
721
|
-
sharesReceived: string;
|
|
722
|
-
tokensReceived: string;
|
|
723
|
-
timestamp: string;
|
|
724
|
-
}
|
|
725
718
|
interface GetUserVaultDepositsResponse {
|
|
726
719
|
vaultDeposits: HistoricalVaultDeposit[];
|
|
727
720
|
paginationCursor?: PaginationCursor;
|
|
@@ -733,18 +726,17 @@ interface GetUserVaultWithdrawsRequest {
|
|
|
733
726
|
newerTimestampMs?: string;
|
|
734
727
|
paginationCursor?: PaginationCursor;
|
|
735
728
|
}
|
|
736
|
-
interface HistoricalVaultWithdraw {
|
|
737
|
-
userId: string;
|
|
738
|
-
vaultId: string;
|
|
739
|
-
usdWithdrawAmount: string;
|
|
740
|
-
sharesReceived: string;
|
|
741
|
-
tokensReceived: string;
|
|
742
|
-
timestamp: string;
|
|
743
|
-
}
|
|
744
729
|
interface GetUserVaultWithdrawsResponse {
|
|
745
730
|
vaultWithdraws: HistoricalVaultWithdraw[];
|
|
746
731
|
paginationCursor?: PaginationCursor;
|
|
747
732
|
}
|
|
733
|
+
interface GetUserVolumeForReferralRequest {
|
|
734
|
+
userId: string;
|
|
735
|
+
}
|
|
736
|
+
interface GetUserVolumeForReferralResponse {
|
|
737
|
+
requiredVolume: string;
|
|
738
|
+
userVolume: string;
|
|
739
|
+
}
|
|
748
740
|
interface GetUserWithdrawalsRequest {
|
|
749
741
|
userId: string;
|
|
750
742
|
paginationCursor?: PaginationCursor;
|
|
@@ -804,6 +796,36 @@ interface GetVaultWithdrawalsResponse {
|
|
|
804
796
|
vaultWithdrawals: HistoricalVaultWithdraw[];
|
|
805
797
|
paginationCursor?: PaginationCursor;
|
|
806
798
|
}
|
|
799
|
+
interface HistoricalVaultDeposit {
|
|
800
|
+
userId: string;
|
|
801
|
+
vaultId: string;
|
|
802
|
+
usdDepositAmount: string;
|
|
803
|
+
sharesReceived: string;
|
|
804
|
+
tokensReceived: string;
|
|
805
|
+
timestamp: string;
|
|
806
|
+
}
|
|
807
|
+
interface HistoricalVaultDeposit {
|
|
808
|
+
vaultId: string;
|
|
809
|
+
usdDepositAmount: string;
|
|
810
|
+
sharesReceived: string;
|
|
811
|
+
tokensReceived: string;
|
|
812
|
+
timestamp: string;
|
|
813
|
+
}
|
|
814
|
+
interface HistoricalVaultWithdraw {
|
|
815
|
+
userId: string;
|
|
816
|
+
vaultId: string;
|
|
817
|
+
usdWithdrawAmount: string;
|
|
818
|
+
sharesReceived: string;
|
|
819
|
+
tokensReceived: string;
|
|
820
|
+
timestamp: string;
|
|
821
|
+
}
|
|
822
|
+
interface HistoricalVaultWithdraw {
|
|
823
|
+
vaultId: string;
|
|
824
|
+
usdAmount: string;
|
|
825
|
+
burntShares: string;
|
|
826
|
+
burntTokens: string;
|
|
827
|
+
timestamp: string;
|
|
828
|
+
}
|
|
807
829
|
interface Lend {
|
|
808
830
|
userId: string;
|
|
809
831
|
tokenAddress: string;
|
|
@@ -1019,7 +1041,8 @@ declare enum EndpointsV1 {
|
|
|
1019
1041
|
GetUserLiquidations = "/v1/get_user_liquidations",
|
|
1020
1042
|
GetIndexerStatus = "/v1/get_indexer_status",
|
|
1021
1043
|
GetVaultWithdrawals = "/v1/get_vault_withdrawals",
|
|
1022
|
-
GetVaultDeposits = "/v1/get_vault_deposits"
|
|
1044
|
+
GetVaultDeposits = "/v1/get_vault_deposits",
|
|
1045
|
+
GetUserVolumeForReferral = "/v1/get_required_volume_for_referral"
|
|
1023
1046
|
}
|
|
1024
1047
|
declare enum SpotMarketStatus {
|
|
1025
1048
|
Halted = "halted",
|
|
@@ -1555,6 +1578,7 @@ declare class Client {
|
|
|
1555
1578
|
getIndexerStatus: () => Promise<GetIndexerStatusResponse>;
|
|
1556
1579
|
getVaultHistoricalDeposits: (request: GetVaultDepositsRequest) => Promise<GetVaultDepositsResponse>;
|
|
1557
1580
|
getVaultWithdrawals: (request: GetVaultWithdrawalsRequest) => Promise<GetVaultWithdrawalsResponse>;
|
|
1581
|
+
getUserRequiredVolumeForReferral: (request: GetUserVolumeForReferralRequest) => Promise<GetUserVolumeForReferralResponse>;
|
|
1558
1582
|
getTime: () => Promise<string>;
|
|
1559
1583
|
}
|
|
1560
1584
|
|
|
@@ -1586,4 +1610,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
1586
1610
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
1587
1611
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
1588
1612
|
|
|
1589
|
-
export { 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 CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, 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 GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexerStatusResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type GetVaultWithdrawalsRequest, type GetVaultWithdrawalsResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalLiquidation, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
|
1613
|
+
export { 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 CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, 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 GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexerStatusResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, 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 HistoricalDeposit, type HistoricalFunding, type HistoricalLiquidation, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
package/dist/index.js
CHANGED
|
@@ -707,6 +707,7 @@ var EndpointsV1 = /* @__PURE__ */ ((EndpointsV12) => {
|
|
|
707
707
|
EndpointsV12["GetIndexerStatus"] = "/v1/get_indexer_status";
|
|
708
708
|
EndpointsV12["GetVaultWithdrawals"] = "/v1/get_vault_withdrawals";
|
|
709
709
|
EndpointsV12["GetVaultDeposits"] = "/v1/get_vault_deposits";
|
|
710
|
+
EndpointsV12["GetUserVolumeForReferral"] = "/v1/get_required_volume_for_referral";
|
|
710
711
|
return EndpointsV12;
|
|
711
712
|
})(EndpointsV1 || {});
|
|
712
713
|
var SpotMarketStatus = /* @__PURE__ */ ((SpotMarketStatus2) => {
|
|
@@ -1397,6 +1398,10 @@ var Client = class _Client {
|
|
|
1397
1398
|
const response = await this.sendGetJson("/v1/get_vault_withdrawals" /* GetVaultWithdrawals */, request);
|
|
1398
1399
|
return response;
|
|
1399
1400
|
};
|
|
1401
|
+
this.getUserRequiredVolumeForReferral = async (request) => {
|
|
1402
|
+
const response = await this.sendGetJson("/v1/get_required_volume_for_referral" /* GetUserVolumeForReferral */, request);
|
|
1403
|
+
return response;
|
|
1404
|
+
};
|
|
1400
1405
|
// Meta
|
|
1401
1406
|
this.getTime = async () => {
|
|
1402
1407
|
const response = await this.sendGetJson("/time" /* Time */);
|