Settlements

Settlement Status

Parameters

In the general case, each settlement has four steps, allowing the API to accommodate a wide variety of methods.

Define Method

POST https://partners.liquid.com ​/api​/v1​/settlement​/method

Creates the settlement for the side of the transaction specified by direction. As a shortcut, method can be supplied when initiating the /intent_to_trade request.

Request Body

POST ​/api​/v1​/settlement​/method

{
  "transaction_id": "59356d64-d843-4f6e-99e7-2893b198e364",
  "method": "BLOCKCHAIN_TRANSFER",
  "direction": "PAYOUT",
  "input_parameters": {
    "wallet_address": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"    
  }
}


RESPONSE 202

{
  "success": true,
  "payload": {
    "settlement_instruction_id": "1cfbbd0b-3ddc-40b6-9676-3cf91ea6949c",
    "transaction_id": "59356d64-d843-4f6e-99e7-2893b198e364",
    "currency": "BTC",
    "direction": "PAYOUT",
    "method": "BLOCKCHAIN_TRANSFER",
    "status": "WAITING_EXTERNAL",
    "quantity": "0.008",
    "required_input": {
      "wallet_address": {
        "label": "Wallet Address",
        "required": true,
        "validation": "^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$"
      }
    },
    "expires": {
      "unix_ms": 1583138106331,
      "iso8601": "2020-03-02T08:35:06.331Z",
      "ttl_ms": 20000
    }
  }
}

Input Parameters

POST https://partners.liquid.com/api/v1/settlement/parameters

Set input parameter values. Should only be called if there are required input parameters.

Request Body

POST /api/v1/settlement/parameters

{
  "settlement_instruction_id": "4e18c3eb-2039-4441-a033-16cfec8ec058",
  "input_parameters": {
    "wallet_address": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"    
  }
}


RESPONSE 202

{
  "success": true,
  "payload": {
    "settlement_instruction_id": "4e18c3eb-2039-4441-a033-16cfec8ec058",
    "transaction_id": "59356d64-d843-4f6e-99e7-2893b198e364",
    "currency": "BTC",
    "direction": "PAYOUT",
    "method": "BLOCKCHAIN_TRANSFER",
    "status": "WAITING_EXTERNAL",
    "quantity": "0.008",
    "input_parameters": {
      "wallet_address": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"      
    },
    "expires": {
      "unix_ms": 1583138106331,
      "iso8601": "2020-03-02T08:35:06.331Z",
      "ttl_ms": 20000
    }
  }
}

No Setup Parameters

For settlement methods where no setup parameters are provided by the server, input parameters and can be optionally supplied when specifying the settlement method.

Define Method and Input Parameters

POST https://partners.liquid.com/api/v1/settlement/method

As a shortcut both method and input parameters can be supplied in the /intent_to_trade endpoints where there are no setup parameters.

Request Body

POST ​/api​/v1​/settlement​/method

{
  "transaction_id": "59356d64-d843-4f6e-99e7-2893b198e364",
  "method": "BLOCKCHAIN_TRANSFER",
  "direction": "PAYOUT",
  "input_parameters": {
    "account_key": {
      "type": "WALLET_ADDRESS",
      "value": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"
    }
  }
}


RESPONSE 201

{
  "success": true,
  "payload": {
    "settlement_instruction_id": "1cfbbd0b-3ddc-40b6-9676-3cf91ea6949c",
    "transaction_id": "59356d64-d843-4f6e-99e7-2893b198e364",
    "currency": "BCH",
    "direction": "FUNDING",
    "method": "BLOCKCHAIN_TRANSFER",
    "status": "WAITING_EXTERNAL",
    "quantity": "0.023470",
    "received_input": {
      "account_key": {
        "type": "WALLET_ADDRESS",
        "value": "3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy"
      }
    },
    "expires": {
      "unix_ms": 1583138106331,
      "iso8601": "2020-03-02T08:35:06.331Z",
      "ttl_ms": 20000
    }
  }
}

Last updated