Expert Option API V2 is a API for the ExpertOption broker
Project description
ExpertOption API V2
join the discord: Discord
This project demonstrates a simple usage of the ExpertOptionApiV2 from the ExpertOptionApiV2.stable_api package. It connects to the ExpertOption server, authenticates with a token, and retrieves the account balance.
🚀 Getting Started
Requirements
- Python 3.7+
ExpertOptionApiV2package installed- A valid ExpertOption token
📦 Installation
pip install ExpertOptionApiV2
Or, if you're installing from source, clone the repository and run:
pip install .
🧠 Usage
Edit the script and replace TOKEN = "" with your actual token:
TOKEN = "your_token_here"
Then run the script:
python script.py
🧪 Example
import asyncio
from ExpertOptionApiV2.stable_api import ExpertOptionApiV2
TOKEN = ""
async def main():
api = ExpertOptionApiV2(TOKEN, server_region="wss://fr24g1eu.expertoption.finance/ws/v40")
await api.connect()
print(await api.GetBalance())
# print(await api.PlaceOrder(amount=1, type="call", assetid=240, exptime=60, isdemo=1))
# print(await api.GetSingleCandles())
if __name__ == '__main__':
asyncio.run(main())
📚 Available Methods
GetBalance(): Returns current account balance.PlaceOrder(...): Places a trade order (uncomment to use).GetSingleCandles(): Fetches single candle data (uncomment to use).
📝 Note: Ensure you are connected and authenticated before calling these methods.
🔐 Disclaimer
Use this code responsibly and ensure you comply with the ExpertOption Terms of Use. This is a simplified example and should not be used in production without further error handling and security checks.
Happy coding! 🚀
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file expertoptionapi_v2-1.0.0.tar.gz.
File metadata
- Download URL: expertoptionapi_v2-1.0.0.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ec4dfd826195495c048875850378ec64c6f7bed0a0525b96420f7d4f18731bc
|
|
| MD5 |
84d12aede5cda80c22afd294247ea3af
|
|
| BLAKE2b-256 |
ed67509e22a60ef259ee2f7b3ef781e52c99e9a1d6fca09ef97b0dbd8280b61e
|
File details
Details for the file expertoptionapi_v2-1.0.0-py3-none-any.whl.
File metadata
- Download URL: expertoptionapi_v2-1.0.0-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d30eeaf1685ecd1bcc5c5ea84b88a73f76024c5fb112ae729e73fbe150adb0a
|
|
| MD5 |
efb1cb6a0a98e2ab365eabfc2096dd21
|
|
| BLAKE2b-256 |
b98240a41b57afb5aa3cfb496b43791442d9b7cf311d098a1fcbebc16f1750b0
|