Skip to content

Latest commit

 

History

History
817 lines (586 loc) · 42.5 KB

AccountsApi.md

File metadata and controls

817 lines (586 loc) · 42.5 KB

Bzzhh\Tzkt\AccountsApi

All URIs are relative to https://api.tzkt.io, except if the operation defines another base path.

Method HTTP request Description
accountsGet() GET /v1/accounts Get accounts
accountsGetBalance() GET /v1/accounts/{address}/balance Get balance
accountsGetBalanceAtDate() GET /v1/accounts/{address}/balance_history/{datetime} Get balance at date
accountsGetBalanceAtLevel() GET /v1/accounts/{address}/balance_history/{level} Get balance at level
accountsGetBalanceHistory() GET /v1/accounts/{address}/balance_history Get balance history
accountsGetBalanceReport() GET /v1/accounts/{address}/report Get account report
accountsGetByAddress() GET /v1/accounts/{address} Get account by address
accountsGetContracts() GET /v1/accounts/{address}/contracts Get account contracts
accountsGetCount() GET /v1/accounts/count Get accounts count
accountsGetCounter() GET /v1/accounts/{address}/counter Get counter
accountsGetDelegators() GET /v1/accounts/{address}/delegators Get account delegators
accountsGetOperations() GET /v1/accounts/{address}/operations Get account operations

accountsGet()

accountsGet($id, $address, $type, $kind, $delegate, $staked_pseudotokens, $balance, $staked, $last_activity, $select, $sort, $offset, $limit): \Bzzhh\Tzkt\Model\Account[]

Get accounts

Returns a list of accounts.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Bzzhh\Tzkt\Api\AccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$id = new \Bzzhh\Tzkt\Model\AccountsGetIdParameter(); // AccountsGetIdParameter | Filters by internal id.
$address = new \Bzzhh\Tzkt\Model\AccountsGetAddressParameter(); // AccountsGetAddressParameter | Filters by address.
$type = new \Bzzhh\Tzkt\Model\AccountsGetTypeParameter(); // AccountsGetTypeParameter | Filters accounts by type (`user`, `delegate`, `contract`, `rollup`, `smart_rollup`, `ghost`).
$kind = new \Bzzhh\Tzkt\Model\AccountsGetKindParameter(); // AccountsGetKindParameter | Filters accounts by contract kind (`delegator_contract` or `smart_contract`)
$delegate = new \Bzzhh\Tzkt\Model\AccountsGetDelegateParameter(); // AccountsGetDelegateParameter | Filters accounts by delegate. Allowed fields for `.eqx` mode: none.
$staked_pseudotokens = new \Bzzhh\Tzkt\Model\AccountsGetStakedPseudotokensParameter(); // AccountsGetStakedPseudotokensParameter | Filters accounts by amount of staked pseudotokens.
$balance = new \Bzzhh\Tzkt\Model\AccountsGetBalanceParameter(); // AccountsGetBalanceParameter | Filters accounts by balance
$staked = new \Bzzhh\Tzkt\Model\AccountsGetStakedParameter(); // AccountsGetStakedParameter | Filters accounts by participation in staking
$last_activity = new \Bzzhh\Tzkt\Model\AccountsGetIdParameter(); // AccountsGetIdParameter | Filters accounts by last activity level (where the account was updated)
$select = new \Bzzhh\Tzkt\Model\AccountsGetSelectParameter(); // AccountsGetSelectParameter | Specify comma-separated list of fields to include into response or leave it undefined to return full object. If you select single field, response will be an array of values in both `.fields` and `.values` modes.
$sort = new \Bzzhh\Tzkt\Model\AccountsGetSortParameter(); // AccountsGetSortParameter | Sorts delegators by specified field. Supported fields: `id` (default), `balance`, `rollupBonds`, `firstActivity`, `lastActivity`, `numTransactions`, `numContracts`.
$offset = new \Bzzhh\Tzkt\Model\AccountsGetOffsetParameter(); // AccountsGetOffsetParameter | Specifies which or how many items should be skipped
$limit = 100; // int | Maximum number of items to return

try {
    $result = $apiInstance->accountsGet($id, $address, $type, $kind, $delegate, $staked_pseudotokens, $balance, $staked, $last_activity, $select, $sort, $offset, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
id AccountsGetIdParameter Filters by internal id. [optional]
address AccountsGetAddressParameter Filters by address. [optional]
type AccountsGetTypeParameter Filters accounts by type (`user`, `delegate`, `contract`, `rollup`, `smart_rollup`, `ghost`). [optional]
kind AccountsGetKindParameter Filters accounts by contract kind (`delegator_contract` or `smart_contract`) [optional]
delegate AccountsGetDelegateParameter Filters accounts by delegate. Allowed fields for `.eqx` mode: none. [optional]
staked_pseudotokens AccountsGetStakedPseudotokensParameter Filters accounts by amount of staked pseudotokens. [optional]
balance AccountsGetBalanceParameter Filters accounts by balance [optional]
staked AccountsGetStakedParameter Filters accounts by participation in staking [optional]
last_activity AccountsGetIdParameter Filters accounts by last activity level (where the account was updated) [optional]
select AccountsGetSelectParameter Specify comma-separated list of fields to include into response or leave it undefined to return full object. If you select single field, response will be an array of values in both `.fields` and `.values` modes. [optional]
sort AccountsGetSortParameter Sorts delegators by specified field. Supported fields: `id` (default), `balance`, `rollupBonds`, `firstActivity`, `lastActivity`, `numTransactions`, `numContracts`. [optional]
offset AccountsGetOffsetParameter Specifies which or how many items should be skipped [optional]
limit int Maximum number of items to return [optional] [default to 100]

Return type

\Bzzhh\Tzkt\Model\Account[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accountsGetBalance()

accountsGetBalance($address): int

Get balance

Returns account balance

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Bzzhh\Tzkt\Api\AccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$address = 'address_example'; // string | Account address (starting with tz or KT)

try {
    $result = $apiInstance->accountsGetBalance($address);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountsGetBalance: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
address string Account address (starting with tz or KT)

Return type

int

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accountsGetBalanceAtDate()

accountsGetBalanceAtDate($address, $datetime): int

Get balance at date

Returns account balance* at the specified datetime. \* - for non-baker tz-accounts historical balances do not include staked tez, because stakers do not really have staked tez on their balance, they have staking pseudotokens instead. If you want to get a full historical balance, including staked tez, use the Tezos node RPC: /chains/main/blocks/{level}/context/contracts/{address}/full_balance.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Bzzhh\Tzkt\Api\AccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$address = 'address_example'; // string | Account address (starting with tz or KT)
$datetime = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Datetime at which you want to know account balance (e.g. `2020-01-01`, or `2019-12-30T23:42:59Z`)

try {
    $result = $apiInstance->accountsGetBalanceAtDate($address, $datetime);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountsGetBalanceAtDate: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
address string Account address (starting with tz or KT)
datetime \DateTime Datetime at which you want to know account balance (e.g. `2020-01-01`, or `2019-12-30T23:42:59Z`)

Return type

int

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accountsGetBalanceAtLevel()

accountsGetBalanceAtLevel($address, $level): int

Get balance at level

Returns account balance* at the specified block. \* - for non-baker tz-accounts historical balances do not include staked tez, because stakers do not really have staked tez on their balance, they have staking pseudotokens instead. If you want to get a full historical balance, including staked tez, use the Tezos node RPC: /chains/main/blocks/{level}/context/contracts/{address}/full_balance.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Bzzhh\Tzkt\Api\AccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$address = 'address_example'; // string | Account address (starting with tz or KT)
$level = 56; // int | Block height at which you want to know account balance

try {
    $result = $apiInstance->accountsGetBalanceAtLevel($address, $level);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountsGetBalanceAtLevel: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
address string Account address (starting with tz or KT)
level int Block height at which you want to know account balance

Return type

int

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accountsGetBalanceHistory()

accountsGetBalanceHistory($address, $step, $select, $sort, $offset, $limit, $quote): \Bzzhh\Tzkt\Model\HistoricalBalance[]

Get balance history

Returns time series with historical balances* (only changes, without duplicates). \* - for non-baker tz-accounts historical balances do not include staked tez, because stakers do not really have staked tez on their balance, they have staking pseudotokens instead. If you want to get a full historical balance, including staked tez, use the Tezos node RPC: /chains/main/blocks/{level}/context/contracts/{address}/full_balance.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Bzzhh\Tzkt\Api\AccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$address = 'address_example'; // string | Account address (starting with tz or KT)
$step = 56; // int | Step of the time series, for example if `step = 1000` you will get balances at blocks `1000, 2000, 3000, ...`.
$select = new \Bzzhh\Tzkt\Model\AccountsGetSelectParameter(); // AccountsGetSelectParameter | Specify comma-separated list of fields to include into response or leave it undefined to return full object. If you select single field, response will be an array of values in both `.fields` and `.values` modes.
$sort = new \Bzzhh\Tzkt\Model\AccountsGetSortParameter(); // AccountsGetSortParameter | Sorts historical balances by specified field. Supported fields: `level`.
$offset = 0; // int | Specifies which or how many items should be skipped
$limit = 100; // int | Maximum number of items to return
$quote = new \Bzzhh\Tzkt\Model\AccountsGetOperationsQuoteParameter(); // AccountsGetOperationsQuoteParameter | Comma-separated list of ticker symbols to inject historical prices into response

try {
    $result = $apiInstance->accountsGetBalanceHistory($address, $step, $select, $sort, $offset, $limit, $quote);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountsGetBalanceHistory: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
address string Account address (starting with tz or KT)
step int Step of the time series, for example if `step = 1000` you will get balances at blocks `1000, 2000, 3000, ...`. [optional]
select AccountsGetSelectParameter Specify comma-separated list of fields to include into response or leave it undefined to return full object. If you select single field, response will be an array of values in both `.fields` and `.values` modes. [optional]
sort AccountsGetSortParameter Sorts historical balances by specified field. Supported fields: `level`. [optional]
offset int Specifies which or how many items should be skipped [optional] [default to 0]
limit int Maximum number of items to return [optional] [default to 100]
quote AccountsGetOperationsQuoteParameter Comma-separated list of ticker symbols to inject historical prices into response [optional]

Return type

\Bzzhh\Tzkt\Model\HistoricalBalance[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accountsGetBalanceReport()

accountsGetBalanceReport($address, $from, $to, $currency, $historical, $delimiter, $separator): \SplFileObject

Get account report

Exports account balance report in .csv format

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Bzzhh\Tzkt\Api\AccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$address = 'address_example'; // string | Account address (starting with tz or KT)
$from = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Start of the datetime range to filter by (ISO 8601, e.g. 2019-11-31)
$to = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | End of the datetime range to filter by (ISO 8601, e.g. 2019-12-31)
$currency = 'currency_example'; // string | Currency to convert amounts to (`btc`, `eur`, `usd`, `cny`, `jpy`, `krw`, `eth`, `gbp`)
$historical = false; // bool | `true` if you want to use historical prices, `false` to use current price
$delimiter = 'comma'; // string | Column delimiter (`comma`, `semicolon`)
$separator = 'point'; // string | Decimal separator (`comma`, `point`)

try {
    $result = $apiInstance->accountsGetBalanceReport($address, $from, $to, $currency, $historical, $delimiter, $separator);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountsGetBalanceReport: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
address string Account address (starting with tz or KT)
from \DateTime Start of the datetime range to filter by (ISO 8601, e.g. 2019-11-31) [optional]
to \DateTime End of the datetime range to filter by (ISO 8601, e.g. 2019-12-31) [optional]
currency string Currency to convert amounts to (`btc`, `eur`, `usd`, `cny`, `jpy`, `krw`, `eth`, `gbp`) [optional]
historical bool `true` if you want to use historical prices, `false` to use current price [optional] [default to false]
delimiter string Column delimiter (`comma`, `semicolon`) [optional] [default to 'comma']
separator string Decimal separator (`comma`, `point`) [optional] [default to 'point']

Return type

\SplFileObject

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accountsGetByAddress()

accountsGetByAddress($address, $legacy): \Bzzhh\Tzkt\Model\Account

Get account by address

Returns an account with the specified address.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Bzzhh\Tzkt\Api\AccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$address = 'address_example'; // string | Account address
$legacy = true; // bool | If `true` (by default), the `metadata` field will contain tzkt profile info, or TZIP-16 metadata otherwise. This is a part of a deprecation mechanism, allowing smooth migration.

try {
    $result = $apiInstance->accountsGetByAddress($address, $legacy);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountsGetByAddress: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
address string Account address
legacy bool If `true` (by default), the `metadata` field will contain tzkt profile info, or TZIP-16 metadata otherwise. This is a part of a deprecation mechanism, allowing smooth migration. [optional] [default to true]

Return type

\Bzzhh\Tzkt\Model\Account

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accountsGetContracts()

accountsGetContracts($address, $sort, $offset, $limit): \Bzzhh\Tzkt\Model\RelatedContract[]

Get account contracts

Returns a list of contracts created by (or related to) the specified account.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Bzzhh\Tzkt\Api\AccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$address = 'address_example'; // string | Account address (starting with tz or KT)
$sort = new \Bzzhh\Tzkt\Model\AccountsGetSortParameter(); // AccountsGetSortParameter | Sorts contracts by specified field. Supported fields: `id` (default, desc), `balance`, `creationLevel`.
$offset = new \Bzzhh\Tzkt\Model\AccountsGetOffsetParameter(); // AccountsGetOffsetParameter | Specifies which or how many items should be skipped
$limit = 100; // int | Maximum number of items to return

try {
    $result = $apiInstance->accountsGetContracts($address, $sort, $offset, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountsGetContracts: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
address string Account address (starting with tz or KT)
sort AccountsGetSortParameter Sorts contracts by specified field. Supported fields: `id` (default, desc), `balance`, `creationLevel`. [optional]
offset AccountsGetOffsetParameter Specifies which or how many items should be skipped [optional]
limit int Maximum number of items to return [optional] [default to 100]

Return type

\Bzzhh\Tzkt\Model\RelatedContract[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accountsGetCount()

accountsGetCount($type, $kind, $balance, $staked, $first_activity): int

Get accounts count

Returns a number of accounts.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Bzzhh\Tzkt\Api\AccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$type = new \Bzzhh\Tzkt\Model\AccountsGetTypeParameter(); // AccountsGetTypeParameter | Filters accounts by type (`user`, `delegate`, `contract`, `rollup`, `smart_rollup`, `ghost`).
$kind = new \Bzzhh\Tzkt\Model\AccountsGetKindParameter(); // AccountsGetKindParameter | Filters accounts by contract kind (`delegator_contract` or `smart_contract`)
$balance = new \Bzzhh\Tzkt\Model\AccountsGetBalanceParameter(); // AccountsGetBalanceParameter | Filters accounts by balance
$staked = new \Bzzhh\Tzkt\Model\AccountsGetStakedParameter(); // AccountsGetStakedParameter | Filters accounts by participation in staking
$first_activity = new \Bzzhh\Tzkt\Model\AccountsGetIdParameter(); // AccountsGetIdParameter | Filters accounts by first activity level (where the account was created)

try {
    $result = $apiInstance->accountsGetCount($type, $kind, $balance, $staked, $first_activity);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountsGetCount: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
type AccountsGetTypeParameter Filters accounts by type (`user`, `delegate`, `contract`, `rollup`, `smart_rollup`, `ghost`). [optional]
kind AccountsGetKindParameter Filters accounts by contract kind (`delegator_contract` or `smart_contract`) [optional]
balance AccountsGetBalanceParameter Filters accounts by balance [optional]
staked AccountsGetStakedParameter Filters accounts by participation in staking [optional]
first_activity AccountsGetIdParameter Filters accounts by first activity level (where the account was created) [optional]

Return type

int

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accountsGetCounter()

accountsGetCounter($address): int

Get counter

Returns account counter

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Bzzhh\Tzkt\Api\AccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$address = 'address_example'; // string | Account address (starting with tz or KT)

try {
    $result = $apiInstance->accountsGetCounter($address);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountsGetCounter: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
address string Account address (starting with tz or KT)

Return type

int

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accountsGetDelegators()

accountsGetDelegators($address, $type, $balance, $delegation_level, $sort, $offset, $limit): \Bzzhh\Tzkt\Model\Delegator[]

Get account delegators

Returns a list of accounts delegated to the specified account.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Bzzhh\Tzkt\Api\AccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$address = 'address_example'; // string | Account address (starting with tz)
$type = new \Bzzhh\Tzkt\Model\AccountsGetTypeParameter(); // AccountsGetTypeParameter | Filters delegators by type (`user`, `delegate`, `contract`, `rollup`, `smart_rollup`, `ghost`).
$balance = new \Bzzhh\Tzkt\Model\AccountsGetBalanceParameter(); // AccountsGetBalanceParameter | Filters delegators by balance.
$delegation_level = new \Bzzhh\Tzkt\Model\AccountsGetIdParameter(); // AccountsGetIdParameter | Number of items to skip
$sort = new \Bzzhh\Tzkt\Model\AccountsGetSortParameter(); // AccountsGetSortParameter | Sorts delegators by specified field. Supported fields: `delegationLevel` (default, desc), `balance`.
$offset = new \Bzzhh\Tzkt\Model\AccountsGetOffsetParameter(); // AccountsGetOffsetParameter | Specifies which or how many items should be skipped
$limit = 100; // int | Maximum number of items to return

try {
    $result = $apiInstance->accountsGetDelegators($address, $type, $balance, $delegation_level, $sort, $offset, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountsGetDelegators: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
address string Account address (starting with tz)
type AccountsGetTypeParameter Filters delegators by type (`user`, `delegate`, `contract`, `rollup`, `smart_rollup`, `ghost`). [optional]
balance AccountsGetBalanceParameter Filters delegators by balance. [optional]
delegation_level AccountsGetIdParameter Number of items to skip [optional]
sort AccountsGetSortParameter Sorts delegators by specified field. Supported fields: `delegationLevel` (default, desc), `balance`. [optional]
offset AccountsGetOffsetParameter Specifies which or how many items should be skipped [optional]
limit int Maximum number of items to return [optional] [default to 100]

Return type

\Bzzhh\Tzkt\Model\Delegator[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

accountsGetOperations()

accountsGetOperations($address, $type, $initiator, $sender, $target, $prev_delegate, $new_delegate, $contract_manager, $contract_delegate, $originated_contract, $accuser, $offender, $baker, $level, $timestamp, $entrypoint, $parameter, $has_internals, $status, $sort, $last_id, $limit, $micheline, $quote): \Bzzhh\Tzkt\Model\Operation[]

Get account operations

Returns a list of operations related to the specified account. Note: for better flexibility this endpoint accumulates query parameters (filters) of each /operations/{type} endpoint, so a particular filter may affect several operation types containing this filter. For example, if you specify an initiator it will affect all transactions, delegations and originations, because all these types have an initiator field. NOTE: if you know in advance what operation type you want to get (e.g. transactions), prefer using /v1/operations/{type} (e.g. /v1/operations/transactions) instead, because it's much more efficient and way more flexible.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Bzzhh\Tzkt\Api\AccountsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$address = 'address_example'; // string | Account address
$type = 'type_example'; // string | Comma separated list of operation types to return (`endorsement`, `preendorsement`, `ballot`, `proposal`, `activation`, `double_baking`,             `double_endorsing`, `double_preendorsing`, `nonce_revelation`, `vdf_revelation`, `delegation`, `origination`, `transaction`, `reveal`, `register_constant`,             `set_deposits_limit`, `increase_paid_storage`, `tx_rollup_origination`, `tx_rollup_submit_batch`, `tx_rollup_commit`, `tx_rollup_return_bond`,             `tx_rollup_finalize_commitment`, `tx_rollup_remove_commitment`, `tx_rollup_rejection`, `tx_rollup_dispatch_tickets`, `transfer_ticket`, `migration`,             `update_consensus_key`, `drain_delegate`, `sr_add_messages`, `sr_cement`, `sr_execute`, `sr_originate`, `sr_publish`, `sr_recover_bond`, `sr_refute`,             `revelation_penalty`, `baking`, `endorsing_reward`). If not specified then the default set will be returned.
$initiator = new \Bzzhh\Tzkt\Model\AccountsGetDelegateParameter(); // AccountsGetDelegateParameter | Filters transactions, delegations and originations by initiator. Allowed fields for `.eqx` mode: none.
$sender = new \Bzzhh\Tzkt\Model\AccountsGetDelegateParameter(); // AccountsGetDelegateParameter | Filters transactions, delegations, originations, reveals and seed nonce revelations by sender. Allowed fields for `.eqx` mode: none.
$target = new \Bzzhh\Tzkt\Model\AccountsGetDelegateParameter(); // AccountsGetDelegateParameter | Filters transactions by target. Allowed fields for `.eqx` mode: none.
$prev_delegate = new \Bzzhh\Tzkt\Model\AccountsGetDelegateParameter(); // AccountsGetDelegateParameter | Filters delegations by prev delegate. Allowed fields for `.eqx` mode: none.
$new_delegate = new \Bzzhh\Tzkt\Model\AccountsGetDelegateParameter(); // AccountsGetDelegateParameter | Filters delegations by new delegate. Allowed fields for `.eqx` mode: none.
$contract_manager = new \Bzzhh\Tzkt\Model\AccountsGetDelegateParameter(); // AccountsGetDelegateParameter | Filters origination operations by manager. Allowed fields for `.eqx` mode: none.
$contract_delegate = new \Bzzhh\Tzkt\Model\AccountsGetDelegateParameter(); // AccountsGetDelegateParameter | Filters origination operations by delegate. Allowed fields for `.eqx` mode: none.
$originated_contract = new \Bzzhh\Tzkt\Model\AccountsGetDelegateParameter(); // AccountsGetDelegateParameter | Filters origination operations by originated contract. Allowed fields for `.eqx` mode: none.
$accuser = new \Bzzhh\Tzkt\Model\AccountsGetDelegateParameter(); // AccountsGetDelegateParameter | Filters double baking and double endorsing by accuser. Allowed fields for `.eqx` mode: none.
$offender = new \Bzzhh\Tzkt\Model\AccountsGetDelegateParameter(); // AccountsGetDelegateParameter | Filters double baking and double endorsing by offender. Allowed fields for `.eqx` mode: none.
$baker = new \Bzzhh\Tzkt\Model\AccountsGetDelegateParameter(); // AccountsGetDelegateParameter | Filters seed nonce revelation operations by baker. Allowed fields for `.eqx` mode: none.
$level = new \Bzzhh\Tzkt\Model\AccountsGetIdParameter(); // AccountsGetIdParameter | Filters operations by level.
$timestamp = new \Bzzhh\Tzkt\Model\AccountsGetOperationsTimestampParameter(); // AccountsGetOperationsTimestampParameter | Filters operations by timestamp.
$entrypoint = new \Bzzhh\Tzkt\Model\AccountsGetOperationsEntrypointParameter(); // AccountsGetOperationsEntrypointParameter | Filters transactions by entrypoint called on the target contract.
$parameter = new \Bzzhh\Tzkt\Model\AccountsGetOperationsParameterParameter(); // AccountsGetOperationsParameterParameter | Filters transactions by parameter value. Note, this query parameter supports the following format: `?parameter{.path?}{.mode?}=...`,             so you can specify a path to a particular field to filter by, for example: `?parameter.token_id=...` or `?parameter.sigs.0.ne=...`.
$has_internals = new \Bzzhh\Tzkt\Model\AccountsGetStakedParameter(); // AccountsGetStakedParameter | Filters transactions by presence of internal operations.
$status = new \Bzzhh\Tzkt\Model\AccountsGetOperationsStatusParameter(); // AccountsGetOperationsStatusParameter | Filters transactions, delegations, originations and reveals by operation status (`applied`, `failed`, `backtracked`, `skipped`).
$sort = new \Bzzhh\Tzkt\Model\AccountsGetOperationsSortParameter(); // AccountsGetOperationsSortParameter | Sort mode (0 - ascending, 1 - descending), operations of different types can only be sorted by ID.
$last_id = 56; // int | Id of the last operation received, which is used as an offset for pagination
$limit = 100; // int | Number of items to return
$micheline = new \Bzzhh\Tzkt\Model\AccountsGetOperationsMichelineParameter(); // AccountsGetOperationsMichelineParameter | Format of the parameters, storage and diffs: `0` - JSON, `1` - JSON string, `2` - raw micheline, `3` - raw micheline string
$quote = new \Bzzhh\Tzkt\Model\AccountsGetOperationsQuoteParameter(); // AccountsGetOperationsQuoteParameter | Comma-separated list of ticker symbols to inject historical prices into response

try {
    $result = $apiInstance->accountsGetOperations($address, $type, $initiator, $sender, $target, $prev_delegate, $new_delegate, $contract_manager, $contract_delegate, $originated_contract, $accuser, $offender, $baker, $level, $timestamp, $entrypoint, $parameter, $has_internals, $status, $sort, $last_id, $limit, $micheline, $quote);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountsApi->accountsGetOperations: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
address string Account address
type string Comma separated list of operation types to return (`endorsement`, `preendorsement`, `ballot`, `proposal`, `activation`, `double_baking`, `double_endorsing`, `double_preendorsing`, `nonce_revelation`, `vdf_revelation`, `delegation`, `origination`, `transaction`, `reveal`, `register_constant`, `set_deposits_limit`, `increase_paid_storage`, `tx_rollup_origination`, `tx_rollup_submit_batch`, `tx_rollup_commit`, `tx_rollup_return_bond`, `tx_rollup_finalize_commitment`, `tx_rollup_remove_commitment`, `tx_rollup_rejection`, `tx_rollup_dispatch_tickets`, `transfer_ticket`, `migration`, `update_consensus_key`, `drain_delegate`, `sr_add_messages`, `sr_cement`, `sr_execute`, `sr_originate`, `sr_publish`, `sr_recover_bond`, `sr_refute`, `revelation_penalty`, `baking`, `endorsing_reward`). If not specified then the default set will be returned. [optional]
initiator AccountsGetDelegateParameter Filters transactions, delegations and originations by initiator. Allowed fields for `.eqx` mode: none. [optional]
sender AccountsGetDelegateParameter Filters transactions, delegations, originations, reveals and seed nonce revelations by sender. Allowed fields for `.eqx` mode: none. [optional]
target AccountsGetDelegateParameter Filters transactions by target. Allowed fields for `.eqx` mode: none. [optional]
prev_delegate AccountsGetDelegateParameter Filters delegations by prev delegate. Allowed fields for `.eqx` mode: none. [optional]
new_delegate AccountsGetDelegateParameter Filters delegations by new delegate. Allowed fields for `.eqx` mode: none. [optional]
contract_manager AccountsGetDelegateParameter Filters origination operations by manager. Allowed fields for `.eqx` mode: none. [optional]
contract_delegate AccountsGetDelegateParameter Filters origination operations by delegate. Allowed fields for `.eqx` mode: none. [optional]
originated_contract AccountsGetDelegateParameter Filters origination operations by originated contract. Allowed fields for `.eqx` mode: none. [optional]
accuser AccountsGetDelegateParameter Filters double baking and double endorsing by accuser. Allowed fields for `.eqx` mode: none. [optional]
offender AccountsGetDelegateParameter Filters double baking and double endorsing by offender. Allowed fields for `.eqx` mode: none. [optional]
baker AccountsGetDelegateParameter Filters seed nonce revelation operations by baker. Allowed fields for `.eqx` mode: none. [optional]
level AccountsGetIdParameter Filters operations by level. [optional]
timestamp AccountsGetOperationsTimestampParameter Filters operations by timestamp. [optional]
entrypoint AccountsGetOperationsEntrypointParameter Filters transactions by entrypoint called on the target contract. [optional]
parameter AccountsGetOperationsParameterParameter Filters transactions by parameter value. Note, this query parameter supports the following format: `?parameter{.path?}{.mode?}=...`, so you can specify a path to a particular field to filter by, for example: `?parameter.token_id=...` or `?parameter.sigs.0.ne=...`. [optional]
has_internals AccountsGetStakedParameter Filters transactions by presence of internal operations. [optional]
status AccountsGetOperationsStatusParameter Filters transactions, delegations, originations and reveals by operation status (`applied`, `failed`, `backtracked`, `skipped`). [optional]
sort AccountsGetOperationsSortParameter Sort mode (0 - ascending, 1 - descending), operations of different types can only be sorted by ID. [optional]
last_id int Id of the last operation received, which is used as an offset for pagination [optional]
limit int Number of items to return [optional] [default to 100]
micheline AccountsGetOperationsMichelineParameter Format of the parameters, storage and diffs: `0` - JSON, `1` - JSON string, `2` - raw micheline, `3` - raw micheline string [optional]
quote AccountsGetOperationsQuoteParameter Comma-separated list of ticker symbols to inject historical prices into response [optional]

Return type

\Bzzhh\Tzkt\Model\Operation[]

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]