It's not really an "API" per se (yet). So what you can do is to download the Amtrak tracking data from its "Track a Train" status page (the URL should be pretty easy to find with F12's network tool), and load them (there should be two, one for the stations and another for the trains) similar to entry.js.
sqd/amtrak-api
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|