@@ -594,6 +594,20 @@ def user_staking_rewards(self, address: str) -> Any:
594594 """
595595 return self .post ("/info" , {"type" : "delegatorRewards" , "user" : address })
596596
597+ def delegator_history (self , user : str ) -> Any :
598+ """Retrieve comprehensive staking history for a user.
599+
600+ POST /info
601+
602+ Args:
603+ user (str): Onchain address in 42-character hexadecimal format.
604+
605+ Returns:
606+ Comprehensive staking history including delegation and undelegation
607+ events with timestamps, transaction hashes, and detailed delta information.
608+ """
609+ return self .post ("/info" , {"type" : "delegatorHistory" , "user" : user })
610+
597611 def query_order_by_oid (self , user : str , oid : int ) -> Any :
598612 return self .post ("/info" , {"type" : "orderStatus" , "user" : user , "oid" : oid })
599613
@@ -641,12 +655,10 @@ def user_non_funding_ledger_updates(self, user: str, startTime: int, endTime: Op
641655 Comprehensive ledger updates including deposits, withdrawals, transfers,
642656 liquidations, and other account activities excluding funding payments.
643657 """
644- if endTime is not None :
645- return self .post (
646- "/info" ,
647- {"type" : "userNonFundingLedgerUpdates" , "user" : user , "startTime" : startTime , "endTime" : endTime },
648- )
649- return self .post ("/info" , {"type" : "userNonFundingLedgerUpdates" , "user" : user , "startTime" : startTime })
658+ return self .post (
659+ "/info" ,
660+ {"type" : "userNonFundingLedgerUpdates" , "user" : user , "startTime" : startTime , "endTime" : endTime },
661+ )
650662
651663 def portfolio (self , user : str ) -> Any :
652664 """Retrieve comprehensive portfolio performance data.
@@ -662,21 +674,6 @@ def portfolio(self, user: str) -> Any:
662674 """
663675 return self .post ("/info" , {"type" : "portfolio" , "user" : user })
664676
665- def batch_clearinghouse_states (self , users : List [str ], dex : str = "" ) -> Any :
666- """Retrieve perpetuals account summaries for multiple users.
667-
668- POST /info
669-
670- Args:
671- users (List[str]): List of onchain addresses in 42-character hexadecimal format.
672- dex (str): Perp dex name. Defaults to empty string (first perp dex).
673-
674- Returns:
675- Array where each item matches the clearinghouseState schema with fields like
676- assetPositions, marginSummary, crossMarginSummary, time, and withdrawable.
677- """
678- return self .post ("/info" , {"type" : "batchClearinghouseStates" , "users" : users , "dex" : dex })
679-
680677 def user_twap_slice_fills (self , user : str ) -> Any :
681678 """Retrieve a user's TWAP slice fills.
682679
@@ -733,20 +730,6 @@ def user_rate_limit(self, user: str) -> Any:
733730 """
734731 return self .post ("/info" , {"type" : "userRateLimit" , "user" : user })
735732
736- def delegator_history (self , user : str ) -> Any :
737- """Retrieve comprehensive staking history for a user.
738-
739- POST /info
740-
741- Args:
742- user (str): Onchain address in 42-character hexadecimal format.
743-
744- Returns:
745- Comprehensive staking history including delegation and undelegation
746- events with timestamps, transaction hashes, and detailed delta information.
747- """
748- return self .post ("/info" , {"type" : "delegatorHistory" , "user" : user })
749-
750733 def query_spot_deploy_auction_status (self , user : str ) -> Any :
751734 return self .post ("/info" , {"type" : "spotDeployState" , "user" : user })
752735
0 commit comments