/wallet/getblockbalance REST API Endpoint
身體參數
hash
字串
必填
載入中...
數字
整數
必填
載入中...
visible
布林值
載入中...
退貨
時間戳記
載入中...
block_identifier
載入中...
hash
載入中...
數字
載入中...
transaction_balance_trace
載入中...
transaction_identifier
載入中...
operation
載入中...
類型
載入中...
狀態
載入中...
請求
1curl https://docs-demo.tron-mainnet.quiknode.pro/wallet/getblockbalance \2--header 'accept: application/json' \3--header 'content-type: application/json' \4--data '5{6"hash": "BLOCK_HASH",7"number": BLOCK_NUMBER,8"visible": true9}10'
1curl https://docs-demo.tron-mainnet.quiknode.pro/wallet/getblockbalance \2--header 'accept: application/json' \3--header 'content-type: application/json' \4--data '5{6"hash": "BLOCK_HASH",7"number": BLOCK_NUMBER,8"visible": true9}10'
1const url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/getblockbalance';2const 標頭 = {3「接受」: 'application/json',4「Content-Type」: 'application/json'5};67const data = {8hash: 'BLOCK_HASH',9number: BLOCK_NUMBER,10visible: true11};1213取得(url, {14方法: 'POST',15標題: 標頭:,16body: JSON.stringify(data)17})18.接著(回應 => response.json())19.接著(結果 => {20控制台.日誌(結果);21})22.catchcatch(錯誤 => {23控制台.錯誤(錯誤);24});25
1const url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/getblockbalance';2const 標頭 = {3「接受」: 'application/json',4「Content-Type」: 'application/json'5};67const data = {8hash: 'BLOCK_HASH',9number: BLOCK_NUMBER,10visible: true11};1213取得(url, {14方法: 'POST',15標題: 標頭:,16body: JSON.stringify(data)17})18.接著(回應 => response.json())19.接著(結果 => {20控制台.日誌(結果);21})22.catchcatch(錯誤 => {23控制台.錯誤(錯誤);24});25
1匯入 請求23url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/getblockbalance'45標題 = {6「接受」: 'application/json',7'content-type': 'application/json'8}910資料 = {11'hash': 'BLOCK_HASH',12'number': BLOCK_NUMBER,13'visible': True14}1516response = requests.post(url, json=data, headers=headers)1718if response.status_code == 200:19print(response.json())20else:21print('Request failed with status code:', response.status_code)22
1匯入 請求23url = 'https://docs-demo.tron-mainnet.quiknode.pro/wallet/getblockbalance'45標題 = {6「接受」: 'application/json',7'content-type': 'application/json'8}910資料 = {11'hash': 'BLOCK_HASH',12'number': BLOCK_NUMBER,13'visible': True14}1516response = requests.post(url, json=data, headers=headers)1718if response.status_code == 200:19print(response.json())20else:21print('Request failed with status code:', response.status_code)22
1需要 'net/http'2require 'json'3需要 'uri'45url = URI('https://docs-demo.tron-mainnet.quiknode.pro/wallet/getblockbalance')67http = Net::HTTP.new(url.host, url.port)8http.use_ssl = true910標題 = {11'Accept' => 'application/json',12'Content-Type' => 'application/json'13}1415資料 = {16'hash' => 'BLOCK_HASH',17'number' => BLOCK_NUMBER,18'visible' => true19}2021請求 = 淨::HTTP::POST.new(網址)22請求。正文 = data.to_json23headers.each { |key, value| request[key] = value }2425回應 = http.請求(請求)2627if response.code.to_i == 20028result = JSON.parse(response.body)29puts result30else31puts "Request failed with status code: #{response.code}"32結束33
1需要 'net/http'2require 'json'3需要 'uri'45url = URI('https://docs-demo.tron-mainnet.quiknode.pro/wallet/getblockbalance')67http = Net::HTTP.new(url.host, url.port)8http.use_ssl = true910標題 = {11'Accept' => 'application/json',12'Content-Type' => 'application/json'13}1415資料 = {16'hash' => 'BLOCK_HASH',17'number' => BLOCK_NUMBER,18'visible' => true19}2021請求 = 淨::HTTP::POST.new(網址)22請求。正文 = data.to_json23headers.each { |key, value| request[key] = value }2425回應 = http.請求(請求)2627if response.code.to_i == 20028result = JSON.parse(response.body)29puts result30else31puts "Request failed with status code: #{response.code}"32結束33