Suggest gas
get
Suggests the gas price for a given account and chain ID.
Authorizations
AuthorizationstringRequired
Path parameters
accountNamestringRequired
- The name of the account for which to suggest the gas price.
Query parameters
chainIdstringRequired
- The ID of the blockchain network.
Header parameters
AuthorizationstringRequired
- The authorization token.
Responses
200
A promise that resolves to a TransactionAPIResponse object containing the suggested gas price.
application/json
Interface representing the response from the Transaction API. Extends the BaseAPIResponse interface.
successbooleanRequired
The success status of the operation.
messagestringRequired
The message associated with the operation.
addressstringOptional
The address associated with the operation.
transaction_hashanyOptional
The hash of the transaction.
signedTxanyOptional
The signed transaction data.
transactionanyOptional
Additional transaction information.
functionstringOptional
The function name associated with the transaction.
get/accounts/{accountName}/suggest-gas
GET /accounts/{accountName}/suggest-gas?chainId=text HTTP/1.1
Host: beta.usemoon.ai/
Authorization: text
Accept: */*
200
A promise that resolves to a TransactionAPIResponse object containing the suggested gas price.
{
"success": true,
"message": "text",
"body": {
"to": "text",
"data": "text",
"value": "text",
"gasLimit": "text",
"nonce": "text",
"simulate": true,
"gas": "text",
"gasPrice": "text",
"maxFeePerGas": "text",
"maxPriorityFeePerGas": "text",
"chain_id": "text",
"encoding": "text",
"type": 1,
"accessList": [
{
"address": "text",
"storageKeys": [
"text"
]
}
],
"blobGas": "text",
"blobGasFeeCap": "text",
"blobHashes": [
"text"
],
"dryrun": true,
"input": "text",
"EOA": true,
"contract_address": "text",
"token_id": "text",
"token_ids": "text",
"approved": true,
"broadcast": true,
"alwaysIncrementNonce": true,
"asset": "text",
"amount": "text",
"interestRateMode": 1,
"referralCode": 1,
"onBehalfOf": "text",
"receiverAddress": "text",
"assets": [
"text"
],
"amounts": [
"text"
],
"modes": [
1
],
"params": "text",
"rateMode": 1,
"useAsCollateral": true,
"collateralAsset": "text",
"debtAsset": "text",
"user": "text",
"debtToCover": "text",
"receiveAToken": true,
"inputTokens": [
{
"tokenAddress": "text",
"amount": "text"
}
],
"outputTokens": [
{
"tokenAddress": "text",
"proportion": 1
}
],
"slippageLimitPercent": 1,
"minHealthFactor": "text",
"premiums": [
"text"
],
"initiator": "text",
"role": "text",
"account": "text",
"initialDeposit": "text",
"borrowAmount": "text"
},
"address": "text",
"transaction_hash": null,
"signedTx": null,
"data": {
"simulation": {
"changes": [
{
"assetType": "NATIVE",
"changeType": "APPROVE",
"from": "text",
"to": "text",
"rawAmount": "text",
"amount": "text",
"name": "text",
"symbol": "text",
"decimals": 1,
"contractAddress": "text",
"logo": "text",
"tokenId": "text"
}
],
"gasUsed": "text",
"error": {
"message": "text"
}
},
"transaction_hash": "text",
"signed_transaction": "text",
"raw_transaction": "text",
"data": "text",
"transactions": [
{
"moon_scan_url": "text",
"transaction_hash": "text",
"signed_transaction": "text",
"signed_message": "text",
"raw_transaction": "text",
"signature": "text",
"transaction": {
"type": 1,
"chain_id": 1,
"data": "text",
"gas": "text",
"gas_price": "text",
"gas_tip_cap": "text",
"gas_fee_cap": "text",
"value": "text",
"nonce": 1,
"from": "text",
"to": "text",
"blob_gas": "text",
"blob_gas_fee_cap": "text",
"blob_hashes": [
"text"
],
"v": "text",
"r": "text",
"s": "text"
},
"userOps": [
{
"nonce": "text",
"data": "text",
"value": "text",
"to": "text",
"from": "text",
"maxFeePerGas": "text",
"maxPriorityFeePerGas": "text"
}
],
"userop_transaction": "text"
}
],
"moon_scan_url": "text",
"signature": "text",
"transaction": {
"type": 1,
"chain_id": 1,
"data": "text",
"gas": "text",
"gas_price": "text",
"gas_tip_cap": "text",
"gas_fee_cap": "text",
"value": "text",
"nonce": 1,
"from": "text",
"to": "text",
"blob_gas": "text",
"blob_gas_fee_cap": "text",
"blob_hashes": [
"text"
],
"v": "text",
"r": "text",
"s": "text"
},
"userOps": [
{
"nonce": "text",
"data": "text",
"value": "text",
"to": "text",
"from": "text",
"maxFeePerGas": "text",
"maxPriorityFeePerGas": "text"
}
],
"userop_transaction": "text",
"user_op": "text",
"success": true,
"message": "text",
"broadcasted": {
"success": true,
"message": "text",
"data": "text"
}
},
"broadcasted": {
"success": true,
"message": "text",
"data": "text"
},
"transaction": null,
"function": "text",
"params": []
}