cURL
curl --request GET \ --url https://test.deribit.com/api/v2/private/change_margin_model \ --header 'Content-Type: application/json' \ --data ' { "jsonrpc": "2.0", "id": 1, "method": "private/change_margin_model", "params": { "user_id": 3, "margin_model": "cross_pm" } } '
{ "jsonrpc": "2.0", "id": 1, "result": [ { "old_state": { "maintenance_margin_rate": 0, "initial_margin_rate": 0, "available_balance": 0 }, "new_state": { "maintenance_margin_rate": 0, "initial_margin_rate": 0, "available_balance": 0 }, "currency": "eth" }, { "old_state": { "maintenance_margin_rate": 0.02862727, "initial_margin_rate": 0.45407615, "available_balance": 0.553590509 }, "new_state": { "maintenance_margin_rate": 0.02710204, "initial_margin_rate": 0.03252245, "available_balance": 0.98106428 }, "currency": "btc" } ] }
Change margin model
Scope: account:read_write
account:read_write
Try in API console
Id of a (sub)account - by default current user id is used
1
Margin model
cross_pm
cross_sm
segregated_pm
segregated_sm
If true request returns the result without switching the margining model. Default: false
true
false
Success response
The JSON-RPC version (2.0)
2.0
Show child attributes
The id that was sent in the request
Was this page helpful?