You can use ReviseItem and ReviseFixedPriceItem call of Trading API to change the listing duration time of an listing.
When you revise a listing, the duration cannot be reduced if it will result in ending the listing within 24 hours of the current date-time. You are only allowed to increase the duration of the listing if fewer than 2 hours have passed since you initially listed the item and the listing has no bids. You can decrease the value of this field only if the listing has no bids (or no items have sold) and the listing does not end within 12 hours.
eBay Developer Support
22 People are following this question.