For the complete documentation index, see llms.txt. This page is also available as Markdown.

buyVolumeQuota

Buy volume quota with USDC. Submit a signed L2Transfer of quota × 500 USDC base units to the volume quota payment account; the server validates it, sends it and credits the quota to the payer's L1 address (or destination_l1_address) once the transfer executes. If execution takes longer than about 5 seconds the response is status=pending and the purchase is claimed by calling again with tx_hash. Exactly one of tx_info (new purchase) or tx_hash (claim) is sent per call. Each transfer is credited once. Only Plus and Premium/Advanced accounts can receive quota, and the balance after the purchase may not exceed 30,000,000. See Volume Quota.

post
/api/v1/buyVolumeQuota
Header parameters
authorizationstringOptional

Auth token in the Authorization header (or pass auth in the body).

Body
quotainteger · int64Required

Volume quota to buy, in transactions. Price is quota × 500 USDC base units (1,000,000 quota = 500 USDC); at most 15,000,000 per request.

tx_infostringOptional

Required for a new purchase (omit when claiming with tx_hash). Signed L2Transfer (tx type 12) of USDC (asset index 3), exactly quota × 500 USDC base units from the paying account to the volume quota payment account (index 765210 on Lighter, 51687 on Lighter on Robinhood Chain), as sent to sendTx. Omit when claiming a pending purchase with tx_hash.

tx_hashstringOptional

Optional; claim only, not needed for a normal purchase. Pass instead of tx_info to finish a purchase whose earlier call answered status=pending: the tx_hash from that response. No new payment is made. Credits that purchase once its transfer has executed; the payer must authenticate.

destination_l1_addressstringOptional

Credit this L1 address instead of the payer's own. Must be a Plus or Premium/Advanced account's L1 address.

authstringOptional

Auth token of the paying account (alternatively the Authorization header).

Responses
200

A successful response.

application/json
codeinteger · int32RequiredExample: 200
messagestringOptional
tx_hashstringRequired

Hash of the USDC payment transfer; use it with tx_hash to claim a pending purchase.

Example: 0x70997970C51812dc3A010C7d01b50e0d17dc79C8
l1_addressstringRequired

L1 address the quota is (or will be) credited to.

Example: 0x70997970C51812dc3A010C7d01b50e0d17dc79C8
quotainteger · int64Required

Quota credited (status=credited) or to be credited (status=pending).

Example: 1000000
volume_quota_remaininginteger · int64Optional

Balance of the credited L1 address after the purchase. Omitted while pending.

Example: 1010780
statusstring · enumRequired

credited: quota added. pending: the transfer has not executed within the wait; call again with tx_hash.

Example: creditedPossible values:
post/api/v1/buyVolumeQuota
POST /api/v1/buyVolumeQuota HTTP/1.1
Host: mainnet.zklighter.elliot.ai
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 91

"quota=1&tx_info='text'&tx_hash='text'&destination_l1_address='text'&auth='text'"
{
  "code": 200,
  "message": "text",
  "tx_hash": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
  "l1_address": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
  "quota": 1000000,
  "volume_quota_remaining": 1010780,
  "status": "credited"
}

Last updated

Was this helpful?