Skip to main content

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

expertoptionapi_v2-1.0.0.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

expertoptionapi_v2-1.0.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

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

Hashes for expertoptionapi_v2-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1ec4dfd826195495c048875850378ec64c6f7bed0a0525b96420f7d4f18731bc
MD5 84d12aede5cda80c22afd294247ea3af
BLAKE2b-256 ed67509e22a60ef259ee2f7b3ef781e52c99e9a1d6fca09ef97b0dbd8280b61e

See more details on using hashes here.

File details

Details for the file expertoptionapi_v2-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for expertoptionapi_v2-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d30eeaf1685ecd1bcc5c5ea84b88a73f76024c5fb112ae729e73fbe150adb0a
MD5 efb1cb6a0a98e2ab365eabfc2096dd21
BLAKE2b-256 b98240a41b57afb5aa3cfb496b43791442d9b7cf311d098a1fcbebc16f1750b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page