API Documentation

ArkEcosystem\Client\API\AbstractAPI

__construct()

1public function __construct(Connection $connection)

Create a new API class instance.

Parameters

Type Name Required Description
Connection connection Yes Connection

get()

1protected function get(string $path, array $query = [])

Send a GET request with query parameters.

Parameters

Type Name Required Description
string path Yes Endpoint
array query No Query parameters

Return Value

array|string

post()

1protected function post(string $path, array $query = [])

Send a POST request with JSON-encoded parameters.

Parameters

Type Name Required Description
string path Yes Endpoint
array query No Query parameters

Return Value

array|string

ArkEcosystem\Client\API\Blocks

all()

1public function all(array $query = [])

Get all blocks.

Parameters

Type Name Required Description
array query No Query parameters

Return Value

array

show()

1public function show(string $id)

Get a block by the given id.

Parameters

Type Name Required Description
string id Yes Block ID

Return Value

array

transactions()

1public function transactions(string $id, array $query = [])

Get all transactions by the given block.

Parameters

Type Name Required Description
string id Yes Block ID
array query No Query parameters

Return Value

array

search()

1public function search(array $parameters)

Filter all blocks by the given parameters.

Parameters

Type Name Required Description
array parameters Yes Search parameters

Return Value

array

ArkEcosystem\Client\API\Delegates

all()

1public function all(array $query = [])

Get all accounts.

Parameters

Type Name Required Description
array query No Query parameters

Return Value

array

show()

1public function show(string $id)

Get a delegate by the given id.

Parameters

Type Name Required Description
string id Yes Delegate identifier

Return Value

array

blocks()

1public function blocks(string $id, array $query = [])

Get all blocks for the given delegate.

Parameters

Type Name Required Description
string id Yes Delegate identifier
array query No Query parameters

Return Value

array

voters()

1public function voters(string $id, array $query = [])

Get all voters for the given delegate.

Parameters

Type Name Required Description
string id Yes Delegate identifier
array query No Query parameters

Return Value

array

ArkEcosystem\Client\API\Node

configuration()

1public function configuration()

Get the node configuration.

Return Value

array

status()

1public function status()

Get the node status.

Return Value

array

syncing()

1public function syncing()

Get the node syncing status.

Return Value

array

fees()

1public function fees(int $days = null)

Get the node fee statistics.

Parameters

Type Name Required Description
int days No

Return Value

array

ArkEcosystem\Client\API\Peers

all()

1public function all(array $query = [])

Get all peers.

Parameters

Type Name Required Description
array query No Query parameters

Return Value

array

show()

1public function show(string $ip)

Get a peer by the given IP address.

Parameters

Type Name Required Description
string ip Yes IP address

Return Value

array

ArkEcosystem\Client\API\Transactions

create()

1public function create(array $transactions)

Create a new transaction.

Parameters

Type Name Required Description
array transactions Yes Transaction(s) to broadcast

Return Value

array

show()

1public function show(string $id)

Get a transaction by the given id.

Parameters

Type Name Required Description
string id Yes Transaction ID

Return Value

array

all()

1public function all(array $query = [])

Get all transactions.

Parameters

Type Name Required Description
array query No Query parameters

Return Value

array

allUnconfirmed()

1public function allUnconfirmed()

Get all unconfirmed transactions.

Return Value

array

showUnconfirmed()

1public function showUnconfirmed(string $id)

Get an unconfirmed transaction by the given id.

Parameters

Type Name Required Description
string id No Transaction ID

Return Value

array

search()

1public function search(array $parameters)

Filter all transactions by the given parameters.

Parameters

Type Name Required Description
array query No Search parameters

Return Value

array

types()

1public function types()

Get a list of valid transaction types.

Return Value

array

ArkEcosystem\Client\API\Votes

all()

1public function all(array $query = [])

Get all votes.

Parameters

Type Name Required Description
array query No Query parameters

Return Value

array

show()

1public function show(string $id)

Get a vote by the given id.

Parameters

Type Name Required Description
string id Yes Vote ID

Return Value

array

ArkEcosystem\Client\API\Wallets

all()

1public function all(array $query = [])

Get all wallets.

Parameters

Type Name Required Description
array query No Query parameters

Return Value

array

show()

1public function show(string $id)

Get a wallet by the given id.

Parameters

Type Name Required Description
string id Yes Wallet identifier

Return Value

array

transactions()

1public function transactions(string $id, array $query = [])

Get all transactions for the given wallet.

Parameters

Type Name Required Description
string id Yes Wallet identifier
array query No Query parameters

Return Value

array

receivedTransactions()

1public function receivedTransactions(string $id, array $query = [])

Get all transactions received by the given wallet.

Parameters

Type Name Required Description
string id Yes Wallet identifier
array query No Query parameters

Return Value

array

sentTransactions()

1public function sentTransactions(string $id, array $query = [])

Get all transactions sent by the given wallet.

Parameters

Type Name Required Description
string id Yes Wallet identifier
array query No Query parameters

Return Value

array

votes()

1public function votes(string $id, array $query = [])

Get all votes by the given wallet.

Parameters

Type Name Required Description
string id Yes Wallet identifier
array query No Query parameters

Return Value

array

top()

1public function top()

Get all wallets sorted by balance in descending order.

Return Value

array

search()

1public function search(array $parameters)

Filter all wallets by the given parameters.

Parameters

Type Name Required Description
array parameters Yes Search parameters

Return Value

array

Last updated 3 years ago
Edit Page
Share: