Hashlock Markets · Schema

Swap

leg a = what the maker gives, leg b = what the maker wants

FinanceCryptocurrencyAtomicSwapNon-CustodialCross-Chain

Properties

Name Type Description
id string
rfqId stringnull
threadId string
status string
makerId string
takerId string
initiatorUserId string funds the long leg first and holds the secret
hashlock string sha256(secret), hex
secretCiphertext stringnull the secret once revealed on chain; null before
meta objectnull server bookkeeping; `meta.fundIntent[leg].at` is a funding in flight (see fund-intent)
feeBps integer
feeAmount string base units of feeAssetId, paid by the taker
feeAssetId stringnull
aAssetId string
aChain string
aAmount string base units
aTimelock string
aPayoutAddress stringnull
aClaimTo stringnull Bitcoin: where this leg's claim pays (its receiver's wallet unless they named another address)
aRefundAddress stringnull
aHtlcAddress stringnull
aFundTx stringnull
aFundOutpoints arraynull Bitcoin: the funding outputs a claim or refund spends
aClaimTx stringnull
aRefundTx stringnull
bAssetId string
bChain string
bAmount string base units
bTimelock string
bPayoutAddress stringnull
bClaimTo stringnull Bitcoin: where this leg's claim pays (its receiver's wallet unless they named another address)
bRefundAddress stringnull
bHtlcAddress stringnull
bFundTx stringnull
bFundOutpoints arraynull Bitcoin: the funding outputs a claim or refund spends
bClaimTx stringnull
bRefundTx stringnull
createdAt string
updatedAt string
View JSON Schema on GitHub

JSON Schema

hashlock-markets-swap-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hashlock-markets/json-schema/hashlock-markets-swap-schema.json",
  "title": "Swap",
  "description": "leg a = what the maker gives, leg b = what the maker wants",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hashlock-markets-openapi.json#/components/schemas/Swap",
  "type": "object",
  "required": [
    "id",
    "threadId",
    "status",
    "makerId",
    "takerId",
    "initiatorUserId",
    "hashlock",
    "aAssetId",
    "aChain",
    "aAmount",
    "aTimelock",
    "bAssetId",
    "bChain",
    "bAmount",
    "bTimelock"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "rfqId": {
      "type": [
        "string",
        "null"
      ]
    },
    "threadId": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "makerId": {
      "type": "string"
    },
    "takerId": {
      "type": "string"
    },
    "initiatorUserId": {
      "type": "string",
      "description": "funds the long leg first and holds the secret"
    },
    "hashlock": {
      "type": "string",
      "description": "sha256(secret), hex"
    },
    "secretCiphertext": {
      "type": [
        "string",
        "null"
      ],
      "description": "the secret once revealed on chain; null before"
    },
    "meta": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true,
      "description": "server bookkeeping; `meta.fundIntent[leg].at` is a funding in flight (see fund-intent)"
    },
    "feeBps": {
      "type": "integer"
    },
    "feeAmount": {
      "type": "string",
      "description": "base units of feeAssetId, paid by the taker"
    },
    "feeAssetId": {
      "type": [
        "string",
        "null"
      ]
    },
    "aAssetId": {
      "type": "string"
    },
    "aChain": {
      "type": "string"
    },
    "aAmount": {
      "type": "string",
      "description": "base units"
    },
    "aTimelock": {
      "type": "string",
      "format": "date-time"
    },
    "aPayoutAddress": {
      "type": [
        "string",
        "null"
      ]
    },
    "aClaimTo": {
      "type": [
        "string",
        "null"
      ],
      "description": "Bitcoin: where this leg's claim pays (its receiver's wallet unless they named another address)"
    },
    "aRefundAddress": {
      "type": [
        "string",
        "null"
      ]
    },
    "aHtlcAddress": {
      "type": [
        "string",
        "null"
      ]
    },
    "aFundTx": {
      "type": [
        "string",
        "null"
      ]
    },
    "aFundOutpoints": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/FundOutpoint"
      },
      "description": "Bitcoin: the funding outputs a claim or refund spends"
    },
    "aClaimTx": {
      "type": [
        "string",
        "null"
      ]
    },
    "aRefundTx": {
      "type": [
        "string",
        "null"
      ]
    },
    "bAssetId": {
      "type": "string"
    },
    "bChain": {
      "type": "string"
    },
    "bAmount": {
      "type": "string",
      "description": "base units"
    },
    "bTimelock": {
      "type": "string",
      "format": "date-time"
    },
    "bPayoutAddress": {
      "type": [
        "string",
        "null"
      ]
    },
    "bClaimTo": {
      "type": [
        "string",
        "null"
      ],
      "description": "Bitcoin: where this leg's claim pays (its receiver's wallet unless they named another address)"
    },
    "bRefundAddress": {
      "type": [
        "string",
        "null"
      ]
    },
    "bHtlcAddress": {
      "type": [
        "string",
        "null"
      ]
    },
    "bFundTx": {
      "type": [
        "string",
        "null"
      ]
    },
    "bFundOutpoints": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/FundOutpoint"
      },
      "description": "Bitcoin: the funding outputs a claim or refund spends"
    },
    "bClaimTx": {
      "type": [
        "string",
        "null"
      ]
    },
    "bRefundTx": {
      "type": [
        "string",
        "null"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "FundOutpoint": {
      "type": "object",
      "properties": {
        "txid": {
          "type": "string"
        },
        "vout": {
          "type": "integer"
        },
        "value": {
          "type": "integer",
          "description": "sats"
        }
      }
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/hashlock-markets-swap"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.