## List Locates

`client.V1.Locates.GetLocates(ctx, accountID, query) (*V1LocateGetLocatesResponse, error)`

**get** `/v1/accounts/{account_id}/locates`

List locates for the account on one effective date, which defaults to today's
New York calendar date. Filter by comma-separated statuses and instrument ids or symbols.

### Parameters

- `accountID int64`

- `query V1LocateGetLocatesParams`

  - `EffectiveDate param.Field[Time]`

    Effective date to list; defaults to today's New York calendar date. Explicit dates are used unchanged, including weekends and holidays.

  - `InstrumentIDs param.Field[[]InstrumentIDOrSymbol]`

    Comma-separated instrument IDs (UUID) or symbols.

  - `Status param.Field[[]string]`

    Comma-separated locate statuses to filter by

    - `const V1LocateGetLocatesParamsStatusRequested V1LocateGetLocatesParamsStatus = "REQUESTED"`

    - `const V1LocateGetLocatesParamsStatusAccepted V1LocateGetLocatesParamsStatus = "ACCEPTED"`

    - `const V1LocateGetLocatesParamsStatusRejected V1LocateGetLocatesParamsStatus = "REJECTED"`

    - `const V1LocateGetLocatesParamsStatusExpired V1LocateGetLocatesParamsStatus = "EXPIRED"`

### Returns

- `type V1LocateGetLocatesResponse struct{…}`

  - `Data LocateList`

    - `AccountID int64`

      Account the locate is booked to.

    - `ClientRequestID string`

      Caller-assigned id of the locate request.

    - `EffectiveDate Time`

      New York calendar date the locate is in force for.

    - `InstrumentID string`

      Instrument id.

    - `LocateRequestID string`

      Engine-assigned locate request id.

    - `RequestedQuantity int64`

      Number of shares requested.

    - `Status LocateStatus`

      Presented status of the locate.

      - `const LocateStatusRequested LocateStatus = "REQUESTED"`

      - `const LocateStatusAccepted LocateStatus = "ACCEPTED"`

      - `const LocateStatusRejected LocateStatus = "REJECTED"`

      - `const LocateStatusExpired LocateStatus = "EXPIRED"`

    - `LocateID string`

      Engine-assigned locate id; set once the locate is granted.
      When a null/undefined value is observed, it indicates it does not apply.

    - `Quantity int64`

      Number of shares granted; set once the locate is granted.
      When a null/undefined value is observed, it indicates it does not apply.

    - `RelatedOrderID string`

      Client order id the request relates to, if any.
      When a null/undefined value is observed, it indicates it does not apply.

    - `ReservedQuantity int64`

      Number of granted shares reserved.
      When a null/undefined value is observed, it indicates it does not apply.

    - `UsedQuantity int64`

      Number of granted shares already used.
      When a null/undefined value is observed, it indicates it does not apply.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/clear-street/clear-street-go"
  "github.com/clear-street/clear-street-go/option"
)

func main() {
  client := clearstreet.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.V1.Locates.GetLocates(
    context.TODO(),
    0,
    clearstreet.V1LocateGetLocatesParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
```

#### Response

```json
{
  "metadata": {
    "request_id": "request_id",
    "next_page_token": "U3RhaW5sZXNzIHJvY2tz",
    "page_number": 1,
    "previous_page_token": "U3RhaW5sZXNzIHJvY2tz",
    "total_items": 42,
    "total_pages": 5
  },
  "error": {
    "code": 400,
    "message": "Order quantity must be greater than zero",
    "details": [
      {
        "foo": "bar"
      }
    ]
  },
  "data": [
    {
      "account_id": 0,
      "client_request_id": "client_request_id",
      "effective_date": "2019-12-27",
      "instrument_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "locate_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "requested_quantity": 0,
      "status": "REQUESTED",
      "locate_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "quantity": 0,
      "related_order_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "reserved_quantity": 0,
      "used_quantity": 0
    }
  ]
}
```
