Inventory Filtering

The inventory filtering endpoint filters for bonds that are available
for trading at the time of the request. Multiple parameters can be
filtered for, including reference data fields (such as S&P rating, bond
type) as well as the bid / ask price and yields. These filters should
be specified in the filters query parameter. We're also able to
filter for ISINs that fulfil a specific trade size.

Two types of filtering are supported:

  • Reference data filtering: specify filters for reference data fields,
    such as S&P rating, bond type, and more.
  • Live inventory filtering: specify filters for price, yield to
    maturity, and yield to worst, filter for quotes that match a trade
    size, and get bids and asks from the returns query parameter.

In addition, specific fields can be requested in the response. These
fields should be specified in the returns query parameter.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

The filters for live inventory are in the format of a JSON object. In a
filter object, each key is either a field to filter on or an operator.
Each value is either a filter condition object or, in the case of
certain operators, an array of filter objects.

A filter condition object can contain the following fields:

  • equal_to: Exact value for the filter.
  • not_equal_to: Not equal to value for the filter.
  • greater_than: Greater than value for the filter.
  • greater_than_or_equal_to: Greater than or equal to value for the filter.
  • less_than: Less than value for the filter.
  • less_than_or_equal_to: Less than or equal to value for the filter.
  • in: Array of values for the filter.
  • not_in: Array of values not to include in the filter.
  • is_null: Boolean to filter for null / not-null values.
  • includes: String to include in the filter.
  • not_includes: String not to include in the filter.
  • starts_with: String to start with in the filter.
  • ends_with: String to end with in the filter.

The fields that can be filtered on are:

  • price
  • yield_to_maturity
  • yield_to_worst
  • isin
  • cusip
  • issuer
  • sector
  • description
  • type
  • issue_date
  • maturity_date
  • workout_date
  • treasury_benchmark
  • sp_rating
  • lowest_rating_rank
  • coupon
  • currency
  • country_issue
  • country_of_risk
  • emerging_status
  • liquidity_micro_buy
  • liquidity_micro_sell
  • liquidity_micro_aggregate
  • liquidity_retail_buy
  • liquidity_retail_sell
  • liquidity_retail_aggregate
  • liquidity_institutional_buy
  • liquidity_institutional_sell
  • liquidity_institutional_aggregate
  • Any of the other fields in the reference data model.

The operators that can be used are:

  • and: Array of filter objects to be combined with an AND operator.
  • not: Filter object to be negated.
  • or: Array of filter objects to be combined with an OR operator.

For example, a sample filter object might look like this:

{
  "yield_to_worst": {
    "greater_than": 6.5
  },
  "price": {
    "less_than": 100
  },
  "maturity_date": {
    "less_than": "2030-01-01",
    "greater_than": "2026-01-01"
  },
  "sp_rating": {
    "greater_than": "BBB"
  },
  "issuer": {
    "includes": "Apple"
  },
  "liquidity_institutional_buy": {
    "in": [3, 4, 5]
  },
  "or": [
    {
      "description": {
        "starts_with": "app"
      }
    },
    {
      "description": {
        "starts_with": "united"
      }
    }
  ]
}

This must be encoded as a JSON string in the query parameter.

returns
array of objects
required

Fields returned for inventory filtering. In order to get live inventory
information, you must add bids and asks -- each of these fields
will be an array of existing inventory for a given instrument,
including information about its price, minimum quantity, total
quantity, and yield to worst (if available). Note that the inventory is
not inclusive of mark-ups.

returns*
sort_by
array of strings

The fields to sort the results by. Each field can optionally specify a direction
by appending '.asc' or '.desc'. If no direction is specified, defaults to ascending order.

Examples:

  • isin.asc
  • cusip.desc
  • par_value.asc
  • maturity_date
  • issuer
sort_by
integer

Page number of results to return. Defaults to 1.

integer
1 to 1000

Number of items to return. Must be in range 1-1000, defaults to 100.

string

Filtering by trade_size will only return asks and bids that would
completely fill an order of the specified quantity. More specifically,
it will return quotes where the minimum quantity is less than or equal
to the specified trade_size and the total quantity is greater than or
equal to the specified trade_size. Optionally, set value to "lowest" to
get all the quotes sorted from least to greatest min_quantity.

string

JSON-encoded objective function that defines the scoring formula for ranking bonds.
When provided alongside objective_score in returns, the server computes a score for each bond.
Currently returns a stub value of 0 — the real computation is connected in a follow-up.

string
enum

Specify a side for inventory filters. Possible values:

  • 'buy' will limit the results to bonds that have quotes to buy
    the instrument.
  • 'sell' will limit the results to bonds that have quotes to sell
    the instrument.
  • 'both' will limit the results to bonds that have quotes on both
    sides of the market, i.e. at least one quote to buy and one to sell.

Important note: If you are building a UI that leverages this API, you should be
especially cognizant that this value represents inventory side, not trade side.

A client who wants to purchase a bond will look for asks/offers where the
counterparty wants to sell. Hence, they should pass 'sell' to the API.

A client who wants to sell a bond will look for bids where the counterparty
wants to buy. Hence, they should pass 'buy' to the API.

Allowed:
string

The risk group ID to filter for tradable inventory. If left null,
and a single risk group exists for the organization, it will be
used as the default risk group. If left null, and more than one
risk group exists, the request will fail.

boolean
Defaults to false

Whether to use close data after market hours. When false (default),
only reference data is returned when market is closed. When true,
orders are shown as available even after market close (9:30 AM - 4:00 PM EST/EDT, Monday-Friday).

Responses

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json