Just to add two small points to JP's answer:
- To get the stop ID of a particular station, you need to consult the GTFS Static feed. The 50th st station on the ACE line has ID A25, for example. The station has two platforms corresponding to the north and south direction with IDs A25N and A25S respectively - and these are the two IDs that will appear in the GTFS Realtime feed.
- Because of service changes, there may be trains at that 50th st station that are not in the ACE feed. As I write this, the F is stopping there. Theoretically to get the complete list of trains you need to search in each of the eight feeds...