# List Staking Event History

<EndpointPage
  breadcrumbs={[
    { label: "Trading", href: "/trading/trading" },
    { label: "Staking", href: "/trading/rest-api/staking" },
    { label: "List Staking Event History" },
  ]}
  title="List Staking Event History"
  method="POST"
  url="https://api.gemini.com/v1/staking/history"
  description="Returns all staking deposits, redemptions, and interest accruals for the account."
  example={{
    request: {
      method: "POST",
      url: "https://api.gemini.com/v1/staking/history",
      headers: [
        { name: "X-GEMINI-APIKEY", value: "<string>" },
        { name: "X-GEMINI-PAYLOAD", value: "<string>" },
        { name: "X-GEMINI-SIGNATURE", value: "<string>" },
      ],
      body: {
        request: "/v1/staking/history",
        nonce: "<nonce>",
        account: "primary",
        since: "2022-11-01T00:00:00.000Z",
        until: "2022-11-03T00:00:00.000Z",
        limit: 50,
      },
    },
  }}
  sections={[
    {
      heading: "Roles",
      children: (
        <p style={{ margin: 0 }}>The API key you use to access this endpoint must have the Trader, Fund Manager, or Auditor role assigned. See <a href="https://docs.gemini.com/roles#roles" style={{ color: "inherit", textDecorationLine: "underline" }}>Roles</a> for more information.</p>
      ),
    },
    {
      heading: "How to iterate through all transactions",
      children: (
        <ol style={{ margin: 0, paddingLeft: "1.25rem" }}>
          <li>Initial request: <InlineBadge>POST</InlineBadge> to <code>https://api.gemini.com/v1/staking/history</code> with a JSON payload including <code>sortAsc</code> set to <code>false</code> and a <code>limit</code> of <code>500</code>.</li>
          <li>The response is sorted by <code>datetime</code> descending — the last element has the lowest <code>timestamp</code>. Call it <code>X</code>.</li>
          <li>Send a second request with <code>until</code> set to <code>X-1</code>, <code>sortAsc</code> still <code>false</code>, and <code>limit</code> of <code>500</code>.</li>
          <li>Repeat using the last element's timestamp minus one as the new <code>until</code> value.</li>
          <li>Continue until an empty list is returned.</li>
        </ol>
      ),
    },
    {
      heading: "Headers",
      children: <SpecHeaders operationId="listStakingEventHistory" />,
    },
    {
      heading: "Request Body",
      children: <SpecParams operationId="listStakingEventHistory" />,
    },
    {
      heading: "Responses",
      children: <SpecResponses operationId="listStakingEventHistory" />,
    },
  ]}
/>

<PageNavigation
  prev={{ label: "Unstake Crypto Funds", href: "/trading/rest-api/staking/unstake-crypto-funds" }}
  next={{ label: "List Staking Rates", href: "/trading/rest-api/staking/list-staking-rates" }}
/>
