Spot trading

Account, orders and fills for Spot strategies.

All routes are under https://bot.mywellat.com/api/v3 and require a signed request (see Authentication). Request parameters and response bodies follow Binance's spot REST API, so a Binance client parses them as-is.

A key bound to a Futures strategy gets 400 -2010 on every route here.

Endpoints

MethodPathCCXTWeight
GET/api/v3/accountfetchBalance20
POST/api/v3/ordercreateOrder1 (+1 order)
DELETE/api/v3/ordercancelOrder1
DELETE/api/v3/openOrderscancelAllOrders1
GET/api/v3/orderfetchOrder4
GET/api/v3/openOrdersfetchOpenOrders6
GET/api/v3/allOrdersfetchOrders20
GET/api/v3/myTradesfetchMyTrades20
POST/api/v3/wellat/strategy/closecloseStrategy (privatePostWellatStrategyClose)1

Weights count against the request-weight budget in Rate limits. CCXT's fetchTradingFees is not available (it calls a Binance sapi route Wellat does not offer); the commission rates are in the account body. As on Binance, a BUY pays its fee in the base asset (commissionAsset is the base), so a full round trip leaves a base-asset remainder below the pair's stepSize that cannot be sold. Judge holdings by value, not by a non-zero balance, or that dust reads as an open position.

Account

GET /api/v3/account

{
  "makerCommission": 10,
  "takerCommission": 10,
  "commissionRates": { "maker": "0.00100000", "taker": "0.00100000" },
  "canTrade": true,
  "canWithdraw": false,
  "canDeposit": false,
  "accountType": "SPOT",
  "balances": [
    { "asset": "USDT", "free": "180.50000000", "locked": "19.50000000" },
    { "asset": "BTC",  "free": "0.00100000",  "locked": "0.00000000" }
  ],
  "permissions": ["SPOT"],
  "strategyId": "3f1c…",
  "isSimulated": true
}

strategyId and isSimulated are Wellat extras; CCXT ignores them. The balances are the strategy's virtual custodian. locked is what resting orders have reserved.

Placing an order

POST /api/v3/order

ParameterRequiredNotes
symbolyese.g. BTCUSDT. Must be listed in exchangeInfo.
sideyesBUY or SELL
typeyesMARKET, LIMIT, STOP_LOSS, STOP_LOSS_LIMIT
quantityone ofBase-asset amount.
quoteOrderQtyone ofQuote-asset amount, MARKET BUY only (createMarketBuyOrderWithCost in CCXT).
priceLIMIT types
stopPriceSTOP_LOSS typesTrigger price.
timeInForceLIMIT typesGTC only.
newClientOrderIdrecommendedYour own id, up to 36 characters. Makes the request idempotent.
newOrderRespTypenoAccepted and ignored; the response is always the order object below.

Any other type answers 400 -1116 Invalid orderType; exchangeInfo advertises exactly the types each symbol accepts.

Sizing. You send absolute amounts, as on any exchange. quantity and price must satisfy the symbol's LOT_SIZE, PRICE_FILTER and NOTIONAL filters from exchangeInfo; CCXT's amountToPrecision and priceToPrecision apply them. The platform sizes copiers proportionally from the fraction of your balance each order commits.

Idempotency. Writes are synchronous and are not retried by Wellat. Set newClientOrderId and re-send on a timeout: a duplicate returns the original order instead of placing a second one. Without it a retry can double-fill, exactly as on Binance.

Response:

{
  "symbol": "BTCUSDT",
  "orderId": 10421,
  "orderListId": -1,
  "clientOrderId": "my-bot-0001",
  "price": "0.00000000",
  "origQty": "0.00100000",
  "executedQty": "0.00100000",
  "cummulativeQuoteQty": "65.12000000",
  "status": "FILLED",
  "timeInForce": "GTC",
  "type": "MARKET",
  "side": "BUY",
  "stopPrice": "0.00000000",
  "time": 1759500000123,
  "updateTime": 1759500000123,
  "isWorking": false,
  "collectiveId": "917fa72c-…"
}

There is no fills[] array: fills are read from GET /api/v3/myTrades. collectiveId is a Wellat extension, the id that groups the copiers' mirrored orders with yours.

orderId is a stable integer issued by Wellat. Order statuses use Binance's vocabulary: NEW, PARTIALLY_FILLED, FILLED, CANCELED, REJECTED, EXPIRED.

Cancelling

DELETE /api/v3/order with symbol and either orderId or origClientOrderId. Returns the cancelled order. An unknown id answers 400 -2013 Order does not exist; an order that is already filled or cancelled answers 400 -2011 Unknown order sent.

DELETE /api/v3/openOrders with symbol cancels every resting order on that symbol and returns them as a list.

Querying

RouteParametersReturns
GET /api/v3/ordersymbol + orderId or origClientOrderIdOne order
GET /api/v3/openOrderssymbol optionalResting orders
GET /api/v3/allOrderssymbol, optional orderId, startTime, endTime, limit (max 1000)Order history, newest last
GET /api/v3/myTradessymbol, optional orderId, startTime, endTime, limitFills: { symbol, id, orderId, price, qty, quoteQty, commission, commissionAsset, time, isBuyer, isMaker }

Closing the strategy

POST /api/v3/wellat/strategy/close (signed, no parameters beyond timestamp).

This is a Wellat-specific route. It cancels resting orders, liquidates the strategy's positions to the quote asset, and closes the strategy for the trader and every copier. It cannot be undone; create a new strategy to trade again.

await exchange.closeStrategy();                    // @wellat/ccxt
await exchange.request('wellat/strategy/close', 'private', 'POST'); // stock ccxt.binance

Closing an already-closed strategy answers 400 -2010.

Write permissions and strategy status

Reads work on any strategy status, so you can inspect a closed strategy's history. Writes (POST, DELETE) require the strategy to be LIVE; otherwise 400 { "code": -2010, "msg": "Strategy not live" }.


Did this page help you?