A method and system for processing application programming interface (API) traffic includes determining corresponding API traffic at a time interval, assigning a corresponding priority value and allocating a cache memory to store a data set that corresponds to a high priority value. The method also includes receiving a plurality of sets of API requests, comparing corresponding precedence value associated with the sets of API requests, determining a set of API requests and allocating bandwidth to the set of API requests. The method further includes receiving a first set of API requests, determining a total number of processed API requests and predicting a second constant number API requests that is included in a second set of API requests. The system includes an electronic device, a communication interface, a memory and a processor.