Si tu bot ya habla el idioma de Binance USD-M Futures, cambia una URL base y estarás activo en BuyCrypt. Nuestros usuarios descubren tu bot en la clasificación, lo prueban en una cuenta demo gratuita de $1,000 y pasan a claves reales cuando se convencen.
Sin reescribir código. Sin particularidades específicas de cada exchange. Misma firma HMAC-SHA256, mismo stream WebSocket de datos de usuario, mismos tipos de orden — todo sobre nuestro motor de trading demo para que los usuarios puedan comparar bots sin arriesgar capital.
Cada usuario que se suscribe obtiene su propia cuenta demo con un saldo virtual de $1,000. Tu bot opera con ella. Ellos observan el PnL en vivo, el drawdown y el win rate. Sin riesgo para su capital real — y sin costo de adquisición para ti.
La cuenta demo de tu propio bot aparece en la clasificación pública con la insignia 🤖 БОТ. Los usuarios ven el ranking de PnL entre traders reales. Toca la fila, pulsa "Conectar" — suscripción instantánea.
Si tu bot usa cualquier SDK de Binance Futures (binance-connector-python, python-binance, CCXT, etc.), apunta su base_url a https://api.buycrypt.com/fapi. HMAC, recvWindow, tipos de orden — idénticos.
Cuando un usuario se suscribe, enviamos por POST la API key + secreto recién generados a tu URL de webhook — firmado con HMAC, con reintentos ante fallos mediante backoff exponencial y recuperable desde dead-letter. Nunca tienes que pedirle credenciales al usuario.
El usuario abre la clasificación. La cuenta de tu bot aparece con una etiqueta 🤖 БОТ junto al nombre de usuario, además del número de suscriptores. Toca la fila.
En la página de perfil del bot ven "Conectar a cuenta demo". Un toque crea una nueva demo de $1,000 para ellos y tu bot empieza a operar con ella.
El usuario observa cómo el bot opera su demo durante días o semanas. PnL, posiciones, win rate — todo en vivo en la app. Si le gusta, ingresa su API key real de Binance dentro de BuyCrypt para pasar de demo a producción.
El usuario agrega su API key real de Binance dentro de BuyCrypt. La entregamos a tu webhook de la misma forma en que entregamos la clave demo — el mismo evento subscription.created, solo que con sus credenciales de producción. Una sola integración cubre ambos flujos, demo y real.
Registra una cuenta normal de BuyCrypt — el mismo proceso que cualquier usuario. Se te asignará una cuenta demo gratuita con un saldo inicial en el momento del registro. Sin formulario de solicitud, sin cola de revisión.
Genera las API keys directamente en la app móvil de BuyCrypt: Mi Perfil → API keys → toca tu cuenta demo → Generar. Obtendrás un apiKey + apiSecret nuevos, mostrados una sola vez — cópialos en tu bot. Luego apunta tu bot existente de Binance USD-M Futures a https://api.buycrypt.com/fapi y simplemente funciona — mismo HMAC, mismos endpoints, mismos tipos de orden.
En cuanto detectamos operaciones impulsadas por API en tu demo, tu cuenta se marca automáticamente como bot. Tu demo aparece en la clasificación con la etiqueta 🤖 БОТ y un perfil público, para que otros usuarios puedan descubrirla y suscribirse.
Cuando estés listo para aceptar suscriptores, agrega una URL de webhook al perfil de tu bot en la configuración. Cada vez que un usuario se suscribe — en demo o con claves reales de Binance — enviamos por POST un evento subscription.created con la API key + secreto de la cuenta de ese usuario. Guarda (userId, apiKey, apiSecret) y empieza a operar en su nombre.
La mayoría de los SDK de Binance Futures aceptan una URL base personalizada. Este es todo el cambio que necesita un bot típico en Python:
# before — trading on real Binance from binance.um_futures import UMFutures client = UMFutures(key=API_KEY, secret=API_SECRET) # after — trading on a BuyCrypt user's demo from binance.um_futures import UMFutures client = UMFutures( key=API_KEY, secret=API_SECRET, base_url="https://api.buycrypt.com/fapi", # <- the only line that changes ) # everything below is identical to your existing code client.new_order(symbol="BTCUSDT", side="BUY", type="MARKET", quantity=0.01) client.account() client.cancel_open_orders(symbol="BTCUSDT")
CCXT, python-binance, el go-binance de Go, el node-binance-api de JS — todos funcionan igual. Los bots simples con requests.get(...).headers["X-MBX-APIKEY"] = key también funcionan; la regla de firma HMAC es idéntica byte a byte.
Cuando un usuario de BuyCrypt se suscribe a tu bot, generamos una API key + secreto por usuario en el servidor y los enviamos mediante POST a tu URL de webhook registrada. El secreto nunca se devuelve al usuario — solo llega a ti, por HTTPS, firmado.
TL;DR: sign up → tap «Generate API key» on your demo → generate a webhook secret → run one Python script → admin approves. ~5 minutes.
Open buycrypt.com/terminal (or the mobile app). Sign in via Google or phone. A $1,000 USDT demo account is created automatically — that's the sandbox your bot will trade on.
In the app: Profile → API Keys → tap your demo account → «Bot API keys» → Generate. A dialog shows the apiKey + apiSecret once — copy both, you can't recover the secret afterwards.
# what you'll save API_KEY = "3fc370a4ac94b9aa756e2a97842dc04c" API_SECRET = "3WJ86kV_VQzLWaED3hSRlY9R6wQHh_f3UEZ_q-CrwRU"
Same shape as Binance — your existing USD-M Futures bot library reads it as a regular Binance key with base URL https://api.buycrypt.com/fapi.
A second secret, separate from API_SECRET. We use it to sign the events we POST to your webhook URL — so you can verify the request really came from us. You generate it on your side; we encrypt-store it but never reveal back:
# any of these works — pick one. Save the output. $ openssl rand -hex 32 # macOS / Linux $ python3 -c "import secrets; print(secrets.token_hex(32))" # cross-platform # sample output 8a31c2f4d5e6789abc01234567890def8a31c2f4d5e6789abc01234567890def
Drop your three secrets into one signed POST. Save this as register_bot.py and run it once. Works on any OS with Python 3.10+ and pip install requests:
import hmac, hashlib, time, urllib.parse, requests # ─── fill these in from steps 2 and 3 ───────────────────── API_KEY = "3fc370a4ac94b9aa756e2a97842dc04c" API_SECRET = "3WJ86kV_VQzLWaED3hSRlY9R6wQHh_f3UEZ_q-CrwRU" WEBHOOK_SECRET = "8a31c2f4d5e6789abc01234567890def8a31c2f4d5e6789abc01234567890def" SLUG = "alpha-trader" # lowercase, [a-z0-9-], unique DISPLAY_NAME = "Alpha Trader" # shown to users in the bot list WEBHOOK_URL = "https://your-bot.example.com/buycrypt/hook" # MUST be HTTPS, public # ────────────────────────────────────────────────────────── params = { "slug": SLUG, "displayName": DISPLAY_NAME, "webhookUrl": WEBHOOK_URL, "webhookSecret": WEBHOOK_SECRET, "defaultLeverage": 10, "timestamp": int(time.time() * 1000), } qs = urllib.parse.urlencode(params) sig = hmac.new(API_SECRET.encode(), qs.encode(), hashlib.sha256).hexdigest() r = requests.post( "https://api.buycrypt.com/fapi/v1/bot/profiles", headers={ "X-MBX-APIKEY": API_KEY, "Content-Type": "application/x-www-form-urlencoded", }, data=qs + f"&signature={sig}", ) print(r.status_code, r.json())
Notice no demoKeyPairId — your API_KEY already points to the demo it was generated for. Need to register against a different demo? Generate a separate API key for it (step 2 again).
Expected output:
201 {
"botId": 42,
"slug": "alpha-trader",
"status": "PENDING_REVIEW",
"webhookUrl": "https://your-bot.example.com/buycrypt/hook",
"webhookStatus": "ACTIVE",
"webhookSecretAutoGenerated": false
}
Common errors:
{"code":-2010, "msg":"Slug already in use."} # pick another slug
{"code":-1102, "msg":"webhookSecret must be at least 32..."} # too short — use 32+ chars
{"code":-1022, "msg":"Signature for this request is not valid."} # API_SECRET wrong, or params order changed after signing
{"code":-1003, "msg":"Bot registration rate limit: 1 per hour..."} # wait it out
Bot lands in PENDING_REVIEW. Our admin sees your request immediately and approves it. To check status anytime:
import hmac, hashlib, time, urllib.parse, requests API_KEY = "3fc370a4..." API_SECRET = "3WJ86kV..." qs = urllib.parse.urlencode({"timestamp": int(time.time() * 1000)}) sig = hmac.new(API_SECRET.encode(), qs.encode(), hashlib.sha256).hexdigest() r = requests.get( f"https://api.buycrypt.com/fapi/v1/bot/profiles?{qs}&signature={sig}", headers={"X-MBX-APIKEY": API_KEY}, ) print(r.json()) # [{"botId":42, "status":"ACTIVE", ...}] when approved
Once "status":"ACTIVE": every time a user subscribes we POST to your webhookUrl with the per-subscriber API key your bot will trade with. The events shape and a copy-paste signature-verification snippet are right below this section.
Lost your webhook secret? Pick a new one and rotate (same signing pattern as registration):
params = {
"webhookSecret": NEW_SECRET, # or omit to get backend-generated
"timestamp": int(time.time() * 1000),
}
qs = urllib.parse.urlencode(params)
sig = hmac.new(API_SECRET.encode(), qs.encode(), hashlib.sha256).hexdigest()
requests.post(
"https://api.buycrypt.com/fapi/v1/bot/profiles/42/webhook/rotate-secret",
headers={"X-MBX-APIKEY": API_KEY,
"Content-Type": "application/x-www-form-urlencoded"},
data=qs + f"&signature={sig}",
)
Old secret invalid the second the new one saves. Rate limit: 10 rotations/hour per bot.
subscription.created — el usuario acaba de suscribirsePOST https://your-bot.example.com/buycrypt/hook Content-Type: application/json User-Agent: BuyCrypt-Webhook/1.0 X-BuyCrypt-Event: subscription.created X-BuyCrypt-Delivery-Id: 7f3b2e8c-a4d1-4f12-93b8-0c1e9f8d2a4b # dedup key — store + reject duplicates X-BuyCrypt-Timestamp: 1745605200123 # ms epoch when payload was built X-BuyCrypt-Signature: 5e8c2d… # hex(HMAC-SHA256(webhookSecret, ts + "." + body)) { "event": "subscription.created", "deliveryId": "7f3b2e8c-a4d1-4f12-93b8-0c1e9f8d2a4b", "timestamp": 1745605200123, "data": { "subscriptionId": 42, "botProfileId": 7, "subscriberHandle": "user_fb_uid_a", "apiKey": "3fc370a4ac94b9aa756e2a97842dc04c", "apiSecret": "3WJ86kV_VQzLWaED3hSRlY9R6wQHh_f3UEZ_q-CrwRU", "demoKeyPairId": 9001, "initialBalance": "1000.00000000", "permissions": "READ_TRADE", "ipWhitelist": "", "createdAt": "2026-04-25T18:00:00Z" } }
subscription.deleted — el usuario se desconectó, clave deshabilitadaX-BuyCrypt-Event: subscription.disconnected { "event": "subscription.disconnected", "deliveryId": "…", "timestamp": …, "data": { "subscriptionId": 42, "botProfileId": 7, "apiKey": "3fc370a4…", "reason": "USER_UNSUBSCRIBED", "disconnectedAt": "2026-04-25T18:30:00Z" } }
secret.regenerated — el administrador rotó el secreto de tu webhookX-BuyCrypt-Event: secret.regenerated { "event": "secret.regenerated", "deliveryId": "…", "timestamp": …, "data": { "subscriptionId": 42, "apiKey": "3fc370a4…", "newApiSecret": "new_plaintext_keep_old_valid_24h", "oldSecretValidUntil": "2026-04-26T18:00:00Z" } }
Use the raw request body bytes — DO NOT parse JSON first and re-serialize, you'll lose key order and signatures will diverge. Always compare in constant time.
# Python (FastAPI / Flask) import hmac, hashlib, time WEBHOOK_SECRET = "whsec_aGVsbG8gd29ybGQ_..." # whsec_…43 chars def verify(headers, body_bytes): sig = headers["X-BuyCrypt-Signature"] ts = int(headers["X-BuyCrypt-Timestamp"]) # anti-replay: reject if too old if abs(time.time() * 1000 - ts) > 5 * 60 * 1000: return False payload = f"{ts}.".encode() + body_bytes expected = hmac.new(WEBHOOK_SECRET.encode(), payload, hashlib.sha256).hexdigest() return hmac.compare_digest(expected, sig)
// Node.js / Express — read RAW body, not parsed JSON const crypto = require('crypto'); const SECRET = 'whsec_aGVsbG8gd29ybGQ_...'; app.post('/buycrypt/hook', express.raw({ type: 'application/json' }), // raw, not json()! (req, res) => { const sig = req.headers['x-buycrypt-signature']; const ts = parseInt(req.headers['x-buycrypt-timestamp'], 10); if (Math.abs(Date.now() - ts) > 5 * 60 * 1000) return res.status(401).end(); const expected = crypto.createHmac('sha256', SECRET) .update(`${ts}.`).update(req.body).digest('hex'); if (!crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(sig))) { return res.status(401).end(); } // req.body is a Buffer here — JSON.parse(req.body.toString('utf8')) res.sendStatus(200); });
6 intentos con backoff exponencial: 1m, 5m, 30m, 2h, 6h, 12h. Si los 6 fallan, el evento cae en nuestra tabla dead-letter y un administrador puede reenviarlo.
Si tu endpoint falla 10 veces seguidas, lo marcamos como deshabilitado y dejamos de enviar eventos. Contáctanos para reactivarlo. Esto evita que un bot inactivo bloquee indefinidamente a nuevos suscriptores.
Cada cuerpo va firmado con HMAC-SHA256 usando el secreto que compartimos en el registro. Verifícalo en tiempo constante antes de confiar en el payload. Hay ejemplos en nuestra guía para partners.
URL base: https://api.buycrypt.com/fapi. Autenticación: encabezado X-MBX-APIKEY + firma HMAC-SHA256 en los endpoints firmados. Recv window: 5,000 ms por defecto, 60,000 ms máximo.
{}.MARKET, LIMIT, STOP_MARKET, TAKE_PROFIT_MARKET, STOP, TAKE_PROFIT (variante limit), TRAILING_STOP_MARKET. Flags: reduceOnly, closePosition, timeInForce (GTC/IOC/FOK), newClientOrderId para idempotencia, workingType, callbackRate.orderId u origClientOrderId.{dualSidePosition: false}.ORDER_TRADE_UPDATE, ACCOUNT_UPDATE, MARGIN_CALL. Misma estructura de payload que Binance.subscribe/unsubscribe/list_subscriptions — passthrough directo a Binance.X-MBX-USED-WEIGHT-1M, X-MBX-ORDER-COUNT-10S, Retry-After en 429.Retry-AfterSin formulario de solicitud, sin cola de revisión, sin comisiones de integración. Regístrate como cualquier usuario, genera las API keys en la app móvil y apunta tu bot a https://api.buycrypt.com/fapi — eso es todo el proceso de incorporación.