Change Margin Type
Type: TRADE
Weight: 1
GET /fapi/v1/marginType·POST /fapi/v1/marginType
Read or set the margin type for a symbol. On the FAPI surface only cross margin exists; the endpoints are provided so SDKs that poll them at startup do not mistake a 404 for an auth failure.
GET
GET /fapi/v1/marginType?symbol=BTCUSDT×tamp=<ms>&signature=<hex>
{ "symbol": "BTCUSDT", "marginType": "CROSSED" }
POST
POST /fapi/v1/marginType?timestamp=<ms>&signature=<hex>
Content-Type: application/json
{ "symbol": "BTCUSDT", "marginType": "CROSSED" }
marginType | Result |
|---|---|
CROSSED | { "code": 200, "msg": "success" } (idempotent) |
ISOLATED | { "code": -4046, "msg": "Isolated margin is not supported on the developer fapi. ..." } |
Isolated / unified margin is an account-level switch on the native API (POST /api/v1/account/margin-mode, JWT) and is not exposed through /fapi.
Authentication failures (INVALID_API_KEY, API_KEY_DISABLED, IP_NOT_ALLOWED, SIGNATURE_INVALID) apply to every signed endpoint and use Sparky's {"success":false,"error":{...}} envelope; see Error Codes.