Trades Snapshot

Note

available on platforms : Platform.Liquids, Platform.LNG, Platform.LPG, Platform.Dry

class kpler.sdk.resources.trades_snapshot.TradesSnapshot(configuration, column_ids=True, log_level=None)[source]

The TradesSnapshot query returns a snapshot of our trades data at a specified time.

get(snapshot_date=None, vessels=None, from_installations=None, to_installations=None, from_zones=None, to_zones=None, buyers=None, sellers=None, products=None, start_date=None, end_date=None, trade_status=None, columns=None)[source]
Parameters
  • snapshot_date – Optional[date] Date of the snapshot, if empty it returns the most recent snapshot

  • vessels – Optional[List[str]] Names/IMO’s of vessels

  • from_installations – Optional[List[str]] Names of the origin installations

  • to_installations – Optional[List[str]] Names of the destination installations (terminal/refinery)

  • from_zones – Optional[List[str]] Names of the origin zones (port/region/country/continent)

  • to_zones – Optional[List[str]] Names of the destination zones (port/region/country/continent)

  • buyers – Optional[List[str]] Buyers of the cargo

  • sellers – Optional[List[str]] Sellers of the cargo

  • products – Optional[List[str]] Names of products

  • start_date – Optional[date] Start of the period

  • end_date – Optional[date] End of the period

  • trade_status – Optional[List[Enum]] TradesStatus Return only trades of a particular status. By default value is scheduled.

  • columns – Optional[List[str]] Retrieve all available columns when set to “all”

Examples

>>> from datetime import date, timedelta, datetime
... from kpler.sdk.resources.trades_snapshot import TradesSnapshot
... trades_snapshot_client = TradesSnapshot(config)
... snapshots = trades_snapshot_client.get(
... snapshot_date = datetime.strptime('2022/01/01', '%Y/%m/%d'),
... to_zones = ["France"],
... products = ["crude"],
... start_date = datetime.strptime('2021/01/01', '%Y/%m/%d'),
... columns=[
...         "vessel_name",
...         "origin_country_name",
...         "origin_location_name",
...         "destination_location_name",
...         "start",
...         "end"
... ]
... )
>>> print(snapshots.headers['snapshotName'])
"2022-01-01T000100"
>>> print(snapshots.headers['lastAvailableDate'])
"2022-10-19T034600"

vessel_name

origin_country_name

origin_location_name

destination_location_name

start

end

trade_id

product_id

Sakura Princess

Russian Federation

Novorossiysk

Fos

2022-02-05 18:48:00

2022-02-18 23:36:00

13163188

1360

Alfa Baltica

United Kingdom

Hound Point

Le Havre

2022-01-29 08:31:00

2022-02-09 22:25:00

13214389

1502

Scf Baikal

Equatorial Guinea

Zafiro FPSO

Fos

2022-01-27 14:18:00

2022-02-20 02:17:00

13263935

2430

Calida

Russian Federation

Umba FSO

Le Havre

2022-01-25 21:59:00

2022-02-02 11:00:00

13107517

1940

Siri Knutsen

United Kingdom

Culzean

Le Havre

2022-01-25 18:50:00

2022-01-27 17:01:00

13208418

2488

Return type

DataFrame

get_columns()[source]

This endpoint returns a recent and updated list of all columns available for the endpoint trades.

Examples

>>> from kpler.sdk.resources.trades_snapshot import TradesSnapshot
...   trades_snapshot_client = TradesSnapshot(config)
...   trades_snapshot_client.get_columns()

id

name

description

deprecated

type

vessel_name

Vessel

Name of the vessel

False

string

start

Date (origin)

Departure date of the vessel

False

datetime yyyy-MM-dd HH:mm

origin_location_name

Origin

Origin location of the cargo

False

string

origin_eta_source

Eta source (origin)

Source of the Estimated Time of Arrival to the Installation of Origin information (Port, Analyst, etc.)

False

string

cargo_origin_cubic_meters

Volume (origin m3)

None

False

long

Return type

DataFrame

class kpler.sdk.TradesStatus(value)[source]
Delivered = 'delivered'
InTransit = 'in transit'
Loading = 'loading'
Scheduled = 'scheduled'