Account Abstraction
API Reference
Gas Tank
(Organization) Get Gas Tank Top-Up History

Get Organization Gas Tank Top-Up History

Overview

This API endpoint allows you to retrieve the top-up history for an organization's gas tank. It provides details of each top-up transaction, including amounts and status.

  • HTTP Method: GET
  • Endpoint: {{BASE_URL}}/api/v1/client/gasTank/topUp/history

Query Parameters

  • limit (optional): Number of records to return per page. Default is 10.
  • page (optional): Page number for pagination. Default is 1.

Request Headers

  • X-CLIENT-ID: (required): Client ID which was generated when registering in Xellar Account Abstraction API Service Dashboard.
  • X-SIGNATURE: (required): Calculated signature, please refer to Authorization section.
  • X-TIMESTAMP: (required): Request timestamp in RFC3339 format.

Example Request Syntax

curl -X GET -H "Content-Type: application/json" \
-H "x-client-id: $YOUR_CLIENT_ID" \
-H "x-signature: $CALCULATED_SIGNATURE" \
-H "x-timestamp: $TIMESTAMP" \
"{{BASE_URL}}/api/v1/client/gasTank/topUp/history?limit=10&page=1"

Response

The response will include a JSON object with the following properties:

  • status (number): The HTTP status code of the response (e.g., 200 for success).
  • message (string): A message indicating the result of the request.
  • data (object): Contains the list of top-up transactions and pagination information:
    • data (array): An array of objects, each representing a top-up transaction with the following properties:
      • id (string): The unique identifier of the top-up transaction.
      • createdAt (string): The timestamp when the top-up was created.
      • updatedAt (string|null): The timestamp when the top-up was last updated, if applicable.
      • clientId (string): The client ID associated with the top-up.
      • gasTankId (string): The gas tank ID used in the top-up.
      • txHash (string): The transaction hash of the top-up.
      • network (string): The network on which the top-up was executed.
      • chainId (number): The chain ID of the network.
      • poolAddress (string): The address of the pool used for the top-up.
      • amount (string): The amount of tokens involved in the top-up.
      • tokenAddress (string): The address of the token used for the top-up.
      • status (string): The status of the top-up (e.g., "success").
    • pagination (object): Pagination information:
      • total (number): Total number of records.
      • page (number): Current page number.
      • limit (number): Number of records per page.
      • totalPages (number): Total number of pages.
      • hasNext (boolean): Whether there is a next page.
      • hasPrev (boolean): Whether there is a previous page.

Example Response

{
    "status": 200,
    "message": "success",
    "data": {
        "data": [
            {
                "id": "67a4ac1ceb676fcd47b81401",
                "createdAt": "2025-02-06T12:33:31.099Z",
                "updatedAt": null,
                "clientId": "19eb9738-dc52-493a-a602-b4d08f946bba",
                "gasTankId": "67a4711c28acbaf72c2cf541",
                "txHash": "0x...",
                "network": "polygon-pos",
                "chainId": 137,
                "poolAddress": "0x...",
                "amount": "504968000000000000",
                "tokenAddress": "0x...",
                "status": "success"
            }
        ],
        "pagination": {
            "total": 23,
            "page": 1,
            "limit": 10,
            "totalPages": 3,
            "hasNext": true,
            "hasPrev": false
        }
    }
}