Overview
Overview
Mudrex Futures API gives programmatic control over your Mudrex trading account. You can transfer funds between your spot and futures wallets, list tradeable instruments, set leverage/margin type for each asset, place and manage orders, track open positions, and retrieve fee histories.
All endpoints are versioned under https://trade.mudrex.com/fapi/v1 Requests require an X-Authentication header carrying your API secret Responses are JSON encoded Numeric values are strings to preserve precision.
Specifications
- Host:
https://trade.mudrex.com - Base path:
/fapi/v1 - Example:
https://trade.mudrex.com/fapi/v1/<resource> - Headers
- Authentication header:
X-Authentication: your-secret-keyrequired with every request. - Content-Type header:
Content-Type: application/jsonrequired with POST/PATCH/DELETE requests that send a body.
- Authentication header:
- Rate limits
- Default API rate limits and separate wallet rate limits apply. See Changelogs and Authentication & Rate Limits.
Resources
| Resource | Purpose |
|---|---|
| Wallet | Fetch spot wallet balances; move funds between spot and futures. |
| Futures | Fetch futures wallet balance, available transfer amount, and transaction history. |
| Assets | List all futures instruments with sorting/pagination; retrieve full metadata for a specific asset. |
| Leverage | Get or set leverage and margin type (isolated) for a specific asset. |
| Orders | Create new orders (market or limit), list open orders, fetch order history, retrieve single orders, amend/cancel orders. |
| Positions | View open positions, set/edit stop‑loss and take‑profit, reverse or partially close positions, fetch position history. |
| Fees | Retrieve your trading and funding fee history. |
Check out the Quickstart guide to follow a complete trading workflow.
Margin currency: USDT and INR
Futures can be traded with USDT (default) or INR as the margin currency. The contracts are the same USDT-quoted linear perpetuals (e.g. BTCUSDT, SOMIUSDT) in both cases — only the wallet the margin is drawn from and the currency in which PnL and fees are realized changes. Existing USDT integrations are unaffected: when no currency is specified, requests behave exactly as before.
Selecting the currency
| Request type | Where the currency goes | Example |
|---|---|---|
GET (spot wallet) | Query parameter currency | ?currency=INR |
GET (all other endpoints) | Query parameter trade_currency | ?trade_currency=INR |
POST / PATCH / DELETE | Body field trade_currency | "trade_currency": "INR" |
| Omitted | Defaults to USDT | — |
Supported values are USDT and INR. Any other value returns 400 with Invalid trade currency.
The spot wallet read is the exception.
GET /wallet/fundsusescurrency(e.g.?currency=INR). Passingtrade_currency=INRon the spot endpoint returns200 OKwith all-zero balances — always use?currency=INRfor the INR spot wallet. Every other endpoint usestrade_currency.
Transfers (per currency)
| Flow | Endpoint |
|---|---|
| USDT spot ↔ USDT futures | POST /wallet/futures/transfer |
| INR spot ↔ INR futures | POST /futures/transfers/inr |
INR transfers do not go through /wallet/futures/transfer. Cross-currency transfers (INR ↔ USDT) are not supported via API.
Currency model
- Contracts are USDT-quoted (
BTCUSDT,SOMIUSDT, …); asset listing and detail are unchanged for both currencies. - Order price, entry price, and liquidation price are in USDT.
- Quantity is in the base asset (e.g. BTC).
- Margin, PnL, fees, and wallet balances are in the wallet/position currency.
- For INR trades the FX rate (INR/USDT) is returned as
hedge_rate(orders) andentry_hedge_rate/exit_hedge_rate(positions).
List endpoints
List endpoints (orders, order history, positions, position history, fee history, transactions) return one currency per call — they never mix USDT and INR. They default to USDT; pass trade_currency explicitly for INR. Each returned item carries a trade_currency tag.
