HTTP API

Last updated last month

An overview of the Arweave HTTP API.

Introduction

The Arweave protocol is based on HTTP, so any existing http clients/libraries can be used to interface with the network, for example Axios or Fetch for JavaScript, Guzzle for PHP, etc.

The default port is 1984.

Requests and queries can be sent to any Arweave node directly using their IP address, for example http://159.65.213.43:1984/info.

Hostnames can also be used if configured with DNS, for example http://arweave.net:1984/info.

Sample Request

cURL
JavaScript (Fetch)
NodeJS
curl --request GET \
--url 'http://arweave.net:1984/info'
fetch('http://arweave.net:1984/info')
.then( response => {
console.log('Arweave network height is: ' + response.json().height);
})
.catch( error => {
console.error(error);
});
let request = require("request");
let options = {
method: 'GET',
url: 'http://arweave.net:1984/info'
};
request(options, function (error, response, body) {
if (error){
console.error(error);
}
console.log('Arweave network height is: ' + JSON.parse(body).height);
});

Integrations

Arweave specific wrappers and clients are currently in development to simplify common operations and API interactions, there are currently integrations for Go, PHP, Scala (which can also be used with Java and C#) and JavaScript/TypeScript/NodeJS.

Schema

Common data structures, formats, and processes explained.

Block Format

There are currently two block formats a node may return depending on how you request the block.

The initial V1 format has the full block hash list and wallet list embedded directly in the block JSON structure, this has since been removed and can now be requested using the hash list endpoint and wallet lists endpoint.

The V1 block format has been deprecated and will be removed in future releases.

V2
V1
{
"nonce": "AAEBAAABAQAAAQAAAQEBAAEAAAABAQABAQABAAEAAAEBAAAAAQAAAAAAAQAAAQEBAAEBAAEBAQEBAQEAAQEBAAABAQEAAQAAAQABAAABAAAAAAEBAQEBAAABAQEAAAAAAAABAQAAAQAAAQEAAQABAQABAQEAAAABAAABAQABAQEAAAEBAQABAQEBAQEBAAABAQEAAAABAQABAAABAAEAAQEBAQAAAAABAQABAQAAAAAAAAABAQABAAEBAAEAAQABAQABAAEBAQEBAAEAAQABAAABAQEBAQAAAQABAQEBAAEBAQAAAQEBAQABAAEBAQEBAAAAAAABAAEAAAEAAAEAAAEBAAAAAAEAAQABAAAAAAABAQABAQAAAAEBAQAAAAABAAABAAEBAQEAAAAAAQAAAQABAQABAAEAAQABAQAAAAEBAQAAAQAAAAEBAAEBAAEBAQEAAAEBAQAAAQAAAAABAAEAAQEAAQ",
"previous_block": "V6YjG8G3he0JIIwRtzTccX39rS0jH-jOqUJy6rxrVAHY0RT0AVhG8K22wCDxy1A0",
"timestamp": 1528500720,
"last_retarget": 1528500720,
"diff": 31,
"height": 100,
"hash": "AAAAANsEvzGbICpfAj3NN41_ox--2cNxkEhAo0aggpDPkY7zru29g24uMWUP9hTa",
"indep_hash": "ngFDAB2KRhJgJRysuhpp1u65FjBf5WZk99_NyoMx8w6uP0IVjzb93EVkYxmcErdZ",
"txs": [
"7BoxcxiJIjTwUp3JXp0xRJQXf6hZtyJj1kjGNiEl5A8"
],
"wallet_list": "ph2FDDuQjNbca34tz7vP9X5Xve2EGJi2ZgFqhMITAdw",
"reward_addr": "em8MfGRInwWEAQnE6b50ENaFOf-0to4Pbygng1ilWGQ",
"tags": [],
"reward_pool": 60770606104,
"weave_size": 599058,
"block_size": 0
}
{
"hash_list": [
"V6YjG8G3he0JIIwRtzTccX39rS0jH-jOqUJy6rxrVAHY0RT0AVhG8K22wCDxy1A0",
"uf9gQ7SdNv8mPwdUxohZZvywBkNCXBN8bgk-eclb6La-Ji8GW0LLB_f4jzWGeiZs",
"GrJ4k5rv6yEehkiW5LaXrvwWVsyhQB7O-sylCsXqGk05WBcGJNFY5OhuvviXijYy",
"0EXA2tzu4C960IxJegJ0r6na5NOlIwbtVhtYxKmdbyZ9R2ohl_OKJ5t5KnFrH4H7",
"8ReYNVyf2_gEaQsur8dnI145c73MmcNygJ9EqgfbJNaUSO9DESi5LDPbxoCOv555"
],
"nonce": "AAEBAAABAQAAAQAAAQEBAAEAAAABAQABAQABAAEAAAEBAAAAAQAAAAAAAQAAAQEBAAEBAAEBAQEBAQEAAQEBAAABAQEAAQAAAQABAAABAAAAAAEBAQEBAAABAQEAAAAAAAABAQAAAQAAAQEAAQABAQABAQEAAAABAAABAQABAQEAAAEBAQABAQEBAQEBAAABAQEAAAABAQABAAABAAEAAQEBAQAAAAABAQABAQAAAAAAAAABAQABAAEBAAEAAQABAQABAAEBAQEBAAEAAQABAAABAQEBAQAAAQABAQEBAAEBAQAAAQEBAQABAAEBAQEBAAAAAAABAAEAAAEAAAEAAAEBAAAAAAEAAQABAAAAAAABAQABAQAAAAEBAQAAAAABAAABAAEBAQEAAAAAAQAAAQABAQABAAEAAQABAQAAAAEBAQAAAQAAAAEBAAEBAAEBAQEAAAEBAQAAAQAAAAABAAEAAQEAAQ",
"previous_block": "V6YjG8G3he0JIIwRtzTccX39rS0jH-jOqUJy6rxrVAHY0RT0AVhG8K22wCDxy1A0",
"timestamp": 1528500720,
"last_retarget": 1528500720,
"diff": 31,
"height": 100,
"hash": "AAAAANsEvzGbICpfAj3NN41_ox--2cNxkEhAo0aggpDPkY7zru29g24uMWUP9hTa",
"indep_hash": "ngFDAB2KRhJgJRysuhpp1u65FjBf5WZk99_NyoMx8w6uP0IVjzb93EVkYxmcErdZ",
"txs": [
"7BoxcxiJIjTwUp3JXp0xRJQXf6hZtyJj1kjGNiEl5A8"
],
"wallet_list": [
{
"wallet": "ABPXQ3UzGLenVZ1Vq77G27ZETEgxIBDjvwtxt0J7Hy4",
"quantity": 100000000000000000,
"last_tx": ""
},
{
"wallet": "AC_xfhPRl-jsJEwo0x_q7Lj0LDvMA8QP0YH4PKKUyv0",
"quantity": 100000000000000000,
"last_tx": ""
},
{
"wallet": "_wtKD-bvlOP-qzmjtQWAn-zWB8ufJmGko9lBu6XllAg",
"quantity": 100000000000000000,
"last_tx": ""
}
],
"reward_addr": "em8MfGRInwWEAQnE6b50ENaFOf-0to4Pbygng1ilWGQ",
"tags": [],
"reward_pool": 60770606104,
"weave_size": 599058,
"block_size": 0
}

Transaction Format

There are three types of transactions you can send depending on your use case, as different combinations of the data, target, and quantity fields can be used.

All transaction fields are strings with the exception of tags, which is an array of objects containing key/value pairs, this includes the quantity and reward fields as they are represented by winston strings.

See the sample transactions below for full examples.

Field Definitions

Name

Required

Value

id

Yes

The transaction ID is derrived from the Base64 URL encoding of a SHA-256 hash of the Base64 decoded transaction signature.

last_tx

Yes

The last outgoing transaction ID from the sending wallet. If this is the first transaction from the wallet then an empty string should be used.

Use the value returned from the last transaction endpoint.

owner

Yes

The full RSA modulus value of the sending wallet, Base64 URL encoded. The modulus is the n value from the JWK.

tags

No

If no tags are being used then use an empty array [].

target

No

The target address to send AR to (if required), the amount to transfer should be specified in the quantity field. If no AR is being transferred to another wallet then use an empty string.

quantity

No

The amount to transfer from the owner wallet to the target wallet address as a winston string. If no AR is being transferred then use an empty string.

data

No

The data to be submitted as a Base64 URL encoded string. If no data is being submitted then this should be an empty string.

reward

Yes

The transaction fee as a winston string, this should be calculated using the price endpoint.

signature

Yes

The transaction signature is derrived from concatenating the transaction data then signing it, the signature should then be Base64 URL encoded. See Transaction Signing for more.

Transaction Use Cases

1. Data Transaction

This is the most common transaction format used to store a piece data on the network. The data should should be base64 URL encoded and go in the data field. The target and quantity fields should be set to empty strings as they are not needed.

2. Wallet to Wallet AR Transfer

This type of transaction is used to move AR from one wallet to another. The data field should be set to an empty string as it it not needed.

3. Wallet to Wallet AR transfer with Data

This type of transaction is for transferring AR with a piece of data attached, this is useful for attaching a message or some other piece of data to a transaction sent to another wallet, for example a reference number or identifier to help account for the transaction. The data, target, and quantity fields should all be used for this type of tranasaction.

Sample Transactions

Data Transaction
Wallet to Wallet AR Transfer
Wallet to Wallet AR Transfer with Data
{
"id": "BNttzDav3jHVnNiV7nYbQv-GY0HQ-4XXsdkE5K9ylHQ",
"last_tx": "jUcuEDZQy2fC6T3fHnGfYsw0D0Zl4NfuaXfwBOLiQtA",
"owner": "posmE...psEok",
"tags": [],
"target": "",
"quantity": "0",
"data": "PGh0b...RtbD4",
"reward": "124145681682",
"signature": "HZRG_...jRGB-M"
}

Some long values have been abbreviated, the full transaction can be found here: http://arweave.net/tx/BNttzDav3jHVnNiV7nYbQv-GY0HQ-4XXsdkE5K9ylHQ

{
"id": "UEVFNJVXSu7GodYbZoldRHGi_tjzNtNcYjeSkxKCpiE",
"last_tx": "knQ5gf4Z_3i-NQ6_jFT2a9zShUOHh4lDZoAUzsWMxMQ",
"owner": "1nPKv...LjJMc",
"tags": [],
"target": "WxLW1MWiSWcuwxmvzokahENCbWurzvwcsukFTGrqwdw",
"quantity": "46598403314697200",
"data": "",
"reward": "321179212",
"signature": "OYIJU...j9Mxc"
}

Some long values have been abbreviated, the full transaction can be found here: http://arweave.net/tx/UEVFNJVXSu7GodYbZoldRHGi_tjzNtNcYjeSkxKCpiE

{
"id": "3pXpj43Tk8QzDAoERjHE3ED7oEKLKephjnVakvkiHF8",
"last_tx": "NpeIbi93igKhE5lKUMhH5dFmyEsNGC0fb2Qysggd-kM",
"owner": "posmE...psEok",
"tags": [],
"target": "pEbU_SLfRzEseum0_hMB1Ie-hqvpeHWypRhZiPoioDI",
"quantity": "10000000000",
"data": "VGVzdA",
"reward": "321579659",
"signature": "fjL0N...f2UMk"
}

Some long values have been abbreviated, the full transaction can be found here: http://arweave.net/tx/3pXpj43Tk8QzDAoERjHE3ED7oEKLKephjnVakvkiHF8

Transaction Signing

Transaction signatures are generated by concatenating the raw and unencoded values from the following fields: owner, target, data, quantity, reward, last_tx, then signing the raw data.

Signatures are RSA-PSS with SHA-256 as the hashing function.

Transaction Signing Examples

JavaScript
function sign(jwk, {owner, target, data, quantity, reward, last_tx}){
let buffers = [
this.utils.b64ToBuffer(this.utils.b64urldec(owner)),
this.utils.b64ToBuffer(this.utils.b64urldec(target)),
this.utils.b64ToBuffer(this.utils.b64urldec(data)),
this.utils.stringToBuffer(quantity),
this.utils.stringToBuffer(reward),
this.utils.b64ToBuffer(this.utils.b64urldec(last_tx)),
];
let key = await crypto.subtle.importKey(
'jwk',
jwk,
{
name: 'RSA-PSS',
modulusLength: 4096,
publicExponent: new Uint8Array([0x01, 0x00, 0x01]),
hash: {
name: 'SHA-256',
}
},
false,
['sign']
);
let signature = await crypto.subtle.sign(
{
hash: 'SHA-256',
subtle: {
name: 'RSA-PSS',
saltLength: 0,
}
},
key,
buffers
);
return signature;
}

Key Format

Arweave uses the JSON Web Key (JWK) format (RFC 7517) with 4096 length RSA-PSS keys. This JWK format allows for cryptographic keys to be represented as a JSON object where each property represents a property of the underlying cryptographic key.

It's widely supported with libraries for most popular languages. It's possible to convert a JWK to a PEM file or other crypto key file format, support for this this will vary from language to language.

If you're generating your own keys manually the public exponent (e) must be 65537. If any other value is used then transactions signed by these keys will be invalid and rejected.

Addressing

The n value is the public modulus and is used as the transaction owner field, and the address of a wallet is a Base64 URL encoded SHA-256 hash of the n value from the JWK.

Sample JWK

The address for this wallet is GRQ7swQO1AMyFgnuAPI7AvGQlW3lzuQuwlJbIpWV7xk.

{
"kty": "RSA",
"e": "AQAB",
"n": "ovFF6EbOtXeg7VnojIgtChgxfU6GZ16JjVj5JFHh6NGHJnq4p059BnMphcDx1mqb3yxM73FxhEszSFLcJiPzway6eIDiXuYiT-Sf_0Wl6_wDLvEmlz43psp7WYJumwpaSyiI_1FWmOVQnTnoAIKaOYKVqzUlteiECQj7XjJl0MZH16RlEfVqVpJ_8Ier4_QXIJ8Y3pe2KF3Lg9UANFU97nuvEM94CSzX-0WIju6Lykt3DBb2YtFFg4bJjOFv3T38nCZmDh8lYjm25_1qILalsB0XRoDxQy9FLxWb4zd09JsDhL0EYAQ_hNfOnQFVOBtYEHVYMCHYH6GoTcNgxmUkZPk4AfpAqZmjDzKfVJrw4Fr68pPTEQOQEzBcIWp61P21BSkhqO4QuFinkQsSH6NdTB_3FpbhYf34Hjf-iH7hdpdWo4aoRLb8eZeZcqBRZoRmlhQnOD-PVxQR_vb9rjXSjGkCWwRbsurVLWdBh_FQn0S9Q6EHqiV8nbW-R0Rk2E76JwgMFkqGUtZj8DeEqXJ2jlAvuzp56fXeAViPEtvUj1HheO8O3LxdVYCiapWWKq4qQVoRzdiyvydYSmbztgFUhekvmjNkxLNKOh71i3hFtoXycegqZ6izrUGoF2oD24lsTKsV5lV5pwfmUjVvxtHZm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dQUpeemChDGzVJXLnJhE4cAS9TtLcNg82xZSKZvHrnkbFpRfSJxzEnvIXW4V0LHkxkxbmM0e9B7UrpYm6LKtvEY6I7L8wHFpHdOwV6NjY925oULEV156X0r55V7N0XF-jy3rbm71DCWRh6IDRghhCZQ3aNgJxE-OtnABqasaY6CQnTDRXLkGE0kq9GCx85-92fQLHMzvrMhr9m_2MHYJ_gZehL4j95CQzhD3Zh602D0YYYwRSsU4h5HGjlmN52pe-rfTLgwCJq5295s7qUP8TTMzbZAOM_hehksHpAaFghA"
}

AR and Winston

Winston is the smallest possible unit of AR, similar to a satoshi in Bitcoin, or wei in Etherium.

1 AR = 1000000000000 Winston (12 zeros) and 1 Winston = 0.000000000001 AR.

The HTTP API will return all amounts as winston strings, this is to allow for easy interoperability between environments that do not accommodate arbitrary-precision arithmetic.

JavaScript for example stores all numbers as double precision floating point values and as such cannot natively express the integer number of winston. Providing these values as strings allows them to be directly loaded into most 'bignum' libraries.

Transactions

Endpoints for interacting with transactions and related resources.

get
Get Transaction by ID

http://arweave.net:1984
/tx/{id}
Get a transaction by its ID.
Request
Response
Path Parameters
id
required
string
Transaction ID
Headers
Accept
optional
string
application/json
200: OK
The transaction as a JSON object.
{
"id": "BNttzDav3jHVnNiV7nYbQv-GY0HQ-4XXsdkE5K9ylHQ",
"last_tx": "jUcuEDZQy2fC6T3fHnGfYsw0D0Zl4NfuaXfwBOLiQtA",
"owner": "posmE...psEok",
"tags": [],
"target": "",
"quantity": "0",
"data": "PGh0b...RtbD4",
"reward": "124145681682",
"signature": "HZRG_...jRGB-M"
}
202: Accepted
The transaction ID is known but is still pending, it has not been mined into a block yet.
Pending
400: Bad Request
The provided transaction ID is not valid.
Invalid hash.
404: Not Found
A transaction with the given ID could not be found.
Not Found.

The quantity and reward values are always represented as winston strings. What and why?

See the Transaction Format section for details about transaction structure and contents, with examples.

get
Get Transaction Field

http://arweave.net:1984
/tx/{id}/{field}
Get a single field from a transaction.
Request
Response
Path Parameters
id
required
string
Transaction ID
field
required
string
Field name. Acceptable values: id, last_tx, owner, tags, target, quantity, data, reward, signature
Headers
Accept
optional
string
application/json
200: OK
The field value as plain text
jUcuEDZQy2fC6T3fHnGfYsw0D0Zl4NfuaXfwBOLiQtA
202: Accepted
The transaction is pending.
Pending
400: Bad Request
The provided transaction ID is not valid or the field name is not valid.
Invalid hash.
404: Not Found
A transaction with the given ID could not be found.
Not Found.

get
Get Transaction Data

http://arweave.net:1984
/tx/{id}/data.{extension}
Get the raw base64 decoded data from a transaction. The Content-Type will default to text/html so this endpoint will return a browser renderable response by default.
Request
Response
Path Parameters
id
required
string
Transaction ID
extension
required
string
Any extension can be specified depending on the clients use case. Web pages can be requested with data.html .
200: OK
<html lang="en-GB" class="b-pw-1280 no-touch orb-js id-svg bbcdotcom ads-enabled bbcdotcom-init bbcdotcom-responsive bbcdotcom-async bbcdotcom-ads-enabled orb-more-loaded bbcdotcom-group-5" id="responsive-news">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=1">
...
202: Accepted
The transaction is pending.
Pending
400: Bad Request
The provided transaction ID is not valid or the field name is not valid.
Invalid hash.
404: Not Found
A transaction with the given ID could not be found.
Not Found.

A Content-Type tag can be submitted with a transaction, the tag will then be used as the Content-Type header when serving the data response, this allows you to submit binary files like images and have them served with correct content type headers over HTTP.

The default Content-Type is text/html.

get
Get Transaction Price

http://arweave.net:1984
price/{bytes}/{target}
This endpoint is used to calculate the minimum fee (reward) for a transaction of a specific size, and possibly to a specific address. This endpoint should always be used to calculate transaction fees as closely to the submission time as possible. Pricing is dynamic and determined by the network, so it's not always possible to accurately calculate prices offline or ahead of time. Transactions with a fee that's too low will simply be rejected.
Request
Response
Path Parameters
bytes
required
string
The number of bytes to go into the transaction data field. If sending AR to another wallet with no data attached, then 0 should be used.
target
optional
string
The target wallet address if sending AR to another wallet.
Headers
Accept
optional
string
application/json
200: OK

The fee for the first transaction sent to a new wallet address will be 0.25 AR more expensive than other transactions. This is intentional and to discourage wallet spam.

Examples

If sending 10 AR to a wallet with address abc we would use /price/0/abc.

If sending a data transaction with 123 bytes we would use /price/123.

If sending 10 AR to another wallet with a data segment of 123 bytes we would use /price/123/abc.

post
Submit a Transaction

http://arweave.net:1984
/tx
Submit a new transaction to the network.The request body should be a JSON object with the following attributes.
Request
Response
Headers
Accept
optional
string
application/json
Content-Type
optional
string
application/json
Body Parameters
id
required
string
The transaction ID.
last_tx
required
string
The last outgoing transaction ID from the sending wallet.
owner
required
string
The full RSA modulus value for the sending wallet, base64 URL encoded. The modulus is the n value from a JWK.
tags
required
array
[]
target
required
string
The recipient address (if sending AR to another wallet). Use an empty string for data transactions.
quantity
required
string
The amount in winston to transfer to the target wallet. Use an empty string for data transactions.
data
required
string
The data to be uploaded, base64 URL encoded. Use an empty string if not required.
reward
required
string
The transaction fee.
signature
required
string
The transaction signature, base64 URL encoded.
200: OK
OK
208: Already Reported
The transaction has already been submitted.
Transaction already processed.
400: Bad Request
The transaction is invalid, couldn't be verified, or the wallet does not have suffucuent funds.
Transaction verification failed.
429: Too Many Requests
The request has exceeded the clients rate limit quota.
Too Many Requests
503: Service Unavailable
The nodes was unable to verify the transaction.
Transaction verification failed.

Find more information about these fields and examples in the transaction format section.

Wallets

Endpoints for getting information about a wallets.

get
Get a Wallet Balance

http://arweave.net:1984
/wallet/{address}/balance
Get the ballance for a given wallet. Unknown wallet addresses will simply return 0.
Request
Response
Path Parameters
address
optional
string
Wallet address.
200: OK
The balance as a winston string.
9554799572505
400: Bad Request
Error response if the given address is incorrectly formatted.
Invalid address.

Wallet balances are always represented as winston strings. What and why?

get
Get Last Transaction ID

http://arweave.net:1984
/wallet/{address}/last_tx
Get the last outgoing transaction for the given wallet address.
Request
Response
Path Parameters
address
optional
string
Wallet address.
200: OK
The last transaction ID a sa string.
7SRpf0dWDqN4hbnCMPkdg02u_tzyMBtqwjDBy3EU9dg
400: Bad Request
Error response if the given address is incorrectly formatted.
Invalid address.

Blocks

Endpoints for getting blocks and block data.

get
Get Block by ID

http://arweave.net:1984
block/hash/{block_hash}
Get a block by its hash (idep_hash).
Request
Response
Path Parameters
block_hash
optional
string
The block hash (indep_hash).
Headers
Accept
optional
string
application/json
X-Block-Format
optional
string
2
200: OK
A successful block response using the V2 format.
{
"nonce": "AQEBAAEBAQAAAAAAAQABAAABAAEAAAEBAAAAAQEBAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"previous_block": "5M2ADEdNw0m5FnF62eBfFJ82lrizaAbb-gI6h3SNCOcV8JP5S7QQzy7_qf9ZxJsQ",
"timestamp": 1541689556,
"last_retarget": 1541688945,
"diff": 34,
"height": 78419,
"hash": "AAAAABXiIEay0l1jH9ibJWKNvCUlxVQrQiZGVyW-4MuDX6Pn_uq6-oOGk3kwAxRa",
"indep_hash": "fv5jRd2TDURBIJAS0BJCtqY3eXpoXvLu7XE6zFU2sgiKFDZc3D6qChS5V99SRuH0",
"txs": [],
"wallet_list": "XYkvWyf0HG2OE1c1_61S6JYew13cKafmshIQ5MGmcAk",
"reward_addr": "G5m6plnC8pKBQFDZOjZvCscbGL216zE_bCexAzM-7UI",
"tags": [],
"reward_pool": 3232,
"weave_size": 160604943,
"block_size": 0
}
404: Not Found
Error response if block hash is not valid or not available.
Block not found.

It's strongly recommended that you specify X-Block-Format: 2 for V2 formatted blocks. The default V1 format is deprecated and will be removed in future releases. What's the difference?

By default the endpoint returns V1 formatted blocks to maintain backwards compatibility.

See the Block Format section for details about the block structure and contents, with examples.

Network and Node State

Endpoints for getting information about the current network and node state.

get
Network Info

http://arweave.net:1984
/info
Get the current network information including height, current block, and other properties.
Request
Response
Headers
Accept
optional
string
application/json
200: OK
{
"network": "arweave.N.1",
"version": 3,
"release": 16,
"height": 78309,
"current": "o8ahQ55Omd7Fdi4UgGP82bD2-TZ66JYY33NzGyvpLL3_V3wCmsq8NJmnkJl1p_ew",
"blocks": 97375,
"peers": 64,
"queue_length": 0,
"node_state_latency": 18
}

get
Peer list

http://arweave.net:1984
/peers
Get the list of peers that the node. Nodes can only respond with peers they currently know about, so this will not be an exhaustive or complete list of nodes on the network.
Request
Response
Headers
Accept
optional
string
application/json
200: OK
[
"127.0.0.1:1984",
"0.0.0.0:1984"
]