Last updated: 2026-06-24 ยท BitUP Server v20+ ยท Swagger API โ
| Role | What you do |
|---|---|
| You (Developer) | Run strategy engine โ analyze market โ send trade signals |
| BitUP Platform | Validate signals โ risk check โ deduct points โ execute trades |
| Users | Subscribe to your strategy โ provide exchange API keys โ auto copy-trade |
Step 1: Register strategy on BitUP โ get developerApiKey
Step 2: Users subscribe to your strategy โ bind exchange API keys
Step 3: Your engine sends POST /api/v1/strategy/signal โ BitUP executes trades
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Your Strategy Engine (Python/Node/Go) โ
โ โ
โ Market Data โโโถ Strategy Logic โโโถ POST /strategy/signalโ
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ HTTPS + Bearer Token
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ BitUP Platform (Java) โ
โ โ
โ โ Verify API Key โ โก Find user binding โ
โ โ โข Decrypt exchange key โ โฃ Risk check โ
โ โ โค Deduct points โ โฅ Execute trade โ โฆ Record order โ
โโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ User A Binanceโ โ User B OKX โ โ User C Hyper โ
โ (User's own key)โ โ (User's own key)โ โ (User's own key)โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
Key design: You never touch any user's exchange API keys. You only send signals like "User X buy BTC", and the platform executes with that user's own keys.
| Item | Value |
|---|---|
| Base URL (prod) | https://bitup.ai/api/v1 |
| Auth | Authorization: Bearer <developerApiKey> |
| Content-Type | application/json |
POST /api/v1/strategy/signal
| Field | Type | Req | Description |
|---|---|---|---|
user_id | Long | YES | Target user ID |
symbol | String | YES | Trading pair, e.g. BTCUSDT |
action | String | YES | BUY long / SELL close |
quantity | BigDecimal | YES | Order quantity (base asset) |
signal_id | String | YES | Unique signal ID, use UUID |
order_type | String | NO | MARKET (default) / LIMIT |
price | BigDecimal | NO | Required for LIMIT orders |
leverage | Integer | NO | Leverage, default 1 |
take_profit | BigDecimal | NO | Take profit price |
stop_loss | BigDecimal | NO | Stop loss price |
POST /api/v1/strategy/signal
Authorization: Bearer sk-your-api-key
{
"user_id": 26,
"symbol": "BTCUSDT",
"action": "BUY",
"quantity": 0.01,
"signal_id": "550e8400-e29b-41d4-a716-446655440000",
"order_type": "MARKET",
"stop_loss": 61000
}
{
"code": 200,
"message": "success",
"data": {
"status": "ACCEPTED",
"exchange_order_id": "binance-order-12345",
"order_status": "FILLED",
"points_before": 1500,
"points_after": 1499,
"signal_id": 42
}
}
GET /api/v1/developer/strategies
| Status | Meaning |
|---|---|
ACCEPTED | Signal received, executing |
PENDING | Waiting for exchange response |
FILLED | Order fully filled |
REJECTED | Rejected by risk check |
Login โ Developer Center โ Register Strategy โ Submit for review โ Get developerApiKey
| Code | ไธญๆ | Description |
|---|---|---|
TREND_FOLLOWING | ่ถๅฟ่ท่ธช | Follow the trend, buy high sell higher |
MEAN_REVERSION | ๅๅผๅๅฝ | Price reverts to mean after deviation |
MOMENTUM | ๅจ้็ญ็ฅ | Strong gets stronger, weak gets weaker |
GRID | ็ฝๆ ผไบคๆ | Buy low sell high within range |
ARBITRAGE | ๅฅๅฉ็ญ็ฅ | Cross-exchange / funding rate arbitrage |
ML_AI | ๆบๅจๅญฆไน | AI model prediction |
MULTI_FACTOR | ๅคๅ ๅญ | Multi-indicator scoring |
CUSTOM | ่ชๅฎไน | Other custom strategies |
Your Engine BitUP Platform
โ โ
โ โ POST /strategy/signalโ
โโโโโโโโโโโโโโโโโโโโโโโโโโถโ
โ โ โก Verify API Key
โ โ โข Find user binding
โ โ โฃ Risk check
โ โ โค Deduct 1 point
โ โ โฅ Execute trade
โ โฆ Return result โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ {status: "ACCEPTED"} โ
signal_id is globally unique. Duplicate IDs are rejected:
{ "code": 4004, "message": "ไฟกๅทID้ๅค" }
import requests, uuid
class BitUPClient:
def __init__(self, api_key, base_url="https://bitup.ai/api/v1"):
self.api_key = api_key
self.base_url = base_url
def send_signal(self, user_id, symbol, action, quantity, **kwargs):
payload = {
"user_id": user_id, "symbol": symbol,
"action": action, "quantity": quantity,
"signal_id": str(uuid.uuid4()),
"order_type": kwargs.get("order_type", "MARKET"),
"leverage": kwargs.get("leverage", 1),
}
if "stop_loss" in kwargs: payload["stop_loss"] = kwargs["stop_loss"]
if "take_profit" in kwargs: payload["take_profit"] = kwargs["take_profit"]
resp = requests.post(
f"{self.base_url}/strategy/signal",
headers={"Authorization": f"Bearer {self.api_key}"},
json=payload
)
return resp.json()
def broadcast(self, user_ids, symbol, action, quantity, **kwargs):
"""Send same signal to multiple users"""
return [{"user_id": uid, "result": self.send_signal(uid, symbol, action, quantity, **kwargs)}
for uid in user_ids]
# Usage
client = BitUPClient("sk-your-api-key")
result = client.send_signal(26, "BTCUSDT", "BUY", 0.01, stop_loss=61000)
print(result["data"]["status"]) # "ACCEPTED"
import crypto from 'crypto';
class BitUPClient {
constructor(apiKey, baseUrl = 'https://bitup.ai/api/v1') {
this.apiKey = apiKey; this.baseUrl = baseUrl;
}
async sendSignal({ userId, symbol, action, quantity, orderType = 'MARKET', stopLoss, takeProfit, leverage = 1 }) {
const payload = {
user_id: userId, symbol, action, quantity,
signal_id: crypto.randomUUID(), order_type: orderType, leverage,
...(stopLoss && { stop_loss: stopLoss }),
...(takeProfit && { take_profit: takeProfit }),
};
const resp = await fetch(`${this.baseUrl}/strategy/signal`, {
method: 'POST',
headers: { Authorization: `Bearer ${this.apiKey}`, 'Content-Type': 'application/json' },
body: JSON.stringify(payload),
});
return resp.json();
}
}
| Check | Rule | Rejection Status |
|---|---|---|
| Daily Loss Limit | Cumulative daily PnL โค user limit | REJECTED |
| Position Limit | Single symbol position โค user limit | REJECTED |
| Leverage Limit | Signal leverage โค strategy max | REJECTED |
| Strategy Status | Strategy ACTIVE, binding RUNNING | REJECTED |
| API Key Validity | User's exchange key working | REJECTED |
| Points Balance | User points โฅ 1 | REJECTED |
User subscribes โ spends subscriptionPoints (e.g. 500 points)
โ
Each signal executes โ deducts 1 point
โ
Points go to strategy developer
โ
Developer can withdraw points as USDT (min 50 USDT)
| Exchange | Code | Type | Symbol Format |
|---|---|---|---|
| Binance | BINANCE | Spot | BTCUSDT |
| OKX | OKX | Spot | BTC-USDT |
| HyperLiquid | HYPERLIQUID | Perpetual | BTC |
| MT5 | MT5 | Forex/Gold/Oil | XAUUSD, US30 |
| Exchange | Required |
|---|---|
| Binance | Enable Spot Trading, DISABLE Withdrawal |
| OKX | Enable Trading, DISABLE Withdrawal |
| HyperLiquid | Enable Trading |
"""
BTC Dual Moving Average Strategy
- Short MA crosses above Long MA โ BUY
- Short MA crosses below Long MA โ SELL
"""
import time, uuid, requests
from collections import deque
API_KEY = "sk-your-api-key"
BASE = "https://bitup.ai/api/v1"
USERS = [26, 30, 40] # Subscribed user IDs
class SMACrossover:
def __init__(self, symbol="BTCUSDT", short=5, long=20):
self.symbol = symbol
self.short, self.long = short, long
self.prices = deque(maxlen=long + 1)
self.positions = {} # user_id โ has_position
def update(self, price): self.prices.append(price)
def should_buy(self):
if len(self.prices) < self.long: return False
s1 = sum(list(self.prices)[-self.short:]) / self.short
l1 = sum(list(self.prices)[-self.long:]) / self.long
s0 = sum(list(self.prices)[-self.short-1:-1]) / self.short
l0 = sum(list(self.prices)[-self.long-1:-1]) / self.long
return s0 <= l0 and s1 > l1 # Golden cross
def should_sell(self):
if len(self.prices) < self.long: return False
s1 = sum(list(self.prices)[-self.short:]) / self.short
l1 = sum(list(self.prices)[-self.long:]) / self.long
s0 = sum(list(self.prices)[-self.short-1:-1]) / self.short
l0 = sum(list(self.prices)[-self.long-1:-1]) / self.long
return s0 >= l0 and s1 < l1 # Death cross
def send(self, uid, action, qty=0.01):
r = requests.post(f"{BASE}/strategy/signal",
headers={"Authorization": f"Bearer {API_KEY}"},
json={"user_id": uid, "symbol": self.symbol,
"action": action, "quantity": qty,
"signal_id": str(uuid.uuid4())})
data = r.json()
ok = data["code"] == 200
print(f"{'โ
' if ok else 'โ'} User {uid} {action} โ {data.get('message','')}")
if ok: self.positions[uid] = (action == "BUY")
def run(self):
while True:
price = self.get_price() # TODO: real API
self.update(price)
if self.should_buy():
for uid in USERS:
if not self.positions.get(uid): self.send(uid, "BUY")
elif self.should_sell():
for uid in USERS:
if self.positions.get(uid): self.send(uid, "SELL")
time.sleep(60)
def get_price(self): return 65000.0 # Replace with API
if __name__ == "__main__":
SMACrossover().run()
| Code | Message | Action |
|---|---|---|
| 200 | Success | - |
| 401 | Invalid API Key | Check developerApiKey |
| 4003 | Strategy API Key invalid | Check strategy status |
| 4004 | Duplicate signal ID | Generate new UUID |
| 2001 | User points insufficient | Signal rejected, no deduction |
| 5001 | Daily loss limit reached | Wait for next day |
| 5002 | Position limit exceeded | Reduce quantity |
| 4001 | Strategy not found | Check review status |
| 4002 | Strategy not active | Wait for approval |