API Reference

Get Vault Share

Method Name

public/get_vault_share

Gets the value of a vault's token against the base currency, underlying currency, and USD for a timestamp range.

The name of the vault from the Vault proxy contract is used to fetch the vault's value.

Parameters

from_timestamp_sec integer required
From timestamp in seconds
to_timestamp_sec integer required
To timestamp in seconds
vault_name string required
Name of the vault
page integer
Page number of results to return (default 1, returns last if above num_pages)
page_size integer
Number of results per page (default 100, max 1000)

Response

id string or integer required
result object required
result.pagination object required
Pagination info
result.pagination.count integer required
Total number of items, across all pages
result.pagination.num_pages integer required
Number of pages
result.vault_shares array of objects required
List of vault history shares, recent first
result.vault_shares[].base_value string required
The value of the vault's token against the base currency. Ex: rswETHC vs rswETH
result.vault_shares[].block_number integer required
The Derive chain block number
result.vault_shares[].block_timestamp integer required
Timestamp of the Derive chain block number
result.vault_shares[].underlying_value string or null required
The value of the vault's token against the underlying currency. Ex: rswETHC vs ETH
result.vault_shares[].usd_value string required
The value of the vault's token against USD

Example

{request_example_shell}
{request_example_javascript}
{request_example_python}

The above command returns JSON structured like this:

{response_example_json}