call_api
Call an API on the bolthub marketplace with automatic L402 Lightning payments. Preview costs first, set a budget, and get the response with cost info.
Instructions
Call an API endpoint on the bolthub marketplace. Handles L402 Lightning payments automatically. Use get_api_details or preview_cost first to check pricing. Returns the response along with cost and budget information.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | JSON request body for POST/PUT/PATCH requests | |
| path | Yes | The endpoint path (e.g. '/v1/history/candles') | |
| slug | Yes | The API slug (e.g. 'btc-intel') | |
| method | No | HTTP method — defaults to GET | |
| headers | No | Additional HTTP headers | |
| query_params | No | Query parameters as key-value pairs | |
| max_cost_sats | No | Maximum sats to pay for this request. If the invoice exceeds this amount, the call is refused and nothing is paid. |