Overview
Many operations in the Jupiter Perps API require keeper-signed transactions to be executed. These transactions cannot be submitted directly through standard Solana RPC calls. Instead, they must be sent to the/transaction/execute endpoint, where a keeper will sign and execute them on your behalf.
Refer to the Transaction Execution endpoint for the complete API documentation.
When to Use Transaction Execution
All transactional operations in the Jupiter Perps API require the transaction execution endpoint. The following operations may require the transaction execution endpoint:- Position Management (
increase-position,decrease-position) - Limit Orders (
limit-order) - TPSL Orders (
tpsl,tpsl-with-fee) - And others
serializedTxBase64: The serialized transaction ready to be signedtransactionType: Either"legacy"or"instant"requireKeeperSignature: Boolean indicating if keeper signature is required
Transaction Types
Instant Transactions
WhentransactionType is "instant" or requireKeeperSignature is true, you must use the /transaction/execute endpoint. These transactions require a keeper to sign and execute them.
Legacy Transactions
WhentransactionType is "legacy" and requireKeeperSignature is false, you can submit the transaction directly through standard Solana RPC methods (e.g., sendTransaction).
Workflow
Step 1: Create the Transaction
Call the appropriate operation endpoint (e.g.,POST /tpsl, POST /positions/increase) with your parameters:
Step 2: Check Transaction Type
Examine the response to determine how to proceed:Step 3: Sign the Transaction
Deserialize and sign the transaction with your wallet:Step 4: Execute via Transaction Endpoint
Send the signed transaction to the/transaction/execute endpoint with the appropriate action:
Supported Actions
Theaction parameter in /transaction/execute must match one of these values:
tpsl- Take profit / Stop loss orderstpsl-with-fee- TPSL orders with integrator feeslimit-order- Limit ordersincrease-position- Increase position sizeincrease-position-with-fee- Increase position with integrator feesdecrease-position- Decrease position sizedecrease-position-with-fee- Decrease position with integrator fees
Important Notes
-
Transaction Expiry: Transactions include blockhash metadata (
txMetadata) that expires. Ensure you execute the transaction promptly after receiving it. -
Serializing Transaction: When serializing transactions for the execution endpoint, use
requireAllSignatures: falsesince the keeper will add its signature. -
Error Handling: The execution endpoint may return errors if:
- The transaction is invalid or expired
- The keeper cannot execute the transaction
- The action type doesnβt match the transaction
-
Transaction ID: Upon successful execution, youβll receive a
txidthat you can use to track the transaction on-chain.
