Developer's Hub
v1.0
API Reference
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
GetEstimatedFee()
Copy Markdown
Open in ChatGPT
Open in Claude
Summary
Route | Type | Example |
|---|---|---|
Monitor/GetEstimatedFee | POST | http://apinode.credits.com/api/monitor/getestimatedfee |
Description
Get transaction fee.
Request
Request Structure
{
// Parameters common for all requests
// Wallet address
"transactionSize": <size>,
"trType": a // (a = 0 - normal, 1 - token transfer, 2 - contract deploy, 3 - contract execute)
}
Request Parameters
int: transactionSize - Transaction size in bytes
int: trType- Transaction type. 0 - normal, 1 - token transfer, 2 - contract deploy, 3 - contract execute
Response
JSON output depends on the request type and its success.
If there’s an error, request returns to the node basic Result:
Success: False
Message:
If successful, requested information is returned.
Response Structure
{
"fee": decimal, // amount of fee
"success":bool, // Shows if request was Succes or False Boolean Value
"message":"String" // Shows if a problem occurred with request in String Value
}
Example Code
import requests
import json
def gettransactioninfo():
url = 'http://apinode.credits.com/api/monitor/getgetestimatedfee'
headers = {
'Content-type': 'application/json'
, 'Accept': 'application/json'
, 'Content-Encoding': 'utf-8'
}
data = {
#transaction size 500 bytes
"transactionSize":500",
#transaction type 1 - token transfer
"trType": 1 #
}
answer = requests.post(url, data=json.dumps(data), headers=headers)
response = answer.json()
print(response)
gettransactioninfo()
Last updated on
Next to read:
GetContractByAddress()null
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message