ပေါင်းစည်းမှု လမ်းညွှန်
Smart Money API ဖြင့် Bybit perpetuals entries များအား အတည်ပြုခြင်း
CCXT ဖြင့် Bybit swap ဈေးကွက် အချက်အလက်များအား တိုက်ရိုက်ဖတ်ပါ၊ Smart Money API အား whale flow နှင့် derivatives positioning တို့က သင့်ရွေးချယ်ထားသောဦးတည်ချက်နှင့် ကိုက်ညီမှုရှိမရှိ မေးမြန်းပါ၊ ထို့နောက် အဆိုပြုထားသော multiplier ဖြင့် perpetuals entry အား ထည့်သွင်းပါ။
ဤသည်မှာ မည်သူ့အတွက်နည်း
Python developers များ Bybit USDT-perpetuals bot အား CCXT တွင် လုပ်ဆောင်နေသူများအတွက်၊ entry တစ်ခုစီမပြုလုပ်မီ လွတ်လပ်သော ဈေးကွက် အခြေအနေစစ်ဆေးမှု လိုအပ်သူများ။ Smart Money API သည် ဆုံးဖြတ်ချက် ထောက်ပံ့မှုဖြစ်သည် — ၎င်းသည် သင့်အတွက် order များအား မထည့်သွင်းပေးပါ။ သင့် CCXT code သည် execution နှင့် risk အား ထိန်းချုပ်ထားဆဲဖြစ်သည်။
လိုအပ်ချက်များ
- Python 3.9+ နှင့်
pip install ccxt requests. - Bybit API keys များအား CCXT အတွက် configure လုပ်ထားရန် (စမ်းသပ်ရန် read-only ဖြစ်နိုင်သည်)
- Smart Money API key တစ်ခု (အခမဲ့ tier သည် BTC အတွက် လုံလောက်သည်)
သင့် API key အား ရယူပါ
တောင်းဆိုမှုတိုင်းသည် X-API-Key header ဖြင့် authenticate လုပ်သည်။ key တစ်ခုရရန်-
- 1အခမဲ့ account တစ်ခုအား ဖန်တီးပါ၊ ထို့နောက် သင့် dashboard.
- 2အား ဖွင့်ပါ API Accessအောက်တွင် ပြသထားသော API key အား ကူးယူပါ။ အခမဲ့ tier သည် BTC အတွက် တစ်နေ့ 100 requests အထိ လုံလောက်သည် — ဤလမ်းညွှန်ချက်အား အဆုံးထိ စမ်းသပ်ရန် လုံလောက်သည်။
- 3symbols အများအပြား သို့မဟုတ် limit မြင့်မားစွာ လိုအပ်ပါသလား? tier များအား pricing page.
တွင် နှိုင်းယှဉ်ကြည့်ပါ။ key အား လျှို့ဝှက်ထားပါ — environment variable တွင် သိမ်းဆည်းထားပါ၊ source control သို့ မည်သည့်အခါမျှ commit မလုပ်ပါနှင့်။
Setup
- 1library များအား install လုပ်ပါ-
pip install ccxt requests. - 2သင့် key အား export လုပ်ပါ-
export SMA_API_KEY="sm_your_key_here". - 3CCXT ဖြင့် Bybit swaps အား ဖွင့်ပါ (
ccxt.bybit({"options":{"defaultType":"swap"}})), သင့် strategy အား candidate direction တစ်ခုအား ရွေးချယ်ခိုင်းပါ၊ ထို့နောက်/v1/confirmအား final context gate အဖြစ် ခေါ်ယူပါ။ - 4action ဖြစ်နေသည့်အခါမှသာ CCXT ဖြင့် perpetuals entry အား ထည့်သွင်းပါ။
CONFIRM, sizing bysize_mult.
Working example
This script reads a Bybit swap ticker with CCXT, derives a candidate direction, then calls GET /v1/confirm?symbol=BTC&direction=long before deciding whether to place the entry.
import os
import ccxt
import requests
API_KEY = os.environ["SMA_API_KEY"] # never hard-code
SMA_BASE = "https://api.smartmoneyapi.com"
exchange = ccxt.bybit({"options": {"defaultType": "swap"}}) # Bybit perpetuals
def confirm(symbol: str, direction: str) -> dict:
"""Ask Smart Money API for market-context confirmation."""
r = requests.get(
f"{SMA_BASE}/v1/confirm",
params={"symbol": symbol, "direction": direction, "source": "bybit-bot"},
headers={"X-API-Key": API_KEY},
timeout=10,
)
r.raise_for_status()
return r.json()
# 1. Read Bybit swap market data with CCXT and pick a candidate direction
ticker = exchange.fetch_ticker("BTC/USDT:USDT")
direction = "long" if ticker["percentage"] and ticker["percentage"] > 0 else "short"
# 2. Confirm with Smart Money API before acting
sig = confirm("BTC", direction)
print(sig["action"], sig["confidence"], "size_mult", sig["size_mult"])
# 3. Act on the recommendation (CCXT executes; the API only advises)
if sig["action"] == "CONFIRM":
base_qty = 0.01
qty = base_qty * sig["size_mult"] # scale by suggested multiplier
# exchange.create_order("BTC/USDT:USDT", "market", direction, qty)
print(f"Would place {direction} {qty} BTC/USDT:USDT perp")
elif sig["action"] == "REDUCE":
print("Context is mixed -> trade smaller or wait for a cleaner setup")
else: # SKIP
print("Context does not support this trade -> stand aside")
Expected response
A successful call to /v1/confirm returns JSON like this:
{
"ts": 1710940821,
"symbol": "BTC",
"direction": "long",
"composite": 0.74,
"confidence": "HIGH",
"action": "CONFIRM",
"size_mult": 1.5,
"deriv_score": 0.81,
"onchain_score": 0.68,
"whale_score": 0.73,
"reasons": [
"Funding rate positive across all venues",
"LSR favors longs: 1.42",
"Whales: 67% long consensus",
"MVRV above 1.0 — on-chain bullish"
]
}
composite ranges from -1.0 (strong contra) to +1.0 (strong confirm), confidence is HIGH or MEDIUM, and size_mult is a 0.0–1.5 suggested size multiplier. See the full field reference in the API docs.
How to act on the response
CONFIRM
Context supports your direction. Proceed with your own entry and risk rules, optionally scaling size by size_mult.
REDUCE
Signals are mixed. Consider a smaller position, tighter stops, or waiting for a cleaner setup.
SKIP
Market context does not support this trade. Stand aside and re-check on the next candidate.
Ready to build?
Grab a free key and make your first confirmation call in under a minute.
Not financial advice. Crypto trading involves risk.