Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
MarketDataManager
A client library to manage a postgresSQL database of financial market data, using a docker containerized api.
Readme
MarketDatabaseManager is your complete solution for interacting with financial assets using a Docker-optimized REST API backed by PostgreSQL.
psql -U postgres;
CREATE DATABASE <database_name>;
git clone https://github.com/anthonyb8/MarketDatabaseManager.git
Create a .env
file in the api
directory and insert your database credentials:
DATABASE_URL = "postgresql://<user>:<password>@host.docker.internal/<database_name>"
⚠️ Note: If Docker isn't running locally, replace
host.docker.internal
with the appropriate host.
From the root MarketDatabaseManager
directory, run the following commands to build and start the Docker container:
docker-compose build
docker-compose up -d
While in the root directory of your project (not the MarketDatabaseManager
directory), execute the following commands to set up the virtual environment and install the client library:
python3.10 -m venv venv
source venv/bin/activate
pip install MarketDataManager
from MarketDataManager import Client
client = Client()
client.create_tables()
new_asset = {
"ticker" : "AAPL",
"type" : "equity"
}
client.create_asset(asset = new_asset)
asset_details = {
'company_name' : 'Apple Inc.',
'exchange' : 'NASDAQ',
'currency' : 'USD',
'industry' : 'Technology',
'description' : 'Equity for Apple Inc. a technologies producer.',
'market_cap' : 100000,
'shares_outstanding' : 100000
}
client.create_asset_details(ticker="AAPL", asset_type="equity",data=asset_details)
asset_bardata = [
{
'date' : '2023-01-01',
'open': 100.0,
'close': 101.0,
'high': 102.0,
'low': 103,
'volume': 109,
'adjusted_close' : 1100.0
},
{
'date' : '2023-01-02',
'open': 100.0,
'close': 101.0,
'high': 102.0,
'low': 103,
'volume': 109,
'adjusted_close' : 1100.0
}
]
client.create_bardata(ticker="AAPL", asset_type="equity", data=asset_bardata)
This project is licensed under the Apache License, Version 2.0. Get a copy of the License here.
FAQs
A client library to manage a postgresSQL database of financial market data, using a docker containerized api.
We found that MarketDataManager demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.