Skip to content
Submit

LCX Liberty. American DeFi. Your keys. Your assets. Your control.

API reference

Submit

POST /v1/submit broadcasts a signed swap through the path most likely to fill it.

When to use it, and when not to

Optional. A wallet that can broadcast its own transaction should just do that, and most integrations never need this endpoint. It exists for one case where the broadcast path changes the price the user actually gets.

A proprietary-AMM leg fills only when the market maker's price update is sequenced immediately before your swap in the same block, which is an ordering only a block builder can produce. Broadcast through the public mempool, the swap lands wherever the mempool puts it, the maker leg misses, and the router falls back to pools. Sending the same signed bytes here instead lets the builder do that sequencing.

This only changes anything for a proprietary-AMM route on Ethereum. Every other transaction is broadcast publicly, which is what your own provider would have done, so there is no reason to route it through us.

Request

POST/v1/submit
chainId*number

Must match the chain the transaction was signed for. A mismatch is refused rather than forwarded.

rawTransaction*string

The signed transaction, 0x-prefixed hex, exactly as the wallet produced it. EIP-1559 (type 2) only: a legacy or EIP-2930 transaction is refused by name. Forwarded byte-identical, so the hash you computed is the hash that lands.

* required

We never sign, never hold keys and never alter the bytes. The endpoint forwards only transactions that target our own router and call one of its swap entrypoints; anything else is refused before any upstream sees it, so it cannot be used as a general relay.

Response

path tells you which route the transaction took, and it is the only field worth branching on.

pathmeaning
titanSent privately to the block builder. fallbackAfterSecs is when we give up waiting and re-broadcast publicly.
publicBroadcast to the public mempool. fallbackAfterSecs is null, because there is nothing to fall back to.
json
{
  "success": true,
  "data": {
    "txHash": "0x…",
    "path": "titan",
    "fallbackAfterSecs": 48
  }
}

The private window, and why it is bounded

A transaction sent privately is included only in blocks that builder wins. If it does not win one, the transaction sits signed, valid and invisible, which reads to a user as a hang. So after a fixed number of blocks without a receipt we re-broadcast the identical bytes to the public mempool.

The hash never changes. Watch the one txHash the response gave you and you cannot observe the switch except as inclusion. Do not re-sign, and do not submit again: a second submission is a second transaction.

Failures

codewhat happened
bad_requestNot 0x-hex, over the size ceiling, not a type-2 transaction, chainId disagrees with the signature, or the transaction does not call a swap entrypoint on our router.
unknown_chainThe chainId is not one we serve.
upstream_rejectedThe node or builder refused it, usually a bad nonce, an underpriced fee or a duplicate. The message is theirs, passed through: it is surfaced now rather than after a silent wait.