/v1/transactions/batch REST API Endpoint
身體參數
寄件人
字串
必填
載入中...
sequence_number
字串
必填
載入中...
max_gas_amount
字串
必填
載入中...
gas_unit_price
字串
必填
載入中...
expiration_timestamp_secs
字串
必填
載入中...
payload
物件
必填
載入中...
類型
字串
載入中...
function
字串
載入中...
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--標頭 '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--標頭 '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.接著(回應 => response.json())32.then(data => {33console.log('Response:', data);34})35.catchcatch(錯誤 => {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.接著(回應 => response.json())32.then(data => {33console.log('Response:', data);34})35.catchcatch(錯誤 => {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
1需要 '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
1需要 '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