need to filter Japanese stock data with api

Roxie
Roxie Newcomer
edited May 26 in Eikon Data APIs

I need to filter Japanese stock data that meets the following criteria:

  • Exchanges: Tokyo (TKS), Osaka (OSE), Nagoya (NGY), Fukuoka (FKU)
  • Security Type: Common Stock
  • Listing Status: Including Active and Delisted
  • Country of Domicile: Japan
  • Time Range: Monthly data from January 2024 to April 2025

I have tried various query methods and encountered errors:

  1. Using SCREENER syntax:
    Query: U(IN(Equity(active,inactive,TKS,OSE,NGY,FKU)))
    Error: Error code -1 | The '(' delimiter is unexpected in identifiers
  2. Using exchange list queries:
    Query: 0#.T, 0#.OS, etc.
    Issue: Uncertain if this correctly retrieves all stocks meeting the criteria
  3. Other attempted syntax:
    • SCREEN(U(IN(Exchanges(TKS,OSE,NGY,FKU))))
    • screen(U(IN(Exchanges(TKS,OSE,NGY,FKU)), EQUITY:COMMON))
      These all produce syntax errors

Questions:

  1. What is the correct SCREENER syntax? Specifically, how to filter for:
    • Multiple Japanese exchanges
    • Common stocks only
    • Including delisted stocks
    • Japan-domiciled companies
  2. How to implement this filtering using rd.get_data() or other functions?
  3. Could you help modify my code?

我使用的程式碼片段:

import refinitiv.data as rd

# 連接設定
rd.open_session("platform.rdp")

# 嘗試的查詢(都失敗了)
basic_data = rd.get_data(
    universe="SCREEN(U(IN(Exchanges(TKS,OSE,NGY,FKU))))",
    fields=['TR.RIC', 'TR.CompanyName', 'TR.ExchangeName']
)

Answers