---
agentTools:
  projectIndex: https://synonym.readme.io/llms.txt
---

# Request a channel to purchase.

Request a channel to purchase.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "description": "Blocktank is a Lightning Network service provider (LSP) with various services that aim to make Lightning Network better.",
    "version": "1.0.0",
    "title": "Blocktank"
  },
  "tags": [
    {
      "name": "Channels",
      "description": "All endpoints related to buying lightning channels"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "samples-enabled": true,
    "samples-languages": [
      "curl"
    ],
    "proxy-enabled": true
  },
  "paths": {
    "/channel/buy": {
      "post": {
        "tags": [
          "Channels"
        ],
        "summary": "Request a channel to purchase.",
        "description": "Request a channel to purchase.",
        "operationId": "buyChannel",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "product_id",
                  "remote_balance",
                  "local_balance",
                  "channel_expiry"
                ],
                "properties": {
                  "product_id": {
                    "type": "string"
                  },
                  "remote_balance": {
                    "type": "number",
                    "default": 1000000
                  },
                  "local_balance": {
                    "type": "number",
                    "default": 2000000
                  },
                  "channel_expiry": {
                    "type": "number",
                    "default": 1
                  }
                }
              }
            }
          },
          "description": "Channel to purchase."
        },
        "responses": {
          "200": {
            "description": "Channel quote",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelQuote"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://blocktank.synonym.to/api/v1"
    }
  ],
  "components": {
    "schemas": {
      "ChannelQuote": {
        "type": "object",
        "properties": {
          "order_id": {
            "type": "string"
          },
          "ln_invoice": {
            "type": "string"
          },
          "total_amount": {
            "type": "integer"
          },
          "btc_address": {
            "type": "string"
          },
          "lnurl_channel": {
            "type": "string"
          }
        }
      }
    }
  },
  "_id": {
    "buffer": {
      "0": 97,
      "1": 136,
      "2": 141,
      "3": 121,
      "4": 248,
      "5": 94,
      "6": 228,
      "7": 0,
      "8": 42,
      "9": 196,
      "10": 77,
      "11": 96
    }
  }
}
```