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

Long position should be opened in order to use smart sell #124

Open
Jenscaasen opened this issue Jan 14, 2022 · 0 comments
Open

Long position should be opened in order to use smart sell #124

Jenscaasen opened this issue Jan 14, 2022 · 0 comments

Comments

@Jenscaasen
Copy link

Hello,
i am getting the error "Long position should be opened in order to use smart sell". This is the request i send to /v2/smart_trades. I am trying to create a smart trade, not a smart sell, therefore i do not get why this fails with that message. Any ideas?

{ "id": 0, "account_id": xyz, "pair": "USD_MATIC-PERP", "instant": false, "skip_enter_step": true, "position": { "type": "buy", "editable": false, "units": { "value": 5313.0, "value_without_commission": null, "editable": false, "type": null, "percent": null }, "price": { "value": 2.3021308874999997, "value_without_commission": null, "editable": null, "type": null, "percent": null }, "total": null, "order_type": "conditional", "status": null, "conditional": { "price": { "value": 2.3021308874999997, "value_without_commission": null, "editable": null, "type": "last", "percent": null }, "trailing": null, "order_type": "market" } }, "take_profit": { "enabled": true, "steps": [ { "id": 0, "order_type": "limit", "editable": true, "units": { "value": 5313.0, "value_without_commission": null, "editable": null, "type": null, "percent": null }, "price": { "value": 2.3687523374999997, "value_without_commission": null, "editable": null, "type": "bid", "percent": null }, "volume": 100.0, "total": 12522.5683275, "trailing": { "enabled": false, "percent": null }, "status": { "type": "order_placed", "title": "Placed" }, "data": { "cancelable": true, "panic_sell_available": true }, "position": 1 } ] }, "stop_loss": { "enabled": false, "order_type": "market", "editable": false, "price": null, "conditional": null, "timeout": null, "status": null } }

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

1 participant