Examples for using the Switcheo API.
Before running the examples, the following variables need to be setup:
- The
address
andprivateKey
of your user insrc/user.js
- The
API_URL
andCONTRACT_HASH
insrc/config.js
Note that address
refers to the script hash of the user's public key,
please check the Address section of the API docs for more information.
Once the variables have been setup, files can be run with node <file path>
.
For example:
node src/examples/tickers/candlesticks.js