vortexasdk.endpoints.fixtures

Try me out in your browser:

Binder

Fixtures

Fixtures(self)

Fixtures Endpoint, use this to search through Vortexa's Fixtures data.

A detailed explanation of the fixtures can be found here. Limitation

Fixtures are available through the UI, API & SDK only by permission from our shipbroker partner only. If we limit API access to certain products then you can only pull the fixtures data for said product e.g. CPP only, then they only have access to CPP fixtures.

For an API key to have access to the endpoint, it needs the scopes "v.r.fix" and "v.r.ais".

What conditions produce a Fixture 'fulfilled' status? - Internal

In terms of the data, we use the laycan and the mapped fixture 'origin'.

Historical movements: The start timestamp of the loading event must be within the 5-day laycan window (even if the laycan window is less than 5 days, we expand it to 5), or the laycan must be within the start and end timestamp of the loading event and the fixture's origin hierarchy must agree with the actual loading polygon's hierarchy.

Future movements: The vessel can be in the reported fixture origin within the laycan window give or take 3 days. We also compare the predicted destination's hierarchy with the fixture's origin hierarchy. An agreement (given that the previous feasibility condition is met) is a sufficient condition to create a movement. When there is disagreement or we don't have a predicted destination, we take into account other factors (e.g. if the destination is a waypoint, we treat them as agreeing).

Fixture status

Fixture status indicates the point that the deal has reached in its evolution from "Subs" for vessels on subjects, to "Fxd" for fixed vessels or sometimes "Failed" or "FLD" for failed fixtures or sometimes "RPLC" for a replacement fixture or "Conf" for confirmed and "Corr" for corrected.

What does the model do in the case of exact duplicates?

  • For historical movements, we don't have a particular logic.
  • For future movements, we apply our own internal sorting procedure.

When we have 2 fixtures that are near exact duplicates but with different freight rates or different charterers, how does the model pick?

  • For historical movements, randomly.
  • For future movements, we apply our own internal sorting procedure.

search

Fixtures.search(
  filter_time_field: str = 'fixing_timestamp',
  filter_time_min: datetime = datetime.datetime(2020, 1, 1, 0, 0),
  filter_time_max: datetime = datetime.datetime(2020, 1, 2, 0, 0),
  ids: typing.Union[str, typing.List[str], NoneType] = None,
  filter_charterers: typing.Union[str, typing.List[str], NoneType] = None,
  filter_destinations:
    typing.Union[str, typing.List[str], NoneType] = None,
  filter_origins: typing.Union[str, typing.List[str], NoneType] = None,
  filter_owners: typing.Union[str, typing.List[str], NoneType] = None,
  filter_effective_controllers:
    typing.Union[str, typing.List[str], NoneType] = None,
  filter_products: typing.Union[str, typing.List[str], NoneType] = None,
  filter_vessels: typing.Union[str, typing.List[str], NoneType] = None,
  filter_vessel_classes:
    typing.Union[str, typing.List[str], NoneType] = None,
  filter_vessel_age_min: typing.Optional[int] = None,
  filter_vessel_age_max: typing.Optional[int] = None,
  filter_vessel_scrubbers: str = 'disabled',
  filter_vessel_flags:
    typing.Union[str, typing.List[str], NoneType] = None,
  exclude_origins: typing.Union[str, typing.List[str], NoneType] = None,
  exclude_destinations:
    typing.Union[str, typing.List[str], NoneType] = None,
  exclude_products: typing.Union[str, typing.List[str], NoneType] = None,
  exclude_vessels: typing.Union[str, typing.List[str], NoneType] = None,
  exclude_vessel_classes:
    typing.Union[str, typing.List[str], NoneType] = None,
  exclude_charterers:
    typing.Union[str, typing.List[str], NoneType] = None,
  exclude_vessel_flags:
    typing.Union[str, typing.List[str], NoneType] = None,
  order: typing.Optional[str] = None,
  order_direction: typing.Optional[str] = None,
  size: typing.Optional[int] = None)

Find Fixtures matching filters and date range.

Arguments

  • filter_time_field: The field that the time range should be filtered against.

filter_time_min: The UTC start date of the time filter.

filter_time_max: The UTC end date of the time filter.

ids: Filter specific fixtures.

filter_charterers: A charterer ID, or list of charterer IDs to filter on.

filter_destinations: A geography ID, or list of geography IDs to filter on.

filter_origins: A geography ID, or list of geography IDs to filter on.

filter_effective_controllers: An effective controller ID, or list of effective controller IDs to filter on.

filter_products: A product ID, or list of product IDs to filter on.

filter_vessels: A vessel ID, or list of vessel IDs to filter on.

filter_vessel_classes: A vessel class, or list of vessel classes to filter on.

filter_vessel_age_min: A number between 1 and 100 (representing years).

filter_vessel_age_max: A number between 1 and 100 (representing years).

filter_vessel_scrubbers: Either inactive 'disabled', or included 'inc' or excluded 'exc'.

filter_vessel_flags: A vessel flag, or list of vessel flags to filter on.

exclude_origins: A geography ID, or list of geography IDs to exclude.

exclude_destinations: A geography ID, or list of geography IDs to exclude.

exclude_products: A product ID, or list of product IDs to exclude.

exclude_vessels: A vessel ID, or list of vessel IDs to exclude.

exclude_vessel_classes: A vessel class, or list of vessel classes to exclude.

exclude_charterers: A charterer ID, or list of charterer IDs to exclude.

exclude_vessel_flags: A geography ID, or list of geography IDs to exclude.

order: Used to sort the returned results.

order_direction: Determines the direction of sorting.

Returns

List of Fixtures objects.

Examples

Find Fixtures from January 2020.

>>> from datetime import datetime
>>> from vortexasdk import Fixtures
>>> df = Fixtures().search(
...     filter_time_field="fixing_timestamp",
...     filter_time_min=datetime(2020, 1, 1),
...     filter_time_max=datetime(2020, 1, 2),
... ).to_df()

returns

vessel.name tones origin.label product.label
ALPINE EAGLE 454.96048964485 UK Crude

Some values can be NULL: value, stocks, cover, runs. It can happen when:

  • The fixture scope is needed to access this endpoint.

vortexasdk.endpoints.fixtures_result

FixtureResult

FixtureResult(*, records: typing.List,
              reference: typing.Dict[str, typing.Any])

Container class that holds the result obtained from calling the Fixtures endpoint.

model_config

to_list

FixtureResult.to_list()

Represent Fixtures data as a list.

to_df

FixtureResult.to_df(
    columns:
    typing.Union[typing_extensions.Literal['all'], typing.List[str], NoneType] = ['id', 'vessel.id', 'vessel.name', 'laycan_from', 'laycan_to', 'tones', 'fixing_timestamp', 'fulfilled', 'vtx_fulfilled', 'destination.label', 'origin.label', 'product.label', 'charterer.label']
)

Represent Fixtures as a pd.DataFrame.

Arguments

  • columns: The Fixtures columns we want in the dataframe. Defaults to columns = [ "id", 'vessels.corporate_entities.charterer.id', 'vessels.corporate_entities.charterer.label', 'vessels.corporate_entities.charterer.layer', 'vessels.corporate_entities.charterer.probability', 'vessels.corporate_entities.charterer.source', 'vessels.corporate_entities.effective_controller.id', 'vessels.corporate_entities.effective_controller.label', 'vessels.corporate_entities.effective_controller.layer', 'vessels.corporate_entities.effective_controller.probability', 'vessels.corporate_entities.effective_controller.source', 'vessels.corporate_entities.time_charterer.end_timestamp', 'vessels.corporate_entities.time_charterer.id', 'vessels.corporate_entities.time_charterer.label', 'vessels.corporate_entities.time_charterer.layer', 'vessels.corporate_entities.time_charterer.probability', 'vessels.corporate_entities.time_charterer.source', 'vessels.corporate_entities.time_charterer.start_timestamp', 'vessels.cubic_capacity', 'vessels.dwt', 'vessels.end_timestamp', 'vessels.fixture_fulfilled', 'vessels.fixture_id', 'vessels.id', 'vessels.imo', 'vessels.mmsi', 'vessels.name', 'vessels.start_timestamp', 'vessels.status', 'vessels.tags.end_timestamp', 'vessels.tags.start_timestamp', 'vessels.tags.tag', 'vessels.vessel_class', 'vessels.voyage_id', "laycan_from", "laycan_to", "tones", "fixing_timestamp", "fulfilled", "vtx_fulfilled", "destination.label", "destination.id", "origin.label", "origin.id", "product.label", "product.id", "charterer.label", "charterer.id", ].

A near complete list of columns is given below

[
    "id",
    "vessel.id",
    "vessel.name",
    "laycan_from",
    "laycan_to",
    "tones",
    "fixing_timestamp",
    "fulfilled",
    "vtx_fulfilled",
    "destination.label",
    "origin.label",
    "product.label",
    "charterer.label",
]

Returns

pd.DataFrame of Fixtures.