Skip to main content
cURL
curl --request GET \
  --url https://test.deribit.com/api/v2/private/get_leg_prices \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "private/get_leg_prices",
  "params": {
    "price": 0.6,
    "legs": [
      {
        "instrument_name": "BTC-1NOV24-67000-C",
        "direction": "buy",
        "amount": 2
      },
      {
        "instrument_name": "BTC-1NOV24-66000-C",
        "direction": "sell",
        "amount": 2
      }
    ]
  }
}
'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "legs": [
      {
        "ratio": 1,
        "instrument_name": "BTC-1NOV24-67000-C",
        "price": 0.6001,
        "direction": "buy"
      },
      {
        "ratio": 1,
        "instrument_name": "BTC-1NOV24-66000-C",
        "price": 0.0001,
        "direction": "sell"
      }
    ],
    "amount": 2
  }
}

Query Parameters

legs
string
required

List of legs for which the prices will be calculated JSON string containing array of objects

price
number
required

Price for the whole leg structure

Response

200 - application/json

Success response

jsonrpc
enum<string>
required

The JSON-RPC version (2.0)

Available options:
2.0
result
object
required
id
integer

The id that was sent in the request