Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ccxt-dev/ccxt
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed May 31, 2018
2 parents 992ba67 + b067761 commit 9e4dda5
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 66 deletions.
39 changes: 22 additions & 17 deletions build/ccxt.browser.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ccxt.js
Expand Up @@ -37,7 +37,7 @@ const Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.14.103'
const version = '1.14.104'

Exchange.ccxtVersion = version

Expand Down
10 changes: 7 additions & 3 deletions doc/manual.rst
Expand Up @@ -1982,6 +1982,10 @@ Most of methods returning orders within ccxt unified API will usually yield an o
- The ``lastTradeTimestamp`` timestamp may have no value and may be ``undefined/None/null`` where not supported by the exchange or in case of an open order (an order that has not been filled nor partially filled yet).
- The ``lastTradeTimestamp``, if any, designates the timestamp of the last trade, in case the order is filled fully or partially, otherwise ``lastTradeTimestamp`` is ``undefined/None/null``.
- Order ``status`` prevails or has precedence over the ``lastTradeTimestamp``.
- The ``cost`` of an order is:
- ``if (status === 'open' and filled === 0) { amount * price }``
- ``if (status === 'closed' || status === 'canceled') { filled * price }``
- The ``cost`` of an order means the total *quote* volume of the order (whereas the ``amount`` is the *base* volume). The value of ``cost`` should be as close to the actual most recent known order cost as possible. The ``cost`` field itself is there mostly for convenience and can be deduced from other fields.

Placing Orders
~~~~~~~~~~~~~~
Expand Down Expand Up @@ -2229,9 +2233,9 @@ Trade structure
},
}
**The work on ``'fee'`` info is still in progress, fee info may be missing partially or entirely, depending on the exchange capabilities.**

**The ``fee`` currency may be different from both traded currencies (for example, an ETH/BTC order with fees in USD).**
- The work on ``'fee'`` info is still in progress, fee info may be missing partially or entirely, depending on the exchange capabilities.
- The ``fee`` currency may be different from both traded currencies (for example, an ETH/BTC order with fees in USD).
- The ``cost`` of the trade means ``amount * price``. It is the total *quote* volume of the trade (whereas ``amount`` is the *base* volume). The cost field itself is there mostly for convenience and can be deduced from other fields.

Trades By Order Id
~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "ccxt",
"version": "1.14.103",
"version": "1.14.104",
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 100+ exchanges",
"main": "./ccxt.js",
"unpkg": "build/ccxt.browser.js",
Expand Down
2 changes: 1 addition & 1 deletion php/Exchange.php
Expand Up @@ -30,7 +30,7 @@

namespace ccxt;

$version = '1.14.103';
$version = '1.14.104';

// rounding mode
const TRUNCATE = 0;
Expand Down
1 change: 1 addition & 0 deletions php/cointiger.php
Expand Up @@ -18,6 +18,7 @@ public function describe () {
'has' => array (
'fetchCurrencies' => false,
'fetchTickers' => true,
'fetchTradingLimits' => false,
'fetchOrder' => false,
),
'headers' => array (
Expand Down
15 changes: 0 additions & 15 deletions php/huobipro.php
Expand Up @@ -128,21 +128,6 @@ public function describe () {
));
}

public function load_trading_limits ($symbols = null, $reload = false, $params = array ()) {
if ($reload || !(is_array ($this->options) && array_key_exists ('limitsLoaded', $this->options))) {
$response = $this->fetch_trading_limits ($symbols);
$limits = $response['limits'];
$keys = is_array ($limits) ? array_keys ($limits) : array ();
for ($i = 0; $i < count ($keys); $i++) {
$symbol = $keys[$i];
$this->markets[$symbol] = array_replace_recursive ($this->markets[$symbol], array (
'limits' => $limits[$symbol],
));
}
}
return $this->markets;
}

public function fetch_trading_limits ($symbols = null, $params = array ()) {
// by default it will try load withdrawal fees of all currencies (with separate requests)
// however if you define codes = array ( 'ETH', 'BTC' ) in args it will only load those
Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/__init__.py
Expand Up @@ -22,7 +22,7 @@

# ----------------------------------------------------------------------------

__version__ = '1.14.103'
__version__ = '1.14.104'

# ----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/async/__init__.py
Expand Up @@ -4,7 +4,7 @@

# -----------------------------------------------------------------------------

__version__ = '1.14.103'
__version__ = '1.14.104'

# -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/async/base/exchange.py
Expand Up @@ -2,7 +2,7 @@

# -----------------------------------------------------------------------------

__version__ = '1.14.103'
__version__ = '1.14.104'

# -----------------------------------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions python/ccxt/async/cointiger.py
Expand Up @@ -32,6 +32,7 @@ def describe(self):
'has': {
'fetchCurrencies': False,
'fetchTickers': True,
'fetchTradingLimits': False,
'fetchOrder': False,
},
'headers': {
Expand Down
12 changes: 0 additions & 12 deletions python/ccxt/async/huobipro.py
Expand Up @@ -141,18 +141,6 @@ def describe(self):
},
})

async def load_trading_limits(self, symbols=None, reload=False, params={}):
if reload or not('limitsLoaded' in list(self.options.keys())):
response = await self.fetch_trading_limits(symbols)
limits = response['limits']
keys = list(limits.keys())
for i in range(0, len(keys)):
symbol = keys[i]
self.markets[symbol] = self.deep_extend(self.markets[symbol], {
'limits': limits[symbol],
})
return self.markets

async def fetch_trading_limits(self, symbols=None, params={}):
# by default it will try load withdrawal fees of all currencies(with separate requests)
# however if you define codes = ['ETH', 'BTC'] in args it will only load those
Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/base/exchange.py
Expand Up @@ -4,7 +4,7 @@

# -----------------------------------------------------------------------------

__version__ = '1.14.103'
__version__ = '1.14.104'

# -----------------------------------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions python/ccxt/cointiger.py
Expand Up @@ -32,6 +32,7 @@ def describe(self):
'has': {
'fetchCurrencies': False,
'fetchTickers': True,
'fetchTradingLimits': False,
'fetchOrder': False,
},
'headers': {
Expand Down
12 changes: 0 additions & 12 deletions python/ccxt/huobipro.py
Expand Up @@ -141,18 +141,6 @@ def describe(self):
},
})

def load_trading_limits(self, symbols=None, reload=False, params={}):
if reload or not('limitsLoaded' in list(self.options.keys())):
response = self.fetch_trading_limits(symbols)
limits = response['limits']
keys = list(limits.keys())
for i in range(0, len(keys)):
symbol = keys[i]
self.markets[symbol] = self.deep_extend(self.markets[symbol], {
'limits': limits[symbol],
})
return self.markets

def fetch_trading_limits(self, symbols=None, params={}):
# by default it will try load withdrawal fees of all currencies(with separate requests)
# however if you define codes = ['ETH', 'BTC'] in args it will only load those
Expand Down

0 comments on commit 9e4dda5

Please sign in to comment.