Turns out live ship tracking APIs are expensive so I manually just copied the json from https://www.marinetraffic.com/en/ais/home/centerx:57.4/cente... I'll probably have an ai agent do the same thing on some cron interval, if this gets any fanfare.
To actually know if the port is open without live ship tracking I found https://portwatch.imf.org/pages/cb5856222a5b4105adc6ee7e880a... which was perfect, except it has 4 day lag!
I also thought of adding news feed parsing or prediction market data to get a more definitive answer on if it's open right when you load it, but I spent a few hours and am gonna move on for now.
Let's not condone "measurements" that are effectively ways for people to gain money on important political decisions, affecting the lives of many people.
this law literally make it illegal to gamble on marine risk that you do not have direct economic interest in
But disregarding this admittedly niche attitude; it's not the same thing. If you're opening bets on the ships being bombed before a certain date, you're opening incentives for people to do so. Although buying OIL or Palantir is morally questionable, it does not create such direct incentives.
Modern equities and futures markets are highly evolved and rather carefully regulated systems. We've spent centuries learning what the failure modes are and how to guard against them. It's never perfect, it's never going to be perfect -- it's fundamentally a voting system -- but in general, we get liquidity and price discovery at a relatively low cost, while avoiding fraudulent and evil behavior like wash trading and criminal profit laundering.
These new "prediction markets" have been put in place without any of those hard-earned protections. And surprise, they're rife with dirty trick and dirty money.
Polymarket has $5 million of wagers on "Strait of Hormuz traffic returns to normal by end of April?"
The toll Iran charges for safe passage is $2 million per ship, and at current prices such a ship would be carrying about $200 million of oil. Oh, and we live in a world where a single billionaire will happily spend $200 million to influence politics.
The polymarket number merely shows that nobody's paid to make it higher or lower yet.
And yet, it is the wisdom of the crowds. The crowds being obscene.
Aren't we all constantly hitting re-fresh for updates, and making predictions.
The prediction markets are just consolidating that 'desire'.
I thought about it more and realized it’s the “via Polymarket” tag on it. It reads like an advertisement. I don’t need to know the exact market the figure is from. Someone could even combine multiple ones and I still wouldn’t want to know.
The sources I used were:
- ESRI World Imagery[1] — free satellite tiles, high-res, but ships are stripped out from the imagery
- NASA GIBS - VIIRS[2] — near real-time daily satellite imagery from NASA, but resolution is ~375m so ships aren't visible anyway
- Mapbox Satellite[3] — high-res and looks great, but same deal — ships are scrubbed from the composited imagery
1. https://server.arcgisonline.com/ArcGIS/rest/services/World_I... 2. https://earthdata.nasa.gov/engage/open-data-services-softwar... 3. https://www.mapbox.com
- Sentinel-2 (10 m/pixel): https://github.com/allenai/rslearn_projects/blob/master/docs...
- Landsat (15-30 m/pixel): https://github.com/allenai/rslearn_projects/blob/master/docs...
- VIIRS Nighttime Lights: https://github.com/allenai/vessel-detection-viirs
I think you can see these vessel detections at https://app.skylight.earth/ ("Try out a limited version as a guest") but they seem to be delayed by 48 hours.
VIIRS is very low resolution but you can make out vessels with reasonable accuracy in the night-time images.
VIIRS covers most locations at least once per day, but the other sensors capture a given location only once per 5-10 days (although when combined, Sentinel-1/Sentinel-2/Landsat should provide close-to-daily coverage).
doesn't this sort of thing invalidate any kind of experiment because the instrument is no longer trustworthy
Ships don't move that quickly; AIS data refreshed once every few hours would probably be more than good enough.
> "Iran will demand that shipping companies pay tolls in cryptocurrency for oil tankers passing through the Strait of Hormuz, as it seeks to retain control over passage through the key waterway during the two-week ceasefire."
If they really will start doing so for all shipping, that would be odd since the straight itself is in Oman's territorial waters. Even so, the UNCLOS convention (2) requires free transit:
> Article 44 > Duties of States bordering straits > > States bordering straits shall not hamper transit passage and shall give appropriate publicity to any danger to navigation or overflight within or over the strait of which they have knowledge. There shall be no suspension of transit passage.
It would be unprecedented and unlawful, but I guess previous actions of Israel, the US and Iran have shown our world is beyond adhering to laws and agreements now.
(1) https://www.ft.com/content/02aefac4-ea62-48db-9326-c0da373b1... (2) United Nations Convention on Law of the Sea: https://www.un.org/depts/los/convention_agreements/texts/unc...
You see, they have not ratified or withdrawn from the Rome treaty, which is the only UN treaty that talks about war crimes.
What I'm saying, if countries just get to opt out of treaties, where that affects a great deal of other countries (like here, in Iran's case), and that just lets them off the hook, then you can just close up the UN and start WW3 right now. Because that just became unavoidable.
(historically people use "war crimes" for Geneva convention violations too, but those can only be presented to the UNSC, and with China and Iran blocking everything, nothing will ever be accepted there. So if those are warcrimes, that's a purely theoretical thing only)
Neither Israel nor the US have signed/ratified the UNCLOS. So Iran has no incentive to abide by it.
Didn't Trump float the Idea of a joint venture with Iran on the Fees?
Amazing, that once you could make money on a toll, Trump was "there is profit in peace? lets get this peace thing going"
> With Trump and Iran each claiming victory, but still far apart on key issues, traffic in the Strait of Hormuz remained at a standstill Wednesday.
1. https://www.washingtonpost.com/world/2026/04/08/trump-iran-w...
Because the cost of failure is death and the crew aren’t going to risk it, and the other cost of failure is a couple hundred million dollars in ship and cargo and the insurance companies aren’t going to risk it either. This is like asking why your DoorDash driver wouldn’t just try to run the police blockade to get you your burrito.
I can't say that I know anything about Iran, but if we were to close our straits off so you couldn't enter the north sea from the baltic sea then our navy would rapidly deploy various different mines that lay on the bottom on the shallower parts and control the shipping lanes with things like suicide drones. I imagine Iran would do something similar, only they've probably been preparing for it a lot more than we have.
The strait isn’t wide enough, Iran can see any ships attempting
https://polymarket.com/event/strait-of-hormuz-traffic-return...
My approach would be if that jumps up to 75%+ it would change to YES. And if we get into May they have one for then too:
https://polymarket.com/event/strait-of-hormuz-traffic-return...
You can actually see in the last 24 hours it jumped up with the ceasefire and Iran saying they would open it and fell back with reports it's been shut down again easlier today.
Edit: I added this, I can see a few downvotes, happy to discuss here or in the github repo if anyone has strong feelings on it!
Here is a node.js script for you which will fetch the data and save it to the file:
import fs from 'fs'
import puppeteer from 'puppeteer-extra'
import StealthPlugin from 'puppeteer-extra-plugin-stealth'
puppeteer.use(StealthPlugin())
const browser = await puppeteer.launch();
const page = await browser.newPage();
async function fetchCoords(x, y, z = 8, station = 0) {
await page.goto(`https://www.marinetraffic.com/getData/get_data_json_4/z:${z}/X:${x}/Y:${y}/station:${station}`);
const jsonRaw = await page.evaluate(() => document.body.innerText);
const json = JSON.parse(jsonRaw)
return json
}
const data8353 = await fetchCoords(83, 53)
const data8453 = await fetchCoords(84, 53)
const data8354 = await fetchCoords(83, 54)
const data8454 = await fetchCoords(84, 54)
const fullData = { ...data8353, ...data8453, ...data8354, ...data8454 }
fs.writeFileSync('data.json', JSON.stringify(fullData, null, 2))
console.log('done!')
process.exit(0)
Just like this, no need to spend a cent on expensive APIs or tokensReminds me of when I was speaking at a conference back in the mid 2010's with a presentation titled "Join the dark side of APIs" or something akin to that, where I showed many of the newly popularized "single page apps (SPAs)" relied on undocumented and public APIs, often without any authorization. Immediately followed by a talk by a business type guy on API copyright or something or other.
Also: Cool project!
CartoDB packages this data into tiles you can use, but that doesn't lift this requirement.
I think Mapbox also provides a similar looking basemap style.
France's Macron actually just commented on this: https://x.com/EmmanuelMacron/status/2041990505760772551
edit: actually im likely completely wrong, what i wrote above is what i hope would be the case but sadly in reality the violence will never end and oil prices will go up and up and up. this is just a temporary blip. the fighting will continue until something more substantial happens to sort it out in favour of one side or the other.
Correct me if I'm wrong, but Israel didn't sign any ceasefire. The ceasefire was between Iran and US. Israel separately announced (not part of any deal) that it would stop attacking Iran. It honored that self-imposed limit. Israel attacked Lebanon (Iran's proxy).
/S trying to highlight how stupid it sounds when you try to retrofit sense into this conflict
Moving to a topographic view, it becomes clear the neck of land at "two seas view" is narrow, but tall. It would literally be moving a mountain.
Panamax and suezmax boats are smaller than ULCC supertankers.
Ferdinand De Lesseps time has passed. This would be ruinously expensive. Better to negotiate with rational intent.
I bet it could have been done with the money spent on the "war"
The same to a lesser extent applies to pipes. You could construct pipes for gas, for some of the heavier oils and crude (what I read suggests pumping crude long distance is painful, it has to be down-mixed with lighter stuff to make it sufficiently fluid) but the fertilizer? that would mean converting dry to wet and back again (nobody ships fluid weight if they can avoid it) -Or ship the inputs: ammonia, and sulphur in some liquid form, and produce the dry goods on the other side.
But, I think pipes have a stronger case than a canal: move the things which are amenable to pipes, into pipes, and bury the pipes.
In times past, this would have been done as a convoy. China and other nations would have stepped to the fore, conducting safe passage with their own ships on the outside edge. But we're not in a world where this kind of thing works for anyone involved. Even offering to cover insurance risk doesn't look to have motivated ship owners to pass. (in times past, the US wouldn't have put itself or it's allies in this position, hence the reference to China)
Don't be fooled by mental images of what a convoy looks like: ships like these maintain massive separation. There's almost suction between hulls moving at this scale, if they were within 500m of each other there'd be chaos if one had to take any evasive action. In reality (I believe) even a convoy consists of a a lot of discrete, clearly demarked and targetable things, not a large mass you can "hide" in.
https://en.wikipedia.org/wiki/List_of_traffic_separation_sch... (and a lot of links off this)
> In an attempt to evade detection, many ships appear to be deliberately switching off their tracking system - known as AIS (Automatic Identification System). https://www.bbc.com/news/articles/c4geg0eeyjeo
Ships had their AIS on before the war, and will turn it on again once they left the area. So we can just filter for ships which previously reported a location in the Persian Gulf, and now are reporting outside of it. Similarly we can count ships which were outside of the Gulf and now are inside. We don’t need the AIS to be on while they are transiting.
On the note of Ai agent getting the data for you, could you not just build a chrome extention that intercepts/read the api response and then uploads it to whatever ingest endpoint you have? You could probably just call their api end points they use on the page as well but not sure what protections they have so might be a bit tricky. A custom chrome extention could do it though if they have protections.
There's a few live ship tracking APIs I considered but they are expensive or their free offering just straight up didn't work. I sent a few an email if they would consider sponsoring the project, no replies yet.
- AISStream.io — https://aisstream.io — Down/not working
- DataDocked — https://datadocked.com — Ran out of credits on a single failed request
- VesselFinder — https://www.vesselfinder.com/realtime-ais-data — Enterprise contact form, asked if they wanted to sponsor in exchange for a link
- MarineTraffic — https://www.marinetraffic.com, their API is like an enterprise contact form, same as above, waiting for response.Your site is very cool. Will test further.
There is also this one- https://hormuzstraitmonitor.com/
Great bit of topical datavis here.
Also, given how markets and news cycles are moved with words not actions these days, I really like this site.
There are still so many misaligned interests; this is a much tougher situation that may get some local stability for a period, but will likely return to chaos again.
What's the threshold function? Do you have graduating `No --> Partially --> Mostly --> Open`?
Also what's the update cadence?
The update cadence kinda sucks because I didn't spring for the $200 a month live ship tracking data, so I'm using https://portwatch.imf.org/pages/cb5856222a5b4105adc6ee7e880a... which lags by 4 days which isn't great for a site like this, but was fine for me on a little side project. Open to other data sources or ideas, of if anyone wants to sponsor an API key (I did reach out to a few vendors already if they would give the project api key in exchange for a link to their site).
The original idea was to track ships and see how many crossed the strait but as mentioned above I didn't find any free sources so I went with what I did.
It’s very well possible that the straight is safe, but the vessels are unnecessarily cautious.
https://www.bloomberg.com/news/articles/2026-04-08/shippers-...
So, it could be that:
* Iran is lying and that has not actually been an option.
* A lot of the ships which would otherwise have transitioned are involved with the war somehow.
* The relevant parties have decided not to coordinate transitions with Iran, for various reasons
* The data displayed at the link is partial for some reason.
https://www.vesselfinder.com/?p=OMKHS001 (click on map, zoom out). At this moment ~18 ships transiting. Not sure what the normal capacity is, and I think it's probably a bit more than this ... but it's at least mostly open.
Number of ship crossings is definitely trending upward as of today.
And wtf is a _fishing_ ship from Panama doing in the middle of the straight?
The "Israel First" administration of the US will happily trade Iran's permanent control of an international waterway for the expansion of Israel.