Use the API provided by the BTC Mining Pool to obtain the mining pool operation status and user account information in real time.
The call path is as follows:
https://${Endpoint}/${Version}/${Path}
among them:
-
Endpoint:
pool.api.btc.com -
Version:
v1 -
Path: Specific API path, see definition below.
- Calling the user-related interface requires that the querystring provide
access_keyandpuidauthentication. - AccessKey is the user identity credentials, corresponding to an account. Please keep your own AccessKey.
- puid is the mine pool sub-account id used to distinguish multiple sub-accounts under an account.
- AccessKey and puid can be logged in to pool.btc.com and accessed from the subaccount management page.
- It depensds on the API call, see detailed docs. Some calls need only the access_key and others also pubid
https://${Endpoint}/${Version}/${Path}?access_key={access_key}https://${Endpoint}/${Version}/${Path}?access_key={access_key}&puid={pubid}(fixed pubid)https://${Endpoint}/${Version}/${Path}?access_key={access_key}&puids={pubid,pubid}(multiple pubid's)
All response types are application/json, as follows:
{
"data": ...,
"err_no": 0,
"err_msg": null
}The data, err_no, and ʻerr_msg` fields in the response body are fixed fields and have the following meanings:
data, the specific API response data.err_no, error code,0is normal, non0is wrong, check theerror_msgfield specifically.err_msg, error message for debugging use. If there are no errors, this field does not appear.