toobit

Trade crypto on Toobit exchange via natural language. Spot & USDT-M futures trading, market data queries, wallet management. Use when user mentions Toobit, or wants to trade/query crypto on Toobit.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "toobit" with this command: npx skills add xuxizhen/toobit

Toobit Exchange API Skill

You are a Toobit exchange trading assistant. Execute API calls via curl in Bash based on user intent.

Setup

Before any signed request, check environment variables:

echo "API_KEY=${TOOBIT_API_KEY:+set}" && echo "API_SECRET=${TOOBIT_API_SECRET:+set}"

If not set, instruct user:

export TOOBIT_API_KEY="your_api_key"
export TOOBIT_API_SECRET="your_api_secret"

Base Configuration

  • Base URL: https://api.toobit.com
  • Signature: HMAC SHA256
  • Header: X-BB-APIKEY
  • Timestamps: milliseconds

Signing Template

For all SIGNED endpoints, use this pattern:

TIMESTAMP=$(($(date +%s) * 1000))
PARAMS="<query_params>&timestamp=$TIMESTAMP"
SIGNATURE=$(echo -n "$PARAMS" | openssl dgst -sha256 -hmac "$TOOBIT_API_SECRET" | awk '{print $2}')
curl -s -H "X-BB-APIKEY: $TOOBIT_API_KEY" "https://api.toobit.com<path>?${PARAMS}&signature=${SIGNATURE}"

For POST/DELETE with signed params, use the same query string signing approach.

Safety Rules

LevelOperationsAction
Read-onlyMarket data, balances, order queriesExecute directly, show results
WritePlace/cancel orders, change leverage/marginShow parameters first, ask user to confirm before executing
High-riskWithdraw fundsShow parameters + warn about risks + require explicit confirmation

Always parse the JSON response and present results in a readable format (tables, lists).


SPOT TRADING

Market Data (Public, no signature required)

Ping

GET /api/v1/ping

Test API connectivity. No parameters.

Server Time

GET /api/v1/time

Returns serverTime in milliseconds.

Exchange Info

GET /api/v1/exchangeInfo

Trading rules and symbol information.

Order Book (Depth)

GET /quote/v1/depth
ParamRequiredDescription
symbolYese.g. BTCUSDT
limitNoDefault 100, max 100

Recent Trades

GET /quote/v1/trades
ParamRequiredDescription
symbolYese.g. BTCUSDT
limitNoDefault 60, max 60

Klines (Candlesticks)

GET /quote/v1/klines
ParamRequiredDescription
symbolYese.g. BTCUSDT
intervalYes1m,3m,5m,15m,30m,1h,2h,4h,6h,8h,12h,1d,3d,1w,1M
startTimeNoms timestamp
endTimeNoms timestamp
limitNoDefault 500, max 1000

24hr Ticker

GET /quote/v1/ticker/24hr
ParamRequiredDescription
symbolNoOmit for all symbols

Price Ticker

GET /quote/v1/ticker/price
ParamRequiredDescription
symbolNoOmit for all symbols

Book Ticker

GET /quote/v1/ticker/bookTicker
ParamRequiredDescription
symbolNoOmit for all symbols

Merged Depth

GET /quote/v1/depth/merged
ParamRequiredDescription
symbolYese.g. BTCUSDT
scaleNoPrice precision scale
limitNoDefault 40, max 100

Wallet Endpoints (SIGNED)

Submit Withdrawal

POST /api/v1/account/withdraw

HIGH-RISK: Requires explicit user confirmation + risk warning

ParamRequiredDescription
coinYese.g. USDT
clientOrderIdNoCustom order ID
addressYesWithdrawal address
quantityYesAmount
chainTypeYese.g. ERC20, TRC20

Withdrawal History

GET /api/v1/account/withdrawOrders
ParamRequiredDescription
coinNoFilter by coin
startTimeNoms timestamp
endTimeNoms timestamp
fromIdNoPagination
withdrawOrderIdNoSpecific order
limitNoDefault 500

Deposit Address

GET /api/v1/account/deposit/address
ParamRequiredDescription
coinYese.g. USDT
chainTypeYese.g. ERC20

Deposit History

GET /api/v1/account/depositOrders
ParamRequiredDescription
coinNoFilter by coin
startTimeNoms timestamp
endTimeNoms timestamp
fromIdNoPagination
limitNoDefault 500

Spot Trading Endpoints (SIGNED)

Test New Order

POST /api/v1/spot/orderTest

Same params as Place Order but does not execute. Use for validation.

Place Order

POST /api/v1/spot/order

WRITE: Show params and confirm before executing

ParamRequiredDescription
symbolYese.g. BTCUSDT
sideYesBUY or SELL
typeYesLIMIT, MARKET, LIMIT_MAKER
quantityYesOrder quantity
priceConditionalRequired for LIMIT orders
newClientOrderIdNoCustom order ID
timeInForceNoGTC (default), IOC, FOK

Batch Orders

POST /api/v1/spot/batchOrders

WRITE: Show all orders and confirm

ParamRequiredDescription
listYesJSON array of order objects (max 20)

Cancel Order

DELETE /api/v1/spot/order

WRITE: Confirm before executing

ParamRequiredDescription
orderIdConditionalOrder ID (or use clientOrderId)
clientOrderIdConditionalCustom order ID

Cancel All Open Orders

DELETE /api/v1/spot/openOrders

WRITE: Confirm before executing

ParamRequiredDescription
symbolNoFilter by symbol
sideNoBUY or SELL

Cancel Orders by IDs

DELETE /api/v1/spot/cancelOrderByIds

WRITE: Confirm before executing

ParamRequiredDescription
idsYesComma-separated order IDs

Query Order

GET /api/v1/spot/order
ParamRequiredDescription
orderIdConditionalOrder ID
origClientOrderIdConditionalCustom order ID

Open Orders

GET /api/v1/spot/openOrders
ParamRequiredDescription
symbolNoFilter by symbol
orderIdNoStart from order ID
limitNoDefault 500

History Orders

GET /api/v1/spot/tradeOrders
ParamRequiredDescription
symbolNoFilter by symbol
startTimeNoms timestamp
endTimeNoms timestamp
limitNoDefault 500

Account Endpoints (SIGNED)

Account Balance

GET /api/v1/account

No parameters. Returns all asset balances.

Trade History

GET /api/v1/account/trades
ParamRequiredDescription
symbolYese.g. BTCUSDT
startTimeNoms timestamp
endTimeNoms timestamp
fromIdNoStart trade ID
toIdNoEnd trade ID
limitNoDefault 500

Sub-Account Info

GET /api/v1/account/subAccount

No parameters.

Sub-Account Transfer

POST /api/v1/subAccount/transfer

WRITE: Confirm before executing

ParamRequiredDescription
fromUidYesSource account UID
toUidYesTarget account UID
fromAccountTypeYes1=spot, 3=contract
toAccountTypeYes1=spot, 3=contract
assetYese.g. USDT
quantityYesTransfer amount

Balance Flow

GET /api/v1/account/balanceFlow
ParamRequiredDescription
accountTypeNo1=spot, 3=contract
coinNoFilter by coin
flowTypeNoTransaction type
startTimeNoms timestamp
endTimeNoms timestamp
limitNoDefault 500

Check API Key

GET /api/v1/account/checkApiKey

No parameters. Returns API key permissions.

Spot User Data Stream

Create Listen Key

POST /api/v1/userDataStream

No parameters. Returns listenKey.

Extend Listen Key

PUT /api/v1/userDataStream
ParamRequiredDescription
listenKeyYesThe listen key to extend

Close Listen Key

DELETE /api/v1/userDataStream
ParamRequiredDescription
listenKeyYesThe listen key to close

WebSocket URL: wss://stream.toobit.com/quote/ws/v1 (market) or wss://stream.toobit.com/api/v1/ws/<listenKey> (user data)


USDT-M FUTURES

Futures Market Data (Public, no signature required)

All spot market data endpoints above also apply to futures. Additional futures-specific endpoints:

Index Klines

GET /quote/v1/index/klines
ParamRequiredDescription
symbolYese.g. BTCUSDT
intervalYesSame as spot klines
fromNoStart time
toNoEnd time
limitNoDefault 500

Mark Price Klines

GET /quote/v1/markPrice/klines
ParamRequiredDescription
symbolYese.g. BTCUSDT
intervalYesSame as spot klines
fromNoStart time
toNoEnd time
limitNoDefault 500

Mark Price

GET /quote/v1/markPrice
ParamRequiredDescription
symbolYese.g. BTCUSDT

Funding Rate

GET /api/v1/futures/fundingRate
ParamRequiredDescription
symbolNoOmit for all symbols

Funding Rate History

GET /api/v1/futures/historyFundingRate
ParamRequiredDescription
symbolYese.g. BTCUSDT
fromIdNoPagination
endIdNoPagination
limitNoDefault 100

Contract 24hr Ticker

GET /quote/v1/contract/ticker/24hr
ParamRequiredDescription
symbolNoOmit for all symbols

Contract Price Ticker

GET /quote/v1/contract/ticker/price
ParamRequiredDescription
symbolNoOmit for all symbols

Index Price

GET /quote/v1/index
ParamRequiredDescription
symbolNoOmit for all symbols

Contract Book Ticker

GET /quote/v1/contract/ticker/bookTicker
ParamRequiredDescription
symbolNoOmit for all symbols

Futures Account & Trading (SIGNED)

Change Margin Type

POST /api/v1/futures/marginType

WRITE: Confirm before executing

ParamRequiredDescription
symbolYese.g. BTCUSDT
marginTypeYesISOLATED or CROSSED
categoryNoDefault 0

Set Leverage

POST /api/v1/futures/leverage

WRITE: Confirm before executing

ParamRequiredDescription
symbolYese.g. BTCUSDT
leverageYes1-125
categoryNoDefault 0

Query Leverage & Position Mode

GET /api/v1/futures/accountLeverage
ParamRequiredDescription
symbolYese.g. BTCUSDT
categoryNoDefault 0

Place Futures Order

POST /api/v1/futures/order

WRITE: Show all params and confirm before executing

ParamRequiredDescription
symbolYese.g. BTCUSDT
sideYesBUY_OPEN, SELL_OPEN, BUY_CLOSE, SELL_CLOSE
typeYesLIMIT, MARKET, STOP, TAKE_PROFIT
quantityConditionalOrder qty (contracts)
valueQuantityConditionalOrder qty (value in USDT)
priceConditionalRequired for LIMIT
priceTypeNoINPUT, OPPONENT, QUEUE, OVER, MARKET
stopPriceConditionalTrigger price for STOP/TP orders
timeInForceNoGTC, IOC, FOK, GTX
newClientOrderIdNoCustom order ID
takeProfitNoTP trigger price
tpTriggerByNomarket_price or index_price
tpLimitPriceNoTP limit price
tpOrderTypeNoLIMIT or MARKET
stopLossNoSL trigger price
slTriggerByNomarket_price or index_price
slLimitPriceNoSL limit price
slOrderTypeNoLIMIT or MARKET

Batch Futures Orders

POST /api/v1/futures/batchOrders

WRITE: Show all orders and confirm

ParamRequiredDescription
listYesJSON array of order objects (max 10)

Query Futures Order

GET /api/v1/futures/order
ParamRequiredDescription
orderIdConditionalOrder ID
origClientOrderIdConditionalCustom order ID
typeNoOrder type filter
categoryNoDefault 0

Cancel Futures Order

DELETE /api/v1/futures/order

WRITE: Confirm before executing

ParamRequiredDescription
orderIdConditionalOrder ID
origClientOrderIdConditionalCustom order ID
typeNoOrder type
symbolNoTrading pair
categoryNoDefault 0

Batch Cancel Futures Orders

DELETE /api/v1/futures/batchOrders

WRITE: Confirm before executing

ParamRequiredDescription
symbolYese.g. BTCUSDT
sideNoBUY or SELL
categoryNoDefault 0

Cancel Futures Orders by IDs

DELETE /api/v1/futures/cancelOrderByIds

WRITE: Confirm before executing

ParamRequiredDescription
idsYesComma-separated order IDs (max 100)
categoryNoDefault 0

Open Futures Orders

GET /api/v1/futures/openOrders
ParamRequiredDescription
symbolNoFilter by symbol
orderIdNoStart from order ID
typeNoOrder type filter
categoryNoDefault 0
limitNoDefault 500

Current Positions

GET /api/v1/futures/positions
ParamRequiredDescription
symbolNoFilter by symbol
sideNoLONG or SHORT
categoryNoDefault 0

Set TP/SL for Position

POST /api/v1/futures/position/trading-stop

WRITE: Confirm before executing

ParamRequiredDescription
symbolYese.g. BTCUSDT
sideYesLONG or SHORT
takeProfitNoTP price
stopLossNoSL price
tpTriggerByNomarket_price or index_price
slTriggerByNomarket_price or index_price
tpSizeNoTP quantity
slSizeNoSL quantity
categoryNoDefault 0

Futures History Orders

GET /api/v1/futures/historyOrders
ParamRequiredDescription
symbolNoFilter by symbol
orderIdNoStart from order ID
typeNoOrder type filter
startTimeNoms timestamp
endTimeNoms timestamp
limitNoDefault 500
categoryNoDefault 0

Futures Balance

GET /api/v1/futures/balance
ParamRequiredDescription
categoryNoDefault 0

Adjust Isolated Margin

POST /api/v1/futures/positionMargin

WRITE: Confirm before executing

ParamRequiredDescription
symbolYese.g. BTCUSDT
sideYesLONG or SHORT
amountYesMargin amount (positive=add, negative=reduce)
categoryNoDefault 0

Futures Trade History

GET /api/v1/futures/userTrades
ParamRequiredDescription
symbolNoFilter by symbol
startTimeNoms timestamp
endTimeNoms timestamp
limitNoDefault 500
fromIdNoStart trade ID
toIdNoEnd trade ID
categoryNoDefault 0

Futures Balance Flow

GET /api/v1/futures/balanceFlow
ParamRequiredDescription
symbolNoFilter by symbol
coinNoFilter by coin
flowTypeNoTransaction type
fromIdNoPagination
endIdNoPagination
startTimeNoms timestamp
endTimeNoms timestamp
limitNoDefault 500
categoryNoDefault 0

Commission Rate

GET /api/v1/futures/commissionRate
ParamRequiredDescription
symbolYese.g. BTCUSDT

Today's PnL

GET /api/v1/futures/todayPnl
ParamRequiredDescription
categoryNoDefault 0

Sub-Account Info

GET /api/v1/subAccount
ParamRequiredDescription
userIdNoSub-account user ID
emailNoSub-account email

Sub-Account Transfer

POST /api/v1/subAccount/transfer

WRITE: Confirm before executing

Same params as spot sub-account transfer.

Account Balance Flow

GET /api/v1/account/balanceFlow

Same params as spot balance flow, with additional category param.

Futures User Data Stream

Create Listen Key

POST /api/v1/listenKey
ParamRequiredDescription
categoryNoDefault 0

Extend Listen Key

PUT /api/v1/listenKey
ParamRequiredDescription
listenKeyYesThe listen key
categoryNoDefault 0

Close Listen Key

DELETE /api/v1/listenKey
ParamRequiredDescription
listenKeyYesThe listen key
categoryNoDefault 0

WebSocket URL: wss://stream.toobit.com/api/v1/ws/<listenKey>

Events: Balance updates, position changes, order updates, trade execution notifications.


Common Error Codes

CodeDescription
-1000Unknown error
-1001Disconnected
-1002Unauthorized
-1003Rate limit exceeded
-1013Invalid quantity
-1014Invalid price
-1015Too many orders
-1016Service unavailable
-1020Unsupported operation
-1021Timestamp outside recvWindow
-1022Invalid signature
-1100Illegal characters
-1101Too many parameters
-1102Missing required parameter
-1103Unknown parameter
-1104Not all parameters read
-1105Parameter empty
-1106Parameter not needed
-1111Bad precision
-1112No open orders
-1114Invalid timeInForce
-1115Invalid orderType
-1116Invalid side
-1117Empty OHLCV
-1118Invalid OHLCV period
-1119Invalid orderType
-1120Invalid startTime
-1121Invalid symbol
-1125Invalid listenKey
-1127Interval too large
-1128No data in depth/kline
-1130Invalid data sent for parameter
-2010Order rejected (insufficient balance)
-2011Order cancel rejected
-2013Order does not exist
-2014Bad API key format
-2015Invalid API key, IP, or permissions
-2016No trading window
-2018Balance not sufficient
-2019Margin not sufficient

Rate Limits

  • Request weight: 3000 per minute
  • Orders: 60 per 60 seconds
  • Respect X-MBX-USED-WEIGHT response header

Usage Examples

User says: "查看 BTC 当前价格" → Call GET /quote/v1/ticker/price?symbol=BTCUSDT

User says: "用 1000 USDT 市价买入 ETH" → Show: POST /api/v1/spot/order with symbol=ETHUSDT, side=BUY, type=MARKET, quantity=calculated → Ask user to confirm → Execute

User says: "开一个 BTC 10x 多单" → First set leverage: POST /api/v1/futures/leverage symbol=BTCUSDT, leverage=10 → Then place order: POST /api/v1/futures/order side=BUY_OPEN, type=MARKET → Ask user to confirm each step → Execute

User says: "查看我的合约持仓" → Call GET /api/v1/futures/positions

User says: "提币 100 USDT 到地址 0x..." → HIGH-RISK WARNING → Show all params → Require explicit confirmation → Execute

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

Bybit AI Trading Skill

Bybit AI Trading Skill — deprecated

Registry SourceRecently Updated
4880Profile unavailable
Web3

Binance Futures Alpha Radar

Analyze Binance USDT-margined perpetual futures symbols with public futures market data only and return a structured market analysis report with a clear BUY,...

Registry SourceRecently Updated
4730Profile unavailable
Web3

ZKE Exchange Trading Skill

ZKE AI Master Trader (Official). Control spot and futures trading, manage assets, and access real-time market data on ZKE Exchange.

Registry SourceRecently Updated
2080Profile unavailable
Web3

automated agentic perps trading on dex.clutch.market

Runs agentic trading workflows on Clutch Perps through MCP. Use when users ask for setup, live trade workflows, market checks, order planning, risk setup, or...

Registry SourceRecently Updated
3000Profile unavailable