Beranda
Notifikasi
Profil
Artikel yang Sedang Tren
Berita
Ditandai dan Disukai
Riwayat
Pusat Kreator
Pengaturan
Zaman3
--
Ikuti
#BinanceEarnYieldArena
am
Penafian: Berisi opini pihak ketiga. Bukan nasihat keuangan. Dapat berisi konten bersponsor.
Baca S&K.
0
0
Jelajahi berita kripto terbaru
⚡️ Ikuti diskusi terbaru di kripto
💬 Berinteraksilah dengan kreator favorit Anda
👍 Nikmati konten yang menarik minat Anda
Email/Nomor Ponsel
Daftar
Masuk
Kreator Terkait
Zaman3
@Square-Creator-e11683627
Ikuti
Jelajahi Konten Lainnya dari Kreator
import time import requests import numpy as np from binance.spot import Spot # --------------------------- # 1) Binance API Keys # --------------------------- API_KEY = "YOUR_API_KEY" API_SECRET = "YOUR_API_SECRET" client = Spot(key=API_KEY, secret=API_SECRET) # --------------------------- # 2) RSI Calculation Function # --------------------------- def calculate_rsi(prices, period=14): prices = np.array(prices) delta = np.diff(prices) gain = delta.clip(min=0) loss = -delta.clip(max=0) avg_gain = np.mean(gain[:period]) avg_loss = np.mean(loss[:period]) rs = avg_gain / (avg_loss if avg_loss != 0 else 1) rsi = 100 - (100 / (1 + rs)) return rsi # --------------------------- # 3) Main Trading Loop # --------------------------- symbol = "BTCUSDT" qty = 0.001 # buy/sell amount while True: # Get last 100 prices (1-minute) url = f"https://api.binance.com/api/v3/klines?symbol={symbol}&interval=1m&limit=100" data = requests.get(url).json() closes = [float(x[4]) for x in data] rsi = calculate_rsi(closes) last_price = closes[-1] print(f"Price: {last_price} | RSI: {rsi}") # --------------------------- # BUY Signal (RSI oversold) # --------------------------- if rsi < 30: print("BUY SIGNAL TRIGGERED") try: order = client.new_order( symbol=symbol, side="BUY", type="MARKET", quantity=qty ) print("Bought:", order) except Exception as e: print("Buy Error:", e) # --------------------------- # SELL Signal (RSI overbought) # --------------------------- if rsi > 70: print("SELL SIGNAL TRIGGERED") try: order = client.new_order( symbol=symbol, side="SELL", type="MARKET", quantity=qty ) print("Sold:", order) except Exception as e: print("Sell Error:", e) time.sleep(15)
--
What is Binance? Binance is the world’s largest cryptocurrency exchange where people can buy, sell, and trade digital currencies like Bitcoin, Ethereum, BNB, and thousands of other tokens. It was founded in 2017 by Changpeng Zhao (CZ). --- Main Features of Binance 1. Crypto Trading – Spot trading, Futures, and Margin trading. 2. Binance Coin (BNB) – Binance’s own cryptocurrency used for discounts on trading fees and many other services. 3. Staking & Earn – Users can stake (lock) their crypto and earn rewards. 4. Launchpad – A platform to invest in new crypto projects. 5. NFT Marketplace – Buy and sell NFTs. 6. P2P (Peer-to-Peer) – Directly buy/sell crypto with other people using local payment methods. 7. Binance Pay – Send and receive crypto payments easily. --- Why People Use Binance Low trading fees. Wide variety of coins and tokens. Advanced tools for professional traders. Strong security system. Global accessibility.
--
great 👍 #SolanaSurge
--
#JELLYJELLYFuturesAlert amazing rewards
--
referral code
--
Berita Terbaru
Bitcoin Melampaui 88.000 USDT Di Tengah Keuntungan Harian
--
Bitcoin(BTC) Melampaui 88.000 USDT dengan Peningkatan 0,63% dalam 24 Jam
--
BNB Melewati 850 USDT dengan Peningkatan 0.44% dalam 24 Jam
--
Transfer PAXG dari Alamat Null ke Paxos Dilaporkan
--
Pasar Kripto Mengalami Likuidasi $182 Juta dalam 24 Jam
--
Lihat Selengkapnya
Sitemap
Preferensi Cookie
S&K Platform