Skip to content

Function to get the "asset open in:" - #1

Open
TheHolsback wants to merge 10 commits into
TheHolsback:masterfrom
Lu-Yi-Hsun:master
Open

TheHolsback wants to merge 10 commits into
TheHolsback:masterfrom
Lu-Yi-Hsun:master

Conversation

@TheHolsback

Copy link
Copy Markdown
Owner

add the following code in stable_api.py
the function return seconds to assets open

def digital_asset_open_in(ACTIVES):
    data=self.get_digital_underlying_list_data()["underlying"]

    for active in data:
        if active["underlying"]== ACTIVES:
            schedule=active["schedule"]
            for schedule_time in schedule:
                start = schedule_time["open"]
                if start>time.time():
                    time_to_open= start-time.time()
                    #print(time_to_open)
                    break 
            break

    return time_to_open

Copilot AI review requested due to automatic review settings July 1, 2026 14:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants