Skip to content

Commit

Permalink
Fix datetime import.
Browse files Browse the repository at this point in the history
fix initialize_market_setup function bug
  • Loading branch information
ven7782 authored and yeonholee50 committed Dec 7, 2024
1 parent 557c85f commit 3865b46
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mongo_setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from config import API_KEY, API_SECRET, POLYGON_API_KEY, RANK_POLYGON_API_KEY, MONGO_DB_USER, MONGO_DB_PASS, mongo_url
from helper_files.client_helper import strategies
from pymongo import MongoClient
import datetime
from datetime import datetime
import math

def insert_rank_to_coefficient(i):
Expand Down Expand Up @@ -77,11 +77,11 @@ def initialize_time_delta():
client.close()

def initialize_market_setup():
client = MongoClient(mongo_url)
db = client.market_data
collection = client.market_status
collection.insert_one({"market_status": "closed"})
client.close()
client = MongoClient(mongo_url)
db = client.market_data # Access the market_data database
collection = db.market_status # Access the market_status collection
collection.insert_one({"market_status": "closed"})
client.close()

if __name__ == "__main__":
insert_rank_to_coefficient(100)
Expand Down

0 comments on commit 3865b46

Please sign in to comment.