Skip to main content

SwapOutputBase

Base serialized swap data returned by API endpoints that expose swap details.

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
    SwapOutputBase
    {
    "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"
    }
    }
    }