theshadow76 / pocketoptionapi Goto Github PK
View Code? Open in Web Editor NEWThe API for Pocket Option broker
The API for Pocket Option broker
what I have:
-account login is successful
-when I click on “restore account” I get error 404
[code after click](https://ctxt.io/2/AADYd38yFg):
How can I install this package via pip
Hello. I'm trying to check example on guidance, but it is not work!
I changed line check_connect,message=account.connect()
on account.connect()
and if check_connect:
on if account.check_connect:
but it is not get resault.
ssid=r"""42["auth",{"session":"a:4:{s:10:\"session_id\";s:32:\"123123123123\";s:10:\"ip_address\";s:12:\"2.111.11.5\";s:10:\"user_agent\";s:104:\"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36\";s:13:\"last_activity\";i:123232;}1232321213","isDemo":0,"uid":"123232132"}]"""
account=PocketOption(ssid)
check_connect,message=account.connect()
if check_connect:
account.change_balance("PRACTICE")#"REAL"
asset="EURUSD"
amount=1
dir="call"#"call"/"put"
duration=30#sec
print("Balance: ",account.get_balance())
buy_info=account.buy(asset,amount,dir,duration)
#need this to close the connect
print("----Trade----")
print("Get: ",account.check_win(buy_info["id"]))
print("----Trade----")
print("Balance: ",account.get_balance())
#need close ping server thread
account.close()```
Hello! I'm doing web socket reverse engineering too, ran into a problem, I'm doing the same as you:
async def process_message(message, websocket):
print(message)
if message.startswith('0{"sid":"'):
message = message.lstrip("0")
data = json.loads(message)
print("got 0 sid send 40 ")
await websocket.send("40")
elif message == "2":
print("got 2 send 3")
await websocket.send("3")
elif message.startswith('40{"sid":"'):
print("got 40 sid send session")
data = r"""42["auth",{"session":"a:4:{s:10:"session_id";s:32:"c53eec05c6f8a8be2d134d4fd55266f8";s:10:"ip_address";s:14:"46.138.176.190";s:10:"user_agent";s:101:"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36";s:13:"last_activity";i:1707850603;}9f383935faff5a86bc1658bbde8c61e7","isDemo":1,"uid":72038016,"platform":3}]"""
await websocket.send(data)
I don't understand what this is about, could you please advise me?
Whats going on with this api? how far along is this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.