/v1/transactions/batch REST API Endpoint
Paramètres du corps
expéditeur
chaîne de caractères
OBLIGATOIRE
Chargement...
sequence_number
chaîne de caractères
OBLIGATOIRE
Chargement...
max_gas_amount
chaîne de caractères
OBLIGATOIRE
Chargement...
gas_unit_price
chaîne de caractères
OBLIGATOIRE
Chargement...
expiration_timestamp_secs
chaîne de caractères
OBLIGATOIRE
Chargement...
charge utile
objet
OBLIGATOIRE
Chargement...
type
chaîne de caractères
Chargement...
fonction
chaîne de caractères
Chargement...
type_arguments
tableau
Chargement...
arguments
tableau
Chargement...
signature
objet
OBLIGATOIRE
Chargement...
type
chaîne de caractères
Chargement...
clé_publique
chaîne de caractères
Chargement...
signature
chaîne de caractères
Chargement...
Renvoie
transaction_failures
Chargement...
erreur
Chargement...
Message
Chargement...
error_code
Chargement...
vm_error_code
Chargement...
transaction_index
Chargement...
Requête
1curl --request POST \2--url https://docs-demo.aptos-mainnet.quiknode.pro/v1/transactions/batch \3--header 'Accept: application/json, application/x-bcs' \4--en-tête '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--en-tête '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, {24method: 'POST',25headers: {26'Accept': 'application/json, application/x-bcs',27« Content-Type »: 'application/json'28},29body: JSON.stringify(requestData)30})31.then(response => response.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, {24method: 'POST',25headers: {26'Accept': 'application/json, application/x-bcs',27« Content-Type »: 'application/json'28},29body: JSON.stringify(requestData)30})31.then(response => response.json())32.then(data => {33console.log('Response:', data);34})35.catch(error => {36console.error('Error:', error);37});38
1import requests2import json34url = 'https://docs-demo.aptos-mainnet.quiknode.pro/v1/transactions/batch'56headers = {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": [25Aucun26]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
1import requests2import json34url = 'https://docs-demo.aptos-mainnet.quiknode.pro/v1/transactions/batch'56headers = {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": [25Aucun26]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 = true78headers = {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)39request.body = data.to_json4041response = http.request(request)42puts response.body43
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 = true78headers = {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)39request.body = data.to_json4041response = http.request(request)42puts response.body43
Vous n'avez pas encore de compte ?
Créez votre endpoint Quicknode en quelques secondes et commencez à développer
Commencez gratuitement