/walletsolidity/getblockbylatestnum REST API Endpoint
身體參數
num
整數
必填
載入中...
退貨
區塊
載入中...
blockID
載入中...
block_header
載入中...
raw_data
載入中...
數字
載入中...
txTrieRoot
載入中...
witness_address
載入中...
parentHash
載入中...
accountStateRoot
載入中...
witness_id
載入中...
版本
載入中...
時間戳記
載入中...
witness_signature
載入中...
交易
載入中...
ret
載入中...
contractRet
載入中...
簽名
載入中...
txID
載入中...
raw_data
載入中...
合約
載入中...
parameter
載入中...
值
載入中...
金額
載入中...
owner_address
載入中...
to_address
載入中...
type_url
載入中...
類型
載入中...
ref_block_bytes
載入中...
ref_block_hash
載入中...
expiration
載入中...
fee_limit
載入中...
時間戳記
載入中...
raw_data_hex
載入中...
請求
1curl https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbylatestnum \2--header 'accept: application/json' \3--header 'content-type: application/json' \4--data '5{6"num": 57}8'
1curl https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbylatestnum \2--header 'accept: application/json' \3--header 'content-type: application/json' \4--data '5{6"num": 57}8'
1fetch('https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbylatestnum', {2方法: 'POST',3headers: {4「接受」: 'application/json',5「Content-Type」: 'application/json'6},7body: JSON.stringify({8num: 59})10})11.接著(回應 => response.json())12.then(data => {13// Handle the response data14console.log(data);15})16.catchcatch(錯誤 => {17// Handle any errors18控制台.錯誤(錯誤);19});20
1fetch('https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbylatestnum', {2方法: 'POST',3headers: {4「接受」: 'application/json',5「Content-Type」: 'application/json'6},7body: JSON.stringify({8num: 59})10})11.接著(回應 => response.json())12.then(data => {13// Handle the response data14console.log(data);15})16.catchcatch(錯誤 => {17// Handle any errors18控制台.錯誤(錯誤);19});20
1匯入 請求2import json34url = 'https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbylatestnum'5標題 = {6「接受」: 'application/json',7「Content-Type」: 'application/json'8}9資料 = {10'num': 511}1213回應 = 請求.POST(url, 標頭=headers, data=json.dumps(data))14if response.status_code == 200:15result = response.json()16# Handle the response data17print(result)18else:19# Handle any errors20print('Request failed with status code', response.status_code)21print(response.text)22
1匯入 請求2import json34url = 'https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbylatestnum'5標題 = {6「接受」: 'application/json',7「Content-Type」: 'application/json'8}9資料 = {10'num': 511}1213回應 = 請求.POST(url, 標頭=headers, data=json.dumps(data))14if response.status_code == 200:15result = response.json()16# Handle the response data17print(result)18else:19# Handle any errors20print('Request failed with status code', response.status_code)21print(response.text)22
1需要 'net/http'2require 'json'3需要 'uri'45url = URI.parse('https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbylatestnum')6http = Net::HTTP.new(url.host, url.port)78request = Net::HTTP::Post.new(url.path, { 'Content-Type' => 'application/json', 'Accept' => 'application/json' })9request.body = { num: 5 }.to_json1011回應 = http.請求(請求)1213if response.code.to_i == 20014result = JSON.parse(response.body)15# Handle the response data16puts result17else18# Handle any errors19puts 'Request failed with status code ' + response.code20puts response.body21結束22
1需要 'net/http'2require 'json'3需要 'uri'45url = URI.parse('https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbylatestnum')6http = Net::HTTP.new(url.host, url.port)78request = Net::HTTP::Post.new(url.path, { 'Content-Type' => 'application/json', 'Accept' => 'application/json' })9request.body = { num: 5 }.to_json1011回應 = http.請求(請求)1213if response.code.to_i == 20014result = JSON.parse(response.body)15# Handle the response data16puts result17else18# Handle any errors19puts 'Request failed with status code ' + response.code20puts response.body21結束22