question

Upvotes
Accepted
7 1 4 7

We use API search function to retrieve data, but it returns unknown property 'ProviderSymbol'. The field in Eikon Client is "PROV_SYMB"

df = rd.discovery.search(

view=rd.discovery.Views.COMMODITY_QUOTES,

top=10,

filter="(ProviderSymbol eq 'm2401')",

select="ProviderSymbol,RIC"

)


{

"return_code": 500,

"return_info": "Error code 400 | Invalid filter: unknown property 'ProviderSymbol'",

"result": {}

}

#productapi#content
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
Accepted
86k 292 53 78

@xuke

Thank you for reaching out to us.

This ProviderSymbol is not a valid field in the COMMODITY_QUOTES.

You can use the following code to the all available fields in the COMMODITY_QUOTES.

response = search.metadata.Definition(
    view = search.Views.COMMODITY_QUOTES  # Required parameter
).get_data()

response.data.df

1693303565243.png

I tried m2401 in Eikon and it doesn't show anything.

1693303871131.png


1693303565243.png (37.0 KiB)
1693303871131.png (9.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.

@Jirapongse thanks. I asked another question is related to this question. Could you have a look at it? (https://community.developers.refinitiv.com/questions/108440/how-to-use-eikon-api-to-get-commodities-ric-code-b.html) I got a reply to use search function to get the RIC code.

Upvotes
86k 292 53 78

@xuke

I assume that m2401 is from Ticker (M) and Expirate Date (Jan 24).

If my assumption is correct, the seach query should be:

{
  "View": "CommodityQuotes",
  "Filter": "TickerSymbol eq 'M' and ContractMonthYear eq 'Jan 24' and AssetStateName eq 'Active' and RCSAssetCategoryLeaf xeq 'Commodity Future' and ExpiryDateString ne null",
  "Select": "DocumentTitle,RIC,AssetType,ContractMonthYear,Periodicity,RCSAssetCategoryLeaf,RCSAssetClass,RCSCurrencyLeaf,ExchangeCode,ExpiryDateString"
}

The output is:

{
  "Total": 1,
  "Hits": [
    {
      "DocumentTitle": "DCE Soybean Meal Commodity Future Jan 2024, Commodity Future, Dalian Commodity Exchange",
      "RIC": "DSMF4",
      "AssetType": [
        "DERIVATIVE"
      ],
      "ContractMonthYear": "Jan 24",
      "Periodicity": "Irregular",
      "RCSAssetCategoryLeaf": "Commodity Future",
      "RCSAssetClass": "FUT",
      "RCSCurrencyLeaf": "Chinese Yuan",
      "ExchangeCode": "DLC",
      "ExpiryDateString": "15 Jan 2024"
    }
  ]
}
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.

"TickerSymbol eq 'M' and ContractMonthYear eq 'Jan 24' and AssetStateName eq 'Active' and RCSAssetCategoryLeaf xeq 'Commodity Future' and ExpiryDateString ne null",

Hi , I want to replace 'TickerSymbol' with 'TradingSymbol’, but It's not valid.

1701830685623.png

What is the solution to solve it

1701830685623.png (64.0 KiB)

@Jirapongse Can you help me solve this problem

@joneliu

I couldn't find this "TradingSymbol" field in the CommodityQuotes.

Show more comments

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.