Skip to main content

No project description provided

Project description

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.

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-0.8.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

ExpertOptionAPI-0.8-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file ExpertOptionAPI-0.8.tar.gz.

File metadata

  • Download URL: ExpertOptionAPI-0.8.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for ExpertOptionAPI-0.8.tar.gz
Algorithm Hash digest
SHA256 15b69e5350564d1511bfa72bb1dd639ca2a131e4604988f8f68ee22982a3c49f
MD5 778c8dc09504b820f2b832918533136b
BLAKE2b-256 9f9fb9f8cb1b4abc4a15fcd331f6e0f363ce8bfa42ad9c0df8d676c4fa378056

See more details on using hashes here.

File details

Details for the file ExpertOptionAPI-0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for ExpertOptionAPI-0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 a36e2253a86ef92257848e5a5078cfffbd9ffe926757fef8b641c7f33e2b3385
MD5 1723cd32240ed0386c73fdde1a5b290b
BLAKE2b-256 eaee39104dd0c19a56d1ac801bc92010c55a91bbde013cd77eea1217f16c4685

See more details on using hashes here.

Supported by

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