Skip to content
Start Trading

List Locates

LocateGetLocatesResponse v1().locates().getLocates(LocateGetLocatesParamsparams = LocateGetLocatesParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
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.

ParametersExpand Collapse
LocateGetLocatesParams params
Optional<Long> accountId
Optional<LocalDate> effectiveDate

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

formatdate
Optional<List<String>> instrumentIds

Comma-separated instrument IDs (UUID) or symbols.

Optional<List<Status>> status

Comma-separated locate statuses to filter by

REQUESTED("REQUESTED")
ACCEPTED("ACCEPTED")
REJECTED("REJECTED")
EXPIRED("EXPIRED")
ReturnsExpand Collapse
class LocateGetLocatesResponse:
List<Locate> data
long accountId

Account the locate is booked to.

formatint64
String clientRequestId

Caller-assigned id of the locate request.

LocalDate effectiveDate

New York calendar date the locate is in force for.

formatdate
String instrumentId

Instrument id.

formatuuid
String locateRequestId

Engine-assigned locate request id.

formatuuid
long requestedQuantity

Number of shares requested.

formatint64

Presented status of the locate.

One of the following:
REQUESTED("REQUESTED")
ACCEPTED("ACCEPTED")
REJECTED("REJECTED")
EXPIRED("EXPIRED")
Optional<String> locateId

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

formatuuid
Optional<Long> quantity

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

formatint64

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

formatuuid
Optional<Long> reservedQuantity

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

formatint64
Optional<Long> usedQuantity

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

formatint64

List Locates

package com.clearstreet.api.example;

import com.clearstreet.api.client.ClearStreetClient;
import com.clearstreet.api.client.okhttp.ClearStreetOkHttpClient;
import com.clearstreet.api.models.v1.locates.LocateGetLocatesParams;
import com.clearstreet.api.models.v1.locates.LocateGetLocatesResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        ClearStreetClient client = ClearStreetOkHttpClient.builder()
            .fromEnv()
            .apiKey("My API Key")
            .build();

        LocateGetLocatesResponse response = client.v1().locates().getLocates(0L);
    }
}
{
  "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
    }
  ]
}
Returns Examples
{
  "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
    }
  ]
}