> ## Documentation Index
> Fetch the complete documentation index at: https://readme.amana-dev.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get day-trader status

> Get the user's Pattern Day Trader (PDT) restriction status for US stocks.

## Response

`200` Success.

<ResponseField name="max" type="number">
  Maximum number of day trades allowed within a 5-business-day rolling window before PDT restrictions apply (typically 3).
</ResponseField>

<ResponseField name="count" type="number">
  Number of day trades the user has already executed in the current 5-business-day rolling window.
</ResponseField>

<ResponseField name="equity" type="number">
  The user's current account equity value in USD. PDT restrictions are lifted automatically when this exceeds \$25,000.
</ResponseField>

<ResponseField name="can_trade" type="boolean">
  Whether the user is permitted to open new day trades. False when the account is PDT-restricted and equity is below \$25,000.
</ResponseField>

<ResponseField name="can_close" type="boolean">
  Whether the user is permitted to close existing positions. Even when can\_trade is false, closing positions may still be allowed.
</ResponseField>

## Possible Errors

| Error | Possible cause | What to do |
| - | - | - |
| 401 | Token missing or expired | Log in again or use the refresh token. |
| 403 | IP not whitelisted, or account restricted | Confirm your IP is whitelisted; otherwise contact Amana. |
| 429 / 5xx | Rate limit, or temporary issue on our side | Retry with backoff; contact support if it persists. |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://gateway.amana.io/trading/pdt' \
    --header 'Authorization: Bearer <token>'
  ```

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

  url = "https://gateway.amana.io/trading/pdt"
  headers = {"Authorization": "Bearer <token>"}

  response = requests.request("GET", url, headers=headers)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://gateway.amana.io/trading/pdt', {
    method: 'GET',
    headers: {"Authorization": "Bearer <token>"},
  });
  console.log(await response.json());
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "max": 123.45,
    "count": 123.45,
    "equity": 123.45,
    "can_trade": true,
    "can_close": true
  }
  ```

  ```json 401 theme={null}
  {
    "error": "<string>",
    "message": "<string>",
    "details": {}
  }
  ```

  ```json 403 theme={null}
  {
    "error": "<string>",
    "message": "<string>"
  }
  ```

  ```json 429 theme={null}
  {
    "error": "<string>",
    "message": "<string>"
  }
  ```

  ```json 500 theme={null}
  {
    "error": "<string>",
    "message": "<string>",
    "details": {}
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.