Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 826 Bytes

README.md

File metadata and controls

25 lines (17 loc) · 826 Bytes

Switcheo API Examples

Examples for using the Switcheo API.

Setup

  1. Install Node.js
  2. Install npm or yarn
  3. Run npm install or yarn install within the root folder

Running Examples

Before running the examples, the following variables need to be setup:

  1. The address and privateKey of your user in src/user.js
  2. The API_URL and CONTRACT_HASH in src/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