forked from ccxt/ccxt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbleutrade.js
44 lines (38 loc) · 1.5 KB
/
bleutrade.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
35
36
37
38
39
40
41
42
43
44
"use strict";
// ---------------------------------------------------------------------------
const bittrex = require ('./bittrex.js')
// ---------------------------------------------------------------------------
module.exports = class bleutrade extends bittrex {
describe () {
return this.deepExtend (super.describe (), {
'id': 'bleutrade',
'name': 'Bleutrade',
'countries': 'BR', // Brazil
'rateLimit': 1000,
'version': 'v2',
'hasCORS': true,
'hasFetchTickers': true,
'hasFetchOHLCV': false,
'urls': {
'logo': 'https://user-images.githubusercontent.com/1294454/30303000-b602dbe6-976d-11e7-956d-36c5049c01e7.jpg',
'api': {
'public': 'https://bleutrade.com/api',
'account': 'https://bleutrade.com/api',
'market': 'https://bleutrade.com/api',
},
'www': 'https://bleutrade.com',
'doc': 'https://bleutrade.com/help/API',
},
});
}
async fetchOrderBook (symbol, params = {}) {
await this.loadMarkets ();
let response = await this.publicGetOrderbook (this.extend ({
'market': this.marketId (symbol),
'type': 'ALL',
'depth': 50,
}, params));
let orderbook = response['result'];
return this.parseOrderBook (orderbook, undefined, 'buy', 'sell', 'Rate', 'Quantity');
}
}