THORChain Swap API
The Swap API from THORChain — 1 operation(s) for swap.
The Swap API from THORChain — 1 operation(s) for swap.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.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.curl "https://apis.io/api/v1/apis/thorchain-swap-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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.
openapi: 3.2.0
info:
title: Thornode Auth Swap API
version: 3.19.1
contact:
email: devs@thorchain.org
description: Thornode REST API.
servers:
- url: https://gateway.liquify.com/chain/thorchain_api
description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: Swap
paths:
/thorchain/queue/swap/details/{tx_id}:
parameters:
- $ref: '#/components/parameters/queryHeight'
- name: tx_id
in: path
required: true
description: Transaction ID of the swap
schema:
type: string
get:
description: Returns detailed information about a specific swap including its state.
operationId: swapDetails
tags:
- Swap
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SwapDetailsResponse'
404:
description: Swap not found
components:
schemas:
Tx:
type: object
required:
- coins
- gas
properties:
id:
type: string
example: CF524818D42B63D25BBA0CCC4909F127CAA645C0F9CD07324F2824CC151A64C7
chain:
type: string
example: BTC
from_address:
type: string
example: bcrt1q0s4mg25tu6termrk8egltfyme4q7sg3h8kkydt
to_address:
type: string
example: bcrt1qf3s7q037eancht7sg0aj995dht25rwrnqsf45e
coins:
type: array
items:
$ref: '#/components/schemas/Coin'
gas:
type: array
items:
$ref: '#/components/schemas/Coin'
memo:
type: string
example: ADD:BTC.BTC:thor1zupk5lmc84r2dh738a9g3zscavannjy3nzplwt
Coin:
type: object
required:
- asset
- amount
properties:
asset:
type: string
example: BTC.BTC
amount:
type: string
example: '100000'
decimals:
type: integer
format: int64
example: 6
SwapDetailsResponse:
type: object
properties:
swap:
$ref: '#/components/schemas/MsgSwap'
status:
type: string
description: Current status of the swap
example: queued
queue_type:
type: string
description: Type of queue the swap is in
example: advanced
MsgSwap:
type: object
required:
- tx
- target_asset
- trade_target
- affiliate_basis_points
properties:
tx:
$ref: '#/components/schemas/Tx'
target_asset:
type: string
example: ETH.ETH
description: the asset to be swapped to
destination:
type: string
example: '0x66fb1cd65b97fa40457b90b7d1ca6b92cb64b32b'
description: the destination address to receive the swap output
trade_target:
type: string
description: the minimum amount of output asset to receive (else cancelling and refunding the swap)
affiliate_address:
type: string
example: thor1f3s7q037eancht7sg0aj995dht25rwrnu4ats5
description: the affiliate address which will receive any affiliate fee
affiliate_basis_points:
type: string
description: the affiliate fee in basis points
signer:
type: string
description: the signer (sender) of the transaction
aggregator:
type: string
description: the contract address if an aggregator is specified for a non-THORChain SwapOut
aggregator_target_address:
type: string
description: the desired output asset of the aggregator SwapOut
aggregator_target_limit:
type: string
description: the minimum amount of SwapOut asset to receive (else cancelling the SwapOut and receiving THORChain's output)
swap_type:
type: string
description: market if immediately completed or refunded, limit if held until fulfillable
stream_quantity:
type: integer
format: int64
description: number of swaps to execute in a streaming swap
stream_interval:
type: integer
format: int64
description: the interval (in blocks) to execute the streaming swap
initial_block_height:
type: integer
format: int64
description: the initial block height when the streaming swap was first queued
state:
$ref: '#/components/schemas/SwapState'
version:
type: string
description: the version of the swap (v1 or v2)
index:
type: integer
format: int32
description: the index of the swap in the batch
SwapState:
type: object
description: State tracking for swap execution
properties:
interval:
type: integer
format: int64
description: the interval for streaming swaps
quantity:
type: integer
format: int64
description: the number of swaps to execute
ttl:
type: integer
format: int64
description: time to live
count:
type: integer
format: int64
description: number of swaps executed
last_height:
type: integer
format: int64
description: last height when a swap was executed
deposit:
type: string
description: total deposit amount
withdrawn:
type: string
description: amount withdrawn
in:
type: string
description: total amount swapped in
out:
type: string
description: total amount swapped out
failed_swaps:
type: array
items:
type: integer
format: int64
description: list of failed swap indices
failed_swap_reasons:
type: array
items:
type: string
description: reasons for failed swaps
parameters:
queryHeight:
name: height
in: query
description: optional block height, defaults to current tip
required: false
schema:
type: integer
format: int64
minimum: 0