Before placing a futes Order i apply the wanted leverage for the symbol. The UI also shows that the leverage got applied. But in the trade it seems that no leverage was used. Does anyone know what i might be doing wrong?
try {
await binanceClient.futuresMarginType({
symbol: binanceTradeParams.binanceTokenName,
marginType: ‘ISOLATED’, // Set the margin type to ‘CROSSED’ for Hedge mode
});
} catch (error) {
// when already set it throws an error
console.log("set marginType error: ", error);
}
try {
await binanceClient.futuresPositionModeChange({
dualSidePosition: “false”,
recvWindow: 5000
});
} catch (error) {
// when already set it throws an error
console.log("set dualSidePosition error: ", error);
}
await binanceClient.futuresLeverage({
symbol: binanceTradeParams.binanceTokenName,
leverage: binanceTradeParams.leverage,
});
// TODO: evtl funktionierts in prod
// quantity: binanceTradeParams.quantity.toFixed(symbolInfo.baseAssetPrecision),
const orderParams = {
symbol: binanceTradeParams.binanceTokenName,
quantity: binanceTradeParams.quantity.toFixed(3),
side: binanceTradeParams.side,
type: ‘MARKET’
} as MarketNewFuturesOrder;
const order = await binanceClient.futuresOrder(orderParams);