<p>Most miners now use Stratum, but the old getwork protocol isn't completely gone yet.</p>

<ol>
<li><p>The URL is the root path (/) of the server usually at port 8332, for instance <a href="http://mint.bitminter.com:8332" rel="nofollow noreferrer">http://mint.bitminter.com:8332</a>. You can see what the data looks like here: <a href="https://bitcoin.stackexchange.com/questions/3168/how-can-i-code-a-bitcoin-json-rpc-getwork-request-in-java">How can I code a Bitcoin JSON-RPC &quot;getwork&quot; request in Java?</a></p></li>
<li><p>No, this is JSON-RPC. It's an RPC-style interface, which is more or less the opposite philosophy to REST. It's not even a good RPC design as the same procedure "getwork" is used both for getting work and for returning work results.</p></li>
<li><p>HTTP Basic Auth is used for authentication. If you are talking to bitcoind you put the user name and password in the config file. If you are talking to a pool you register at the pool.</p></li>
</ol>

<p>There is some info about getwork and its various extensions at <a href="https://en.bitcoin.it/wiki/Getwork" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Getwork</a></p>

CC BY-SA 3.0
2013-09-08T12:59:48.343Z
+1. JSON in JSON-RPC put me off scent. Thanks for your reply. Will look into JSON-RPC. Should be okay as long as it is textual :)
bytefire
CC BY-SA 3.0
2013-09-07T21:49:03.193Z
2013-09-07T21:49:03.193Z
2017-04-13T12:47:33.583Z
Dr.Haribo
<p>I'm a novice to bitcoin trying to learn mining. I know that in order to get the value (header) to hash, you call Getwork. I have seen the bitcoin wiki page for it and read some relevant threads on different forums. What I want want to know is what is required before one can make a call to Getwork? Specifically the following:</p>

<ol>
<li>What URL to call with what parameters?</li>
<li>I understand it is a REST call. Can you confirm this is so?</li>
<li>Do you need to be registered before being able to make the call?</li>
</ol>

<p>Please post any relevant links that might help.</p>

<api><json-rpc><miner-configuration><getwork><stratum>
Pre-requisites for calling Getwork
bytefire
# Pre-requisites for calling Getwork

(Asked by: username_0 on 2013-09-07)

I'm a novice to bitcoin trying to learn mining. I know that in order to get the value (header) to hash, you call Getwork. I have seen the bitcoin wiki page for it and read some relevant threads on different forums. What I want want to know is what is required before one can make a call to Getwork? Specifically the following:

1. What URL to call with what parameters?
2. I understand it is a REST call. Can you confirm this is so?
3. Do you need to be registered before being able to make the call?

Please post any relevant links that might help.

**Tags:** api, json-rpc, miner-configuration, getwork, stratum


---

## 1 answers

### Answer by username_1 on 2013-09-07. Score: 3 | Accepted answer

Most miners now use Stratum, but the old getwork protocol isn't completely gone yet.

1. The URL is the root path (/) of the server usually at port 8332, for instance <http://mint.bitminter.com:8332>. You can see what the data looks like here: [How can I code a Bitcoin JSON-RPC "getwork" request in Java?](https://bitcoin.stackexchange.com/questions/3168/how-can-i-code-a-bitcoin-json-rpc-getwork-request-in-java)
2. No, this is JSON-RPC. It's an RPC-style interface, which is more or less the opposite philosophy to REST. It's not even a good RPC design as the same procedure "getwork" is used both for getting work and for returning work results.
3. HTTP Basic Auth is used for authentication. If you are talking to bitcoind you put the user name and password in the config file. If you are talking to a pool you register at the pool.

There is some info about getwork and its various extensions at <https://en.bitcoin.it/wiki/Getwork>

> **Comments:**
> **username_0**: +1. JSON in JSON-RPC put me off scent. Thanks for your reply. Will look into JSON-RPC. Should be okay as long as it is textual :)  

---

