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

Found on the internet, the Yahoo Finance API interface can basically obtain stock, index, and foreign exchange data from various markets around the world. However, it seems that there is no data available for Japan domestically, but after investigation, it was found that it can be obtained using other methods, which will be included in a subsequent blog post.

  1. Get real-time data
    s - represents the stock name, multiple stocks are separated by plus signs, such as "XOM+BBDb.TO+JNJ+MSFT", listing four companies' stocks: 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 have the following values: d->'day', w->'week', m->'month', v->'dividends only'
    The month starts from 0, so for September data, it should be written as 08.

Reference URLs:\_71302a17010100on.html

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