To find the price from trade agreements for a specific item to a specific vendor, you can use the following code snipped (i wrote it as static method so you can easily integrate it).
FOr customers just change the module to sales.
public static Price findPurchPrice(ItemId _itemId, VendAccount _vendAccount,