Skip to main content

Get Prices in Graphql

This query returns price history rows for one instrument (by user_code).


Screenshot 2025-12-16 at 17.49.19.png


GraphQL Query

query GetPriceHistoryList {
  price_history(
    pagination: {
      limit: 20
      offset: 0
    }
    filters: {
      instrument: {
        user_code: {
          exact: "XS2200244072"
        }
      }
    }
  ) {
    id
    date
    principal_price
    instrument {
      id
      user_code
      name
    }
    pricing_policy {
      id
      user_code
    }
  }
}

Filter Highlights

filters: {
  instrument: {
    user_code: { exact: "XS2200244072" }
  }
}
  • instrument is a related object.
  • You can filter it by its fields.
  • exact means strict match.

Why Use user_code

  • Stable identifier for business use.
  • No need to know internal id.

Notes

  • Add a date filter if you want one day only:
date: { exact: "2023-12-01" }
  • Pagination stays the same for list queries.