andy/zyklisch Back to the workshop

Workshop / P.I.M.P. Services

Public Testnet Beta

Machines pay
machines.

An agent needs data. An API supplies it. Lightning makes the payment in between possible — directly, in satoshis and as part of the request.

P.I.M.P. Services is our experiment with paid interfaces for programs and AI agents. We are starting with BTC market data: a 14-period RSI based on hourly candles, using LNMarkets as the data source.

The first service

BTC / RSI 14

A clearly defined piece of data for your own applications. The beta tests the path from the initial request through a test payment to the authorised response.

Timeframe
1-hour candles
Data source
LNMarkets
Beta price
25 testnet sats
Access
Lightning / L402

25 testnet sats for reusable beta access. We have verified one payment followed by two successful requests to the same endpoint. The validity period and other usage limits have not yet been fully tested. There is no promise of unlimited use or a year of availability. No mainnet payments.

Try API

The unpaid request.

Test the endpoint without proof of payment. With L402 access control active, HTTP 402 Payment Required is the expected response: it requests payment. This test does not itself make a payment.

GET https://pimp.andyzyklisch.de/v1/btc/rsi14

No request sent yet.

Try it in your terminal

curl --max-time 15 -i 'https://pimp.andyzyklisch.de/v1/btc/rsi14'

This button does not pay an invoice or unlock data. Requirements for paid requests are listed under “How L402 works”. Do not share access tokens or proof of payment publicly.

Testnet means testing with test satoshis. Availability and responses may change during the beta. The display above shows the result of your request, not a continuously monitored service status.

After successful authorisation

The data your program receives.

The API returns JSON containing the RSI, reported state, latest candle and age of the data snapshot. The example below comes from an actual backend request on 16 September 2026 and does not show current market data.

{
  "candles": 500,
  "data_source": "pimp-public-market-bridge",
  "last_candle_timestamp": "2026-09-16T09:00:00+00:00",
  "last_close": 75823,
  "market_source": "lnmarkets",
  "payment_gate": "aperture",
  "rsi": 43.4416,
  "rsi_period": 14,
  "snapshot_age_seconds": 259.7,
  "state": "neutral",
  "symbol": "BTC",
  "timeframe": "1h"
}

rsi is the indicator value over rsi_period periods. candles gives the number of candles; last_candle_timestamp the timestamp of the latest candle in UTC, and last_close its closing price. snapshot_age_seconds describes the snapshot’s age in seconds at the time of the request. Check the timestamp and age before using the data.

From request to response

How L402 works.

What you need for a paid request

A Lightning environment on the appropriate Bitcoin testnet, with test satoshis and a payable route to the invoice, plus a client that provides the preimage after payment. Your HTTP client must be able to send the access token and this preimage as proof of payment. An ordinary mainnet wallet and the demo button alone are not enough.

Open the step-by-step guide using LND / lncli and curl →

For testers with an existing testnet node. The guide is based on our successful payment test; independent testing is still outstanding.

  1. 01

    Request data

    Your program calls the API endpoint. Without valid proof of payment, the service may respond with HTTP 402.

  2. 02

    Pay the test invoice

    The L402 response includes an access token and a Lightning invoice in the WWW-Authenticate header. A suitable testnet client checks the invoice and pays it with test satoshis.

  3. 03

    Send proof of payment

    The client repeats the request with the token and proof of payment, known as the preimage. The service checks both and releases the resource if authorisation is valid.

Technical background: Lightning Labs L402 documentation.

Try it together

Looking for testers.

Do you build agents, use Lightning or want to try the API in your own project? We want to hear about clear responses, working flows and the places where things still get stuck. Send us your experiences and questions.

Get in touch about the beta

Share questions and experiences on Stacker News ↗