jaggedsoft / node-binance-api

Node Binance API is an asynchronous node.js library for the Binance API designed to be easy to use.
MIT License
1.57k stars 767 forks source link

How to close a position in hedge mode? #842

Closed clientmagallanes22 closed 1 year ago

clientmagallanes22 commented 2 years ago

Can some1 help me how to close a position in hedge mode please

SANGMINNNN commented 1 year ago

Do you solve it?

clientmagallanes22 commented 1 year ago

Do you solve it?

Yup, do you need to know how?

SANGMINNNN commented 1 year ago

YES! please bro

clientmagallanes22 commented 1 year ago

YES! please bro

to open long await binance.futuresMarketBuy("BTCUSDT", 0.100, {workingType: "MARK_PRICE"}); to close long await binance.futuresMarketSell("BTCUSDT", 0.100, {positionSide: "LONG", workingType: "MARK_PRICE"});

to open short await binance.futuresMarketSell("BTCUSDT", 0.100, {workingType: "MARK_PRICE"}); to close short await binance.futuresMarketBuy("BTCUSDT", -0.100, {positionSide: "SHORT", workingType: "MARK_PRICE"});

SANGMINNNN commented 1 year ago

THX!