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. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Thornode Streaming Swap API
version: 3.19.1
contact:
email: devs@thorchain.org
description: Thornode REST API.
tags:
- name: StreamingSwap
paths:
/thorchain/swap/streaming/{hash}:
parameters:
- $ref: '#/components/parameters/queryHeight'
- $ref: '#/components/parameters/hash'
get:
description: Returns the state of a streaming swap
operationId: stream_swap
tags:
- StreamingSwap
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/StreamingSwapResponse'
summary: Stream swap
x-summary-source: derived
/thorchain/swaps/streaming:
parameters:
- $ref: '#/components/parameters/queryHeight'
get:
description: Returns the state of all streaming swaps
operationId: stream_swaps
tags:
- StreamingSwap
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/StreamingSwapsResponse'
summary: Stream swaps
x-summary-source: derived
components:
parameters:
queryHeight:
name: height
in: query
description: optional block height, defaults to current tip
required: false
schema:
type: integer
format: int64
minimum: 0
hash:
name: hash
in: path
required: true
schema:
type: string
example: CF524818D42B63D25BBA0CCC4909F127CAA645C0F9CD07324F2824CC151A64C7
schemas:
StreamingSwap:
type: object
required:
- trade_target
- deposit
- in
- out
properties:
tx_id:
type: string
example: CF524818D42B63D25BBA0CCC4909F127CAA645C0F9CD07324F2824CC151A64C7
description: the hash of a transaction
interval:
type: integer
format: int64
description: how often each swap is made, in blocks
quantity:
type: integer
format: int64
description: the total number of swaps in a streaming swaps
count:
type: integer
format: int64
description: the amount of swap attempts so far
last_height:
type: integer
format: int64
description: the block height of the latest swap
initial_height:
type: integer
format: int64
description: the block height when the swap first entered the queue
trade_target:
type: string
example: '100'
description: the total number of tokens the swapper wants to receive of the output asset
source_asset:
type: string
example: BTC.BTC
description: the asset to be swapped from
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
deposit:
type: string
example: '100'
description: the number of input tokens the swapper has deposited
in:
type: string
example: '100'
description: the amount of input tokens that have been swapped so far
out:
type: string
example: '100'
description: the amount of output tokens that have been swapped so far
failed_swaps:
type: array
description: the list of swap indexes that failed
items:
type: integer
format: int64
failed_swap_reasons:
type: array
description: the list of reasons that sub-swaps have failed
items:
type: string
StreamingSwapsResponse:
type: array
items:
$ref: '#/components/schemas/StreamingSwap'
StreamingSwapResponse:
$ref: '#/components/schemas/StreamingSwap'
x-provenance:
method: harvested
publisher: THORChain
source: https://gateway.liquify.com/chain/thorchain_api/thorchain/doc/openapi.yaml
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)