-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.js
22 lines (15 loc) · 808 Bytes
/
client.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
var CoinbaseExchange = require('coinbase-exchange');
/**
* Enter your Coinbase Exchange Sandbox API key, API secret, and the passphrase
* you specified when creating the API key pair.
*/
var key = 'your-coinbase-exchange-sandbox-api-key';
var b64secret = 'your-coinbase-exchange-sandbox-api-secret';
var passphrase = '123456789abcdef';
// For the sandbox, use this
var apiURL = 'https://api-public.sandbox.exchange.coinbase.com';
var authedClient = new CoinbaseExchange.AuthenticatedClient(key, b64secret, passphrase, apiURL);
// For the live API, use this. Example only. Please use the sandbox while testing.
// var authedClient = new CoinbaseExchange.AuthenticatedClient(key, b64secret, passphrase);
exports.authedClient = authedClient;
exports.publicClient = new CoinbaseExchange.PublicClient();