Skip to content

Commit

Permalink
bitflyer new method schema, linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Jan 31, 2018
1 parent 3066637 commit 41fd3a4
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions js/bitflyer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const Exchange = require ('./base/Exchange');
// ---------------------------------------------------------------------------

module.exports = class bitflyer extends Exchange {

describe () {
return this.deepExtend (super.describe (), {
'id': 'bitflyer',
Expand Down Expand Up @@ -78,9 +77,9 @@ module.exports = class bitflyer extends Exchange {
}

async fetchMarkets () {
let jp_markets = await this.publicGetMarkets ();
let us_markets = await this.publicGetMarketsUsa ();
let eu_markets = await this.publicGetMarketsEu ();
let jp_markets = await this.publicGetGetmarkets ();
let us_markets = await this.publicGetGetmarketsUsa ();
let eu_markets = await this.publicGetGetmarketsEu ();
let markets = this.arrayConcat (jp_markets, us_markets);
markets = this.arrayConcat (markets, eu_markets);
let result = [];
Expand Down Expand Up @@ -116,7 +115,7 @@ module.exports = class bitflyer extends Exchange {

async fetchBalance (params = {}) {
await this.loadMarkets ();
let response = await this.privateGetBalance ();
let response = await this.privateGetGetbalance ();
let balances = {};
for (let b = 0; b < response.length; b++) {
let account = response[b];
Expand All @@ -140,15 +139,15 @@ module.exports = class bitflyer extends Exchange {

async fetchOrderBook (symbol, params = {}) {
await this.loadMarkets ();
let orderbook = await this.publicGetBoard (this.extend ({
let orderbook = await this.publicGetGetboard (this.extend ({
'product_code': this.marketId (symbol),
}, params));
return this.parseOrderBook (orderbook, undefined, 'bids', 'asks', 'price', 'size');
}

async fetchTicker (symbol, params = {}) {
await this.loadMarkets ();
let ticker = await this.publicGetTicker (this.extend ({
let ticker = await this.publicGetGetticker (this.extend ({
'product_code': this.marketId (symbol),
}, params));
let timestamp = this.parse8601 (ticker['timestamp']);
Expand Down Expand Up @@ -202,7 +201,7 @@ module.exports = class bitflyer extends Exchange {
async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) {
await this.loadMarkets ();
let market = this.market (symbol);
let response = await this.publicGetExecutions (this.extend ({
let response = await this.publicGetGetexecutions (this.extend ({
'product_code': market['id'],
}, params));
return this.parseTrades (response, market, since, limit);
Expand Down Expand Up @@ -271,4 +270,4 @@ module.exports = class bitflyer extends Exchange {
}
return { 'url': url, 'method': method, 'body': body, 'headers': headers };
}
}
};

0 comments on commit 41fd3a4

Please sign in to comment.