Account Abstraction
API Reference
Gas Tank
(Organization) Get Gas Tank Usage History

Get Organization Gas Tank Usage History

Overview

This API endpoint allows you to retrieve the gas tank usage history for an organization. It provides details of each usage transaction, including amounts and rates.

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

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/history"

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 (array): An array of objects, each representing a gas tank usage transaction with the following properties:
    • id (string): The unique identifier of the usage transaction.
    • clientId (string): The client ID associated with the transaction.
    • clientGasTankId (string): The gas tank ID used in the transaction.
    • userOpId (string): The user operation ID related to the transaction.
    • nativeToGasTankRate (number): The conversion rate from native currency to gas tank currency.
    • amountInNative (string): The amount in native currency.
    • amountInGasTank (string): The amount in gas tank currency.
    • initialDeductedAmountInNative (string): The initially deducted amount in native currency.
    • initialDeductedAmountInGasTank (string): The initially deducted amount in gas tank currency.
    • refundedAmountInNative (string|null): The refunded amount in native currency, if any.
    • refundedAmountInGasTank (string|null): The refunded amount in gas tank currency, if any.
    • createdAt (string): The timestamp when the transaction was created.
    • refundedAt (string|null): The timestamp when the refund was processed, if applicable.

Example Response

{
    "status": 200,
    "message": "success",
    "data": [
        {
            "id": "67a48d4a531158cc6112d9d6",
            "clientId": "19eb9738-dc52-493a-a602-b4d08f946bba",
            "clientGasTankId": "67a4711c28acbaf72c2cf541",
            "userOpId": "67a48cef1028c9207b639628",
            "nativeToGasTankRate": 0.31823,
            "amountInNative": "8409380409424485",
            "amountInGasTank": "2676117127691153",
            "initialDeductedAmountInNative": "11386606973247233",
            "initialDeductedAmountInGasTank": "3623559937096467",
            "refundedAmountInNative": "2977226563822748",
            "refundedAmountInGasTank": "947442809405314",
            "createdAt": "2025-02-06T10:22:01.886Z",
            "refundedAt": "2025-02-06T10:25:06.767Z"
        }
    ]
}