stocksera


Namestocksera JSON
Version 0.1.21 PyPI version JSON
download
home_pagehttps://github.com/guanquann/Stocksera-API
SummaryOfficial Stocksera API
upload_time2022-03-27 13:59:55
maintainer
docs_urlNone
authorGuan Quan
requires_python>=3.6
licenseThe MIT License (MIT)
keywords stocks wallstreetbets trading senate investing finviz
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Stocksera API

[![Downloads](https://pepy.tech/badge/stocksera)](https://pepy.tech/project/stocksera)

This is the official API for Stocksera. Visit Stocksera at https://github.com/guanquann/Stocksera. 
Sign up for free Stocksera API at https://stocksera.pythonanywhere.com/accounts/developers.

### Installation
The package can easily be installed in your terminal by entering
```
pip install stocksera
```

### Import the package
```
import stocksera

# Sign up for free Stocksera API at https://stocksera.pythonanywhere.com/accounts/developers/
client = stocksera.Client(api_key="YOUR API KEY")
```

### Get data from social media

##### Get total mentions/ mentions of a stock on wallstreetbets
```
data = client.wsb_mentions(days=1, ticker="AAPL")
```
| Params  | Required | Default | Description     |
| ------- | -------- | ------- | --------------- |
| days    | No       | 1       | number days ago |
| ticker  | No       |         | stock symbol    |

##### Get total number of puts/calls mentions on wallstreetbets
```
data = client.wsb_options(days=1)
```
| Params  | Required | Default | Description     |
| ------- | -------- | ------- | --------------- |
| days    | No       | 1       | number days ago |

##### Get subreddit count on Reddit
```
data = client.subreddit(days=50, ticker="GME")
```
| Params  | Required | Default | Description     |
| ------- | -------- | ------- | --------------- |
| days    | No       | 100     | number days ago |
| ticker  | Yes      | GME     | stock symbol    |

##### Get current trending stocks/ ranking and watchlist count of a stock in stocktwits
```
data = client.stocktwits(ticker="AAPL")
```
| Params  | Required | Default | Description     |
| ------- | -------- | ------- | --------------- |
| ticker  | No       |         | stock symbol    |

### Get stocks related data

##### Get SEC fillings of a stock
```
data = client.sec_fillings(ticker="AAPL", date_from="2022-01-01", date_to="2022-01-31")
```
| Params    | Required | Default | Description     |
| --------- | -------- | ------- | --------------- |
| ticker    | Yes      | AAPL    | stock symbol    |
| date_from | No       |         | YYYY-MM-DD      |
| date_to   | No       |         | YYYY-MM-DD      |

##### Get news sentiment of a stock
```
data = client.news_sentiment(ticker="AAPL")
```
| Params  | Required | Default | Description     |
| ------- | -------- | ------- | --------------- |
| ticker  | Yes      | AAPL    | stock symbol    |

##### Get recent insider trading of all tickers/ insider trading of a stock
```
data = client.insider_trading(limit=500, ticker="AAPL", date_from="2022-01-01", date_to="2022-01-31")
```

| Params    | Required | Default | Description     |
| --------- | -------- | ------- | --------------- |
| limit     | No       | 500     | last n records  |
| ticker    | No       | AAPL    | stock symbol    |
| date_from | No       |         | YYYY-MM-DD      |
| date_to   | No       |         | YYYY-MM-DD      |

##### Get recent insider trading analysis
```
data = client.latest_insider_trading_summary()
```

##### Get stocks with high short volume/ short volume of a stock
```
data = client.short_volume(ticker="AAPL", date_from="2022-01-01", date_to="2022-01-31")
```
| Params    | Required | Default | Description     |
| --------- | -------- | ------- | --------------- |
| ticker    | No       |         | stock symbol    |
| date_from | No       |         | YYYY-MM-DD      |
| date_to   | No       |         | YYYY-MM-DD      |

##### Get stocks with consistently high FTD/ FTD of a stock
```
data = client.ftd(ticker="AAPL", date_from="2022-01-01", date_to="2022-01-31")
```
| Params    | Required | Default | Description     |
| --------- | -------- | ------- | --------------- |
| ticker    | No       |         | stock symbol    |
| date_from | No       |         | YYYY-MM-DD      |
| date_to   | No       |         | YYYY-MM-DD      |

##### Get number of shares available and borrow fees of a stock
```
data = client.borrowed_shares(ticker="AAPL")
```
| Params    | Required | Default | Description     |
| --------- | -------- | ------- | --------------- |
| ticker    | No       | AAPL    | stock symbol    |

### Get government trades data

#### Get all senate trades/ trades of a specific person/ trades of a specific ticker
```
data = client.senate(ticker="AAPL", name="Thomas H Tuberville", date_from="2022-01-01", date_to="2022-01-31")
```
| Params    | Required | Default | Description     |
| --------- | -------- | ------- | --------------- |
| ticker    | No       |         | stock symbol    |
| name      | No       |         | name of person  |
| date_from | No       |         | YYYY-MM-DD      |
| date_to   | No       |         | YYYY-MM-DD      |

#### Get all house trades/ trades of a specific person/ trades of a specific ticker
```
data = client.house(ticker="AAPL", name="Nancy Pelosi", state="CA", date_from="2022-01-01", date_to="2022-01-31")
```
| Params    | Required | Default | Description     |
| --------- | -------- | ------- | --------------- |
| ticker    | No       |         | stock symbol    |
| name      | No       |         | name of person  |
| state     | No       |         | district code   |
| date_from | No       |         | YYYY-MM-DD      |
| date_to   | No       |         | YYYY-MM-DD      |

### Get ETF data

##### Get market indices
```
data = client.market_summary(market_type="snp500")
```
| Params       | Required | Default | Description              |
| -------      | -------- | ------- | -------------------------|
| market_type  | Yes      | snp500  | snp500/nasdaq100/dia/wsb |

### Get economic data

##### Get reverse repo
```
data = client.reverse_repo(days=100)
```
| Params  | Required | Default | Description     |
| ------- | -------- | ------- | --------------- |
| days    | No       | 100     | number days ago |

##### Get daily treasury
```
data = client.daily_treasury(days=100)
```
| Params  | Required | Default | Description     |
| ------- | -------- | ------- | --------------- |
| days    | No       | 100     | number days ago |

##### Get inflation
```
data = client.inflation()
```

##### Get initial jobless claims
```
data = client.jobless_claims(days=100)
```
| Params  | Required | Default | Description     |
| ------- | -------- | ------- | --------------- |
| days    | No       | 100     | number days ago |

##### Get retail sales
```
data = client.retail_sales(days=100)
```
| Params  | Required | Default | Description     |
| ------- | -------- | ------- | --------------- |
| days    | No       | 100     | number days ago |

### Get stock related news

##### Get recent market news
```
data = client.market_news()
```

##### Get trading halts
```
data = client.trading_halts()
```

### Get other interesting data

##### Get Jim Cramer trades
```
data = client.jim_cramer(ticker="AAPL", segment="featured", call="buy")
```

| Params  | Required | Default | Description                        |
| ------- | -------- | ------- | ---------------------------------- |
| ticker  | No       | all     | stock symbol                       |
| segment | No       | all     | featured/discussed/lightning/guest |
| call    | No       | all     | buy/positive/hold/negative/sell    |

##### Get stocks with high short interest
```
data = client.short_interest()
```

##### Get stocks with low float
```
data = client.low_float()
```

##### Get upcoming and past IPOs
```
data = client.ipo_calendar()
```

##### Get earnings calendar of stocks
```
data = client.earnings_calendar(date_from="2022-01-01", date_to="2022-01-31")
```
| Params    | Required | Default | Description     |
| --------- | -------- | ------- | --------------- |
| date_from | No       |         | YYYY-MM-DD      |
| date_to   | No       |         | YYYY-MM-DD      |



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/guanquann/Stocksera-API",
    "name": "stocksera",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "stocks,wallstreetbets,trading,senate,investing,finviz",
    "author": "Guan Quan",
    "author_email": "stocksera@gmail.com.com",
    "download_url": "https://files.pythonhosted.org/packages/b3/28/79424c811d8fa41167471ada6371aff8dcb8ad0ebaf86a8471f660065447/stocksera-0.1.21.tar.gz",
    "platform": null,
    "description": "# Stocksera API\n\n[![Downloads](https://pepy.tech/badge/stocksera)](https://pepy.tech/project/stocksera)\n\nThis is the official API for Stocksera. Visit Stocksera at https://github.com/guanquann/Stocksera. \nSign up for free Stocksera API at https://stocksera.pythonanywhere.com/accounts/developers.\n\n### Installation\nThe package can easily be installed in your terminal by entering\n```\npip install stocksera\n```\n\n### Import the package\n```\nimport stocksera\n\n# Sign up for free Stocksera API at https://stocksera.pythonanywhere.com/accounts/developers/\nclient = stocksera.Client(api_key=\"YOUR API KEY\")\n```\n\n### Get data from social media\n\n##### Get total mentions/ mentions of a stock on wallstreetbets\n```\ndata = client.wsb_mentions(days=1, ticker=\"AAPL\")\n```\n| Params  | Required | Default | Description     |\n| ------- | -------- | ------- | --------------- |\n| days    | No       | 1       | number days ago |\n| ticker  | No       |         | stock symbol    |\n\n##### Get total number of puts/calls mentions on wallstreetbets\n```\ndata = client.wsb_options(days=1)\n```\n| Params  | Required | Default | Description     |\n| ------- | -------- | ------- | --------------- |\n| days    | No       | 1       | number days ago |\n\n##### Get subreddit count on Reddit\n```\ndata = client.subreddit(days=50, ticker=\"GME\")\n```\n| Params  | Required | Default | Description     |\n| ------- | -------- | ------- | --------------- |\n| days    | No       | 100     | number days ago |\n| ticker  | Yes      | GME     | stock symbol    |\n\n##### Get current trending stocks/ ranking and watchlist count of a stock in stocktwits\n```\ndata = client.stocktwits(ticker=\"AAPL\")\n```\n| Params  | Required | Default | Description     |\n| ------- | -------- | ------- | --------------- |\n| ticker  | No       |         | stock symbol    |\n\n### Get stocks related data\n\n##### Get SEC fillings of a stock\n```\ndata = client.sec_fillings(ticker=\"AAPL\", date_from=\"2022-01-01\", date_to=\"2022-01-31\")\n```\n| Params    | Required | Default | Description     |\n| --------- | -------- | ------- | --------------- |\n| ticker    | Yes      | AAPL    | stock symbol    |\n| date_from | No       |         | YYYY-MM-DD      |\n| date_to   | No       |         | YYYY-MM-DD      |\n\n##### Get news sentiment of a stock\n```\ndata = client.news_sentiment(ticker=\"AAPL\")\n```\n| Params  | Required | Default | Description     |\n| ------- | -------- | ------- | --------------- |\n| ticker  | Yes      | AAPL    | stock symbol    |\n\n##### Get recent insider trading of all tickers/ insider trading of a stock\n```\ndata = client.insider_trading(limit=500, ticker=\"AAPL\", date_from=\"2022-01-01\", date_to=\"2022-01-31\")\n```\n\n| Params    | Required | Default | Description     |\n| --------- | -------- | ------- | --------------- |\n| limit     | No       | 500     | last n records  |\n| ticker    | No       | AAPL    | stock symbol    |\n| date_from | No       |         | YYYY-MM-DD      |\n| date_to   | No       |         | YYYY-MM-DD      |\n\n##### Get recent insider trading analysis\n```\ndata = client.latest_insider_trading_summary()\n```\n\n##### Get stocks with high short volume/ short volume of a stock\n```\ndata = client.short_volume(ticker=\"AAPL\", date_from=\"2022-01-01\", date_to=\"2022-01-31\")\n```\n| Params    | Required | Default | Description     |\n| --------- | -------- | ------- | --------------- |\n| ticker    | No       |         | stock symbol    |\n| date_from | No       |         | YYYY-MM-DD      |\n| date_to   | No       |         | YYYY-MM-DD      |\n\n##### Get stocks with consistently high FTD/ FTD of a stock\n```\ndata = client.ftd(ticker=\"AAPL\", date_from=\"2022-01-01\", date_to=\"2022-01-31\")\n```\n| Params    | Required | Default | Description     |\n| --------- | -------- | ------- | --------------- |\n| ticker    | No       |         | stock symbol    |\n| date_from | No       |         | YYYY-MM-DD      |\n| date_to   | No       |         | YYYY-MM-DD      |\n\n##### Get number of shares available and borrow fees of a stock\n```\ndata = client.borrowed_shares(ticker=\"AAPL\")\n```\n| Params    | Required | Default | Description     |\n| --------- | -------- | ------- | --------------- |\n| ticker    | No       | AAPL    | stock symbol    |\n\n### Get government trades data\n\n#### Get all senate trades/ trades of a specific person/ trades of a specific ticker\n```\ndata = client.senate(ticker=\"AAPL\", name=\"Thomas H Tuberville\", date_from=\"2022-01-01\", date_to=\"2022-01-31\")\n```\n| Params    | Required | Default | Description     |\n| --------- | -------- | ------- | --------------- |\n| ticker    | No       |         | stock symbol    |\n| name      | No       |         | name of person  |\n| date_from | No       |         | YYYY-MM-DD      |\n| date_to   | No       |         | YYYY-MM-DD      |\n\n#### Get all house trades/ trades of a specific person/ trades of a specific ticker\n```\ndata = client.house(ticker=\"AAPL\", name=\"Nancy Pelosi\", state=\"CA\", date_from=\"2022-01-01\", date_to=\"2022-01-31\")\n```\n| Params    | Required | Default | Description     |\n| --------- | -------- | ------- | --------------- |\n| ticker    | No       |         | stock symbol    |\n| name      | No       |         | name of person  |\n| state     | No       |         | district code   |\n| date_from | No       |         | YYYY-MM-DD      |\n| date_to   | No       |         | YYYY-MM-DD      |\n\n### Get ETF data\n\n##### Get market indices\n```\ndata = client.market_summary(market_type=\"snp500\")\n```\n| Params       | Required | Default | Description              |\n| -------      | -------- | ------- | -------------------------|\n| market_type  | Yes      | snp500  | snp500/nasdaq100/dia/wsb |\n\n### Get economic data\n\n##### Get reverse repo\n```\ndata = client.reverse_repo(days=100)\n```\n| Params  | Required | Default | Description     |\n| ------- | -------- | ------- | --------------- |\n| days    | No       | 100     | number days ago |\n\n##### Get daily treasury\n```\ndata = client.daily_treasury(days=100)\n```\n| Params  | Required | Default | Description     |\n| ------- | -------- | ------- | --------------- |\n| days    | No       | 100     | number days ago |\n\n##### Get inflation\n```\ndata = client.inflation()\n```\n\n##### Get initial jobless claims\n```\ndata = client.jobless_claims(days=100)\n```\n| Params  | Required | Default | Description     |\n| ------- | -------- | ------- | --------------- |\n| days    | No       | 100     | number days ago |\n\n##### Get retail sales\n```\ndata = client.retail_sales(days=100)\n```\n| Params  | Required | Default | Description     |\n| ------- | -------- | ------- | --------------- |\n| days    | No       | 100     | number days ago |\n\n### Get stock related news\n\n##### Get recent market news\n```\ndata = client.market_news()\n```\n\n##### Get trading halts\n```\ndata = client.trading_halts()\n```\n\n### Get other interesting data\n\n##### Get Jim Cramer trades\n```\ndata = client.jim_cramer(ticker=\"AAPL\", segment=\"featured\", call=\"buy\")\n```\n\n| Params  | Required | Default | Description                        |\n| ------- | -------- | ------- | ---------------------------------- |\n| ticker  | No       | all     | stock symbol                       |\n| segment | No       | all     | featured/discussed/lightning/guest |\n| call    | No       | all     | buy/positive/hold/negative/sell    |\n\n##### Get stocks with high short interest\n```\ndata = client.short_interest()\n```\n\n##### Get stocks with low float\n```\ndata = client.low_float()\n```\n\n##### Get upcoming and past IPOs\n```\ndata = client.ipo_calendar()\n```\n\n##### Get earnings calendar of stocks\n```\ndata = client.earnings_calendar(date_from=\"2022-01-01\", date_to=\"2022-01-31\")\n```\n| Params    | Required | Default | Description     |\n| --------- | -------- | ------- | --------------- |\n| date_from | No       |         | YYYY-MM-DD      |\n| date_to   | No       |         | YYYY-MM-DD      |\n\n\n",
    "bugtrack_url": null,
    "license": "The MIT License (MIT)",
    "summary": "Official Stocksera API",
    "version": "0.1.21",
    "project_urls": {
        "Homepage": "https://github.com/guanquann/Stocksera-API"
    },
    "split_keywords": [
        "stocks",
        "wallstreetbets",
        "trading",
        "senate",
        "investing",
        "finviz"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1074c0d50d5780052477f9aa476ff68ce12e213db64039ea5b2446b07110c2c6",
                "md5": "6577782427bfe5599674edde37a60657",
                "sha256": "106efc755265926341fd96e57613304e5b6d370f0cd67ac9b483283ee2264053"
            },
            "downloads": -1,
            "filename": "stocksera-0.1.21-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6577782427bfe5599674edde37a60657",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 5403,
            "upload_time": "2022-03-27T13:59:53",
            "upload_time_iso_8601": "2022-03-27T13:59:53.841995Z",
            "url": "https://files.pythonhosted.org/packages/10/74/c0d50d5780052477f9aa476ff68ce12e213db64039ea5b2446b07110c2c6/stocksera-0.1.21-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b32879424c811d8fa41167471ada6371aff8dcb8ad0ebaf86a8471f660065447",
                "md5": "153b33b41569a7f75b1008c089c4928e",
                "sha256": "3280137cfd3c02765c9450344e940f31d887f519433ac5a3709ce86710dd5cd8"
            },
            "downloads": -1,
            "filename": "stocksera-0.1.21.tar.gz",
            "has_sig": false,
            "md5_digest": "153b33b41569a7f75b1008c089c4928e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 5360,
            "upload_time": "2022-03-27T13:59:55",
            "upload_time_iso_8601": "2022-03-27T13:59:55.989731Z",
            "url": "https://files.pythonhosted.org/packages/b3/28/79424c811d8fa41167471ada6371aff8dcb8ad0ebaf86a8471f660065447/stocksera-0.1.21.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-03-27 13:59:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "guanquann",
    "github_project": "Stocksera-API",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "stocksera"
}
        
Elapsed time: 0.72473s