Body
The public key for owner of the position.
"5HHB8sCKjWPU2zr3p4Lg49mQiaPQiHbCjHW7jgVzp583"
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 mint address for the token used when withdrawing collateral or closing position when the TPSL is executed.
So11111111111111111111111111111111111111112, 7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs, 3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh, EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v, Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB 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 the USDC mint on-chain. For example, to decrease by $10 USD, set 'sizeUsdDelta' to 10000000; for $20.50 USD, set 'sizeUsdDelta' to 20500000.
"10000000"
Trigger price at which the TP / SL request will be executed. The value must be an integer corresponding to 6 decimal places. For example, to set a trigger price of $20, pass in 20000000
"20000000"
Pass in tp to set a take profit request or sl to set a stop loss request
tp, sl Sets the type of serialized transaction to execute the action. If the transaction type is legacy, the transaction must be submitted by the client itself through the RPC. If the transaction type is instant, the transaction must be sent to the POST /transaction/execute endpoint. If the transaction type is mixed, the transactionType returned in the response will be either legacy or instant.
legacy, mixed, instant TPSL requests to set
Response
200 OK
The position request account pubkeys for the TP / SL
When requireKeeperSignature is true, the transaction must be signed, serialized, and sent to the the POST /transaction/execute endpoint to execute the transaction. When requireKeeperSignature is false, the transaction can be submitted through the sendTransaction RPC call as usual
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
Returns the type of serialized transaction to execute the action. If the transaction type is legacy, the transaction must be submitted by the client itself through the RPC. If the transaction type is instant, the transaction must be sent to the POST /transaction/execute endpoint.
legacy, instant Contains relevant metadata for the serialized transaction.
