develop #3
@@ -1,21 +0,0 @@
|
|||||||
import app.telegram.database.requests as rq
|
|
||||||
import app.services.Bybit.functions.price_symbol as price_s
|
|
||||||
|
|
||||||
from pybit.unified_trading import HTTP
|
|
||||||
|
|
||||||
client = HTTP()
|
|
||||||
|
|
||||||
async def get_min_qty(tg_id, message):
|
|
||||||
api_key = await rq.get_bybit_api_key(tg_id)
|
|
||||||
secret_key = await rq.get_bybit_secret_key(tg_id)
|
|
||||||
SYMBOL = await rq.get_symbol(tg_id)
|
|
||||||
|
|
||||||
client = HTTP(
|
|
||||||
api_key=api_key,
|
|
||||||
api_secret=secret_key
|
|
||||||
)
|
|
||||||
|
|
||||||
price = await price_s.get_price(tg_id, message)
|
|
||||||
min_qty = int(5 / price * 1.1)
|
|
||||||
|
|
||||||
return min_qty
|
|
@@ -1,8 +0,0 @@
|
|||||||
import logging
|
|
||||||
|
|
||||||
logging.basicConfig(
|
|
||||||
level=logging.INFO,
|
|
||||||
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
|
|
||||||
)
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
|
Reference in New Issue
Block a user