File size: 2,741 Bytes
4585d4c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Yes, it is possible to use the Aptos Python SDK to check all transactions, including credits and debits, between an Aptos account and another account. The Aptos Python SDK enables retrieval of transaction history for a specific account address by interacting with the Aptos blockchain's API endpoints.[2][10]

### How It Works

- The Python SDK supports querying an account's transactional history, retrieving data on all transactions affecting a specified account address.
- This data can be filtered and parsed to determine which transactions are credits (incoming funds) and debits (outgoing funds) by inspecting sender and recipient addresses in each transaction payload.[1][6]
- You can use the account resource functions in the SDK to check balances, and use transaction history to track credit and debit flows, as the data includes transaction direction and value.[5]

### Key Functions and Methods

- Historical transactions can be retrieved using GraphQL queries or by directly using SDK client methods to fetch account transactions.[1][2]
- Each transaction includes details such as sender, recipient, amount, and transaction type, which allow differentiation between credits (incoming) and debits (outgoing).[7]

### Example

Typically, you would:

- Use `client.get_account_transactions(address)` or a similar function to fetch all transactions for the account.
- Check, for each transaction, if your account is the sender (debit) or receiver (credit) and extract the corresponding amount.

This enables comprehensive tracking of all credits and debits for an Aptos account using the Python SDK.[10][2]

[1](https://aptos.dev/build/indexer/indexer-api/account-transactions)
[2](https://aptos.dev/build/sdks/python-sdk)
[3](https://www.youtube.com/watch?v=7Br6TAfabfg)
[4](https://aptos.guide/en/build/sdks)
[5](https://stackoverflow.com/questions/74133381/how-do-you-define-and-query-a-read-function-in-a-move-module-on-aptos-blockchain)
[6](https://aptos.dev/build/cli/trying-things-on-chain/looking-up-account-info)
[7](https://aptos-labs.github.io/ts-sdk-doc/classes/Types.TransactionsService.html)
[8](https://www.youtube.com/watch?v=mUYtwV3SgiA)
[9](https://docs.fordefi.com/developers/transaction-types/aptos-payload-transaction)
[10](https://github.com/aptos-labs/aptos-python-sdk)
[11](https://stackoverflow.com/questions/74177609/aptos-sdk-transaction-argument)
[12](https://www.tokenmetrics.com/blog/upcoming-crypto-airdrops?0fad35da_page=2&74e29fd5_page=128)
[13](https://business.fiu.edu/biz/conf-irm/pdf/Conf-IRM-2020-Proceedings.pdf)
[14](https://planet.debian.org)
[15](https://www.scribd.com/document/648865649/FTI-2023-Trend-Report)
[16](https://br.saintleo.edu/pt/info/academic-catalog/672-slubr_posgrados.pdf)