API v1 docs

The API is authenticated via URL parameter to decrease implementation difficulty for low-code or no-code users, such as BotGhost users.

The API base URL will always be https://api.meltfinance.org.

Get the current Bitcoin price

GET /v1/btcprice

{
  "status": "success",
  "message": "97498.37"
}

This endpoint does not require an API key.

Get account balance

GET /v1/balance?apikey=YOUR_API_KEY

{
  "balance": 2317800,
  "balance_satoshi": 3782497370000,
  "btc_balance": 3782500000,
  "status": "success"
}

Here, the balance is the USD value, balance_satoshi is the millisatoshi value, and btc_balance is the regular satoshi value.

Get account info

GET /v1/info?apikey=YOUR_API_KEY

lnurlp stands for LNURL-Pay, which is an alternate representation of a Lightning address. It is recommended to present this to wallets with QR code scanning capabilities as it is more currently widespread.

Get account transactions

GET /v1/transactions?apikey=YOUR_API_KEY&limit=500

Create invoice

GET /v1/invoices/create?apikey=YOUR_API_KEY&amount=69420&currency=sat&memo=Sigma%20Payment

The currency parameter is optional, and can be either sat or USD. memo is also optional but highly recommended.

Pay invoice

GET /v1/invoices/pay?apikey=YOUR_API_KEY&invoice=YOUR_INVOICE_HERE

Decode invoice

GET /v1/invoices/decode?invoice=YOUR_INVOICE_HERE

This endpoint does not require an API key. The returned amount_msat is of millisatoshis. Unless you are an experienced developer, the other fields may not be of big importance to you.

Pay LNURL or LN address

GET /v1/lnurl/pay?apikey=YOUR_API_KEY&object=YOUR_LNURL_HERE&amount=69420&memo=MEMO_HERE

The memo parameter is optional.

Withdraw from a LNURLw

GET /v1/lnurl/withdraw?apikey=YOUR_API_KEY&lnurl=YOUR_LNURLW_HERE

LNURLw (lnurl-withdraw) is a type of LNURL that allows the user to receive a certain amount of money from the recipient. One of its many current uses is to allow Slice users to receive their browsing earnings.

Last updated