Arka API calls
pm_getERC20TokenQuotes
Arka Paymaster
- Introduction to Arka
- Deposit to Arka
- Sponsor A Transaction
- Pay for gas with ERC20 tokens
- Arka testnet Usage
- Arka API calls
- POSTpm_getERC20TokenQuotes
- POSTpm_sponsorUserOperation
- POST/checkWhitelist
- POST/checkWhitelist/v2
- POST/whitelist
- POST/whitelist/v2
- POST/removeWhitelist
- POST/removeWhitelist/v2
- POST/deposit
- POST/deposit/v2
- POST/pimlicoAddress
- POST/getAllWhitelist/v2
- GET/metadata
- POST/add-policy
- DEL/delete-policy/{id}
- PUT/update-policy
- PUT/enable-policy/{id}
- PUT/disable-policy/{id}
- GET/policy
- GET/policy/{id}
- GET/policy/wallet-address/{walletAddress}
- GET/policy/wallet-address/{walletAddress}/ep-version/{epVersion}
- GET/policy/wallet-address/{walletAddress}/ep-version/{epVersion}/chain-id/{chainId}
- GET/policy/wallet-address/{walletAddress}/latest
- GET/policy/wallet-address/{walletAddress}/ep-version/{epVersion}/latest
- GET/policy/wallet-address/{walletAddress}/chain-id/{chainId}/latest
- GET/policy/wallet-address/{walletAddress}/ep-version/{epVersion}/chain-id/{chainId}/latest
- POST
Arka API calls
pm_getERC20TokenQuotes
get token exchange quotes
POST
/
apiKey
string
apiKey
string
Arka API key
chainId
string
chainId
string
Chain ID
object
*
jsonrpc
enum<string>
*
jsonrpc
Required
enum<string>
method
enum<string>
*
method
Required
enum<string>
params
array
*
params
Required
array
id
integer
*
id
Required
integer
Example values you use to demo the API:
{
"jsonrpc": "2.0",
"method": "pm_getERC20TokenQuotes",
"params": [
{
"sender": "0xB3aF6CFDDc444B948132753AD8214a20605692eF",
"nonce": "0x6",
"initCode": "0x",
"callData": "0x47e1da2a000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000080a1874e1046b1cc5defdf4d3153838b72ff94ac0000000000000000000000000fd9e8d3af1aaee056eb9e802c3a762a667b1904000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000005af3107a4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044095ea7b3000000000000000000000000386ed13ba07e1c409693b299bbb9839d05af20c3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000",
"callGasLimit": "0x88b8",
"verificationGasLimit": "0x186a0",
"maxFeePerGas": "0x8dcac078f",
"maxPriorityFeePerGas": "0x8dcac078f",
"paymasterAndData": "0x0101010101010101010101010101010101010101000000000000000000000000000000000000000000000000000001010101010100000000000000000000000000000000000000000000000000000000000000000101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101",
"signature": "0x",
"preVerificationGas": "0xcb78"
},
"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
[{ token: "0x0Fd9e8d3aF1aaee056EB9e802c3A762a667b1904" }]
],
"id": 1
}
Example response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
etherUSDExchangeRate: "0x1e"
paymasterAddress: "0x386eD13Ba07E1C409693b299BbB9839d05aF20c3"
gasEstimates: {
"preVerificationGas": "0xc01c",
"verificationGasLimit": "0xf4f1",
"callGasLimit": "0x15971"
}
feeEstimates: {
"maxFeePerGas": "0x8dcac078f",
"maxPriorityFeePerGas": "0x8dcac078f"
}
quotes: [
{
"token": "0x0Fd9e8d3aF1aaee056EB9e802c3A762a667b1904",
"symbol": "LINK",
"decimals": 18,
"etherTokenExchangeRate": "0x01a055690d9db80000",
"serviceFeePercent": 15
}
]
unsupportedTokens: []
}
}
Body
application/json
Available options:
2.0
Available options:
pm_getERC20TokenQuotes