Skip to main content

Get Instruments in Graphql

This query returns a list of instruments with basic fields and instrument type.


Screenshot 2025-12-16 at 17.42.03.png

GraphQL Query

query GetInstrumentList {
  instrument(
    pagination: {
      limit: 20
      offset: 0
    }
  ) {
    id
    user_code
    name
    maturity_date
    instrument_type {
      id
      user_code
      name
    }
  }
}

Python Example

import requests

url = "https://<domain_name>/<realm_code>/<space_code>/graphql/"

headers = {
    "Authorization": "Bearer <access_token>",
    "Content-Type": "application/json"
}

payload = {
    "query": """
    query GetInstrumentList {
      instrument(
        pagination: {
          limit: 20
          offset: 0
        }
      ) {
        id
        user_code
        name
        maturity_date
        instrument_type {
          id
          user_code
          name
        }
      }
    }
    """
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())

Notes

  • Field names must match the schema (maturity_date, instrument_type, etc.)
  • Add filters the same way as in currency_history when needed (Previous documentation page)