vortexasdk.endpoints.anywhere_freight_pricing_forecast_timeseries
Try me out in your browser:
AnywhereFreightPricingForecastTimeseries
AnywhereFreightPricingForecastTimeseries(self)
Anywhere Freight Pricing Forecast Timeseries endpoint.
Please note, a subscription to our Anywhere Freight Pricing module is required to access Anywhere Freight Pricing.
search
AnywhereFreightPricingForecastTimeseries.search(
routes:
typing.List[vortexasdk.endpoints.anywhere_freight_pricing_types.AfpForecastRoute],
time_min: datetime,
time_max: datetime,
frequency:
typing_extensions.Literal['day', 'week', 'doe_week', 'month', 'quarter', 'year'] = 'week',
unit:
typing_extensions.Literal['usd_per_tonne', 'usd_per_barrel'] = 'usd_per_tonne'
)
Get forecast pricing over time for multiple routes.
Given a set of routes, a frequency, unit and a time period, this endpoint returns forecast-only prices, lumpsums and upper and lower bounds bucketed by the requested frequency per route. Price is the total cost including voyage, port and canal costs. Lumpsum is the total voyage cost in USD.
Arguments
routes: A list of route dictionaries. Each route must contain:
- `origin` (str, required): Geographical ID of the origin port.
- `destination` (str, required): Geographical ID of the destination port.
- `product` (str, required): One of `'clean'`, `'dirty'`, `'crude'`.
- `vessel_class` (str, required): One of `'oil_coastal'`, `'oil_specialised'`,
`'oil_handysize_mr1'`, `'oil_handymax_mr2'`, `'oil_panamax_lr1'`,
`'oil_aframax_lr2'`, `'oil_suezmax_lr3'`, `'oil_vlcc'`, `'lpg_sgc'`,
`'lpg_mgc'`, `'lpg_lgc'`, `'lpg_vlgc_vlec'`, `'lng_small_scale_lng'`,
`'lng_mid_scale_lng'`, `'lng_conventional_lng'`, `'lng_q_fleet'`.
- `avoid_zone` (list, optional): Routing zones to avoid. Options:
`'Panama Canal'`, `'Suez Canal'`.
- `suggested_tonnage` (float, optional): Suggested tonnage for the route.
time_min: The UTC start date of the time filter.
time_max: The UTC end date of the time filter.
frequency: Frequency denoting the granularity of the time series.
Must be one of: `'day'`, `'week'`, `'doe_week'`, `'month'`, `'quarter'`, `'year'`.
Note: `'quarter'` and `'year'` are not supported by the forecast model and
will return empty prices.
Defaults to `'week'`.
unit: The unit for pricing. Must be one of: `'usd_per_tonne'`, `'usd_per_barrel'`.
Defaults to `'usd_per_tonne'`.
Returns
AnywhereFreightPricingResult
Example
Get weekly forecast pricing for a Handymax MR2 clean route from Rotterdam to New York.
>>> from vortexasdk import AnywhereFreightPricingForecastTimeseries
>>> from datetime import datetime
>>> routes = [
... {
... "origin": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e",
... "destination": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb",
... "product": "clean",
... "vessel_class": "oil_handymax_mr2",
... }
... ]
>>> result = AnywhereFreightPricingForecastTimeseries().search(
... routes=routes,
... time_min=datetime(2026, 5, 26),
... time_max=datetime(2026, 8, 26),
... frequency="week",
... unit="usd_per_tonne",
... )
>>> df = result.to_df()
Returns a DataFrame with columns:
| origin | destination | vessel_class | product | prices | lumpsums | suggested_tonnage | |
|---|---|---|---|---|---|---|---|
| 0 | 68faf65a... | ea4921c8... | oil_handymax_mr2 | clean | [{'date': '2026-06-01', ...}] | [{'date': '2026-06-01', ...}] | 37000.0 |