Skip to content

Issue when sending a NewOrderRequest with limit stop market order type and stop trigger #7 #7

@l3oxer

Description

@l3oxer

when Executing the following code
'''

        NewOrderRequest newOrderRequestStop = new NewOrderRequest("BTC-PERPETUAL", dirStop);
        
        //   newOrderRequest.Price = 45000;
        newOrderRequestStop.OrderType = OrderType.StopMarket;
        newOrderRequestStop.Quantity = 1000;
        newOrderRequestStop.Label = "Testing From the bot";
        newOrderRequestStop.StopPrice = 42000;
        newOrderRequestStop.StopTrigger = StopTrigger.LastPrice;
        OrderOperationResponse orderOperationResponseStop = await deribitApi.Send(newOrderRequestStop);
        if (!orderOperationResponseStop.Succeeded) {
            Concole.WriteLine("Error " + orderOperationResponseStop.Error.Code + " " + orderOperationResponseStop.Error.Message + " " + orderOperationResponseStop.Error.Data);
        } else {
            Concole.WriteLine((orderOperationResponse.ToString());
        }

'''

I get the following exception

image

when I remove this line

''' newOrderRequestStop.StopTrigger = StopTrigger.LastPrice;'''

everything seems fine

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions