> ## Documentation Index
> Fetch the complete documentation index at: https://docs.msu.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Stream Reward History

> Stream reward draw history as chunked response (up to 30 days after the draw).

## Path parameters

<ParamField path="worldId" type="integer" required>
  World ID
</ParamField>

## Body parameters

<ParamField body="layerDescs" type="array" required>
  List of layer conditions to query (specify either `layer_id` or `layer_type`)
</ParamField>

<ParamField body="raffledAtInterval" type="object">
  Time range of raffles to query

  <Expandable title="properties">
    <ParamField body="raffledAtInterval.from" type="string">
      Start of the raffle time range (ISO8601 format)
    </ParamField>

    <ParamField body="raffledAtInterval.to" type="string">
      End of the raffle time range (ISO8601 format)
    </ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the request was successful
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="worldId" type="integer">
      World ID
    </ResponseField>

    <ResponseField name="rewardHistories" type="object">
      Raffle history list
    </ResponseField>

    <ResponseField name="updatedAt" type="string">
      Data update time (ISO8601)
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://openapi.msu.io/v1rc1/msn/rewards/{worldId}/history/stream' \
    --header 'Content-Type: application/json' \
    --header 'x-nxopen-api-key: YOUR_API_KEY' \
    --data '{
      "layerDescs": [],
      "raffledAtInterval": {
        "from": "string",
        "to": "string"
      }
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://openapi.msu.io/v1rc1/msn/rewards/{worldId}/history/stream', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-nxopen-api-key': 'YOUR_API_KEY'
    },
    body: JSON.stringify({
      layerDescs: [],
      raffledAtInterval: {
        from: "string",
        to: "string"
      }
    })
  });
  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  url = "https://openapi.msu.io/v1rc1/msn/rewards/{worldId}/history/stream"
  headers = {
    "x-nxopen-api-key": "YOUR_API_KEY"
  }
  body = {
    "layerDescs": [],
    "raffledAtInterval": {
      "from": "string",
      "to": "string"
    }
  }

  response = requests.post(url, headers=headers, json=body)
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "worldId": 0,
      "rewardHistories": {},
      "updatedAt": "string"
    }
  }
  ```
</ResponseExample>
