/wallet/getnowblock REST API Endpoint
參數
此方法不接受任何參數
退貨
blockID
載入中...
block_header
載入中...
raw_data
載入中...
數字
載入中...
txTrieRoot
載入中...
witness_address
載入中...
parentHash
載入中...
accountStateRoot
載入中...
witness_id
載入中...
版本
載入中...
時間戳記
載入中...
witness_signature
載入中...
請求
1curl https://docs-demo.tron-mainnet.quiknode.pro/wallet/getnowblock \2--request POST \3--header 'accept: application/json'
1curl https://docs-demo.tron-mainnet.quiknode.pro/wallet/getnowblock \2--request POST \3--header 'accept: application/json'
1const url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/getnowblock';2const 標頭 = {3'Accept': 'application/json'4};56取得(url, {7方法: 'POST',8headers: headers9})10.接著(回應 => response.json())11.接著(結果 => {12控制台.日誌(結果);13})14.catchcatch(錯誤 => {15控制台.錯誤(錯誤);16});17
1const url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/getnowblock';2const 標頭 = {3'Accept': 'application/json'4};56取得(url, {7方法: 'POST',8headers: headers9})10.接著(回應 => response.json())11.接著(結果 => {12控制台.日誌(結果);13})14.catchcatch(錯誤 => {15控制台.錯誤(錯誤);16});17
1匯入 請求23url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/getnowblock'45標題 = {6'accept': 'application/json'7}89response = requests.post(url, headers=headers)1011if response.status_code == 200:12print(response.json())13else:14print("Request failed with status code:", response.status_code)15
1匯入 請求23url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/getnowblock'45標題 = {6'accept': 'application/json'7}89response = requests.post(url, headers=headers)1011if response.status_code == 200:12print(response.json())13else:14print("Request failed with status code:", response.status_code)15
1需要 'net/http'2require 'json'3需要 'uri'45url = URI('https://docs-demo.tron-mainnet.quiknode.pro/wallet/getnowblock')67http = Net::HTTP.new(url.host, url.port)8http.use_ssl = true910標題 = {11'Accept' => 'application/json'12}1314請求 = 淨::HTTP::POST.new(網址)15headers.each { |key, value| request[key] = value }1617回應 = http.請求(請求)1819if response.code.to_i == 20020result = JSON.parse(response.body)21puts result22else23puts "Request failed with status code: #{response.code}"24結束25
1需要 'net/http'2require 'json'3需要 'uri'45url = URI('https://docs-demo.tron-mainnet.quiknode.pro/wallet/getnowblock')67http = Net::HTTP.new(url.host, url.port)8http.use_ssl = true910標題 = {11'Accept' => 'application/json'12}1314請求 = 淨::HTTP::POST.new(網址)15headers.each { |key, value| request[key] = value }1617回應 = http.請求(請求)1819if response.code.to_i == 20020result = JSON.parse(response.body)21puts result22else23puts "Request failed with status code: #{response.code}"24結束25