Shahbandar Koya (sometimes Khwaja, popularly known as the "Koya of Kozhikode") was a privileged administrative position in Kozhikode. The Shahbandar was the second most important official in most Asian polities after the ruler. Trade at the port of Kozhikode was controlled by this Muslim merchant-cum-port commissioner. He supervised customs on the behalf of the king, fixed the prices of the commodities, and collected the share to the treasury. As the farmer of customs he also had right collect brokerage and poll tax at the port.