Support,
Regarding the documentation https://docs.moralis.io/reference/getnftcontracttransfers, it seems we can use parameters from_date and to_date but it seems they are not included in the moralis API module in python.
I made some changes in the code to debug. You can find the code and the output
def get_nft_contract_transfers(api_key: str, params: typing.Union[RequestQueryParams, RequestPathParams]):
api_instance = get_api_instance(api_key)
query_params = {k: v for k, v in params.items() if k in RequestQueryParams.__annotations__.keys()}
path_params = {k: v for k, v in params.items() if k in RequestPathParams.__annotations__.keys()}
print(params)
print("===== DEBUG =====")
print(RequestQueryParams.__annotations__.keys())
print(RequestPathParams.__annotations__.keys())
print("===== DEBUG =====")
print(query_params)
print(path_params)
api_response = api_instance.get_nft_contract_transfers(
query_params=query_params,
path_params=path_params,
accept_content_types='application/json; charset=utf-8',
skip_deserialization=True
)
return json.loads(api_response.response.data)
And the output
{'address': '0xf34b2632cdf132170e30f4e60327645127012f77', 'chain': 'polygon', 'format': 'decimal', 'from_date': '2022-10-01', 'to_date': '2022-12-31'}
===== DEBUG =====
dict_keys(['chain', 'format', 'limit', 'cursor'])
dict_keys(['address'])
===== DEBUG =====
{'chain': 'polygon', 'format': 'decimal'}
{'address': '0xf34b2632cdf132170e30f4e60327645127012f77'}