Yes,
The best way to get windowed account history is by using using https://docs.q2developer.com/api_references/hq_api/q2_api/GetAccountHistoryByIdWindowed.html
A great code example of how to use this is from the Caliper API:
```
get_account_history = GetAccountHistoryByIdWindowedWithUserId.ParamsObj(
self.logger,
host_account_id=history_parameters.host_account_id,
page_size=history_parameters.page_size,
page_number=history_parameters.page_number,
perform_history_lookup=True,
perform_memo_lookup=False,
perform_nsf_lookup=False,
user_id=history_parameters.user_id,
optional_sort='',
optional_filter=GetAccountHistoryByIdWindowedWithUserId.OptionalFilter([
GetAccountHistoryByIdWindowedWithUserId.FilterItem(
is_or_operator_not_and=0,
operand='GT',
parens_before=0,
parens_after=0,
field_name='PostDate',
comparison_value=history_parameters.from_date
),
GetAccountHistoryByIdWindowedWithUserId.FilterItem(
is_or_operator_not_and=0,
operand='LT',
parens_before=0,
parens_after=0,
field_name='PostDate',
comparison_value=history_parameters.to_date
)
]),
hq_credentials=self.hq_credentials
)
results = await GetAccountHistoryByIdWindowedWithUserId.execute(get_account_history)
```
The Caliper API code will be made available for external developers to view and request changes at some point. Q2 is polishing the code a little bit more before making it externally viewable.
-Trey
Yes,
The best way to get windowed account history is by using using https://docs.q2developer.com/api_references/hq_api/q2_api/GetAccountHistoryByIdWindowed.html
A great code example of how to use this is from the Caliper API:
```
get_account_history = GetAccountHistoryByIdWindowedWithUserId.ParamsObj(
self.logger,
host_account_id=history_parameters.host_account_id,
page_size=history_parameters.page_size,
page_number=history_parameters.page_number,
perform_history_lookup=True,
perform_memo_lookup=False,
perform_nsf_lookup=False,
user_id=history_parameters.user_id,
optional_sort='',
optional_filter=GetAccountHistoryByIdWindowedWithUserId.OptionalFilter([
GetAccountHistoryByIdWindowedWithUserId.FilterItem(
is_or_operator_not_and=0,
operand='GT',
parens_before=0,
parens_after=0,
field_name='PostDate',
comparison_value=history_parameters.from_date
),
GetAccountHistoryByIdWindowedWithUserId.FilterItem(
is_or_operator_not_and=0,
operand='LT',
parens_before=0,
parens_after=0,
field_name='PostDate',
comparison_value=history_parameters.to_date
)
]),
hq_credentials=self.hq_credentials
)
found_transactions = {
'Transactions': None,
'TransactionCount': 0,
'TransactionReturned': 0
}
results = await GetAccountHistoryByIdWindowedWithUserId.execute(get_account_history)
```
The Caliper API code will be made available for external developers to view and request changes at some point. Q2 is polishing the code a little bit more before making it externally viewable.
-Trey
What is the best way to get Account History?
Yes,
The best way to get windowed account history is by using using https://docs.q2developer.com/api_references/hq_api/q2_api/GetAccountHistoryByIdWindowed.html
A great code example of how to use this is from the Caliper API:
```
get_account_history = GetAccountHistoryByIdWindowedWithUserId.ParamsObj(
self.logger,
host_account_id=history_parameters.host_account_id,
page_size=history_parameters.page_size,
page_number=history_parameters.page_number,
perform_history_lookup=True,
perform_memo_lookup=False,
perform_nsf_lookup=False,
user_id=history_parameters.user_id,
optional_sort='',
optional_filter=GetAccountHistoryByIdWindowedWithUserId.OptionalFilter([
GetAccountHistoryByIdWindowedWithUserId.FilterItem(
is_or_operator_not_and=0,
operand='GT',
parens_before=0,
parens_after=0,
field_name='PostDate',
comparison_value=history_parameters.from_date
),
GetAccountHistoryByIdWindowedWithUserId.FilterItem(
is_or_operator_not_and=0,
operand='LT',
parens_before=0,
parens_after=0,
field_name='PostDate',
comparison_value=history_parameters.to_date
)
]),
hq_credentials=self.hq_credentials
)
found_transactions = {
'Transactions': None,
'TransactionCount': 0,
'TransactionReturned': 0
}
results = await GetAccountHistoryByIdWindowedWithUserId.execute(get_account_history)
```
The Caliper API code will be made available for external developers to view and request changes at some point. Q2 is polishing the code a little bit more before making it externally viewable.
-Trey