Skip to content
This repository was archived by the owner on Apr 26, 2026. It is now read-only.

Commit 4957615

Browse files
committed
little update
1 parent ea7bc01 commit 4957615

19 files changed

Lines changed: 33 additions & 41 deletions

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
env
2-
pocket.log
2+
pocket.log
3+
.env
6.13 KB
Binary file not shown.
3.43 KB
Binary file not shown.
1.76 KB
Binary file not shown.
430 Bytes
Binary file not shown.
9.38 KB
Binary file not shown.

pocketoptionapi/constants.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -137,23 +137,23 @@
137137

138138
class REGION:
139139
REGIONS = {
140-
# "EUROPA": "wss://api-eu.po.market/socket.io/?EIO=4&transport=websocket",
141-
# "SEYCHELLES": "wss://api-sc.po.market/socket.io/?EIO=4&transport=websocket",
142-
# "HONGKONG": "wss://api-hk.po.market/socket.io/?EIO=4&transport=websocket",
143-
# "SERVER1": "wss://api-spb.po.market/socket.io/?EIO=4&transport=websocket",
144-
# "FRANCE2": "wss://api-fr2.po.market/socket.io/?EIO=4&transport=websocket",
145-
# "UNITED_STATES4": "wss://api-us4.po.market/socket.io/?EIO=4&transport=websocket",
146-
# "UNITED_STATES3": "wss://api-us3.po.market/socket.io/?EIO=4&transport=websocket",
147-
# "UNITED_STATES2": "wss://api-us2.po.market/socket.io/?EIO=4&transport=websocket",
140+
"EUROPA": "wss://api-eu.po.market/socket.io/?EIO=4&transport=websocket",
141+
"SEYCHELLES": "wss://api-sc.po.market/socket.io/?EIO=4&transport=websocket",
142+
"HONGKONG": "wss://api-hk.po.market/socket.io/?EIO=4&transport=websocket",
143+
"SERVER1": "wss://api-spb.po.market/socket.io/?EIO=4&transport=websocket",
144+
"FRANCE2": "wss://api-fr2.po.market/socket.io/?EIO=4&transport=websocket",
145+
"UNITED_STATES4": "wss://api-us4.po.market/socket.io/?EIO=4&transport=websocket",
146+
"UNITED_STATES3": "wss://api-us3.po.market/socket.io/?EIO=4&transport=websocket",
147+
"UNITED_STATES2": "wss://api-us2.po.market/socket.io/?EIO=4&transport=websocket",
148148
"UNITED_STATES": "wss://api-us-north.po.market/socket.io/?EIO=4&transport=websocket",
149-
# "RUSSIA": "wss://api-msk.po.market/socket.io/?EIO=4&transport=websocket",
150-
# "SERVER2": "wss://api-l.po.market/socket.io/?EIO=4&transport=websocket",
151-
# "INDIA": "wss://api-in.po.market/socket.io/?EIO=4&transport=websocket",
152-
# "FRANCE": "wss://api-fr.po.market/socket.io/?EIO=4&transport=websocket",
153-
# "FINLAND": "wss://api-fin.po.market/socket.io/?EIO=4&transport=websocket",
154-
# "SERVER3": "wss://api-c.po.market/socket.io/?EIO=4&transport=websocket",
155-
# "ASIA": "wss://api-asia.po.market/socket.io/?EIO=4&transport=websocket",
156-
# "SERVER4": "wss://api-us-south.po.market/socket.io/?EIO=4&transport=websocket"
149+
"RUSSIA": "wss://api-msk.po.market/socket.io/?EIO=4&transport=websocket",
150+
"SERVER2": "wss://api-l.po.market/socket.io/?EIO=4&transport=websocket",
151+
"INDIA": "wss://api-in.po.market/socket.io/?EIO=4&transport=websocket",
152+
"FRANCE": "wss://api-fr.po.market/socket.io/?EIO=4&transport=websocket",
153+
"FINLAND": "wss://api-fin.po.market/socket.io/?EIO=4&transport=websocket",
154+
"SERVER3": "wss://api-c.po.market/socket.io/?EIO=4&transport=websocket",
155+
"ASIA": "wss://api-asia.po.market/socket.io/?EIO=4&transport=websocket",
156+
"SERVER4": "wss://api-us-south.po.market/socket.io/?EIO=4&transport=websocket"
157157
}
158158

159159
def __getattr__(self, key):

pocketoptionapi/stable_api.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from collections import deque
1717
# from pocketoptionapi.expiration import get_expiration_time, get_remaning_time
1818
import pandas as pd
19+
from pocketoptionapi.ws.chanels.get_balances import *
1920

2021
# Obtener la zona horaria local del sistema como una cadena en el formato IANA
2122
local_zone_name = get_localzone()
@@ -115,12 +116,13 @@ def check_connect():
115116
# wait for timestamp getting
116117

117118
# self.update_ACTIVES_OPCODE()
118-
@staticmethod
119-
def get_balance():
120-
if global_value.balance_updated:
121-
return global_value.balance
122-
else:
123-
return None
119+
def get_balance(self):
120+
self.api.get_balances()
121+
return {
122+
"balance_id" : global_value.balance_id,
123+
"balance" : global_value.balance,
124+
"balance_type" : global_value.balance_type
125+
}
124126

125127
def buy(self, amount, ACTIVES, ACTION, expirations):
126128
self.api.buy_multi_option = {}
5.72 KB
Binary file not shown.
1.11 KB
Binary file not shown.

0 commit comments

Comments
 (0)