Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
frosty00 committed May 31, 2018
1 parent effebad commit a946bdc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions js/gateio.js
Expand Up @@ -22,6 +22,9 @@ module.exports = class gateio extends Exchange {
'withdraw': true,
'createDepositAddress': true,
'fetchDepositAddress': true,
'fetchClosedOrders': true,
'fetchOpenOrders': true,
'fetchOrders': true,
},
'urls': {
'logo': 'https://user-images.githubusercontent.com/1294454/31784029-0313c702-b509-11e7-9ccc-bc0da6a0e435.jpg',
Expand Down Expand Up @@ -450,6 +453,23 @@ module.exports = class gateio extends Exchange {
return await this.queryDepositAddress ('Deposit', code, params);
}

async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) {
await this.loadMarkets ();
let market = this.market (symbol);
let response = this.privatePostOpenOrders ();
return this.parseOrders (response['orders'], market, since, limit);
}

async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) {
if (typeof symbol === 'undefined')
throw new ExchangeError (this.id + ' fetchMyTrades requires symbol param');
await this.loadMarkets ();
let market = this.market (symbol);
let id = market['id'];
let response = this.privatePostTradeHistory (this.extend ({ 'currencyPair': id }, params));
return this.parseTrades (response['trades'], market, since, limit);
}

async withdraw (currency, amount, address, tag = undefined, params = {}) {
this.checkAddress (address);
await this.loadMarkets ();
Expand Down

0 comments on commit a946bdc

Please sign in to comment.