/walletsolidity/getblockbynum REST API Endpoint
신체 측정값
num
정수
필수
로딩 중...
반품
blockID
로딩 중...
원시 데이터
로딩 중...
숫자
로딩 중...
txTrieRoot
로딩 중...
witness_address
로딩 중...
parentHash
로딩 중...
accountStateRoot
로딩 중...
witness_id
로딩 중...
버전
로딩 중...
타임스탬프
로딩 중...
witness_signature
로딩 중...
요청
1curl https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbynum \2--header 'accept: application/json' \3--헤더 'content-type: application/json' \4--데이터 '5{6"num": 2007}8'
1curl https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbynum \2--header 'accept: application/json' \3--헤더 'content-type: application/json' \4--데이터 '5{6"num": 2007}8'
1fetch('https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbynum', {2메서드: 'POST',3headers: {4'수락': 'application/json',5'Content-Type': 'application/json'6},7body: JSON.stringify({8num: 2009})10})11.그런 다음(응답 => 응답.json())12.그런 다음(데이터 => {13// Handle the response data14콘솔.log(데이터);15})16.catchcatch (오류 => {17// Handle any errors18콘솔.오류(오류);19});20
1fetch('https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbynum', {2메서드: 'POST',3headers: {4'수락': 'application/json',5'Content-Type': 'application/json'6},7body: JSON.stringify({8num: 2009})10})11.그런 다음(응답 => 응답.json())12.그런 다음(데이터 => {13// Handle the response data14콘솔.log(데이터);15})16.catchcatch (오류 => {17// Handle any errors18콘솔.오류(오류);19});20
1import 요청2import json34url = 'https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbynum'5헤더 = {6'수락': 'application/json',7'Content-Type': 'application/json'8}9데이터 = {10'num': 20011}1213response = requests.post(url, headers=headers, data=json.dumps(data))14만약 응답.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
1import 요청2import json34url = 'https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbynum'5헤더 = {6'수락': 'application/json',7'Content-Type': 'application/json'8}9데이터 = {10'num': 20011}1213response = requests.post(url, headers=headers, data=json.dumps(data))14만약 응답.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
1require 'net/http'2require 'json'3필수 'uri'45url = URI.parse('https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbynum')6http = Net::HTTP.new(url.호스트, url.포트)78request = Net::HTTP::Post.new(url.path, { 'Content-Type' => 'application/json', 'Accept' => 'application/json' })9request.body = { num: 200 }.to_json1011답변 = http.요청(요청)1213만약 응답.코드.to_i == 20014결과 = JSON.parse(response.body)15# Handle the response data16결과를 출력합니다17else18# Handle any errors19puts 'Request failed with status code ' + response.code20puts response.body21끝22
1require 'net/http'2require 'json'3필수 'uri'45url = URI.parse('https://docs-demo.tron-mainnet.quiknode.pro/walletsolidity/getblockbynum')6http = Net::HTTP.new(url.호스트, url.포트)78request = Net::HTTP::Post.new(url.path, { 'Content-Type' => 'application/json', 'Accept' => 'application/json' })9request.body = { num: 200 }.to_json1011답변 = http.요청(요청)1213만약 응답.코드.to_i == 20014결과 = JSON.parse(response.body)15# Handle the response data16결과를 출력합니다17else18# Handle any errors19puts 'Request failed with status code ' + response.code20puts response.body21끝22