API Reference
Get Bundle Cost
Gets the total cost for a meta intent and list the tokens that will be sent and received
POST
/
accounts
/
{userAddress}
/
bundles
/
cost
curl --request POST \
--url https://orchestrator.rhinestone.dev/accounts/{userAddress}/bundles/cost \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{
"targetChainId": 123,
"tokenTransfers": [
{
"tokenAddress": "<string>",
"amount": "<string>"
}
],
"targetGasUnits": "<string>",
"userOp": {
"callGasLimit": "<string>",
"verificationGasLimit": "<string>",
"preVerificationGas": "<string>"
},
"accountAccessList": [
{
"chainId": 123,
"tokenAddress": "<string>"
}
]
}'
{
"hasFulfilledAll": true,
"tokensSpent": {
"1": {
"0x6B175474E89094C44Da98b954EedeAC495271d0F": "501000"
},
"137": {
"0x0000000000000000000000000000000000001010": "500000"
}
},
"tokensReceived": [
{
"tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amountSpent": "1001000",
"targetAmount": "1000000",
"fee": "1000",
"hasFulfilled": true
}
],
"tokenShortfall": [
{
"tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"targetAmount": "1000000",
"amountSpent": "800000",
"fee": "1000",
"tokenSymbol": "USDC",
"tokenDecimals": 6
}
],
"totalTokenShortfallInUSD": "200.50"
}
Headers
Rhinestone API key
Path Parameters
Ethereum address of the user account
Example:
"0x579d5631f76126991c00fb8fe5467fa9d49e5f6a"
Body
application/json
Body
The body is of type object
.
Response
200
application/json
200
Successfully calculated bundle cost and token requirements
curl --request POST \
--url https://orchestrator.rhinestone.dev/accounts/{userAddress}/bundles/cost \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{
"targetChainId": 123,
"tokenTransfers": [
{
"tokenAddress": "<string>",
"amount": "<string>"
}
],
"targetGasUnits": "<string>",
"userOp": {
"callGasLimit": "<string>",
"verificationGasLimit": "<string>",
"preVerificationGas": "<string>"
},
"accountAccessList": [
{
"chainId": 123,
"tokenAddress": "<string>"
}
]
}'
{
"hasFulfilledAll": true,
"tokensSpent": {
"1": {
"0x6B175474E89094C44Da98b954EedeAC495271d0F": "501000"
},
"137": {
"0x0000000000000000000000000000000000001010": "500000"
}
},
"tokensReceived": [
{
"tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amountSpent": "1001000",
"targetAmount": "1000000",
"fee": "1000",
"hasFulfilled": true
}
],
"tokenShortfall": [
{
"tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"targetAmount": "1000000",
"amountSpent": "800000",
"fee": "1000",
"tokenSymbol": "USDC",
"tokenDecimals": 6
}
],
"totalTokenShortfallInUSD": "200.50"
}
Assistant
Responses are generated using AI and may contain mistakes.