Explorer

Estimate

Order Estimate

POST
/api/oc/v1/estimate

Authorization

AuthorizationRequiredBearer <token>

In: header

Request Body

application/jsonRequired
typeRequiredstring
jobIdRequiredstring
gasDetailsRequiredobject
paymasterDataRequiredstring
detailsRequiredobject
curl -X POST "https://sandbox-api.okto.tech/api/oc/v1/estimate" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "TOKEN_TRANSFER",
    "jobId": "4f858322-c613-439b-ad73-9ab85dea5382",
    "gasDetails": {
      "maxFeePerGas": "0xBA43B7400",
      "maxPriorityFeePerGas": "0xBA43B7400"
    },
    "paymasterData": "0x0000000000000000000000006b6fad2600bc57075ee560a6fdf362ffefb9dc3c000000000000000000000000000000000000000000000000000000006d0db17b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000041b48db75bb370f6e497d61a0550a31d1a6666a4ccc9fb95bd283acb4badc50da7015043af919b59bd07d0a980621e402fa10a59c62b568073e8bd500b356a13af1b00000000000000000000000000000000000000000000000000000000000000",
    "details": {
      "recipientWalletAddress": "0xff90C06e1fA92A9B7Dd95E7FBA9F7FC4d518058d",
      "networkId": "eip155:8453",
      "tokenAddress": "",
      "amount": "10000"
    }
  }'

Fetched

{
  "status": "success",
  "data": {
    "details": {
      "estimation": {
        "amount": "1"
      },
      "fees": {
        "transactionFees": {
          "eip155:8453": "string"
        },
        "approxTransactionFeesInUSDT": "string"
      }
    },
    "callData": {
      "intentType": "TOKEN_TRANSFER",
      "jobId": "0a043a1a-5157-483a-b2b6-8f124c9d0455",
      "vendorId": "0x6b6Fad2600Bc57075ee560A6fdF362FfefB9dC3C",
      "creatorId": "0xE14A85291F6A8DE60dC06b2dD373DfFDa779AF8D",
      "policies": {
        "isGsnEnabled": false,
        "isSponsorshipEnabled": false
      },
      "gsn": {
        "isPossible": false,
        "isRequired": false,
        "requiredNetworks": [
          null
        ],
        "tokens": [
          null
        ]
      },
      "payload": {
        "amount": "1",
        "networkId": "eip155:137",
        "recipientWalletAddress": "0x15000a9E47E8527a7C4A02189e581F4D0Df589C3",
        "tokenAddress": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f"
      }
    },
    "userOps": {
      "sender": "0xe14a85291f6a8de60dc06b2dd373dffda779af8d",
      "nonce": "0x000000000000000000000000000000000a043a1a5157483ab2b68f124c9d0455",
      "callData": "0x8dd7712f00000000000000000000000000000000000000000000000000000000000000000000000000000000ed8fe2543efff64fc3567b03b612aa82c409579a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000004248fa61ac0000000000000000000000000000000000a043a1a5157483ab2b68f124c9d04550000000000000000000000006b6fad2600bc57075ee560a6fdf362ffefb9dc3c000000000000000000000000e14a85291f6a8de60dc06b2dd373dffda779af8d00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000003e000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000a6569703135353a31333700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783135303030613945343745383532376137433441303231383965353831463444304466353839433300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30786332313332643035643331633931346138376336363131633130373438616562303462353865386600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e544f4b454e5f5452414e5346455200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "callGasLimit": "0x484f6",
      "verificationGasLimit": "0x16c6c",
      "preVerificationGas": "0x15500",
      "maxFeePerGas": "0xBA43B7400",
      "maxPriorityFeePerGas": "0xBA43B7400",
      "paymaster": "0x9b34131837d534cd199c0b8fdd8347c05e21a2d8",
      "paymasterVerificationGasLimit": "0x5489",
      "paymasterPostOpGasLimit": "0x1",
      "paymasterData": "0x0000000000000000000000006b6fad2600bc57075ee560a6fdf362ffefb9dc3c000000000000000000000000000000000000000000000000000000006d0db17b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000041d729196c70661de6ec5eaa983a49f24e65f74da18bf7e0459b43b592e4450b533fbb56823fea5411779ae05c0e2f92d8805c8f13927da42cdfc54bf387513ed61c00000000000000000000000000000000000000000000000000000000000000"
    }
  }
}