Create quote

Name
Type
Required
Description

currency

string

true

BTC / ETH

quantity

float

true

For single leg, quantity of the leg; For multileg, quantity of the combo.

side

string

true

Side quoted by maker: bid/ask

price

float

true

Option value for single leg, net option value for multilegs (taking selling Bull Spread as an example, the meaning of bidding this price is the difference between the leg 1 sell atm call say 0.0500, and leg 2 buy otm call say 0.0100, net = -0.0500+0.0100 = -0.0400. Taker bid a minus price thus net collecting premiums. Maker ask a minus price thus net paying premiums.).

account_name

string

true

Deribit account name

ref_inquiry_id

string

false

The associated inquiry id; the quote with this field is only visible to the inquirer.

is_private

boolean

false

Whether the quote is private. Default: false

is_anonymous

boolean

true

Whether the quote is anonymous.

seconds

integer

true

Validity of quote (number of seconds)

legs.instrument

string

true

Contract name

legs.size

float

true

For single leg, legs.size is 1. For multilegs, legs.size is the quantity of other legs divided by the quantity of smallest leg (if the quantities of leg1 and leg2 are 50 and 30, then legs.size of leg1 is 1.667, legs.size of leg2 is 1).

legs.direction

string

true

The direction of single legs: buy/sell

// An example of a request message
{
    "jsonrpc" : 2.0,
    "method" : "/private/create_quote",
    "params" : {
        "currency":"BTC",
        "quantity":25,
        "side":"ask",
        "price":0.0031,
        "seconds":1800,
        "account_name":"COOK_ACCOUNT_1",
        "ref_inquiry_id":"xxxxxx",
        "is_private":true,
        "is_anonymous":false,
        "legs":[
            {
                "instrument":"BTC-25NOV22-19000-P",
                "size":1,
                "direction":"buy"
            }
        ]
    },
    "id" : 1
}

Name
Type
Description

quote_id

string

Quote id

user_id

string

Quote user id

user_name

string

Quote user name

currency

string

BTC / ETH

quantity

float

For single leg, quantity of the leg; For multileg, quantity of the combo.

price

float

Combination order price

ref_inquiry_id

string

The associated inquiry id; the quote with this field is only visible to the inquirer.

side

string

Side quoted by maker: bid/ask

is_private

boolean

Whether the quote is private.

is_anonymous

boolean

Whether the quote is anonymous.

status

string

wait_approve/active/canceled/timeout/completed/closed

close_reason

string

The reason why the quote was closed.

1.ref_inquiry_canceled

2.ref_inquiry_trade_away

3.ref_inquiry_timeout

4.close_by_admin

create_timestamp

long

Inquiry creation timestamp (Number of milliseconds since the Unix epoch ie January 1st, 1970 at 00:00:00 UTC)

expire_timestamp

long

Inquiry expiration timestamp (Number of milliseconds since the Unix epoch ie January 1st, 1970 at 00:00:00 UTC)

legs.instrument

string

Contract name

legs.size

float

The number of single legs, all of which have at least one leg of which the number is 1.

legs.price

float

Unit price of each contract

legs.direction

string

The direction of single legs: buy/sell

// An example of a response message
{
    "jsonrpc" : 2.0,
    "method" : "/private/create_quote",
    "result" :{
        "id":"xxxxxxxxxxx",
        "user_id":"1123123",
        "user_name":"COOK",
        "quantity":25,
        "price":0.0031,
        "side":"ask",
        "currency":"BTC",
        "is_private":true,
        "is_anonymous":false,
        "status","active",
        "create_timestamp":1663926165000,
        "expire_timestamp":1663926365000,
        "legs":[
            {
                "instrument":"BTC-25NOV22-19000-P",
                "size":1,
                "direction":"buy",
                "price":0.0031
            }
        ]
    },
    "id" : 1
}

Last updated