Skip to content

ChipaDevTeam/ExpertOptionAPI-V2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

ExpertOptionAPI-V2 is the better version of ExpertOptionAPI

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages