This page provides detailed examples of how to use the xmrig
API. Each example demonstrates a specific functionality.
- Add Miners
- List All Miners
- Get Individual Miners
- Update Config
- Update Individual Miners Endpoints
- Update All Endpoints for All Miners
- Start/Stop All Miners
- Pause/Resume All Miners
- Remove Miner
- Access Properties
- Full Example
This example demonstrates how to add XMRig miners to the XMRigManager. It shows how to configure logging and add miners to the manager.
{% include "../examples/add_miners.py" %}
This example demonstrates how to list all XMRig miners managed by the XMRigManager. It shows how to configure logging, add miners to the manager, and list all miners.
{% include "../examples/list_all_miners.py" %}
This example demonstrates how to retrieve individual XMRig miners from the XMRigManager. It shows how to configure logging, add miners to the manager, and retrieve individual miners.
{% include "../examples/get_individual_miners.py" %}
This example demonstrates how to update the configuration of an XMRig miner using the XMRigManager. It shows how to configure logging, add miners to the manager, retrieve the current config, modify it, and post the updated config.
{% include "../examples/update_config.py" %}
This example demonstrates how to update the endpoints for individual XMRig miners using the XMRigManager. It shows how to configure logging, add miners to the manager, and update the summary, backends, and config endpoints for each miner.
{% include "../examples/update_individual_miners_endpoints.py" %}
This example demonstrates how to update all endpoints for all XMRig miners using the XMRigManager. It shows how to configure logging, add miners to the manager, and update all endpoints for all miners in the manager.
{% include "../examples/update_all_miners.py" %}
This example demonstrates how to start and stop all XMRig miners using the XMRigManager. It shows how to configure logging, add miners to the manager, and perform start/stop actions on all miners.
{% include "../examples/start_stop_all_miners.py" %}
This example demonstrates how to pause and resume all XMRig miners using the XMRigManager. It shows how to configure logging, add miners to the manager, and perform pause/resume actions on all miners.
{% include "../examples/pause_resume_all_miners.py" %}
This example demonstrates how to remove an XMRig miner from the XMRigManager. It shows how to configure logging, add miners to the manager, list all miners, remove a miner, and list all miners again.
{% include "../examples/remove_miner.py" %}
This example demonstrates how to use the XMRigManager to manage multiple XMRig miners. It shows how to configure logging, add miners to the manager, and retrieve data from individual miners. The example logs various properties of the miners, such as summary, backends, config, hashrates, and job counters.
{% include "../examples/access_properties.py" %}
This full example demonstrates various functionalities of the XMRigManager. It shows how to configure logging, add and remove miners, list all miners, update endpoints, pause/resume miners, start/stop miners, and update the miner's config.
{% include "../examples/full-example.py" %}