---
title: "Build UNSIGNED transaction(s) to fund a leg — sign with your own key/HSM, then broadcast"
method: POST
path: "/v1/swaps/{id}/legs/{leg}/fund"
---

# Build UNSIGNED transaction(s) to fund a leg — sign with your own key/HSM, then broadcast

`POST /v1/swaps/{id}/legs/{leg}/fund`

## Request

- Base URL: `https://api.hashlock.markets`
- URL: `https://api.hashlock.markets/v1/swaps/{id}/legs/{leg}/fund`
- Auth: HTTP bearer

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.

## Path parameters

- `id` string, required
- `leg` 'a' | 'b', required

## Response `200`

chain-specific signing material (EVM txs / BTC pay-to / TRON txs / Solana transaction, base64)

- object

## Other responses

- `400`: error
- `409`: a state to wait out or act on, not an error: the leg is already funded, the initiator's leg must be funded first, or an address is still missing — the message says which (never stored by Idempotency-Key)
- `503`: temporarily unavailable (TRON funding paused, or the already-funded check could not be read) — retry
- `504`: a chain or explorer read of ours ran out of time — nothing was changed; retry (an Idempotency-Key does not remember a 504)

---

[API](https://skmtc.dev/hashlock/apis/hashlock-markets-api.md) · [All operations](https://skmtc.dev/hashlock/apis/hashlock-markets-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hashlock/apis/hashlock-markets-api/revisions/b85bd3992c46?raw)
