MarketWatch's API
Project description
Marketwatch API Python Library
[]
[
]
[
]
[
]
[
]
A Python libary to interact with the MarketWatch Stock Market Game Based on code from
Example
if __name__ == "__main__":
import os
username = os.environ.get("MARKETWATCH_USERNAME")
password = os.environ.get("MARKETWATCH_PASSWORD")
marketwatch = MarketWatch(username, password)
print(f"Price: {marketwatch.get_price('AAPL')} \n")
print(f"Games: {marketwatch.get_games()} \n")
games1 = marketwatch.get_games()[0]["name"].lower().replace(" ", "-")
print(f"Game: {marketwatch.get_game(games1)} \n")
print(f"Game Settings: {marketwatch.get_game_settings(games1)} \n")
print(f"Leaderboard: {marketwatch.get_leaderboard(games1)} \n")
print(f"Porfolio: {marketwatch.get_portfolio(games1)} \n")
print(f"Position: {marketwatch.get_positions(games1)}")
print(f"Orders Pending: {marketwatch.get_pending_orders(games1)}")
marketwatch.buy(games1, "AAPL", 100)
print(f"Position diff: {marketwatch.get_positions(games1)}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
marketwatch-0.1.2.tar.gz
(13.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file marketwatch-0.1.2.tar.gz.
File metadata
- Download URL: marketwatch-0.1.2.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c15c1b2f859168a1a020fe89c7ff5bb04f062ec4145c051b46515d5fe0a26b6e
|
|
| MD5 |
0462c22ac20f13124195f5780099970e
|
|
| BLAKE2b-256 |
ed350623fb1b1fd9f44b8a7fb980ba1a64bbb32cd38f008558bbb3defb5a9e99
|
File details
Details for the file marketwatch-0.1.2-py3-none-any.whl.
File metadata
- Download URL: marketwatch-0.1.2-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30997a342d567aab0221ba12bc76f24e5117d9444b72279816db60dfbbddd0b6
|
|
| MD5 |
29af2580ec68c301bd5584013d3628af
|
|
| BLAKE2b-256 |
c354e012f457082aa5ef15a237cada85c48282a7bdf898185954594c14b6dfe1
|