Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

place trade order use type TRAILING_STOP_MARKET #28

Open
aref-r opened this issue Mar 29, 2024 · 7 comments
Open

place trade order use type TRAILING_STOP_MARKET #28

aref-r opened this issue Mar 29, 2024 · 7 comments

Comments

@aref-r
Copy link

aref-r commented Mar 29, 2024

hello, I want to open trade order in perpetual futures with this endpoint :
/openApi/swap/v2/trade/order
and the type is TRAILING_STOP_MARKET
as the documentation confirmed, there is three field for TRAILING_STOP_MARKET :
"activationPrice",
"priceRate",
"price"
I couldn't find a perfect explanation for these three field in doc .

I want to set takeprofit and stoploss too,
but seems these two field is Only supports type: STOP_MARKET/STOP or Only supports type: TAKE_PROFIT_MARKET/TAKE_PROFIT.
and I have no idea to insert takeprofit price and stoploss price when opening order, can any one help me ?

@bingx-support
Copy link

bingx-support commented Mar 30, 2024 via email

@aref-r
Copy link
Author

aref-r commented Mar 31, 2024

Hello, You can place an individual order with type=TRAILING_STOP_MARKET.

If I create an individual order, how to link the new order to the previous order? (to prevent create additional order)

@bingx-support
Copy link

bingx-support commented Mar 31, 2024 via email

@aref-r
Copy link
Author

aref-r commented Apr 1, 2024

thanks, But for set the takeProfit and stopLoss in single api request, what type I have to use for order ?
because you specified in the documentation :

stopLoss : Only supports type: STOP_MARKET/STOP
takeProfit : Only supports type: TAKE_PROFIT_MARKET/TAKE_PROFIT

@bingx-support
Copy link

bingx-support commented Apr 1, 2024 via email

@aref-r
Copy link
Author

aref-r commented Apr 1, 2024

Yes I know,
I mean the first api for place order (before trailing) . what type for this order I have to use ? just as the takeProfit and stopLoss need to separate type and don't have an in common type.

for example if I use MAEKET type for place new order , I can not set the takeProfit and stopLoss , and I have to send separate api with type TRAILING_TP_SL after create order.

I need to set TP & SL in first request, not the second. (before trailing)

generally is it necessary to send twice api request ?

@bingx-support
Copy link

bingx-support commented Apr 2, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants