Skip to content

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

Open
TheHolsback wants to merge 9 commits intoTheHolsback:masterfrom
Lu-Yi-Hsun:master
Open

Function to get the "asset open in:"#1
TheHolsback wants to merge 9 commits intoTheHolsback:masterfrom
Lu-Yi-Hsun:master

Conversation

@TheHolsback
Copy link
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

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.

5 participants