# Order protection

A position protection can be optionally set with the protection directive.

  • Example






 
 
 
 


import { MidaOrderDirection, } from "@reiryoku/mida";

const myOrder = await myAccount.placeOrder({
    symbol: "BTCUSDT",
    direction: MidaOrderDirection.BUY,
    volume: 1,
    protection: {
        takeProfit: 65000,
        stopLoss: 30000,
    },
});