Guides
API principles

Pagination

Bloquo's four paginated list shapes and the parameters of each.

Bloquo's lists come from different services and paginate in four ways. In all of them the first page is 1, the default size is 20 and the maximum is 100.

ListParametersShape
Customer Service, trade and whitelist (childrenList, counterparty/list, pair, order, crypto/wallet/whitelist)page, pageSizeresult: {data, pagination: {currentPage, pageSize, totalItems, totalPages}}
Orders (orders/deposit, orders/withdrawal, orders/fx-payment and their /children)page, pageSize{items, meta: {currentPage, pageSize, totalItems, totalPages}}, no envelope
Transactions (transaction)page, pageSizeresult: {transactions, totalRecords, currentPage, pageSize, totalPages}
Notifications (notification/preference, notification/order)pageNumber (preferences) or page (notification orders), pageSizeresult: {data, pagination: {totalItems, page, pageSize, totalPages, hasPreviousPage, hasNextPage}}

Bloquo doesn't document the defaults of page and pageSize. In Mimicr they are 1 and 20, capped at 100.

Customer Service

bash
curl "https://bloquo.mimicr.dev/api/v1/customer/1001/counterparty/list?page=1&pageSize=20" \
  -H "Authorization: Bearer <token>"
json
{
  "status": true,
  "statusCode": 200,
  "result": {
    "data": [ { "id": 1084, "legalName": "Maria Santos" } ],
    "pagination": { "currentPage": 1, "pageSize": 20, "totalItems": 1, "totalPages": 1 }
  },
  "message": null
}

Orders

bash
curl "https://bloquo.mimicr.dev/api/v1/customer/1001/orders/deposit?status=COMPLETED&page=1&pageSize=20" \
  -H "Authorization: Bearer <token>"
json
{
  "items": [ { "id": 1043, "status": "COMPLETED", "currency": "BRL", "totalAmount": 1000 } ],
  "meta": { "currentPage": 1, "pageSize": 20, "totalItems": 1, "totalPages": 1 }
}

Orders also accept status, startDate and endDate (ISO 8601) and come newest first.

Transactions

bash
curl "https://bloquo.mimicr.dev/api/v1/customer/1001/transaction?accountId=1004&pageSize=5" \
  -H "Authorization: Bearer <token>"
json
{
  "status": true,
  "result": {
    "transactions": [
      { "id": 1116, "accountId": 1004, "type": "Credit", "amount": 200, "currency": "BRL", "orderId": 1113, "orderType": "DEPOSIT", "description": "Deposit confirmed" }
    ],
    "totalRecords": 14,
    "currentPage": 1,
    "pageSize": 5,
    "totalPages": 3
  },
  "message": "Transactions successfully retrieved."
}

Filters: accountId, currency, type, orderId, orderType, startDate and endDate.

Notifications

json
{
  "status": true,
  "result": {
    "data": [ { "id": 1121, "orderType": "FxPayment", "status": "Completed" } ],
    "pagination": { "totalItems": 35, "page": 1, "pageSize": 5, "totalPages": 7, "hasPreviousPage": false, "hasNextPage": true }
  },
  "message": null
}

Watch out for empty results: with no preferences, GET .../notification/preference answers 404 No Notification Preferences found.; with no notification orders matching the filter, GET .../notification/order answers 204 with no body.

CSV reports

GET .../transaction/report and GET .../notification/report take the same filters as the lists and return every row, unpaginated, up to 1000. Above that the response is 400 Export limit exceeded (Found N; Limit: 1000). Please refine your search criteria.; with no rows, 400 No transactions found to export. (or No notification orders found to export.).