-
-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathpayout.py
More file actions
27 lines (21 loc) · 888 Bytes
/
Copy pathpayout.py
File metadata and controls
27 lines (21 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import time
from BinaryOptionsToolsV2.pocketoption import PocketOption
# Main part of the code
def main(ssid: str):
# The api automatically detects if the 'ssid' is for real or demo account
api = PocketOption(ssid)
time.sleep(5)
# Candñes are returned in the format of a list of dictionaries
full_payout = api.payout() # Returns a dictionary asset: payout
print(f"Full Payout: {full_payout}")
partial_payout = api.payout(
["EURUSD_otc", "EURUSD", "AEX25"]
) # Returns a list of the payout for each of the passed assets in order
print(f"Partial Payout: {partial_payout}")
single_payout = api.payout(
"EURUSD_otc"
) # Returns the payout for the specified asset
print(f"Single Payout: {single_payout}")
if __name__ == "__main__":
ssid = input("Please enter your ssid: ")
main(ssid)