# Hashlock Markets > Developer documentation for Hashlock Markets: non-custodial atomic P2P cross-chain swaps (Bitcoin, Ethereum, Base, Robinhood Chain, TRON, Solana) via sealed RFQ and HTLC — REST API, SDK, webhooks and MCP for AI agents. - [Introduction](https://docs.hashlock.markets/index.md): Non-custodial atomic P2P cross-chain swaps: Bitcoin, Ethereum, Base, Robinhood Chain, TRON and Solana, via sealed RFQ and HTLC. - [Quickstart](https://docs.hashlock.markets/quickstart.md): From an API key to a settled swap over the /v1 REST API. - [How it works](https://docs.hashlock.markets/concepts/how-it-works.md): Sealed RFQ, negotiation thread, agreed swap, two HTLC legs, and the secret that settles both. - [HTLC and timelocks](https://docs.hashlock.markets/concepts/htlc-and-timelocks.md): One sha256 hashlock on every chain, and asymmetric timelocks so nobody holds a free option. - [Roles](https://docs.hashlock.markets/concepts/roles.md): Taker, maker, initiator and counterparty — and which leg each one funds. - [Networks](https://docs.hashlock.markets/concepts/networks.md): Supported chains, their keys in the API and MCP, the HTLC contracts, and how many confirmations a funding needs. - [Settlement by chain](https://docs.hashlock.markets/concepts/settlement-by-chain.md): How the HTLC escrow is built on Bitcoin, EVM, TRON and Solana. - [Fees](https://docs.hashlock.markets/concepts/fees.md): Who pays the protocol fee, when you see it, and what the networks charge on top. - [Non-custodial guarantees](https://docs.hashlock.markets/concepts/non-custodial.md): What the server and the keeper can and cannot do with your funds. - [API keys](https://docs.hashlock.markets/guides/api-keys.md): Minting, scopes, expiry, limits, and proving wallets. - [Settle a leg](https://docs.hashlock.markets/guides/settle-a-leg.md): Build unsigned fund, claim and refund transactions, sign them yourself, and broadcast. - [Token listing](https://docs.hashlock.markets/guides/token-listing.md): How tokens beyond the curated set get on Hashlock Markets: launchpad listing, listing by API key, the checks, and when a token closes. - [Webhooks](https://docs.hashlock.markets/guides/webhooks.md): Swap lifecycle events pushed to your HTTPS endpoint, signed with HMAC-SHA256. - [Maker feed](https://docs.hashlock.markets/guides/maker-feed.md): A WebSocket that streams the RFQs you can quote, and takes your quotes back. - [Rate limits and idempotency](https://docs.hashlock.markets/guides/rate-limits-and-idempotency.md): RateLimit headers, 429 handling, and safe retries with Idempotency-Key. - [MCP server](https://docs.hashlock.markets/agents/mcp.md): Connect Claude or any MCP client to Hashlock Markets: hosted by URL, or local over stdio. - [Agents without a human](https://docs.hashlock.markets/agents/agents-without-a-human.md): An agent that holds its own wallet mints its own API key by signature, then trades over MCP or REST. - [Agent skill](https://docs.hashlock.markets/agents/agent-skill.md): A ready-made skill that teaches any AI agent to trade on Hashlock Markets: RFQ, negotiation and atomic settlement with its own wallet. - [Introduction](https://docs.hashlock.markets/api-reference/introduction.md): Servers, authentication and conventions of the /v1 REST API. - [Verify the key, list its scopes and the wallets attached to its account](https://docs.hashlock.markets/api-reference/verify-the-key-list-its-scopes-and-the-wallets-attached-to-its-account.md) - [Start minting an API key: a single-use nonce (5 minutes). No key needed.](https://docs.hashlock.markets/api-reference/start-minting-an-api-key:-a-single-use-nonce-5-minutes-no-key-needed.md) - [Mint an API key with a wallet signature — no browser, no key needed (agents start here)](https://docs.hashlock.markets/api-reference/mint-an-api-key-with-a-wallet-signature-—-no-browser-no-key-needed-agents-start-here.md): Sign, with the wallet, a message that says `create an API key`, names the address and carries a nonce from `GET /v1/keys/nonce`. Optional lines `Key name: ` and `Scopes: read, taker` (default all three) decide the key — they are read from the signed text only. The key belongs to the account th… - [A single-use nonce to put in the message you are about to sign](https://docs.hashlock.markets/api-reference/a-single-use-nonce-to-put-in-the-message-you-are-about-to-sign.md): Expires shortly and is consumed by the first proof that presents it. It is a LINK nonce: it cannot be spent at a login endpoint, so the signature you collect is not a session. `?purpose=authorize` issues the nonce for the login wallet's authorisation instead — a separate pool. - [Prove a EVM wallet this account holds](https://docs.hashlock.markets/api-reference/prove-a-evm-wallet-this-account-holds.md): Sign with personal_sign / EIP-191 a message carrying `Hashlock Markets`, the words `link this wallet`, the address itself and a nonce from `GET /v1/wallets/nonce`. Needed before this account can create an order that GIVES a EVM asset. The proof is recorded as a proof — it does not become the account… - [Prove a TRON wallet this account holds](https://docs.hashlock.markets/api-reference/prove-a-tron-wallet-this-account-holds.md): Sign with signMessageV2 a message carrying `Hashlock Markets`, the words `link this wallet`, the address itself and a nonce from `GET /v1/wallets/nonce`. Needed before this account can create an order that GIVES a TRON asset. The proof is recorded as a proof — it does not become the account's payout… - [Prove a Solana wallet this account holds](https://docs.hashlock.markets/api-reference/prove-a-solana-wallet-this-account-holds.md): Sign with ed25519 signMessage, base58 a message carrying `Hashlock Markets`, the words `link this wallet`, the address itself and a nonce from `GET /v1/wallets/nonce`. Needed before this account can create an order that GIVES a Solana asset. The proof is recorded as a proof — it does not become the… - [Prove a Bitcoin wallet this account holds](https://docs.hashlock.markets/api-reference/prove-a-bitcoin-wallet-this-account-holds.md): Sign with BIP-322 (UniSat / OKX `signMessage(msg, 'bip322-simple')`) a message carrying `Hashlock Markets`, the words `link this wallet`, and a nonce from `GET /v1/wallets/nonce`. Needed before this account can create an order that GIVES a Bitcoin asset. The proof is recorded as a proof — it does no… - [Withdraw a proof this account made](https://docs.hashlock.markets/api-reference/withdraw-a-proof-this-account-made.md): Removes the address from what this account can trade from. Reach for it after rotating a leaked key: the proofs made with that key outlive it otherwise. Proofs only — a login address is not one and is not removable here. Putting a proof back needs that wallet to sign again. - [Enabled asset registry — the whole list, or a search](https://docs.hashlock.markets/api-reference/enabled-asset-registry-—-the-whole-list-or-a-search.md): Without `q`, `limit` or `offset`: every enabled asset. Any of those turns on search, where `chain` and `verified` also apply: an exact symbol first, then verified, then alphabetical, paged by `nextOffset`. - [Ask for a token to be listed](https://docs.hashlock.markets/api-reference/ask-for-a-token-to-be-listed.md): Runs the same checks as the launchpad listener: an on-chain check (EVM: a simulated transfer; Solana: a classic SPL mint with no mint or freeze authority — Token-2022 is not listable), security scan (Powered by GoPlus Security) and market thresholds (market cap ≥ $1M, liquidity ≥ $100k, 24h volume ≥… - [Order book (open RFQs to quote) — cursor-paginated](https://docs.hashlock.markets/api-reference/order-book-open-rfqs-to-quote-—-cursor-paginated.md) - [Create an RFQ (scope: taker)](https://docs.hashlock.markets/api-reference/create-an-rfq-scope:-taker.md) - [Your own RFQs — private ones included, every status — cursor-paginated](https://docs.hashlock.markets/api-reference/your-own-rfqs-—-private-ones-included-every-status-—-cursor-paginated.md): The order book lists only public open RFQs. This lists everything you created, newest first: how to find an order whose create call timed out, and its id to cancel it. - [Get an RFQ](https://docs.hashlock.markets/api-reference/get-an-rfq.md) - [The negotiation threads on an RFQ — every one for its creator, your own for a maker](https://docs.hashlock.markets/api-reference/the-negotiation-threads-on-an-rfq-—-every-one-for-its-creator-your-own-for-a-maker.md): How a taker finds the quotes on its RFQ without a webhook: each thread is one maker's quote. Read one with `GET /v1/threads/{id}`. Newest activity first. - [Withdraw your own RFQ (scope: taker)](https://docs.hashlock.markets/api-reference/withdraw-your-own-rfq-scope:-taker.md): Only before a deal is agreed, and only your own order — the id alone does not cancel someone else's. - [Quote an RFQ (scope: maker) — opens a settlement thread](https://docs.hashlock.markets/api-reference/quote-an-rfq-scope:-maker-—-opens-a-settlement-thread.md) - [Get a negotiation thread (messages, current terms)](https://docs.hashlock.markets/api-reference/get-a-negotiation-thread-messages-current-terms.md) - [Propose a new price on a thread](https://docs.hashlock.markets/api-reference/propose-a-new-price-on-a-thread.md): Proposing a price is agreeing to it: when the counterparty takes it with accept: true (POST /v1/threads/{id}/accept-proposal) the deal is agreed in that step. The initiator agrees only with its hashlock, so it passes it here; an initiator's proposal without one leaves it to accept after the take. - [Accept the counterparty's pending price](https://docs.hashlock.markets/api-reference/accept-the-counterpartys-pending-price.md): Name the price you are accepting: it is refused if a newer counter has replaced it since you read the thread. With `accept: true` it also accepts the deal at that price in the same transaction — COMMITS, like POST /v1/threads/{id}/accept — and, since proposing a price is agreeing to it, that agrees… - [Accept the current terms — COMMITS, and cannot be undone](https://docs.hashlock.markets/api-reference/accept-the-current-terms-—-commits-and-cannot-be-undone.md): Name the price you are accepting: it is refused if the terms moved since you read the thread. The initiator (funds the long leg) also passes hashlock = sha256(secret); when BOTH sides accept, the swap is created. - [List your swaps — cursor-paginated](https://docs.hashlock.markets/api-reference/list-your-swaps-—-cursor-paginated.md) - [Swap lifecycle status](https://docs.hashlock.markets/api-reference/swap-lifecycle-status.md) - [Set a settlement address](https://docs.hashlock.markets/api-reference/endpoints/set-swap-address.md): Set your receive (payout) / refund address for a leg. Bitcoin: the compressed pubkey (hex) — the P2WSH is derived once both sides are set. Required before funding. An address that RECEIVES money — the payout one, and on Bitcoin and Solana the refund one too — must be a wallet this account signed in… - [Reserve an EVM leg's funding, then report its broadcast](https://docs.hashlock.markets/api-reference/reserve-an-evm-legs-funding-then-report-its-broadcast.md): Call it WITHOUT txHash before the first transaction of an EVM leg you fund (approve or createSwap): it reserves the leg, and is refused with 409 while another funding of it is live — from any client or wallet. Call it again WITH txHash as soon as your createSwap is broadcast. While the reservation s… - [Give back a funding reservation that never broadcast](https://docs.hashlock.markets/api-reference/give-back-a-funding-reservation-that-never-broadcast.md) - [Build UNSIGNED transaction(s) to fund a leg — sign with your own key/HSM, then broadcast](https://docs.hashlock.markets/api-reference/build-unsigned-transactions-to-fund-a-leg-—-sign-with-your-own-keyhsm-then-broadcast.md): EVM: sign every returned transaction from the returned `from` address — the leg refund address. The factory refuses any other sender, and the escrow refunds to it. - [Build UNSIGNED claim (reveals the secret) — body: { secret: 32-byte hex }](https://docs.hashlock.markets/api-reference/build-unsigned-claim-reveals-the-secret-—-body:-.md): The secret travels to the server in this request, on every chain: the EVM, TRON and Solana claim transactions carry it, and on Bitcoin it comes back as `preimageHex` for the broadcast. Until then the server has only `sha256(secret)`. Build the claim when you are about to send it: the transaction put… - [Build UNSIGNED refund (after the timelock)](https://docs.hashlock.markets/api-reference/build-unsigned-refund-after-the-timelock.md) - [Relay a client-signed transaction](https://docs.hashlock.markets/api-reference/relay-a-client-signed-transaction.md) - [List your webhooks (secret not shown)](https://docs.hashlock.markets/api-reference/list-your-webhooks-secret-not-shown.md) - [Register a webhook](https://docs.hashlock.markets/api-reference/endpoints/register-webhook.md): Register a webhook. Events: quote.created, swap.agreed, swap.funded, secret.revealed, swap.settled, swap.refunded, swap.half_settled (omit = all). Returns the signing secret ONCE; deliveries are POSTed with X-Hashlock-Signature: sha256=HMAC-SHA256(secret, `${timestamp}.${body}`). - [Delete a webhook](https://docs.hashlock.markets/api-reference/delete-a-webhook.md) - [Send a test delivery to a webhook](https://docs.hashlock.markets/api-reference/send-a-test-delivery-to-a-webhook.md) ## OpenAPI Specs - [openapi](/api-reference/openapi.json) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.