Use Yahoo API to access Yahoo's stock market data interface (real-time quotes, K-line, etc.)

The Yahoo Finance API interface found online can basically retrieve stock, index, and foreign exchange data from various markets around the world. However, it seems that there is no data available for Japan domestically. However, after investigation, it was found that there are other ways to obtain the data, and the methods will be included in a subsequent blog post.

  1. Obtaining real-time data
    s - represents the stock name, multiple stocks are separated by a plus sign, such as "XOM+BBDb.TO+JNJ+MSFT", which lists the stocks of four companies: XOM, BBDb.TO, JNJ, MSFT.
    f - represents the returned data columns, such as "snd1l1yr".

  2. Historical data request
    s - stock name
    a - start time, month
    b - start time, day
    c - start time, year
    d - end time, month
    e - end time, day
    f - end time, year
    g - time period.
    The parameter g can take the values: d-> 'day', w-> 'week', m-> 'month', v-> 'dividends only'
    The month starts from 0, so for September data, it is written as 08.

Reference URLs:\_71302a17010100on.html

Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.