Entering a Long Position
Entering a long position means you are going long on an asset. This is useful if you want to enter a position at once, for example when you want to enter a position when a certain condition is met.
Often, you want to enter a long position when you think the price will go up.
Currently, only market orders are supported. More order types will be added in the future.
Method
When you enter a long position, all open short positions will be closed.
Inputs
Parameter | Argument type | Description | Default Value |
---|---|---|---|
quantity | float | Quantity to buy | - |
comment | Optional[str] | Comment to add to the order | "" |
tags | Optional[Dict[str, str]] | Tags to add to the order | {} |
stop_loss_percent | Optional[float] | Stop loss percentage | None |
take_profit_percent | Optional[float] | Take profit percentage | None |
Outputs
Order that was created to enter the position.