Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add sort_order param to blockchain method: get_account_transactions #42

Merged
merged 1 commit into from
Jan 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pytonapi/methods/blockchain.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Optional, Dict, Any
from typing import Literal, Optional, Dict, Any

from pytonapi.base import AsyncTonapiClientBase
from pytonapi.schema.blockchain import (
Expand Down Expand Up @@ -188,6 +188,7 @@ async def get_account_transactions(
after_lt: Optional[int] = None,
before_lt: Optional[int] = None,
limit: int = 100,
sort_order: Optional[Literal['asc', 'desc']] = 'desc',
) -> Transactions:
"""
Get account transactions.
Expand All @@ -196,6 +197,7 @@ async def get_account_transactions(
:param after_lt: omit this parameter to get last transactions
:param before_lt: omit this parameter to get last transactions
:param limit: Default value : 100
:param sort_order: Default value : desc
:return: :class:`Transactions`
"""
method = f"v2/blockchain/accounts/{account_id}/transactions"
Expand Down