Freight Rates¶
Freight Rates API Package.
Classes:
Name | Description |
---|---|
FreightRatesAPI |
Represents Signal's Freight Rates API. |
FreightPricing |
The freight pricing given a load and discharge port. |
VesselClass |
A vessel class. |
Port |
A maritime facility where vessels can dock. |
PortFilter |
A filter used to find specific ports. |
Cost
dataclass
¶
The freight costs breakdown.
Attributes:
Name | Type | Description |
---|---|---|
canal |
float
|
Canal costs. |
freight_cost |
float
|
Freight cost. |
other_port_expenses |
float
|
Other port expenses. |
Source code in signal_ocean/freight_rates/models.py
7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
FreightPricing
dataclass
¶
The freight pricing given a load and discharge port.
Attributes:
Name | Type | Description |
---|---|---|
vessel_class |
str
|
The vessel class. |
rate |
float
|
Value of the rate. |
rate_type |
str
|
Type of the rate. |
estimated_flat_rate |
float
|
Estimated flat rate. |
costs |
Cost
|
Costs breakdown. |
total_freight_cost |
float
|
Total freight cost. |
total_freight_rate |
float
|
Total freight rate. |
route_type |
str
|
Route type. |
load_ports |
List[Port]
|
Load ports. |
discharge_ports |
List[Port]
|
Discharge ports. |
quantity |
float
|
Quantity. |
min_flat_augusta_used |
bool
|
True if minimum flat Augusta was used. |
routing_choices |
Optional[List[str]]
|
Routing choices (e.g. Suez, Panama etc). |
Source code in signal_ocean/freight_rates/models.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
FreightRatesAPI
¶
Represents Signal's Freight Rates API.
Source code in signal_ocean/freight_rates/freight_rates_api.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
__init__(connection=None)
¶
Initializes the Freight Rates API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
connection |
Optional[Connection]
|
API connection configuration. If not provided, the default connection method is used. |
None
|
Source code in signal_ocean/freight_rates/freight_rates_api.py
17 18 19 20 21 22 23 24 |
|
get_freight_pricing(load_ports, discharge_ports, vessel_classes, is_clean, date=date.today())
¶
Provides freight pricing for given load/discharge ports.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
load_ports |
List[int]
|
Load ports. |
required |
discharge_ports |
List[int]
|
Discharge ports. |
required |
vessel_classes |
List[str]
|
Vessel classes for which to return the freight e.g. |
required |
is_clean |
bool
|
True if it is clean cargo. |
required |
date |
date
|
Date of pricing. |
today()
|
Returns:
Type | Description |
---|---|
FreightPricing
|
The freight pricing or None if there are is no freight matching the |
...
|
given criteria. |
Source code in signal_ocean/freight_rates/freight_rates_api.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
|
get_ports(port_filter=None)
¶
Retrieves available ports.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
port_filter |
Optional[PortFilter]
|
A filter used to find specific ports. If not specified, returns all available ports. |
None
|
Returns:
Type | Description |
---|---|
Tuple[Port, ...]
|
A tuple of available ports that match the filter. |
Source code in signal_ocean/freight_rates/freight_rates_api.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
|
get_vessel_classes()
staticmethod
¶
Retrieves all available vessel classes.
Returns:
Type | Description |
---|---|
Tuple[str, ...]
|
A tuple of all available vessel classes. |
Source code in signal_ocean/freight_rates/freight_rates_api.py
67 68 69 70 71 72 73 74 75 76 |
|
Port
dataclass
¶
A maritime facility where vessels can dock.
Attributes:
Name | Type | Description |
---|---|---|
id |
Optional[int]
|
ID of the port. |
name |
str
|
Name of the port. |
country |
Optional[str]
|
Country of the port. |
area |
Optional[str]
|
Area of the port. |
Source code in signal_ocean/freight_rates/models.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
|
PortFilter
dataclass
¶
A filter used to find specific ports.
Attributes:
Name | Type | Description |
---|---|---|
name_like |
Optional[str]
|
Used to find ports by name. When specified, ports whose names partially match (contain) the attribute's value will be returned. Matching is case-insensitive. |
Source code in signal_ocean/freight_rates/port_filter.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|