Skip to main content
Two independent pairs of roles apply to every swap.

Taker and maker (who asked, who answered)

The legs are named from the maker’s side: Both roles use the same endpoints for negotiation and settlement. One API key can hold both scopes.

Initiator and counterparty (who holds the secret)

The initiator is not chosen by who asked. It is chosen by the chains: whoever funds the leg on the chain with the longer safe timelock is the initiator. On a tie, the taker (leg b) is the initiator. See HTLC and timelocks. Example: a taker selling BTC for Sepolia USDT funds the Bitcoin leg (24 h), so the taker is the initiator.
You learn whether you are the initiator from the thread: the server refuses the initiator’s accept without a hashlock. Treat any refusal that asks for a hashlock as “you are the initiator”.

The keeper

The keeper is a server process. It can submit claim and refund calls on chains where those calls are permissionless, so a leg settles even if its party is offline. It never receives user principal: a claim pays the leg’s fixed recipient, a refund pays the funder. See Non-custodial guarantees.