Charts API

Use the Charts API to generate the charts shown on Midaz console.

Request a chart

POST /v1/organizations/{{id}}/ledgers/{{id}}/charts

Use this endpoint to create one of the following charts:

  • Total Transactions: We will compile the SENT transactions in the database for that particular ledger. This provides an overview of the transaction volume processed, offering insights into the total activity over the selected period.

  • Transactions by Status: We will present the total number of transactions according to their statuses. This detailed view by status allows for a more granular analysis of the health and flow of transactions, aiding in identifying potential bottlenecks or points of attention in the operation.

  • Top Instruments: We will provide the total amount allocated in accounts for the ledger's instruments. This indicator is crucial to understanding the distribution of resources and identifying which instruments are capturing the most asset allocation, offering a clear view of investment preferences and trends.

    • As it does not make sense to consider this value over time, the startDate and endDate parameters are not necessary.

    • Additionally, the limit query parameter can be sent to define how many instruments will be returned. If not specified, the default is 3 instruments.

Headers

NameValue

Content-Type

application/json

Authorization

Bearer <token>

Request body

The request body sent will depend on the type of chart you want to create. Total transactions:

{
  "type": "totalTransactions",
  "startDate": "2024-01-01",
  "endDate": "2024-05-12"
}

Transactions by status:

{
  "type": "transactionsByStatus",
  "startDate": "2024-01-01",
  "endDate": "2024-05-12"
}

Top instruments:

{
  "type": "totalAmountByInstrument"
}

Response codes

{
    "type": "totalTransactions",
    "startDate": "2024-01-01",
    "endDate": "2024-05-12",
    "data": [
        {
            "metric": "totalTransactions",
            "count": 195
        }
    ]
}

Last updated