BuyCrypt
For developers and AI assistants

An API for trading bots and MCP for AI

A bot written for Binance USD-M Futures runs on a BuyCrypt demo account without rewriting: only the API address changes. And Claude, ChatGPT and Cursor see tournaments, trader ratings and your demo account through the BuyCrypt MCP server.

1 linein the bot's code: a different base URL
500+USDT perpetual contracts
9MCP tools, all read-only
api.buycrypt.comlive response
GET https://api.buycrypt.com/fapi/v1/ticker/price?symbol=BTCUSDT
{ "symbol": "BTCUSDT", "price": "…" }
# your bot on Binance USD-M Futures
- base_url="https://fapi.binance.com"
+ base_url="https://api.buycrypt.com"
Two ways to connect

The bot trades. The assistant answers questions.

API for trading bots

Request, signature and response formats are the same as Binance USD-M Futures. The bot places orders on your BuyCrypt demo account: market prices, demo money.

  • The same libraries: binance-futures-connector, your own code on requests
  • REST, a private WebSocket via listenKey, candles and mark price in the stream
  • The key is created in the app and works with one demo account only
API documentation →

MCP for AI assistants

One address in the Claude, ChatGPT or Cursor settings, and the assistant pulls BuyCrypt data by itself when you ask about it.

  • Tournaments, prizes, the participant table, leaders by coin
  • Trader passport: rating out of 1000, level, trading style
  • Your demo account: balance, positions, orders (with a read-only key)
Connect in a minute →
MCP · Model Context Protocol

MCP: connect BuyCrypt to Claude, ChatGPT and Cursor

MCP is an open standard through which AI assistants connect to external data and tools. The BuyCrypt server gives the assistant live platform data. No sign-up or key needed; you need a key only for your demo account.

https://buycrypt.com/mcp
Streamable HTTPno sign-inread-only
  1. Open claude.ai or the Claude Desktop app → Customize → Connectors.
  2. Click + Add → Add custom connector.
  3. Name — BuyCrypt, URL — https://buycrypt.com/mcp, then Continue.
  4. Under Authentication choose No sign in and click Add.

Custom connectors are available on all Claude plans; the free plan allows one. In Team and Enterprise, the organization owner adds the connector in Organization settings → Connectors. For your own demo account, add the key in the Request headers block of the same window — how to do it.

  1. Run one command in the terminal:
Terminal
claude mcp add --transport http buycrypt https://buycrypt.com/mcp

Check: claude mcp list — buycrypt will appear in the list. Add --scope user to make the server available in all projects.

  1. Open chatgpt.com/plugins in your browser.
  2. Click + → Add custom MCP server.
  3. Name — BuyCrypt; under Connection choose a public URL and enter https://buycrypt.com/mcp.
  4. Authentication — No authentication. Confirm the I understand and want to continue warning and click Create.

Custom MCP servers in ChatGPT can be added only in the web version and aren't available on all plans. If the option is missing, your plan or the workspace admin has disabled it. You can't connect your demo account in ChatGPT: it doesn't pass keys to the server. Claude, Claude Code and Cursor work for that.

Add to Cursor

The button opens Cursor with the setup ready. Or manually: add to ~/.cursor/mcp.json (for all projects) or .cursor/mcp.json in the project root:

mcp.json
{
  "mcpServers": {
    "buycrypt": {
      "url": "https://buycrypt.com/mcp"
    }
  }
}

Any client that supports Streamable HTTP will do: enter the URL https://buycrypt.com/mcp, no authorization needed. If the client can only run local servers (stdio), connect through the mcp-remote bridge; Node.js is required:

claude_desktop_config.json and similar
{
  "mcpServers": {
    "buycrypt": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://buycrypt.com/mcp"]
    }
  }
}

Check the server without an assistant: npx @modelcontextprotocol/inspector --cli https://buycrypt.com/mcp --transport http --method tools/list

What the server can do

platform_overview

Which tournaments are running now, which starts next, how many traders are in tournaments, the latest prizes.

no key
list_tournaments

Running, upcoming and finished tournaments: coin, scoring method, prize pool, entry, participants.

no key
get_tournament

A single tournament: prizes by place and the participant table with results.

no key
leaderboard

Leaders by coin over 7, 30 or 90 days — as on the Top Traders page.

no key
trader_profile

Trader passport by nickname: rating out of 1000, level, the five parts of the score, style. Public profiles only.

no key
market_ticker

Price and 24-hour change for a perpetual contract, for example BTCUSDT.

no key
demo_account

Balance, margin and open positions of your demo account.

your key
demo_open_orders

Open orders of your demo account.

your key
demo_recent_results

Latest demo account results: profit and loss of closed trades, fees.

your key

No tool places orders, joins tournaments or moves money — the server only reads.

What to ask the assistant

Click a question to copy it.

Live example

How the assistant sees BuyCrypt

Below is the real response of the https://buycrypt.com/mcp server right now. The assistant gets the same data and retells it in its own words.

Show the top 5 BTC traders of the month
the assistant calls leaderboard{"coin":"BTC","period_days":30,"limit":5}
Loading the server response…
With your key

Your demo account in the assistant

The demo_account, demo_open_orders and demo_recent_results tools read your demo account. For them, the client sends your API key to the server in two headers: X-BuyCrypt-Api-Key and X-BuyCrypt-Api-Secret. Create a read-only key for the assistant: it sees the balance, positions and orders, but BuyCrypt will not place an order, cancel one or change leverage with it (response 403). How to get one.

Terminal
claude mcp add --transport http buycrypt https://buycrypt.com/mcp \
  --header "X-BuyCrypt-Api-Key: YOUR_API_KEY" \
  --header "X-BuyCrypt-Api-Secret: YOUR_API_SECRET"
mcp.json
{
  "mcpServers": {
    "buycrypt": {
      "url": "https://buycrypt.com/mcp",
      "headers": {
        "X-BuyCrypt-Api-Key": "YOUR_API_KEY",
        "X-BuyCrypt-Api-Secret": "YOUR_API_SECRET"
      }
    }
  }
}
  1. When adding the connector (Customize → Connectors → Add custom connector), choose No sign in after the URL.
  2. In the Request headers block add two headers: X-BuyCrypt-Api-Key and X-BuyCrypt-Api-Secret with your values.
  3. Click Add. If the connector was already added without a key, remove it and add it again with the headers.

Read-only

The MCP server does not place or cancel orders. It needs the key to read the balance, positions and orders. A read-only key can't be used to trade, even if it ends up in the wrong hands.

One demo account

A BuyCrypt key works only with the demo account it was created for. It gives no access to real exchange accounts.

A separate key

Create a separate read-only key for the assistant. The key is sent only to buycrypt.com; the server does not store it or write it to logs. You can revoke it in the same place where you created it.

API for trading bots

An API compatible with Binance USD-M Futures

Paths, HMAC-SHA256 signature, parameters and response format are the same as Binance USD-M Futures. There is one difference: orders are executed on your BuyCrypt demo account at market prices and never go to a real exchange. That way you can test a strategy on the market without risking money.

How to start

  1. Account. Sign in to the web terminal or the BuyCrypt app with Google or Apple. The demo account appears at once.
  2. Key. In the web terminal or the app: Profile → API keys → your demo account → the Bot API keys block → Generate API key. Copy the apiKey and apiSecret: the secret is shown only once. For an AI assistant or monitoring, the web terminal has a Generate read-only key (for MCP) button.
  3. Address. In your library set https://api.buycrypt.com instead of https://fapi.binance.com. The /fapi/v1/… paths stay the same.
  4. Check. Request the balance — GET /fapi/v2/balance: the response will show the USDT of your demo account.

What to know

  • USDT contracts and one-way position mode only; hedge mode isn't supported.
  • The ticker price is /fapi/v1/ticker/price. The /fapi/v2/ticker/price path that newer library versions call isn't supported yet.
  • The public stream delivers @kline_1m candles (every 5 s) and @markPrice (every second).
  • recvWindow is 5,000 ms by default, up to 60,000 ms. Sync your clock via /fapi/v1/time.
  • An account with a trading API key gets a 🤖 badge in the app's rating, so everyone can see that a program is trading.
  • Key permissions: a regular key (READ_TRADE) reads and trades; a read-only key (READ) allows only GET requests and listenKey. An order, cancellation, leverage or margin request with it returns HTTP 403 and code -2015.
pip install binance-futures-connector
import os
from binance.um_futures import UMFutures

client = UMFutures(
    key=os.environ["BUYCRYPT_API_KEY"],        # key from the BuyCrypt app
    secret=os.environ["BUYCRYPT_API_SECRET"],
    base_url="https://api.buycrypt.com",      # the only line that changes
)

print(client.balance())                             # demo account USDT
client.change_leverage(symbol="BTCUSDT", leverage=5)
order = client.new_order(symbol="BTCUSDT", side="BUY", type="MARKET", quantity=0.002)
print(order["orderId"], order["status"])
print(client.get_position_risk(symbol="BTCUSDT"))
pip install requests
import hashlib, hmac, os, time, urllib.parse, requests

API = "https://api.buycrypt.com"
KEY = os.environ["BUYCRYPT_API_KEY"]
SECRET = os.environ["BUYCRYPT_API_SECRET"]

def signed(method, path, **params):
    params["timestamp"] = int(time.time() * 1000)
    query = urllib.parse.urlencode(params)
    sig = hmac.new(SECRET.encode(), query.encode(), hashlib.sha256).hexdigest()
    r = requests.request(method, f"{API}{path}?{query}&signature={sig}",
                         headers={"X-MBX-APIKEY": KEY}, timeout=10)
    r.raise_for_status()
    return r.json()

print(signed("GET", "/fapi/v2/balance"))
print(signed("POST", "/fapi/v1/order", symbol="BTCUSDT", side="BUY",
             type="LIMIT", timeInForce="GTC", quantity=0.002, price=60000))
bash, openssl
# public data — no key
curl "https://api.buycrypt.com/fapi/v1/ticker/price?symbol=BTCUSDT"
curl "https://api.buycrypt.com/fapi/v1/klines?symbol=ETHUSDT&interval=1h&limit=3"

# demo account balance — a signed request
KEY="YOUR_API_KEY"; SECRET="YOUR_API_SECRET"
Q="timestamp=$(date +%s)000"
SIG=$(printf '%s' "$Q" | openssl dgst -sha256 -hmac "$SECRET" | sed 's/^.* //')
curl -H "X-MBX-APIKEY: $KEY" "https://api.buycrypt.com/fapi/v2/balance?$Q&signature=$SIG"

Methods

The REST base URL is https://api.buycrypt.com. Signed methods require the X-MBX-APIKEY header, timestamp and signature.

Market data no key
GET/fapi/v1/ping · /fapi/v1/timeConnectivity check and server time in ms.
GET/fapi/v1/exchangeInfoContracts, price and quantity filters, limits.
GET/fapi/v1/ticker/price · /ticker/24hr · /ticker/bookTickerLast price, 24-hour statistics, best bid and ask.
GET/fapi/v1/depth · /fapi/v1/klinesOrder book and candles.
GET/fapi/v1/premiumIndex · /fapi/v1/fundingRateMark price, index and funding rate.
Account and positions signed
GET/fapi/v2/account · /fapi/v3/accountBalance, margin and positions in one response (v1, v2 and v3 are identical).
GET/fapi/v2/balance · /fapi/v3/balanceDemo account balance, USDT only.
GET/fapi/v2/positionRisk · /fapi/v3/positionRiskOpen positions: entry price, mark price, unrealized result, liquidation price.
GET/fapi/v1/userTrades · /fapi/v1/incomeTrades by symbol and income history: profit and loss, fees.
GET/fapi/v1/commissionRate · /fapi/v1/leverageBracketFee by symbol and leverage brackets.
Trading signed
POST/fapi/v1/orderNew order: MARKET, LIMIT, STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET, TRAILING_STOP_MARKET; reduceOnly, closePosition, timeInForce, newClientOrderId.
GET/fapi/v1/order · /openOrders · /allOrdersOne order, open orders, history.
PUT/fapi/v1/orderModify a limit order.
DELETE/fapi/v1/order · /allOpenOrdersCancel one order or all orders for a symbol.
POST/fapi/v1/batchOrdersSeveral orders in one request; DELETE cancels a list.
POST/fapi/v1/algoOrderConditional orders (stop, take profit, trailing); GET /openAlgoOrders, /allAlgoOrders, DELETE /algoOrder, /algoOpenOrders.
POST/fapi/v1/leverage · /fapi/v1/marginTypeLeverage and margin type by symbol.
GET/fapi/v1/positionSide/dualAlways dualSidePosition: false — one-way position mode.
WebSocket streams
POST/fapi/v1/listenKeyA private stream key for 60 minutes; PUT extends it, DELETE closes it.
WSwss://api.buycrypt.com/fapi/ws/<listenKey>Your account events: ORDER_TRADE_UPDATE, ACCOUNT_UPDATE, MARGIN_CALL — in Binance format.
WSwss://api.buycrypt.com/fapi/ws-market/btcusdt@markPricePublic stream for one market: @markPrice and @kline_1m.
WSwss://api.buycrypt.com/stream?streams=btcusdt@markPrice/ethusdt@kline_1mSeveral streams in one connection, responses wrapped in {"stream", "data"}.
Limits and errors
1 min2,400 weight · 1,200 signed readsPer API key. Responses carry the X-MBX-USED-WEIGHT-1M and X-MBX-ORDER-COUNT-10S headers.
10 s300 ordersWhen exceeded — HTTP 429 and Retry-After.
ERR-1021 · -1022 · -2014 · -2015Timestamp outside recvWindow · invalid signature · invalid key format · key revoked or invalid (HTTP 401) · read-only key used for a trading request (HTTP 403).
ERR-1102 · -2010 · -2011 · -2019Missing required parameter · order rejected · order not found · insufficient margin.
Subscribers for your bot (beta)

A bot can be registered as public: a user taps Connect in the app, BuyCrypt opens a separate demo account for them with 1,000 demo USDT and issues a key to that account only. The key is sent to your webhook in a subscription.created event, and the bot trades on the subscriber's demo account. When the user disconnects, the positions are closed, the key stops working and you receive subscription.disconnected.

The bot never gets users' real accounts or exchange keys — only a key to a separate demo account.

Registration is a signed POST /fapi/v1/bot/profiles with the parameters slug, displayName, webhookUrl (HTTPS only) and webhookSecret (32 characters or more); the bot has the PENDING_REVIEW status until it is reviewed. Every event is signed: the X-BuyCrypt-Signature header = HMAC-SHA256(webhookSecret, timestamp + "." + body), the time is in X-BuyCrypt-Timestamp. Delivery is retried up to 6 times (immediately, after 10 s, 30 s, 2 min, 10 min, 1 h); after 10 failed deliveries in a row the webhook is disabled — support can turn it back on.

Webhook signature check, Python
import hashlib, hmac, os, time

WEBHOOK_SECRET = os.environ["BUYCRYPT_WEBHOOK_SECRET"]

def verify(headers, raw_body: bytes) -> bool:
    ts = int(headers["X-BuyCrypt-Timestamp"])
    if abs(time.time() * 1000 - ts) > 5 * 60 * 1000:   # older than 5 minutes — reject
        return False
    expected = hmac.new(WEBHOOK_SECRET.encode(), f"{ts}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, headers["X-BuyCrypt-Signature"])
Keys and security

A BuyCrypt key opens only a demo account

Tied to one account

An API key is created for a specific demo account and works only with it. Real exchange accounts are not available through this API. A read-only key can't trade on this account either.

The secret is shown once

Keep the key and secret in environment variables or a secrets manager, not in code and not in public repositories.

Revoke in a second

In the web terminal or the app, in the same "Bot API keys" block, press "Revoke": all requests with this key will get a 401 error right away.

Questions

Frequently asked questions

Does the bot trade real money?

No. The BuyCrypt API executes orders on your demo account: market prices, a balance in demo USDT. Orders aren't sent to an exchange, so you can test a strategy without risk.

Do I need to rewrite my bot for BuyCrypt?

Usually not. If the bot works with Binance USD-M Futures, change the base URL to https://api.buycrypt.com and plug in a BuyCrypt key. The paths, signature and response format are the same. Check that the bot doesn't use hedge mode or the /fapi/v2/ticker/price path.

Where do I get an API key?

In the BuyCrypt web terminal or app: Profile → API keys → your demo account → Bot API keys → Generate API key. For MCP and AI assistants, use "Generate read-only key (for MCP)" in the web terminal: this key sees the account but does not trade. The secret is shown only once, so save it right away. You can also revoke the key there.

What is MCP and why do I need it?

MCP (Model Context Protocol) is an open standard through which AI assistants connect to external data. Once you connect the https://buycrypt.com/mcp server, you can ask Claude, ChatGPT or Cursor about tournaments, leaders and trader passports, and the assistant will answer using live BuyCrypt data.

Do I need to sign up to connect MCP?

No. Tournaments, the rating, trader passports and prices are available without a key. A key is needed only for the three tools that read your demo account, and a read-only key is enough.

Can an AI assistant trade through MCP?

No. All nine server tools only read data: no orders are placed or cancelled, nobody joins tournaments, no money is moved.

Will the bot developer get my exchange keys?

No. When you connect someone else's bot, BuyCrypt opens a separate demo account for it and issues a key to that account only. Your real accounts and exchange keys are never passed to the bot. More about data protection on the Security page.

Start with a demo account

A BuyCrypt account is free: a demo account for your bot, an API key in the app, tournaments and a rating that show what your strategy is worth.