Skip to main content

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+
  • ExpertOptionApiV2 package 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! 🚀

Metadata

Release files for ExpertOptionAPI-V2 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ExpertOptionAPI-V2 1.0.0
File Size Uploaded
expertoptionapi_v2-1.0.0.tar.gz 15.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ExpertOptionAPI-V2 1.0.0
File Interpreter ABI Platform
expertoptionapi_v2-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.6 kB

Release files / expertoptionapi_v2-1.0.0.tar.gz

Download URL expertoptionapi_v2-1.0.0.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1ec4dfd826195495c048875850378ec64c6f7bed0a0525b96420f7d4f18731bc
BLAKE2b-256 checksum
How to use checksums
ed67509e22a60ef259ee2f7b3ef781e52c99e9a1d6fca09ef97b0dbd8280b61e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / expertoptionapi_v2-1.0.0-py3-none-any.whl

Download URL expertoptionapi_v2-1.0.0-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d30eeaf1685ecd1bcc5c5ea84b88a73f76024c5fb112ae729e73fbe150adb0a
BLAKE2b-256 checksum
How to use checksums
b98240a41b57afb5aa3cfb496b43791442d9b7cf311d098a1fcbebc16f1750b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page