Skip to main content

GetSwapStatusOutput

Detailed swap status returned by the getSwapStatus endpoint.

swapIdstringrequired

Unique identifier of the swap.

swapTypestringrequired

Swap type name, for example FROM_BTC, TO_BTCLN, or FROM_BTCLN.

state objectrequired

Current swap state information. This varies for every swap type.

numberintegerrequired

Numeric state representation of the state.

namestringrequired

Human-readable state name.

descriptionstringrequired

Human-readable state description.

quote objectrequired

Quote data captured when the swap was created.

inputAmount objectrequired

Input source amount that will be paid by the user (including fees, but excluding source network fees).

amountdecimalrequired

Decimal format of the amount, e.g. 1.5.

rawAmountbigintrequired

Raw base units as string, e.g. 1500000000000000000.

Possible values: Value must match regular expression ^[+-]?\d+$

Example: 1500000000000000000
decimalsintegerrequired

Token decimals, e.g. 18.

symbolstringrequired

Token ticker, e.g. STRK.

chainstringrequired

Chain identifier, e.g. STARKNET, BITCOIN, LIGHTNING.

outputAmount objectrequired

Output destination amount that will be paid out to the user.

amountdecimalrequired

Decimal format of the amount, e.g. 1.5.

rawAmountbigintrequired

Raw base units as string, e.g. 1500000000000000000.

Possible values: Value must match regular expression ^[+-]?\d+$

Example: 1500000000000000000
decimalsintegerrequired

Token decimals, e.g. 18.

symbolstringrequired

Token ticker, e.g. STRK.

chainstringrequired

Chain identifier, e.g. STARKNET, BITCOIN, LIGHTNING.

fees objectrequired

Fee breakdown included in the quote.

swap objectrequired

Swap service fee (charged in source token).

amountdecimalrequired

Decimal format of the amount, e.g. 1.5.

rawAmountbigintrequired

Raw base units as string, e.g. 1500000000000000000.

Possible values: Value must match regular expression ^[+-]?\d+$

Example: 1500000000000000000
decimalsintegerrequired

Token decimals, e.g. 18.

symbolstringrequired

Token ticker, e.g. STRK.

chainstringrequired

Chain identifier, e.g. STARKNET, BITCOIN, LIGHTNING.

networkOutput object

Swap fee to cover the transaction network fees on the destination side (charged in source token).

amountdecimalrequired

Decimal format of the amount, e.g. 1.5.

rawAmountbigintrequired

Raw base units as string, e.g. 1500000000000000000.

Possible values: Value must match regular expression ^[+-]?\d+$

Example: 1500000000000000000
decimalsintegerrequired

Token decimals, e.g. 18.

symbolstringrequired

Token ticker, e.g. STRK.

chainstringrequired

Chain identifier, e.g. STARKNET, BITCOIN, LIGHTNING.

expiryint64required

Quote expiration timestamp in milliseconds since Unix epoch.

outputAddressstringrequired

Output address of the swap, the destination tokens will be sent here.

createdAtint64required

Swap creation timestamp in milliseconds since Unix epoch.

steps object[]required

Swap execution steps.

  • Array [
  • oneOf
    typestringrequired

    Possible values: [Setup]

    sidestringrequired

    Possible values: [destination]

    chainstringrequired
    titlestringrequired
    descriptionstringrequired
    statusstringrequired

    Possible values: [awaiting, completed, soft_expired, expired]

    setupTxIdstring
  • ]
  • lnurl object

    LNURL metadata attached to Lightning-based swaps when applicable.

    withdrawstring

    LNURL-withdraw link for Lightning to smart-chain flows.

    paystring

    LNURL-pay link for smart-chain to Lightning flows.

    successAction object

    LNURL success action returned after a successful payment via LNURL-pay link, if specified in the LNURL.

    descriptionstringrequired
    textstring
    urlstring
    isFinishedbooleanrequired

    Whether the swap reached a terminal state.

    isSuccessbooleanrequired

    Whether the swap finished successfully.

    isFailedbooleanrequired

    Whether the swap finished in a failed state.

    isExpiredbooleanrequired

    Whether the quote expired before completion.

    currentAction objectnullablerequired

    Current actionable instruction for the client, or null when no action is required.

    type stringrequired

    Current actionable instruction for the client, or null when no action is required.

    Possible values: [SendToAddress, SignPSBT, SignSmartChainTransaction, Wait]

    namestringrequired

    Possible values: [Deposit on Lightning, Deposit on Bitcoin]

    descriptionstringrequired
    chainstringrequired

    Possible values: [LIGHTNING, BITCOIN]

    txs object[]required
  • Array [
  • typestringrequired

    Possible values: [BOLT11_PAYMENT_REQUEST, BITCOIN_ADDRESS]

    addressstringrequired
    hyperlinkstringrequired
    amount objectrequired

    Unified amount type for all API responses.

    amountdecimalrequired

    Decimal format of the amount, e.g. 1.5.

    rawAmountbigintrequired

    Raw base units as string, e.g. 1500000000000000000.

    Possible values: Value must match regular expression ^[+-]?\d+$

    Example: 1500000000000000000
    decimalsintegerrequired

    Token decimals, e.g. 18.

    symbolstringrequired

    Token ticker, e.g. STRK.

    chainstringrequired

    Chain identifier, e.g. STARKNET, BITCOIN, LIGHTNING.

  • ]
  • requiresSecretRevealboolean

    For Lightning-to-smart-chain swaps. Indicates that the client should provide the Lightning secret pre-image to continue execution. This is returned when the destination-chain HTLC is created and ready to be claimed by the user.

    escrow object

    Escrow-specific data for escrow-contract based swaps, which includes all current escrow-backed flows except the non-legacy Bitcoin-to-smart-chain swaps.

    data objectrequired

    Serialized escrow data payload.

    property name*any

    Serialized escrow data payload.

    initTxIdstring

    Transaction hash that created the escrow when it is already known.

    GetSwapStatusOutput
    {
    "swapId": "string",
    "swapType": "string",
    "state": {
    "number": 0,
    "name": "string",
    "description": "string"
    },
    "quote": {
    "inputAmount": {
    "amount": "string",
    "rawAmount": "1500000000000000000",
    "decimals": 0,
    "symbol": "string",
    "chain": "string"
    },
    "outputAmount": {
    "amount": "string",
    "rawAmount": "1500000000000000000",
    "decimals": 0,
    "symbol": "string",
    "chain": "string"
    },
    "fees": {
    "swap": {
    "amount": "string",
    "rawAmount": "1500000000000000000",
    "decimals": 0,
    "symbol": "string",
    "chain": "string"
    },
    "networkOutput": {
    "amount": "string",
    "rawAmount": "1500000000000000000",
    "decimals": 0,
    "symbol": "string",
    "chain": "string"
    }
    },
    "expiry": 0,
    "outputAddress": "string"
    },
    "createdAt": 0,
    "steps": [
    {
    "type": "Setup",
    "side": "destination",
    "chain": "string",
    "title": "string",
    "description": "string",
    "status": "awaiting",
    "setupTxId": "string"
    },
    {
    "type": "Payment",
    "side": "source",
    "chain": "string",
    "title": "string",
    "description": "string",
    "status": "inactive",
    "confirmations": {
    "current": 0,
    "target": 0,
    "etaSeconds": 0
    },
    "initTxId": "string",
    "settleTxId": "string"
    },
    {
    "type": "Settlement",
    "side": "destination",
    "chain": "string",
    "title": "string",
    "description": "string",
    "status": "inactive",
    "initTxId": "string",
    "settleTxId": "string"
    },
    {
    "type": "Refund",
    "side": "source",
    "chain": "string",
    "title": "string",
    "description": "string",
    "status": "inactive",
    "refundTxId": "string"
    }
    ],
    "lnurl": {
    "withdraw": "string",
    "pay": "string",
    "successAction": {
    "description": "string",
    "text": "string",
    "url": "string"
    }
    },
    "isFinished": true,
    "isSuccess": true,
    "isFailed": true,
    "isExpired": true,
    "currentAction": {
    "type": "SendToAddress",
    "name": "Deposit on Lightning",
    "description": "string",
    "chain": "LIGHTNING",
    "txs": [
    {
    "type": "BOLT11_PAYMENT_REQUEST",
    "address": "string",
    "hyperlink": "string",
    "amount": {
    "amount": "string",
    "rawAmount": "1500000000000000000",
    "decimals": 0,
    "symbol": "string",
    "chain": "string"
    }
    }
    ]
    },
    "requiresSecretReveal": true,
    "escrow": {
    "data": {},
    "initTxId": "string"
    }
    }