forked from matthew1232/stockx-api
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
34 lines (25 loc) · 746 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const StockXAPI = require('./src/classes/stockx');
const stockX = new StockXAPI({
currency: 'EUR',
//proxy: 'ip:port'
});
(async () => {
try {
console.log('Logging in...');
await stockX.login({
user: 'YOUR_EMAIL',
password: 'YOUR_PASSWORD'
});
console.log('Successfully logged in!');
console.log('Getting profile...');
const profile = await stockX.getProfile();
console.log('Successfully got profile data!');
const bids = await stockX.getBids('current');
bids.forEach(function (item) {
console.log(item);
});
}
catch(e){
console.log('Error: ' + e.message);
}
})();