Skip to content

Commit

Permalink
refactor: merged changes from #44 & added new author
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiiRepair committed Dec 3, 2023
1 parent d952880 commit d1ae285
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 28 deletions.
13 changes: 0 additions & 13 deletions example/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,19 +340,6 @@ async def assets_open():
client.close()


async def get_candle():
check_connect, message = await login()
if check_connect:
global CONST_ASSET
asset, asset_open = check_asset(CONST_ASSET)
offset = 180 # in seconds
period = 3600 # in seconds / opcional
candles = await client.get_candles(asset, offset, period)
for candle in candles["data"]:
print(candle)
client.close()


async def get_payment():
check_connect, message = await login()
if check_connect:
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
name = "quotexpy"
version = "1.40.3"
description = "📈 QuotexPy is a library for interact with qxbroker easily."
authors = ["Santiago Ramirez <[email protected]>"]
authors = [
"Santiago Ramirez <[email protected]>",
"Ricardo Spinoza <[email protected]>",
]

repository = "https://github.com/SantiiRepair/quotexpy"
readme = ["README.md"]
keywords = ["quotex", "quotexpy"]
Expand Down
10 changes: 1 addition & 9 deletions quotexpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import math
import asyncio
import logging
import yfinance as yf
from collections import defaultdict
from datetime import datetime, timedelta

Expand All @@ -26,7 +25,7 @@ def truncate(f, n):


class Quotex(object):
__version__ = "1.40.3"
__version__ = "1.40.3+1"

def __init__(self, email, password):
self.size = [
Expand Down Expand Up @@ -355,11 +354,6 @@ async def get_moving_average(self, symbol, interval, periods):

return data["Close_MA"]

async def get_last_candles(self, symbol, interval):
ticker = yf.Ticker(symbol)
last_candles = ticker.history(period="1d", interval=interval)
return last_candles


logging.basicConfig(
filename=".quotexpy.log",
Expand All @@ -369,5 +363,3 @@ async def get_last_candles(self, symbol, interval):

logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())

__author__ = "Santiago Ramirez"
3 changes: 0 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,3 @@ urllib3>=2.0.5
websocket-client==1.6.3
websockets==11.0.3
zipp==3.17.0
setuptools
schedule
yfinance
2 changes: 1 addition & 1 deletion runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.10.6
python-3.12
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"name": "quotexpy",
"version": "1.40.3",
"description": "📈 QuotexPy is a library for interact with qxbroker easily.",
"long_description": '<div align="center">\n<img src="https://static.scarf.sh/a.png?x-pxid=cf317fe7-2188-4721-bc01-124bb5d5dbb2" />\n\n## <img src="https://github.com/SantiiRepair/quotexpy/blob/main/.github/images/quotex-logo.png?raw=true" height="56"/>\n\n\n**📈 QuotexPy is a library for interact with qxbroker easily.**\n\n______________________________________________________________________\n\n[![License](https://img.shields.io/badge/License-GPL--3.0-magenta.svg)](https://www.gnu.org/licenses/gpl-3.0.txt)\n[![PyPI version](https://badge.fury.io/py/quotexpy.svg)](https://badge.fury.io/py/quotexpy)\n![GithubActions](https://github.com/SantiiRepair/quotexpy/actions/workflows/pylint.yml/badge.svg)\n\n</div>\n\n______________________________________________________________________\n\n## Installing\n\n📈 QuotexPy is tested on Ubuntu 18.04 and Windows 10 with **Python >= 3.10, <= 3.12.**\n```bash\npip install quotexpy\n```\n\nIf you plan to code and make changes, clone and install it locally.\n\n```bash\ngit clone https://github.com/SantiiRepair/quotexpy.git\npip install -e .\n```\n\n### Import\n```python\nfrom quotexpy.new import Quotex\n```\n\n### Examples\nFor examples check out [some](https://github.com/SantiiRepair/quotexpy/blob/main/example/main.py) found in the `example` directory.\n\n### Donations\nIf you feel like showing your love and/or appreciation for this project, then how about shouting me a coffee, beer or something more interesting ;)\n\n<a href="https://www.buymeacoffee.com/SantiiRepair"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a whore&emoji=👯\u200d♀️&slug=SantiiRepair&button_colour=980028&font_colour=ffffff&font_family=Poppins&outline_colour=ffffff&coffee_colour=FFDD00" /></a>\n\n### Acknowledgements\nThanks to [@ricardospinoza](https://github.com/ricardospinoza) for solving the `trade` error in the code 🚀\n',
"long_description": '<div align="center">\n<img src="https://static.scarf.sh/a.png?x-pxid=cf317fe7-2188-4721-bc01-124bb5d5dbb2" />\n\n## <img src="https://github.com/SantiiRepair/quotexpy/blob/main/.github/images/quotex-logo.png?raw=true" height="56"/>\n\n\n**📈 QuotexPy is a library for interact with qxbroker easily.**\n\n______________________________________________________________________\n\n[![License](https://img.shields.io/badge/License-LGPL--2.1-magenta.svg)](https://www.gnu.org/licenses/gpl-3.0.txt)\n[![PyPI version](https://badge.fury.io/py/quotexpy.svg)](https://badge.fury.io/py/quotexpy)\n![GithubActions](https://github.com/SantiiRepair/quotexpy/actions/workflows/pylint.yml/badge.svg)\n\n</div>\n\n______________________________________________________________________\n\n## Installing\n\n📈 QuotexPy is tested on Ubuntu 18.04 and Windows 10 with **Python >= 3.10, <= 3.12.**\n```bash\npip install quotexpy\n```\n\nIf you plan to code and make changes, clone and install it locally.\n\n```bash\ngit clone https://github.com/SantiiRepair/quotexpy.git\npip install -e .\n```\n\n### Import\n```python\nfrom quotexpy import Quotex\n```\n\n### Examples\nFor examples check out [some](https://github.com/SantiiRepair/quotexpy/blob/main/example/main.py) found in the `example` directory.\n\n### Donations\nIf you feel like showing your love and/or appreciation for this project, then how about shouting us a coffee ;)\n\n[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/SantiiRepair)\n\n### Acknowledgements\nThanks to [@ricardospinoza](https://github.com/ricardospinoza) for solving the `trade` error in the code 🚀\n',
"author": "Santiago Ramirez",
"author_email": "[email protected]",
"maintainer": "None",
Expand Down

0 comments on commit d1ae285

Please sign in to comment.