sendTx
You need to sign the transaction body before sending it to the server. More details can be found here: https://docs.lighter.xyz/developers
post/api/v1/sendTx
Body
tx_typeinteger · uint8Required
Numeric transaction type returned by the signer.
tx_infostringRequiredExample:
Signed transaction object serialized as a JSON string. Pass the tx_info string returned by the signer unchanged; its fields depend on tx_type.
{"AccountIndex":123,"ApiKeyIndex":4,"Nonce":1,"ExpiredAt":1792713600000,"Sig":"<signature>"}price_protectionbooleanOptionalDefault:
trueResponses
200
A successful response.
application/json
Fields with zero or empty values may be omitted; handle optional properties when decoding responses.
codeinteger · int32RequiredExample:
200messagestringOptional
tx_hashstringRequiredExample:
0x70997970C51812dc3A010C7d01b50e0d17dc79C8predicted_execution_time_msinteger · int64RequiredExample:
1751465474volume_quota_remaininginteger · int64Optional
remaining_send_txinteger · int64Optional
Remaining sendTx requests in the current per-minute bucket. Only returned for Premium accounts; omitted otherwise.
400
Bad request
application/json
post/api/v1/sendTx
POST /api/v1/sendTx HTTP/1.1
Host: mainnet.zklighter.elliot.ai
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 154
"tx_type=1&tx_info='{\'AccountIndex\':123,\'ApiKeyIndex\':4,\'Nonce\':1,\'ExpiredAt\':1792713600000,\'Sig\':\'<signature>\'}'&price_protection=true"{
"code": 200,
"message": "text",
"tx_hash": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8",
"predicted_execution_time_ms": 1751465474,
"volume_quota_remaining": 1,
"remaining_send_tx": 1
}Last updated
Was this helpful?