For the complete documentation index, see llms.txt. This page is also available as Markdown.

Increase, decrease & reverse

Resize an open position or flip its direction.

Adjust an existing position without closing it. All three identify the position by (owner, marketSymbol, side).

Increase

Add size (and optionally collateral) to an open position.

curl -X POST $FLASH_API_URL/transaction-builder/increase-position -d '{
  "marketSymbol": "SOL", "side": "LONG",
  "sizeAmountUi": "0.5", "collateralAmountUi": "25.0", "owner": "<WALLET>"
}'

collateralAmountUi may be "0" to add size without adding margin (raising leverage). → API reference › Trading › Increase / Decrease

Decrease

Close part of a position by target-token size. For a full exit use close-position.

curl -X POST $FLASH_API_URL/transaction-builder/decrease-position -d '{
  "marketSymbol": "SOL", "side": "LONG", "sizeAmountUi": "0.25", "owner": "<WALLET>"
}'

Reverse

Atomically close the current side and open the opposite side at a new leverage — one transaction. A 2% haircut on close proceeds absorbs price drift.

side is the current side; the new position opens on the opposite side. → API reference › Trading › Reverse position

All three submit to the v2 RPC.

Last updated

Was this helpful?