mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
add type hint for ticker
This commit is contained in:
parent
e5a742cf2e
commit
358a1eb73f
4
main.py
4
main.py
|
@ -4,7 +4,7 @@ import logging
|
|||
import time
|
||||
import traceback
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
from typing import Dict, Optional
|
||||
|
||||
from jsonschema import validate
|
||||
|
||||
|
@ -138,7 +138,7 @@ def handle_trade(trade: Trade) -> None:
|
|||
except ValueError:
|
||||
logger.exception('Unable to handle open order')
|
||||
|
||||
def get_target_bid(ticker) -> float:
|
||||
def get_target_bid(ticker: Dict[str, float]) -> float:
|
||||
""" Calculates bid target between current ask price and last price """
|
||||
if ticker['ask'] < ticker['last']:
|
||||
return ticker['ask']
|
||||
|
|
Loading…
Reference in New Issue
Block a user