Guides
Guides

Trading API quick reference

A quick overview of all trading actions and their corresponding API endpoints. Use this to find the right endpoint for your workflow.

Currency parameter. Add trade_currency (USDT or INR) to operate in a given currency — query parameter on GET, body field on POST/PATCH/DELETE. Omitted defaults to USDT. The spot balance endpoint uses currency instead of trade_currency. INR transfers use a dedicated endpoint. List endpoints return one currency per call.

Market Data

Base: https://trade.mudrex.com/fapi/v1/price (REST) · wss://trade.mudrex.com/fapi/v1/price/ws/linear (WebSocket). REST symbols use <base>/<quote> (e.g. BTC/USDT); WebSocket uses lowercase no-slash (e.g. btcusdt).

ActionMethodEndpointDescription
Historical klinesGET/price/klineBulk OHLCV price klines (≤25 assets, ≤1440 candles/asset).
Mark-price klinesGET/price/mark-klineBulk OHLC mark-price klines (no volume).
Live streamsWS/price/ws/linearSubscribe to kline@…, markKline@…, ticker@1s / ticker@5s.

Wallet Management

ActionMethodEndpointDescription
Check spot balanceGET/wallet/fundsSpot wallet balance. Use ?currency=INR for the INR spot wallet.
Check futures balanceGET/futures/fundsFutures wallet balance. Use ?trade_currency=INR for INR.
Transfer funds (USDT)POST/wallet/futures/transferMove USDT between USDT spot and USDT futures wallets.
Transfer funds (INR)POST/futures/transfers/inrMove INR between INR spot and INR futures wallets.
Futures transactionsGET/futures/transactionsList transfers (DEPOSIT/WITHDRAW). Use ?trade_currency=INR.

Asset Discovery

ActionMethodEndpointDescription
List all assetsGET/futuresList tradable futures contracts. Unchanged for USDT/INR.
Get asset detailsGET/futures/{asset_id}Contract specs. Unchanged for USDT/INR.

Leverage Management

ActionMethodEndpointDescription
Get leverageGET/futures/{asset_id}/leverageLeverage/margin type per (asset, currency). Add trade_currency.
Set leveragePOST/futures/{asset_id}/leverageSet leverage per (asset, currency). Add trade_currency in body.

Order Management

ActionMethodEndpointDescription
Place orderPOST/futures/{asset_id}/orderCreate market or limit order. Add trade_currency in body for INR.
View open ordersGET/futures/ordersOpen orders for one currency (?trade_currency=INR).
Get order detailsGET/futures/orders/{order_id}A specific order (carries trade_currency, hedge_rate).
Amend orderPATCH/futures/orders/{order_id}Modify an order. Requires both order_price and quantity.
Cancel orderDELETE/futures/orders/{order_id}Cancel an open order.
Order historyGET/futures/orders/historyHistorical orders for one currency (?trade_currency=INR).

Position Management

ActionMethodEndpointDescription
View open positionsGET/futures/positionsOpen positions for one currency (?trade_currency=INR).
Close positionPOST/futures/positions/{position_id}/closeFully close a position.
Partial closePOST/futures/positions/{position_id}/close/partialClose a portion of a position.
Reverse positionPOST/futures/positions/{position_id}/reverseSwitch from LONG to SHORT or vice versa.
Add/Reduce marginPOST/futures/positions/{position_id}/add-marginAdjust margin (in the position's currency).
Liquidation priceGET/futures/positions/{position_id}/liq-priceEstimated liquidation price (USDT).
Position historyGET/futures/positions/historyClosed positions for one currency (?trade_currency=INR).

Risk Management (Stop-Loss & Take-Profit)

ActionMethodEndpointDescription
Set SL/TPPOST/futures/positions/{position_id}/riskorderAttach stop-loss and/or take-profit to a position.
Edit SL/TPPATCH/futures/positions/{position_id}/riskorderModify SL/TP. Requires stoploss_order_id / takeprofit_order_id.

Monitoring & History

ActionMethodEndpointDescription
Fee historyGET/futures/fee/historyTrading/funding fee history for one currency (?trade_currency=INR).

Quick Trading Workflow

  1. Check balanceGET /wallet/funds (?currency=INR for INR spot)
  2. Transfer to futuresPOST /wallet/futures/transfer (USDT) or POST /futures/transfers/inr (INR)
  3. Discover assetsGET /futures
  4. Set leveragePOST /futures/{asset_id}/leverage (add trade_currency for INR)
  5. Place orderPOST /futures/{asset_id}/order (add trade_currency for INR)
  6. Monitor positionGET /futures/positions (?trade_currency=INR)
  7. Manage riskPOST /futures/positions/{position_id}/riskorder
  8. Close positionPOST /futures/positions/{position_id}/close or partial close

For detailed parameters and examples, refer to the API Reference section.