question

Upvotes
Accepted
1 0 1 2

I'd like to know if you can help us with an API with some information about vessels. To explain it better, the idea is to input the IMO number of an vessel and Refinitiv return us the fields below

Dear all, good day! I'd like to know if you can help us with an API with some information about vessels. To explain it better, the idea is to input the IMO number of an vessel and Refinitiv return us the fields below:

Name:

Vessel Type:

MMSI:

Call Sign:

Gross Tonnage:

NET Tonnage:

Summer DWT:

Length Overall:

Breadth Extreme:

Year Built:

vessel
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
Accepted
32.2k 41 11 20

Hello @daniela.sanches ,

Sharing the findings from case #11042734 that you probably have seen, for the benefit of dev community:

Name: TR.AssetName
Vessel Type: TR.AssetType
MMSI: TR.AssetMMSI
Call Sign: TR.AssetCallSign
Gross Tonnage: TR.GrossTonnage
NET Tonnage: TR.AssetNetTonnage
Summer DWT: Dead Weight Tonnage
We only have: TR.AssetDWT and TR.AssetPortMaxDWT
Length Overall: TR.AssetLOA
Breadth Extreme: TR.AssetBreadthExtreme
Year Built: TR.AssetMainEngineBYear
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
32.2k 41 11 20

Hello @daniela.sanches ,

In my understanding, the best approach would be to get one of the IMO numbers and to self-select the available information/fields to use in Python code, using Eikon CodeCreator tool, for example:

vessel.gif

1. Selected Instruments = 'C}BS7309857750'

2. In Data Items selected 'vessel - that resulted in all available fields available for vessels

3. I selected 'Vessel Details' which was 39 fields and the 'Add all'.

4. Python code on the bottom was generated that can be used:

df, err = ek.get_data(
    instruments = ['C}BS7309857750'],
    fields = [
        'TR.AssetExName',
        'TR.AssetLOA',
        'TR.AssetCubicCapacity',
        'TR.AssetBuilt',
        'TR.AssetBuiltDemolition',
        'TR.AssetIsDeactivated',
        'TR.AssetBallastWater',
        'TR.AssetClassedBy1',
        'TR.AssetClassedBy1DateChange,
...
        'TR.AssetDischargeDate',
        'TR.AssetCharterer'
    ]
)

display(df)

Hope this information helps


vessel.gif (191.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
19k 86 39 63

Hi @daniela.sanches

You can combine a couple of APIs that will allow you to capture the necessary details requested. As @zoya faberov pointed out, you can use the CodeCreator tool to help identify some of these fields. I put together a simple Python function that combines a couple of our APIs that will allow you to request the details based on IMO. For example:

import refinitiv.dataplatform as rdp
from refinitiv.dataplatform import eikon as ek
...

def vessel_details(imo):
    # Retrieve available details from Search based on IMO
    response = rdp.Search.search(
        view=rdp.SearchViews.VesselPhysicalAssets,
        filter=f"IMO eq '{imo}'",
        select="DTSubjectName, DTSimpleType, MMSI, GrossTonnage, DWT, \
                VesselBuildYear, RIC"
    )
    if response.is_success:
        ric = response.data.df['RIC'][0]
        df,err = ek.get_data(ric, ['TR.AssetType','TR.AssetCallSign',
                                   'TR.AssetNetTonnage','TR.AssetLOA', 
                                   'TR.AssetBeamExtreme'])
        if err is None:
            df.rename(columns={ 'Instrument': 'RIC' }, inplace = True)
            result = df.merge(response.data.df, how='inner', on='RIC')
            return result
    return null

With this in place, you can use the above as:

IMO = '9901984'
vessel_details(IMO)

ahs.png


ahs.png (58.1 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
1 0 1 2

Dear all,

Are all the fields mentioned in my first question available in this API?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
32.2k 41 11 20

Hello @daniela.sanches ,

This forum can be of most help to you with questions about Refinitiv Eikon Data API Python usage.

Your question is now on mapping/pinpointing the required Refinitiv Eikon content, where Refinitiv content experts can help you best, and I have opened case #11042734 with Refinitiv content helpdesk on your behalf to help you map the requirements to fields.

Please await for the content experts to reach out via email.

Once you have Eikon Excel formula for the content that you require, we can be of help to you with Eikon Data API request(s).

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.