BITSTAMP:BTCUSD   비트코인
import time
import requests

def get_price(symbol):
"""Abfrage des aktuellen Preises einer Kryptowährung."""
url = f"https://api.coinmarketcap.com/v2/ticker/{symbol}/?convert=EUR"
response = requests.get(url)
data = response.json()
return data

def buy_sell_strategy(symbol, buy_threshold, sell_threshold):
"""Automatisierte Handelsstrategie zum Kauf und Verkauf von Kryptowährungen."""
current_price = get_price(symbol)
if current_price < buy_threshold:
print(f"Kaufe {symbol} zu einem Preis von {current_price:.2f} EUR.")
elif current_price > sell_threshold:
print(f"Verkaufe {symbol} zu einem Preis von {current_price:.2f} EUR.")


면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.