@@ -500,6 +500,56 @@ def user_fees(self, address: str) -> Any:
500500 }
501501 """
502502 return self .post ("/info" , {"type" : "userFees" , "user" : address })
503+
504+ def user_staking_summary (self , address : str ) -> Any :
505+ """Retrieve the staking summary associated with a user.
506+ POST /info
507+ Args:
508+ address (str): Onchain address in 42-character hexadecimal format;
509+ e.g. 0x0000000000000000000000000000000000000000.
510+ Returns:
511+ {
512+ delegated: float string,
513+ undelegated: float string,
514+ totalPendingWithdrawal: float string,
515+ nPendingWithdrawals: int
516+ }
517+ """
518+ return self .post ("/info" , {"type" : "delegatorSummary" , "user" : address })
519+
520+ def user_staking_delegations (self , address : str ) -> Any :
521+ """Retrieve the user's staking delegations.
522+ POST /info
523+ Args:
524+ address (str): Onchain address in 42-character hexadecimal format;
525+ e.g. 0x0000000000000000000000000000000000000000.
526+ Returns:
527+ [
528+ {
529+ validator: string,
530+ amount: float string,
531+ lockedUntilTimestamp: int
532+ },
533+ ]
534+ """
535+ return self .post ("/info" , {"type" : "delegations" , "user" : address })
536+
537+ def user_staking_rewards (self , address : str ) -> Any :
538+ """Retrieve the historic staking rewards associated with a user.
539+ POST /info
540+ Args:
541+ address (str): Onchain address in 42-character hexadecimal format;
542+ e.g. 0x0000000000000000000000000000000000000000.
543+ Returns:
544+ [
545+ {
546+ time: int,
547+ source: string,
548+ totalAmount: float string
549+ },
550+ ]
551+ """
552+ return self .post ("/info" , {"type" : "delegatorRewards" , "user" : address })
503553
504554 def query_order_by_oid (self , user : str , oid : int ) -> Any :
505555 return self .post ("/info" , {"type" : "orderStatus" , "user" : user , "oid" : oid })
0 commit comments