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

Uploaded Source

Built Distribution

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

ExpertOptionAPI-0.4-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ExpertOptionAPI-0.4.tar.gz
  • Upload date:
  • Size: 9.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.4.tar.gz
Algorithm Hash digest
SHA256 ab781b3eb6330b4f3d2448ded0f8a616dcbe7dc216c25e0d8719d6fa5c2cd34c
MD5 6aeaa53a8c6dcea03e3f3478b21dfd19
BLAKE2b-256 755301a6c68ef96f5c0d0cbdae0d0777b475602151581eb33d89eb4402ea0770

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ExpertOptionAPI-0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for ExpertOptionAPI-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2db05f9b883c22256bf96fd2029fc02050c6c079fd91f4baed2d3fbf75e98ac2
MD5 311fcb7baaae266191340bbec7bbc2db
BLAKE2b-256 7369b71693285be257ce19ff2268ee6eda9c87c11ba56f9ce339317d699d415a

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