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

# Pending Withdrawals

## Overview

Get all pending withdrawals for a user, including their status and claimable amounts.

<Info>
  To avoid ambiguity, we denote the smallest possible multiple of USDC (0.000001 USDC) as one `uusdc`,
  which stands for µUSDC (micro-USDC), and denote the smallest possible multiple of a contract (0.01 contract)
  as one `ccontract` (centicontract).

  User-facing USDC balances are specified as fixed-point strings (e.g. `"1.2625"` for USDC). Contract quantities
  in the API and SDK are specified as integer `ccontracts` strings (e.g. `"1050"` for 10.50 contracts at precision 2).
</Info>

## Path Parameters

<ParamField path="userAddress" type="string" required>
  User's Ethereum wallet address.
</ParamField>

## Response

<ResponseField name="withdraws" type="array">
  List of withdrawal records.

  <Expandable title="Withdrawal object properties">
    <ResponseField name="id" type="string">
      Unique withdrawal identifier.
    </ResponseField>

    <ResponseField name="chain" type="string">
      Chain the withdrawal is on (`base` or `bsc`).
    </ResponseField>

    <ResponseField name="amountUusdc" type="string">
      Original scheduled withdrawal amount in µUSDC (integer string).
    </ResponseField>

    <ResponseField name="claimedAmountUusdc" type="string">
      Amount already claimed from this withdrawal in µUSDC (integer string).
    </ResponseField>

    <ResponseField name="remainingUusdc" type="string">
      Amount still available to claim in µUSDC (integer string).
    </ResponseField>

    <ResponseField name="status" type="string">
      Current status: `pending`, `fill-locked`, `unclaimed`, or `claimed`.
    </ResponseField>

    <ResponseField name="scheduledAt" type="string">
      ISO 8601 timestamp when the withdrawal was scheduled.
    </ResponseField>

    <ResponseField name="lockedAt" type="string | null">
      ISO 8601 timestamp when the withdrawal was locked for processing.
    </ResponseField>

    <ResponseField name="unclaimedAt" type="string | null">
      ISO 8601 timestamp when the withdrawal became claimable.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="totalPending" type="string">
  Total amount in `pending` status in µUSDC (integer string).
</ResponseField>

<ResponseField name="totalFillLocked" type="string">
  Total amount in `fill-locked` status in µUSDC (integer string).
</ResponseField>

<ResponseField name="totalUnclaimed" type="string">
  Total amount in `unclaimed` status in µUSDC (integer string).
</ResponseField>

<ResponseField name="totalAvailableUnclaimed" type="string">
  Total amount available to claim right now in µUSDC (integer string). Use this value to determine if the user can call `/get-withdraw-authorization`.
</ResponseField>

## Withdrawal Statuses

| Status        | Description                              |
| ------------- | ---------------------------------------- |
| `pending`     | Scheduled, waiting for system processing |
| `fill-locked` | Being processed by the system            |
| `unclaimed`   | Ready to claim on-chain                  |
| `claimed`     | Successfully withdrawn                   |

## Example Request

```
GET /pending-withdraws/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
```

## Example Response

```json theme={null}
{
  "withdraws": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "chain": "base",
      "amountUusdc": "50000000",
      "claimedAmountUusdc": "0",
      "remainingUusdc": "50000000",
      "status": "unclaimed",
      "scheduledAt": "2024-11-09T15:30:00.000Z",
      "lockedAt": "2024-11-09T15:35:00.000Z",
      "unclaimedAt": "2024-11-09T15:40:00.000Z"
    },
    {
      "id": "661f9511-f30c-52e5-b827-557766551111",
      "chain": "base",
      "amountUusdc": "25000000",
      "claimedAmountUusdc": "0",
      "remainingUusdc": "25000000",
      "status": "pending",
      "scheduledAt": "2024-11-09T16:00:00.000Z",
      "lockedAt": null,
      "unclaimedAt": null
    }
  ],
  "totalPending": "25000000",
  "totalFillLocked": "0",
  "totalUnclaimed": "50000000",
  "totalAvailableUnclaimed": "50000000"
}
```

## Usage

Check this endpoint to:

1. **Monitor withdrawal progress**: See when scheduled withdrawals become claimable
2. **Determine claimable amount**: Use `totalAvailableUnclaimed` to know how much can be claimed
3. **Track partial claims**: View `claimedAmountUusdc` and `remainingUusdc` for partial claim tracking

When `totalAvailableUnclaimed !== "0"`, the user can call `/get-withdraw-authorization` to get a claim signature.


## OpenAPI

````yaml GET /pending-withdraws/{userAddress}
openapi: 3.0.0
info:
  version: 1.0.0
  title: Bison API
servers: []
security: []
paths:
  /pending-withdraws/{userAddress}:
    get:
      parameters:
        - schema:
            type: string
          required: true
          name: userAddress
          in: path
      responses:
        '200':
          description: User pending withdraws retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  withdraws:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        chain:
                          type: string
                          enum:
                            - base
                            - bsc
                        amountUusdc:
                          type: string
                        claimedAmountUusdc:
                          type: string
                        remainingUusdc:
                          type: string
                        status:
                          type: string
                          enum:
                            - pending
                            - fill-locked
                            - unclaimed
                            - claimed
                        scheduledAt:
                          type: string
                        lockedAt:
                          type: string
                          nullable: true
                        unclaimedAt:
                          type: string
                          nullable: true
                      required:
                        - id
                        - chain
                        - amountUusdc
                        - claimedAmountUusdc
                        - remainingUusdc
                        - status
                        - scheduledAt
                        - lockedAt
                        - unclaimedAt
                  totalPending:
                    type: string
                  totalFillLocked:
                    type: string
                  totalUnclaimed:
                    type: string
                  totalAvailableUnclaimed:
                    type: string
                required:
                  - withdraws
                  - totalPending
                  - totalFillLocked
                  - totalUnclaimed
                  - totalAvailableUnclaimed
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error

````