LndHubX (1.0 Alpha)

Download OpenAPI specification:Download

LndhubX is a Lightning Bitcoin bank that allows users to swap into synthetic fiat and back.

Learn more about the project on Github: https://github.com/kolliderhq/lndhubx

Info about Lndhubx.

Responses

200

OK

get/nodeinfo
https://lndhubx.kollider.xyz/api/nodeinfo

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "ln_network_max_fee": "string",
  • "ln_network_fee_margin": "string",
  • "reserve_ratio": "string",
  • "external_tx_fee": "string",
  • "internal_tx_fee": "string"
}

Creates a new user.

Request Body schema: application/json

This creates a new unique user on LndhubX.

username
string

A unique username.

password
string

A unique strong password.

Responses

200

OK

post/create
https://lndhubx.kollider.xyz/api/create

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "username": "string"
}

Logs in a new user.

Request Body schema: application/json

This will log a user and in an return the JWT tokens.

username
string

A unique username.

password
string

A unique strong password.

Responses

200

Returns an object of accounts.

post/auth
https://lndhubx.kollider.xyz/api/auth

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "username": "string",
  • "password": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "access_token": "string",
  • "refresh_token": "string"
}

Get user balance.

Responses

200

OK

get/balance
https://lndhubx.kollider.xyz/api/balance

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "account_id": "string",
  • "account_type": "string",
  • "balance": 0,
  • "currency": "string"
}

Creates a new invoice.

query Parameters
amount
required
integer

The amount of the specified currency. NOTE BTC is not denominated in Sats but in BTC.

currency
string

The currency you want to deposit.

meta
string

Some optional meta data to include in the invoice.

account_id
string

If you want to generate the invoice for a specific account otherwise your default account is used.

Responses

200

OK

get/addinvoice
https://lndhubx.kollider.xyz/api/addinvoice

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "payment_request": "string",
  • "amount": "string",
  • "account_id": "string",
  • "meta": "string",
  • "rate": "string",
  • "currency": "string"
}

Pay an invoice.

Request Body schema: application/json

This will pay an invoice. Internal payments are possible but no self payments.

payment_request
string

The LN payment request to be paid.

Responses

200

OK

post/payinvoice
https://lndhubx.kollider.xyz/api/payinvoice

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "payment_request": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "success": true,
  • "currency": "string",
  • "payment_request": "string",
  • "fee": "string",
  • "error": "string"
}

Gets all invoices that were generated by user.

Responses

200

OK

get/getuserinvoices
https://lndhubx.kollider.xyz/api/getuserinvoices

Shows you all available currencies to swap into.

Responses

200

OK

get/getavailablecurrencies
https://lndhubx.kollider.xyz/api/getavailablecurrencies

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • "string"
]

Swap one currency for another.

Request Body schema: application/json

This will swap any two currencies with each other.

from_currency
string

The currency you want to sell.

to_currency
string

The currency you wan to buy.

amount
string

The amount you want to swap.

Responses

200

OK

post/swap
https://lndhubx.kollider.xyz/api/swap

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "from_currency": "string",
  • "to_currency": "string",
  • "amount": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "amount": "string",
  • "from": "string",
  • "to": "string",
  • "valid_until": 0,
  • "rate": "string",
  • "quote_id": 0,
  • "error": "string"
}

Get a quote for a currency swap.

query Parameters
from_currency
required
string

The currency you want to sell.

to_currency
required
string

The currency you want to buy.

amount
required
integer

The amount you want to swap. Note BTC is denominated in BTC not Sats.

Responses

200

OK

get/quote
https://lndhubx.kollider.xyz/api/quote

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "amount": "string",
  • "from": "string",
  • "to": "string",
  • "valid_until": 0,
  • "rate": "string",
  • "quote_id": 0,
  • "error": "string"
}

Gets all transactions made by user.

This includes deposits, withdrawals and swaps.

Responses

200

OK

get/gettxs
https://lndhubx.kollider.xyz/api/gettxs