cURL
curl --request POST \
--url https://test.deribit.com/api/v2/private/get_order_margin_by_ids \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 5625,
"method": "private/get_order_margin_by_ids",
"params": {
"ids": [
"ETH-349280",
"ETH-349279",
"ETH-349278"
]
}
}'{
"jsonrpc": "2.0",
"id": 5625,
"result": [
{
"order_id": "ETH-349278",
"initial_margin": 0.00091156,
"initial_margin_currency": "ETH"
},
{
"order_id": "ETH-349279",
"initial_margin": 0,
"initial_margin_currency": "ETH"
},
{
"order_id": "ETH-349280",
"initial_margin": 0,
"initial_margin_currency": "ETH"
}
]
}Trading
private/get_order_margin_by_ids
Retrieves the initial margin requirements for one or more orders identified by their order IDs. Initial margin is the amount of funds required to open a position with these orders.
This method is useful for calculating margin requirements before placing orders, helping to ensure sufficient funds are available.
Scope: trade:read
cURL
curl --request POST \
--url https://test.deribit.com/api/v2/private/get_order_margin_by_ids \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"id": 5625,
"method": "private/get_order_margin_by_ids",
"params": {
"ids": [
"ETH-349280",
"ETH-349279",
"ETH-349278"
]
}
}'{
"jsonrpc": "2.0",
"id": 5625,
"result": [
{
"order_id": "ETH-349278",
"initial_margin": 0.00091156,
"initial_margin_currency": "ETH"
},
{
"order_id": "ETH-349279",
"initial_margin": 0,
"initial_margin_currency": "ETH"
},
{
"order_id": "ETH-349280",
"initial_margin": 0,
"initial_margin_currency": "ETH"
}
]
}Response
200 - application/json
Success response
Was this page helpful?