Trying to calculate bps with api base on ports + date

Hello guys im trying to make a script in order to calculate port traffic with the api using python so far i been able to collect some data but i want specify data the bps with a specific dates from specific devices port my script look something like this

import requests
from datetime import datetime, timedelta
import json

# Function to convert datetime to UNIX timestamp
def to_unix_time(dt):
    return int(dt.timestamp())


# Calculate the date range for the past month
end_date = datetime.now()
start_date = end_date - timedelta(days=30)

# Convert dates to UNIX timestamps
from_timestamp = to_unix_time(start_date)
to_timestamp = to_unix_time(end_date)
print(f'From timestamp: {from_timestamp}')
print(f'To timestamp: {to_timestamp}')
# Generate the URL for the LibreNMS API
# url = f'https://librenmsip/api/v0/devices/1418/ports?columns=ifName%2Cport_id'
# url = f'https://librenmsip/api/v0/ports/689258/'

url = f'https://librenmzip/api/v0/devices/872/ports/451011'

# Headers to include your API token
headers = {
    'X-Auth-Token': 'token'
}

# Parameters for the request
# params = {
#     'from': from_timestamp,
#     'to': to_timestamp
# }

# Make the GET request with SSL verification optionally disabled
response = requests.get(url, headers=headers, verify=False)  # Disable SSL certificate verification if needed

# Check if the request was successful
if response.status_code == 200:
    # Convert JSON response to a Python dict
    data = response.json()
    # Pretty-print the JSON data
    print("Data retrieved successfully!")
    print(json.dumps(data, indent=4))
else:
    print(f'Failed to retrieve data: {response.status_code}, {response.text}')

and the output that i got is this

Data retrieved successfully!
{
“status”: “ok”,
“port”: {
“in_rate”: “0 bps”,
“out_rate”: “0 bps”,
“in_perc”: 0,
“out_perc”: 0,
“in_pps”: "0 ",
“out_pps”: "0 "
},
“count”: 6
}

but i have trafic Even if i add the dates do you know why ? Can some one help me a bit im new to this field