Top-Up Organization Gas Tank
Overview
This API endpoint allows you to top up an organization's gas tank using a specified token. The top-up can be processed immediately or scheduled for a short delay to account for mining times.
- HTTP Method: POST
- Endpoint: {{BASE_URL}}/api/v1/client/gasTank/topUp
Request Body Parameters
- txHash(required): The transaction hash of the top-up.
- chainId(required): The chain ID where the transaction is executed.
- tokenAddress(required): The address of the token used for the top-up. Must be the USDT address.
- poolAddress(required): The address of the Xellar pool. Refer to the Pool Section for details.
- immediate(required): A boolean indicating whether the top-up should be processed immediately. If- true, the top-up is checked immediately; if- false, it is checked approximately 20 seconds later to compensate for mining delay.
- signature(required): A signature of the format- ${chainId}.${txHash}signed by the wallet that initiated the transfer.
Example Request Body
{
  "txHash": "0x...",
  "chainId": 137,
  "tokenAddress": "0x...",
  "poolAddress": "0x....",
  "immediate": true,
  "signature": "0x...."
}Request Headers
- X-APP-ID: (required): APP ID/Project ID obtained from dashboard.
- X-SIGNATURE: (required): Calculated signature, please refer to Authorization section.
- X-TIMESTAMP: (required): Request timestamp in RFC3339 format.
Example Request Syntax
curl -X POST -H "Content-Type: application/json" \
-H "x-app-id: $YOUR_APP_ID" \
-H "x-signature: $CALCULATED_SIGNATURE" \
-H "x-timestamp: $TIMESTAMP" \
-d '{
    "txHash": "0x...",
    "chainId": 137,
    "tokenAddress": "0x...",
    "poolAddress": "0x....",
    "immediate": true,
    "signature": "0x...."
}' {{BASE_URL}}/api/v1/client/gasTank/topUpResponse
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 top-up operation.
Example Response
{
  "status": 200,
  "message": "success topup"
}