This endpoint allows you to execute transactions on behalf of a portfolio. It can be used for custom transactions, manual rebalancing, or any operation that requires using the portfolio’s vault to interact with other contracts.
Path Parameters
The unique identifier of the portfolio
Query Parameters
If true, simulate the transaction without executing it on-chain
Must be set to application/json
Request Body
Chain ID for transaction execution
Transaction parameters Transaction call(s) to execute. Can be a single call object or an array of call objects. Transaction calldata (hex-encoded)
Amount of native token to send with the call (in wei)
Optional nonce to use for the transaction
Response
Indicates if the request was successful
Unique identifier for this execution request
Current status of the execution (e.g., “pending”, “completed”, “failed”)
Transaction details Transaction hash (if submitted)
Address sending the transaction
Address receiving the transaction
Chain ID for the transaction
Simulation results (if dryRun=true) Whether the simulation was successful
Execution trace information
Check Execution Status
GET /portfolio/:portfolioId/execute/status/:executionId
This endpoint allows you to check the status of a previously submitted execution.
Path Parameters
The unique identifier of the portfolio
The execution identifier returned from the execute endpoint
Response
Indicates if the request was successful
Current status of the execution: “pending”, “processing”, “completed”, “failed”
Transaction details Transaction status: “pending”, “confirmed”, “failed”
Block number (if confirmed)
Timestamp of transaction confirmation (if confirmed)
Execution result (if completed) Whether the execution succeeded
Events emitted by the transaction
Error information (if failed) Detailed error information
Example Request
curl -X POST "https://api.glider.fi/portfolio/port_1a2b3c4d5e6f/execute" \
-H "X-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"chainId": "1",
"params": {
"calls": [
{
"to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"data": "0xa9059cbb000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045000000000000000000000000000000000000000000000000000000002540be400",
"value": "0"
}
]
}
}'
Example Response
{
"success" : true ,
"data" : {
"executionId" : "exec_a1b2c3d4e5f6" ,
"status" : "pending" ,
"transaction" : {
"hash" : "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890" ,
"data" : "0x..." ,
"from" : "0x1234...5678" ,
"to" : "0xA0b8...eB48" ,
"chainId" : "1"
}
}
}
Example Status Check
curl -X GET "https://api.glider.fi/portfolio/port_1a2b3c4d5e6f/execute/status/exec_a1b2c3d4e5f6" \
-H "X-API-KEY: YOUR_API_KEY"
Example Status Response
{
"success" : true ,
"data" : {
"status" : "completed" ,
"executionId" : "exec_a1b2c3d4e5f6" ,
"transaction" : {
"hash" : "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890" ,
"status" : "confirmed" ,
"blockNumber" : 16123456 ,
"timestamp" : 1684147200
},
"result" : {
"success" : true ,
"gasUsed" : "51234" ,
"events" : [
{
"name" : "Transfer" ,
"address" : "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" ,
"args" : {
"from" : "0x1234...5678" ,
"to" : "0xd8da...6045" ,
"value" : "1000000000"
}
}
]
}
}
}
Error Codes
The specified portfolio or execution ID could not be found
Invalid or missing API key
The API key does not have permission to execute transactions for this portfolio
The request body is invalid or missing required fields
Transaction simulation failed
Transaction execution failed
Notes
Use the dryRun
parameter to simulate transactions before executing them
The execution process is asynchronous - use the status endpoint to check completion
Transactions are executed through the portfolio’s vault, which must have sufficient permissions and balances
For security reasons, transactions have built-in limits and validations to protect portfolio assets
Multiple calls can be batched into a single transaction for efficiency