CorebanqCorebanq Developer Docs
Chartsv1

Generate line chart data

Generate line chart data based on flexible query parameters

GET/v1/charts/line

Authorization

bearerAuth
AuthorizationBearer <token>

Bearer token authentication. Use your user token in the format: Bearer {{user_token}}

In: header

Query Parameters

rec_type*string

Record type to query (e.g., currency_pairs, exchange_rates, ledgers, transactions)

x_field*string

Field to use for X-axis values

y_field*string

Field to use for Y-axis values

group_by?string

Field to group by for multiple series

limit?integer

Limit number of data points

offset?integer

Offset for pagination

color?string

Base color for chart series (HSL format)

fill_gaps?string

Gap filling strategy for missing time points

search.type?string

Filter by type (e.g., SELL, BUY, MID)

search.source?string

Filter by source (e.g., SNB, Currency Cloud)

search.date.gte?string

Filter by date greater than or equal to (RFC3339 format)

search.date.lte?string

Filter by date less than or equal to (RFC3339 format)

search.date.gt?string

Filter by date greater than (RFC3339 format)

search.date.lt?string

Filter by date less than (RFC3339 format)

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/charts/line?rec_type=currency_pairs&x_field=date&y_field=rate&group_by=base_currency&limit=50&offset=0&color=hsl%2858%2C+70%25%2C+50%25%29&fill_gaps=daily&search.source=SNB"
[
  {
    "id": "string",
    "color": "string",
    "data": [
      {
        "x": "string",
        "y": "string"
      }
    ]
  }
]
{
  "error": "string",
  "code": "string",
  "params": {}
}
{
  "error": "string",
  "code": "string",
  "params": {}
}
{
  "error": "string",
  "code": "string",
  "params": {}
}
{
  "error": "string",
  "code": "string",
  "params": {}
}
{
  "error": "string",
  "code": "string",
  "params": {}
}