Yahoo#

Following methods are provided:

class rug.yahoo.Yahoo(symbol=None)#
get_current_price_change()#

Fetches current market price inc. pre/post market prices/percent/value changes. Also returns current market state (pre-market, open, post-market, closed).

Fetched stucture has following fields:

  • state (pre-market, open, post-market, closed)

  • pre_market
    • change
      • percents

      • value

    • value

  • current_market
    • change
      • percents

      • value

    • value

  • post_market
    • change
      • percents

      • value

    • value

Returned dict looks like:

{
    "state": "open",
    "pre_market": {
        "change": {
            "percents": -1.32476,
            "value": -1.42001
        },
        "value": 105.77
    },
    "current_market": {
        "change": {
            "percents": -1.6046284000000002,
            "value": -1.7200012
        },
        "value": 105.47
    },
    "post_market": {
        "change": {
            "percents": 0.0,
            "value": 0.0
        },
        "value": 0.0
    }
}
Returns:

Current/Pre/Post market numbers (all are floats).

Return type:

dict