Is your feature request related to a problem?
The panel UI already calculates and displays the remaining traffic for each client (e.g. Remained 59.93 GB), but the API endpoint GET /panel/api/inbounds/getClientTraffics/:email does not return this value.
The only way to get remaining traffic via API right now is:
remaining = total - (up + down)
But this doesn't match what the panel shows because up/down accumulate as all-time traffic even after resets, making external calculations incorrect.
Describe the solution you'd like
Please add a remaining (or remainingTraffic) field to the response of:
GET /panel/api/inbounds/getClientTraffics/:email
GET /panel/api/inbounds/getClientTrafficsById/:id
Since the panel already computes this value internally and displays it in the UI, exposing it in the API response would be straightforward and extremely useful for developers building external tools/bots on top of 3x-ui.
Expected Response
{
"up": 7959552,
"down": 161734656,
"total": 107374182400,
"remaining": 64357523456,
"enable": true
}
Thank you!###
Describe alternatives you've considered
No response
Checklist
Is your feature request related to a problem?
The panel UI already calculates and displays the remaining traffic for each client (e.g.
Remained 59.93 GB), but the API endpointGET /panel/api/inbounds/getClientTraffics/:emaildoes not return this value.The only way to get remaining traffic via API right now is:
But this doesn't match what the panel shows because
up/downaccumulate as all-time traffic even after resets, making external calculations incorrect.Describe the solution you'd like
Please add a
remaining(orremainingTraffic) field to the response of:GET /panel/api/inbounds/getClientTraffics/:emailGET /panel/api/inbounds/getClientTrafficsById/:idSince the panel already computes this value internally and displays it in the UI, exposing it in the API response would be straightforward and extremely useful for developers building external tools/bots on top of 3x-ui.
Expected Response
{ "up": 7959552, "down": 161734656, "total": 107374182400, "remaining": 64357523456, "enable": true }Thank you!###
Describe alternatives you've considered
No response
Checklist