Other

private/get_subaccount_value_history

Changed on
post/private/get_subaccount_value_history

Request

  • Base URL
    https://api.derive.xyz/v3
  • Auth
    API key in header X-DeriveWallet and API key in header X-DeriveTimestamp and API key in header X-DeriveSignature

Request body

GetSubaccountValueHistoryRequest required

wallet, when set, takes precedence over subaccount_id. The window is unix milliseconds; period is seconds and must be one the sampler's tables cover.

end_timestamp, integer nullable
page, integer nullable
page_size, integer nullable
period, integer nullable
start_timestamp, integer nullable
subaccount_id, integer nullable
wallet, string nullable

Response

Success

SubaccountValueHistoryResult required

By-wallet lookups return every owned subaccount's samples, concatenated and tagged with subaccount_id — not a summed wallet total. Coverage is ragged by design: a subaccount contributes no entry for buckets in which it held nothing, rather than reporting a zero it never had. Callers plotting a wallet total must group by subaccount_id and carry each series forward.

pagination, Pagination required

Response envelope for paginated RPCs.

subaccount_value_history, SubaccountValueEntry[] required

Changes

    • info

      the endpoint scheme security DeriveWallet AND DeriveTimestamp AND DeriveSignature was added to the API

    • info

      added the media type application/json for the response with the status