/v1/transactions/batch REST API Endpoint
身体参数
sender
字符串
必填
正在加载...
sequence_number
字符串
必填
正在加载...
max_gas_amount
字符串
必填
正在加载...
gas_unit_price
字符串
必填
正在加载...
expiration_timestamp_secs
字符串
必填
正在加载...
有效载荷
对象
必填
正在加载...
类型
字符串
正在加载...
函数
字符串
正在加载...
type_arguments
数组
正在加载...
arguments
数组
正在加载...
签名
对象
必填
正在加载...
类型
字符串
正在加载...
公钥
字符串
正在加载...
签名
字符串
正在加载...
退货
transaction_failures
正在加载...
错误
正在加载...
消息
正在加载...
error_code
正在加载...
vm_error_code
正在加载...
transaction_index
正在加载...
请求
1curl --request POST \2--url https://docs-demo.aptos-mainnet.quiknode.pro/v1/transactions/batch \3--header 'Accept: application/json, application/x-bcs' \4--header 'Content-Type: application/json' \5--data '[6{7"sender": "SENDER_ADDRESS",8"sequence_number": "SEQUENCE_NUMBER",9"max_gas_amount": "MAX_GAS_AMOUNT",10"gas_unit_price": "GAS_UNIT_PRICE",11"expiration_timestamp_secs": "EXPIRATION_TIMESTAMP_SECS",12"payload": {13"type": "PAYLOAD_TYPE",14"function": "FUNCTION",15"type_arguments": [16"string"17],18"arguments": [19null20]21},22"signature": {23"type": "SIGNATURE_TYPE",24"public_key": "PUBLIC_KEY",25"signature": "SIGNATURE"26}27}28]'
1curl --request POST \2--url https://docs-demo.aptos-mainnet.quiknode.pro/v1/transactions/batch \3--header 'Accept: application/json, application/x-bcs' \4--header 'Content-Type: application/json' \5--data '[6{7"sender": "SENDER_ADDRESS",8"sequence_number": "SEQUENCE_NUMBER",9"max_gas_amount": "MAX_GAS_AMOUNT",10"gas_unit_price": "GAS_UNIT_PRICE",11"expiration_timestamp_secs": "EXPIRATION_TIMESTAMP_SECS",12"payload": {13"type": "PAYLOAD_TYPE",14"function": "FUNCTION",15"type_arguments": [16"string"17],18"arguments": [19null20]21},22"signature": {23"type": "SIGNATURE_TYPE",24"public_key": "PUBLIC_KEY",25"signature": "SIGNATURE"26}27}28]'
1const userUrl = 'https://docs-demo.aptos-mainnet.quiknode.pro/v1/transactions/batch';2const requestData = [3{4sender: 'SENDER_ADDRESS',5sequence_number: 'SEQUENCE_NUMBER',6max_gas_amount: 'MAX_GAS_AMOUNT',7gas_unit_price: 'GAS_UNIT_PRICE',8expiration_timestamp_secs: 'EXPIRATION_TIMESTAMP_SECS',9payload: {10type: 'PAYLOAD_TYPE',11function: 'FUNCTION',12type_arguments: ['string'],13arguments: [null]14},15signature: {16type: 'SIGNATURE_TYPE',17public_key: 'PUBLIC_KEY',18signature: 'SIGNATURE'19}20}21];2223fetch(userUrl, {24方法: 'POST',25headers: {26'Accept': 'application/json, application/x-bcs',27“Content-Type”: 'application/json'28},29body: JSON.stringify(requestData)30})31.然后(响应 => 响应.json())32.then(data => {33console.log('Response:', data);34})35.catch(error => {36console.error('Error:', error);37});38
1const userUrl = 'https://docs-demo.aptos-mainnet.quiknode.pro/v1/transactions/batch';2const requestData = [3{4sender: 'SENDER_ADDRESS',5sequence_number: 'SEQUENCE_NUMBER',6max_gas_amount: 'MAX_GAS_AMOUNT',7gas_unit_price: 'GAS_UNIT_PRICE',8expiration_timestamp_secs: 'EXPIRATION_TIMESTAMP_SECS',9payload: {10type: 'PAYLOAD_TYPE',11function: 'FUNCTION',12type_arguments: ['string'],13arguments: [null]14},15signature: {16type: 'SIGNATURE_TYPE',17public_key: 'PUBLIC_KEY',18signature: 'SIGNATURE'19}20}21];2223fetch(userUrl, {24方法: 'POST',25headers: {26'Accept': 'application/json, application/x-bcs',27“Content-Type”: 'application/json'28},29body: JSON.stringify(requestData)30})31.然后(响应 => 响应.json())32.then(data => {33console.log('Response:', data);34})35.catch(error => {36console.error('Error:', error);37});38
1导入 请求2import json34url = 'https://docs-demo.aptos-mainnet.quiknode.pro/v1/transactions/batch'56标题 = {7'Accept': 'application/json, application/x-bcs',8“Content-Type”: 'application/json'9}1011data = [12{13"sender": "SENDER_ADDRESS",14"sequence_number": "SEQUENCE_NUMBER",15"max_gas_amount": "MAX_GAS_AMOUNT",16"gas_unit_price": "GAS_UNIT_PRICE",17"expiration_timestamp_secs": "EXPIRATION_TIMESTAMP_SECS",18"payload": {19"type": "PAYLOAD_TYPE",20"function": "FUNCTION",21"type_arguments": [22"string"23],24"arguments": [25无26]27},28"signature": {29"type": "SIGNATURE_TYPE",30"public_key": "PUBLIC_KEY",31"signature": "SIGNATURE"32}33}34]3536response = requests.post(url, headers=headers, json=data)37print(response.json())38
1导入 请求2import json34url = 'https://docs-demo.aptos-mainnet.quiknode.pro/v1/transactions/batch'56标题 = {7'Accept': 'application/json, application/x-bcs',8“Content-Type”: 'application/json'9}1011data = [12{13"sender": "SENDER_ADDRESS",14"sequence_number": "SEQUENCE_NUMBER",15"max_gas_amount": "MAX_GAS_AMOUNT",16"gas_unit_price": "GAS_UNIT_PRICE",17"expiration_timestamp_secs": "EXPIRATION_TIMESTAMP_SECS",18"payload": {19"type": "PAYLOAD_TYPE",20"function": "FUNCTION",21"type_arguments": [22"string"23],24"arguments": [25无26]27},28"signature": {29"type": "SIGNATURE_TYPE",30"public_key": "PUBLIC_KEY",31"signature": "SIGNATURE"32}33}34]3536response = requests.post(url, headers=headers, json=data)37print(response.json())38
1require 'net/http'2require 'json'34url = URI.parse('https://docs-demo.aptos-mainnet.quiknode.pro/v1/transactions/batch')5http = Net::HTTP.new(url.host, url.port)6http.use_ssl = true78标题 = {9'Accept' => 'application/json, application/x-bcs',10'Content-Type' => 'application/json'11}1213data = [14{15"sender" => "SENDER_ADDRESS",16"sequence_number" => "SEQUENCE_NUMBER",17"max_gas_amount" => "MAX_GAS_AMOUNT",18"gas_unit_price" => "GAS_UNIT_PRICE",19"expiration_timestamp_secs" => "EXPIRATION_TIMESTAMP_SECS",20"payload" => {21"type" => "PAYLOAD_TYPE",22"function" => "FUNCTION",23"type_arguments" => [24"string"25],26"arguments" => [27nil28]29},30"signature" => {31"type" => "SIGNATURE_TYPE",32"public_key" => "PUBLIC_KEY",33"signature" => "SIGNATURE"34}35}36]3738request = Net::HTTP::Post.new(url.path, headers)39请求.请求体 = data.to_json4041回复 = http.请求(请求)42返回响应.正文43
1require 'net/http'2require 'json'34url = URI.parse('https://docs-demo.aptos-mainnet.quiknode.pro/v1/transactions/batch')5http = Net::HTTP.new(url.host, url.port)6http.use_ssl = true78标题 = {9'Accept' => 'application/json, application/x-bcs',10'Content-Type' => 'application/json'11}1213data = [14{15"sender" => "SENDER_ADDRESS",16"sequence_number" => "SEQUENCE_NUMBER",17"max_gas_amount" => "MAX_GAS_AMOUNT",18"gas_unit_price" => "GAS_UNIT_PRICE",19"expiration_timestamp_secs" => "EXPIRATION_TIMESTAMP_SECS",20"payload" => {21"type" => "PAYLOAD_TYPE",22"function" => "FUNCTION",23"type_arguments" => [24"string"25],26"arguments" => [27nil28]29},30"signature" => {31"type" => "SIGNATURE_TYPE",32"public_key" => "PUBLIC_KEY",33"signature" => "SIGNATURE"34}35}36]3738request = Net::HTTP::Post.new(url.path, headers)39请求.请求体 = data.to_json4041回复 = http.请求(请求)42返回响应.正文43