Starton Eridani has this in its Trade element:
<Sell criteria="m +commonwealth; -illegal; -military; -notForSale; -notStandard; L:1-3;" priceAdj="115" inventoryAdj="200"/>
<Sell criteria="*NU -Illegal; -ID; -NotForSale;" priceAdj="110"/>
<Sell criteria="rNU L:1-4; -Illegal; -NotForSale; -notStandard;" priceAdj="110" inventoryAdj="100"/>
<Buy criteria="amswNU -Illegal; -NotForSale;" priceAdj="50"/>
<Buy criteria="*NU -Illegal; -ID; -NotForSale;" priceAdj="90"/>
<Buy criteria="*NU -Illegal; -ID;" priceAdj="10"/>
Many stations are similar or identical. This means they won't sell notForSale items ever, won't buy damaged, installed, illegal, or ID items, and pay only 10% for notForSale items. If you want to prevent an item from being purchased by these stations without tagging it illegal or ID, you have to make the price stations would pay less than 1 unit of currency (or bug George until he adds some more exclusion attributes to the trade elements of all stations). Fortunately, you can do this with a <GetTradePrice> event in the item definition.
From the wiki:
<GetTradePrice>
Use this event to dynamically compute the price of the item at runtime. The result of the event is the price of a single item of this type in credits.
gSource is the object that is valuing the item (not necessarily the object on which the item resides).
gItem is the item.
So, for example, you could make the price normal when gSource is a specific station type, and 0 otherwise, so no other stations will buy it. I think this applies when buying and selling, so you would want it to be notForSale or some other attribute that prevents it from appearing in normal stations' inventories so they won't sell it for 0.