Skip to main content

ExpertOption API

Overview

The ExpertOption API offers a programmable interface to interact with Expert Option, a renowned platform for binary options trading. This unofficial API facilitates automated trading, data retrieval, and analysis, enhancing the trading experience.

GitHub Project: ExpertOptionApi
PyPi Package: ExpertOptionAPI on PyPi

Table of Contents

Features

  • Automated trading actions.
  • Real-time data fetching for market analysis.
  • Customizable trading strategies.
  • Profile management and trading history retrieval.

Installation

From GitHub:

git clone https://github.com/theshadow76/ExpertOptionApi.git
cd ExpertOptionApi
pip install -r requirements.txt

Using pip:

pip install ExpertOptionAPI

Usage

To start using the API, here is a example where it buy's a random amount, and a random option (call or put):

from expert import EoApi as ExpertAPI
import time
import logging
import random

# Create a logger object
logger = logging.getLogger(__name__)

# Set the desired logging level
logger.setLevel(logging.INFO)

# Create a formatter to format the log messages
formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')

# Create a console handler to send logs to the console
console_handler = logging.StreamHandler()
console_handler.setFormatter(formatter)

# Add the console handler to the logger
logger.addHandler(console_handler)
# Create a file handler to send logs to a file
file_handler = logging.FileHandler('expert.log')
file_handler.setFormatter(formatter)

# Add the file handler to the logger
logger.addHandler(file_handler)

# Initialize the expert object with the logger
expert = ExpertAPI(token="YOUR_TOKEN", server_region="wss://fr24g1eu.expertoption.com/")

expert.connect()

expert.SetDemo()

profile = expert.Profile()
print(f"PRofile is: {profile}")

candles = expert.GetCandles()
print(f"The candles are: {candles}")

trades = 15

for i in range(trades):
    trade_choice = random.randint(1, 2)
    strik_time = time.time()
    amount = random.randint(10, 500)
    try:
        if trade_choice == 1:
            expert.Buy(amount=amount, type="call", assetid=240, exptime=60, isdemo=1, strike_time=strik_time)
        elif trade_choice == 2:
            expert.Buy(amount=amount, type="put", assetid=240, exptime=60, isdemo=1, strike_time=strik_time)
        else:
            print("Error")
        time.sleep(15)
    except Exception as e:
        print(f"Errror: {e}")
        time.sleep(60)

For detailed documentation and more complex use cases, refer to the docs directory.

Examples

Find practical examples and usage scenarios in the examples folder. These examples cover a range of operations, from basic trading to advanced data analysis.

Contribution

Your contributions can help improve this project. Please feel free to submit pull requests, report bugs, or suggest new features.

License

This software is released under the MIT License, offering freedom for private, educational, and commercial use. For more details, see the LICENSE file.


For updates and support, follow the project on GitHub or contact the maintainers.

Metadata

Release files for ExpertOptionAPI 0.8

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 0.8
File Size Uploaded
ExpertOptionAPI-0.8.tar.gz 13.9 kB Details

Built distribution (wheel)

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

Total release size: 33.4 kB

Release files / ExpertOptionAPI-0.8.tar.gz

Download URL ExpertOptionAPI-0.8.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
15b69e5350564d1511bfa72bb1dd639ca2a131e4604988f8f68ee22982a3c49f
BLAKE2b-256 checksum
How to use checksums
9f9fb9f8cb1b4abc4a15fcd331f6e0f363ce8bfa42ad9c0df8d676c4fa378056
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / ExpertOptionAPI-0.8-py3-none-any.whl

Download URL ExpertOptionAPI-0.8-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a36e2253a86ef92257848e5a5078cfffbd9ffe926757fef8b641c7f33e2b3385
BLAKE2b-256 checksum
How to use checksums
eaee39104dd0c19a56d1ac801bc92010c55a91bbde013cd77eea1217f16c4685
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.8 This release

2 release files

0.7

2 release files

0.6

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

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