Bot overview

Run a trading bot on Wellat with the CCXT library you already use.

The Bot API lets your own code run a Wellat strategy. It speaks Binance's own wire format: the same paths, parameters, response bodies, error codes, signing scheme and rate-limit headers. If your bot already runs on Binance through CCXT, it runs on Wellat by swapping the exchange class. There is no Wellat SDK to learn.

npm install ccxt @wellat/ccxt
import wellat from '@wellat/ccxt';

const exchange = new wellat({
  apiKey: WELLAT_API_KEY,
  secret: WELLAT_API_SECRET,
});

await exchange.createOrder('BTC/USDT', 'market', 'buy', 0.001);

wellat is a thin subclass of CCXT's binance class with Wellat's hosts and options built in. Stock ccxt.binance works too with a few overrides; see the Quickstart. Requires @wellat/ccxt 0.1.9 or later. For a Futures key, pass options: { defaultType: 'future' }.

How it fits together

ThingWhat it is
Base URLhttps://bot.mywellat.com
Spot/api/v3/*, Binance spot shape
USDⓈ-M futures/fapi/v1/*, /fapi/v2/*, /fapi/v3/*, Binance futures shape
API keyCreated in your trader dashboard, protected by 2FA. One key is bound to exactly one strategy, operated by a bot.
StrategyThe thing your bot trades. Spot or Futures. Runs in demo with a virtual balance.
CopiersReal accounts that mirror the strategy. You never address them; the platform fans out every order.

Your bot never names a strategy, never deposits or withdraws, and can never reach any other account. The API key is the strategy identifier.

Before you write code

Complete the five steps in Account setup:

  1. Sign up and pass KYC.
  2. Switch to the Trader profile.
  3. Enable 2FA and create an API key and secret.
  4. Create a strategy operated by a bot and bind it to that key.
  5. Note the strategy type: it decides whether your bot calls /api/v3 (Spot) or /fapi (Futures).

Then follow the Quickstart to place a first order.

What the API covers

  • Market data: exchange info, tickers, order book, trades, candles, funding rates.
  • Account: balances, positions, commission rates.
  • Orders: place, cancel, cancel all, query, open orders, order history, fills.
  • Futures controls: leverage, take-profit / stop-loss legs.
  • Strategy close.

What it does not cover: deposits, withdrawals, transfers, sub-accounts, margin borrowing, WebSocket streams, or anything about copiers. Those are platform concerns, not bot concerns.


Did this page help you?