Body
The amount of collateral to withdraw in USD from the position. Must be an integer representing the USD amount multiplied by 10^6 (1 million) to align with the 6 decimal places used for USDC/USDT tokens on-chain. For example, to decrease by $10 USD, set 'collateralUsdDelta' to 10000000; for $20.50 USD, set 'collateralUsdDelta' to 20500000.
"10000000"
The mint address for the token to be used when withdrawing collateral or closing position.
So11111111111111111111111111111111111111112, 7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs, 3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh, EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v, Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB "So11111111111111111111111111111111111111112"
The public key for the open position. Use the GET positions endpoint to fetch the public key for the trader's open positions.
"5HHB8sCKjWPU2zr3p4Lg49mQiaPQiHbCjHW7jgVzp583"
The amount in USD to decrease the position size by. Must be an integer representing the USD amount multiplied by 10^6 (1 million) to align with the 6 decimal places used for USDC/USDT tokens on-chain. For example, to decrease by $10 USD, set 'sizeUsdDelta' to 10000000; for $20.50 USD, set 'sizeUsdDelta' to 20500000.
"10000000"
When set to true, this will close the position and transfer the remaining collateral and realised profits (if the position is profitable) to the trader.
false
The maximum slippage in (BPS) for the token swap (if required) and the token price when executing the increase position trade
"100"
Response
200 OK
The unique identifier (i.e. a program derived address) for the position account. Use this address to find the position account onchain.
The 'quote' object contains the position's updated values (leverage, size, collateral size, etc.) after withdrawing collateral.
The serialized transaction (base64 encoded) containing the instructions and given parameters for the decrease position request. The transaction can be deserialized, signed by the owner of walletAddress and submitted onchain to execute the decrease position request
Contains relevant metadata for the serialized transaction.
The unique identifier (i.e. a program derived address) for the position request. Use this address to find the position request account onchain. Returns null if requireKeeperSignature is true.
