-
Notifications
You must be signed in to change notification settings - Fork 231
/
Copy pathARCHIVED-api-help.md.archive
36 lines (22 loc) · 1.45 KB
/
ARCHIVED-api-help.md.archive
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
title: How do I see the list of API functions I can call, and how do I call them?
category: developer
---
**This FAQ is subsumed by specific read-mes and lbry.tech**
## The LBRY API
The best way to learn how to use the LBRY API is to go through our [quickstart](/quickstart).
A full list of API calls provided by LBRY is available in [the API documentation](/api).
If you're new to LBRY, this is probably the API you want.
## The LBRY Blockchain API (lbrycrd)
Ensure that `lbrycrd` is running with the `-server` flag, which enables the JSON-RPC API. Then use one of the following methods to make API calls.
Many (though not all) of the calls are the same as those for bitcoin core, which are
documented [here](https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list). To see the full list of API calls, use the `help` API call.
### lbrycrd-cli
lbrycrd-cli help
### curl
curl --user USER:PASSWORD --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "help", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:9245/
- `USER` and `PASSWORD` can be found in your lbrycrd.conf file.
- The `method` field can be any of the supported methods like `getbalance` or `getnewaddress`.
- `9245` is the default port used, but if you chose a custom port for the server, you'd need to use that instead.
- If the command accepts parameters, they can be passed inside the `params` array.
See Also: [important directories](/faq/lbry-directories).