# Get liquidations

List all liquidations by date range

Endpoint: GET /liquidations
Version: 1.0.0
Security: Bearer

## Security:

  - `Bearer` (unknown)
    apiKey in header Authorization

## Query parameters:

  - `start_date` (string)
    Start date (inclusive) of first activity. Specified in ISO-8601 format, for example `2018-08-06T23:13:55.997Z`

  - `end_date` (string)
    End date (exclusive) of last activity. Specified in ISO-8601 format, for example `2018-08-06T23:13:55.997Z`

  - `payment_id` (array)
    RippleNet payment ID(s)

  - `reference_id` (array)
    Unique reference ID(s)

  - `status` (string)
    Liquidation status

  - `page` (integer)
    The page number for [paginated results](/products/payments-odl/api-docs/ripplenet/best-practices/pagination/). The value is zero-based, where `0` represents the first page.<br/>
Set it to `0` to get the first page of results.

  - `size` (integer)
    Number of liquidations to return per page.

## Response 200:

  - `200` (unknown)
    Returns a paginated list of liquidations

## Response 200 fields (application/json):

  - `first` (boolean, required)
    True if this is the first page

  - `last` (boolean, required)
    True if this is the last page

  - `number` (integer, required)
    Page number

  - `numberOfElements` (integer, required)
    Number of elements in this request

  - `size` (integer, required)
    Number of objects returned per page

  - `totalElements` (integer, required)
    Total number of elements for the given request

  - `totalPages` (integer, required)
    Total number of pages for the given request

  - `sort` (array, required)
    Sort details of this page

  - `sort.direction` (string)
    Direction of the sort
    Example: ASC

  - `sort.property` (string)
    Property name to sort on

  - `sort.ascending` (boolean)
    True if the sort direction is ascending
    Example: true

  - `sort.descending` (boolean)
    True if the sort direction is descending
    Example: false

  - `results` (array, required)
    Array of all liquidation objects that match the specified query parameters, if any

  - `results.id` (string, required)
    Unique liquidation identifier

  - `results.account_id` (string, required)
    The identifier of the account requesting the liquidation

  - `results.created_at` (string, required)
    Date specified in ISO-8601 format, for example `2018-04-06T20:33:35Z`
    Example: 2018-04-06T20:33:35Z

  - `results.modified_at` (string, required)
    Date specified in ISO-8601 format, for example `2018-04-06T20:33:35Z`
    Example: 2018-04-06T20:33:35Z

  - `results.unique_reference_id` (string, required)
    The unique 32-character string representing the liquidation

  - `results.ripplenet_payment_id` (string)
    Unique identifier for a RippleNet payment

  - `results.ripplenet_payment_created_at` (string)
    Timestamp when the RippleNet payment was created

  - `results.ripplenet_sender_address` (string)
    RippleNet address of the sender
    Example: sf_gbp@rn.us.ca.san_francisco

  - `results.ripplenet_receiver_address` (string)
    RippleNet address of the receiver
    Example: sf_gbp@rn.us.ca.san_francisco

  - `results.destination_amount` (number, required)
    The total amount available for withdrawal after all fees have been collected
    Example: 10000

  - `results.destination_currency` (string, required)
    The 3-letter currency code of the destination currency
    Example: usd

  - `results.destination_venue` (string, required)
    The name of the exchange where XRP is liquidated into fiat currency
    Example: bitso

  - `results.estimate_type` (string)
    Enum: "firm", "indicative"

  - `results.expires_at` (string)
    The expiration time of the liquidation
    Example: 2018-04-06T20:33:35Z

  - `results.liquidation_source` (string, required)
    Enum: "xrrn", "operator"

  - `results.status` (string, required)
    Enum: "CREATED", "QUEUED", "STARTED", "COMPLETED", "PARTIALLY_COMPLETED", "FAILED"

## Response 400:

  - `400` (unknown)
    Bad liquidation request

## Response 400 fields (application/json):

  - `type` (string)
    Type of problem.
    Enum: "BAD_REQUEST", "INVALID_DATES", "INVALID_VENUE_AND_OR_CURRENCY", "INVALID_LIQUIDATION_AMOUNT", "NOT_FOUND", "REFERENCE_ID_NOT_UNIQUE", "AUTH_PROBLEM", "GENERIC_CLIENT_ERROR", "GENERIC_SERVER_ERROR"

  - `title` (string, required)
    Summary of the returned problem.

  - `status` (integer, required)
    HTTP error code.

  - `detail` (string)
    Description of the returned problem.

  - `correlationId` (string)
    ID of the correlating request.

  - `timestamp` (string)
    Date and time at which the error occured.

  - `liquidationId` (string)
    Unique identifier of the liquidation.

## Response 401:

  - `401` (unknown)
    Authorization has expired for user to get liquidations

## Response 401 fields (application/json):

  - `type` (string)
    Type of problem.
    Enum: "BAD_REQUEST", "INVALID_DATES", "INVALID_VENUE_AND_OR_CURRENCY", "INVALID_LIQUIDATION_AMOUNT", "NOT_FOUND", "REFERENCE_ID_NOT_UNIQUE", "AUTH_PROBLEM", "GENERIC_CLIENT_ERROR", "GENERIC_SERVER_ERROR"

  - `title` (string, required)
    Summary of the returned problem.

  - `status` (integer, required)
    HTTP error code.

  - `detail` (string)
    Description of the returned problem.

  - `correlationId` (string)
    ID of the correlating request.

  - `timestamp` (string)
    Date and time at which the error occured.

  - `liquidationId` (string)
    Unique identifier of the liquidation.

## Response 403:

  - `403` (unknown)
    User is not authorized to get all liquidations

## Response 403 fields (application/json):

  - `type` (string)
    Type of problem.
    Enum: "BAD_REQUEST", "INVALID_DATES", "INVALID_VENUE_AND_OR_CURRENCY", "INVALID_LIQUIDATION_AMOUNT", "NOT_FOUND", "REFERENCE_ID_NOT_UNIQUE", "AUTH_PROBLEM", "GENERIC_CLIENT_ERROR", "GENERIC_SERVER_ERROR"

  - `title` (string, required)
    Summary of the returned problem.

  - `status` (integer, required)
    HTTP error code.

  - `detail` (string)
    Description of the returned problem.

  - `correlationId` (string)
    ID of the correlating request.

  - `timestamp` (string)
    Date and time at which the error occured.

  - `liquidationId` (string)
    Unique identifier of the liquidation.

## Response 400 examples:

  - `response` (unknown)

## Response 401 examples:

  - `response` (unknown)

## Response 403 examples:

  - `response` (unknown)

