Skip to content

Commit

Permalink
bash example
Browse files Browse the repository at this point in the history
  • Loading branch information
xrado committed Aug 29, 2019
1 parent 141111f commit 6868854
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
17 changes: 17 additions & 0 deletions bash/README.md
@@ -0,0 +1,17 @@
# Instructions

Get python client

wget https://raw.githubusercontent.com/nicehash/rest-clients-demo/master/python/nicehash.py

Install dependencies

pip install requests

Enter API key/secret/org in to the bash script

./run.sh

For more options see

python nicehash.py -h
13 changes: 13 additions & 0 deletions bash/run.sh
@@ -0,0 +1,13 @@
#!/bin/bash
# Configuration
ORG="---"
KEY="---"
SEC="---"
#API="https://api2.nicehash.com" #prod env
API="https://api-test.nicehash.com" # test env

# Command
NHCLIENT="python nicehash.py -b $API -o $ORG -k $KEY -s $SEC"

# Run method
eval "$NHCLIENT -m GET -p '/main/api/v2/accounting/accounts'"; # -b '{json}'

0 comments on commit 6868854

Please sign in to comment.