Skip to content

Commit a671c4b

Browse files
author
Travis CI
committed
1.60.60
[ci skip]
1 parent 6866c5a commit a671c4b

19 files changed

+90
-90
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,13 @@ console.log (ccxt.exchanges) // print all available exchanges
216216

217217
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
218218

219-
* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].59/dist/ccxt.browser.js
220-
* unpkg: https://unpkg.com/[email protected].59/dist/ccxt.browser.js
219+
* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].60/dist/ccxt.browser.js
220+
* unpkg: https://unpkg.com/[email protected].60/dist/ccxt.browser.js
221221

222222
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
223223

224224
```HTML
225-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].59/dist/ccxt.browser.js"></script>
225+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].60/dist/ccxt.browser.js"></script>
226226
```
227227

228228
Creates a global `ccxt` object:

ccxt.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const Exchange = require ('./js/base/Exchange')
3636
//-----------------------------------------------------------------------------
3737
// this is updated by vss.js when building
3838

39-
const version = '1.60.59'
39+
const version = '1.60.60'
4040

4141
Exchange.ccxtVersion = version
4242

dist/ccxt.browser.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const Exchange = require ('./js/base/Exchange')
4444
//-----------------------------------------------------------------------------
4545
// this is updated by vss.js when building
4646

47-
const version = '1.60.59'
47+
const version = '1.60.60'
4848

4949
Exchange.ccxtVersion = version
5050

@@ -106253,28 +106253,28 @@ module.exports = class okex3 extends Exchange {
106253106253
symbol = market['symbol'];
106254106254
}
106255106255
}
106256-
let amount = this.safeNumber (order, 'size');
106257-
const filled = this.safeNumber2 (order, 'filled_size', 'filled_qty');
106256+
let amount = this.safeString (order, 'size');
106257+
const filled = this.safeString2 (order, 'filled_size', 'filled_qty');
106258106258
let remaining = undefined;
106259106259
if (amount !== undefined) {
106260106260
if (filled !== undefined) {
106261-
amount = Math.max (amount, filled);
106262-
remaining = Math.max (0, amount - filled);
106261+
amount = Precise.stringMax (amount, filled);
106262+
remaining = Precise.stringMax (0, Precise.stringSub (amount, filled));
106263106263
}
106264106264
}
106265106265
if (type === 'market') {
106266-
remaining = 0;
106266+
remaining = '0';
106267106267
}
106268-
let cost = this.safeNumber2 (order, 'filled_notional', 'funds');
106269-
const price = this.safeNumber (order, 'price');
106270-
let average = this.safeNumber (order, 'price_avg');
106268+
let cost = this.safeString2 (order, 'filled_notional', 'funds');
106269+
const price = this.safeString (order, 'price');
106270+
let average = this.safeString (order, 'price_avg');
106271106271
if (cost === undefined) {
106272106272
if (filled !== undefined && average !== undefined) {
106273-
cost = average * filled;
106273+
cost = Precise.stringMul (average, filled);
106274106274
}
106275106275
} else {
106276-
if ((average === undefined) && (filled !== undefined) && (filled > 0)) {
106277-
average = cost / filled;
106276+
if ((average === undefined) && (filled !== undefined) && Precise.stringGt (filled, '0')) {
106277+
average = Precise.stringDiv (cost, filled);
106278106278
}
106279106279
}
106280106280
const status = this.parseOrderStatus (this.safeString (order, 'state'));
@@ -106292,7 +106292,7 @@ module.exports = class okex3 extends Exchange {
106292106292
clientOrderId = undefined; // fix empty clientOrderId string
106293106293
}
106294106294
const stopPrice = this.safeNumber (order, 'trigger_price');
106295-
return {
106295+
return this.safeOrder2 ({
106296106296
'info': order,
106297106297
'id': id,
106298106298
'clientOrderId': clientOrderId,
@@ -106314,7 +106314,7 @@ module.exports = class okex3 extends Exchange {
106314106314
'status': status,
106315106315
'fee': fee,
106316106316
'trades': undefined,
106317-
};
106317+
});
106318106318
}
106319106319

106320106320
async fetchOrder (id, symbol = undefined, params = {}) {

doc/readme.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,14 +1882,14 @@ JavaScript (for use with the ``<script>`` tag):
18821882
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
18831883

18841884

1885-
* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].59/dist/ccxt.browser.js
1886-
* unpkg: https://unpkg.com/[email protected].59/dist/ccxt.browser.js
1885+
* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].60/dist/ccxt.browser.js
1886+
* unpkg: https://unpkg.com/[email protected].60/dist/ccxt.browser.js
18871887

18881888
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
18891889

18901890
.. code-block:: HTML
18911891

1892-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].59/dist/ccxt.browser.js"></script>
1892+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].60/dist/ccxt.browser.js"></script>
18931893

18941894
Creates a global ``ccxt`` object:
18951895

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ccxt",
3-
"version": "1.60.59",
3+
"version": "1.60.60",
44
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 130+ exchanges",
55
"main": "./ccxt.js",
66
"unpkg": "dist/ccxt.browser.js",

php/Exchange.php

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

php/async/Exchange.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@
2828

2929
include 'Throttle.php';
3030

31-
$version = '1.60.59';
31+
$version = '1.60.60';
3232

3333
class Exchange extends \ccxt\Exchange {
3434

35-
const VERSION = '1.60.59';
35+
const VERSION = '1.60.60';
3636

3737
public static $loop;
3838
public static $kernel;

php/async/okex3.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,28 +2174,28 @@ public function parse_order($order, $market = null) {
21742174
$symbol = $market['symbol'];
21752175
}
21762176
}
2177-
$amount = $this->safe_number($order, 'size');
2178-
$filled = $this->safe_number_2($order, 'filled_size', 'filled_qty');
2177+
$amount = $this->safe_string($order, 'size');
2178+
$filled = $this->safe_string_2($order, 'filled_size', 'filled_qty');
21792179
$remaining = null;
21802180
if ($amount !== null) {
21812181
if ($filled !== null) {
2182-
$amount = max ($amount, $filled);
2183-
$remaining = max (0, $amount - $filled);
2182+
$amount = Precise::string_max($amount, $filled);
2183+
$remaining = Precise::string_max(0, Precise::string_sub($amount, $filled));
21842184
}
21852185
}
21862186
if ($type === 'market') {
2187-
$remaining = 0;
2187+
$remaining = '0';
21882188
}
2189-
$cost = $this->safe_number_2($order, 'filled_notional', 'funds');
2190-
$price = $this->safe_number($order, 'price');
2191-
$average = $this->safe_number($order, 'price_avg');
2189+
$cost = $this->safe_string_2($order, 'filled_notional', 'funds');
2190+
$price = $this->safe_string($order, 'price');
2191+
$average = $this->safe_string($order, 'price_avg');
21922192
if ($cost === null) {
21932193
if ($filled !== null && $average !== null) {
2194-
$cost = $average * $filled;
2194+
$cost = Precise::string_mul($average, $filled);
21952195
}
21962196
} else {
2197-
if (($average === null) && ($filled !== null) && ($filled > 0)) {
2198-
$average = $cost / $filled;
2197+
if (($average === null) && ($filled !== null) && Precise::string_gt($filled, '0')) {
2198+
$average = Precise::string_div($cost, $filled);
21992199
}
22002200
}
22012201
$status = $this->parse_order_status($this->safe_string($order, 'state'));
@@ -2213,7 +2213,7 @@ public function parse_order($order, $market = null) {
22132213
$clientOrderId = null; // fix empty $clientOrderId string
22142214
}
22152215
$stopPrice = $this->safe_number($order, 'trigger_price');
2216-
return array(
2216+
return $this->safe_order2(array(
22172217
'info' => $order,
22182218
'id' => $id,
22192219
'clientOrderId' => $clientOrderId,
@@ -2235,7 +2235,7 @@ public function parse_order($order, $market = null) {
22352235
'status' => $status,
22362236
'fee' => $fee,
22372237
'trades' => null,
2238-
);
2238+
));
22392239
}
22402240

22412241
public function fetch_order($id, $symbol = null, $params = array ()) {

php/okex3.php

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,13 +216,13 @@ console.log (ccxt.exchanges) // print all available exchanges
216216

217217
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
218218

219-
* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].59/dist/ccxt.browser.js
220-
* unpkg: https://unpkg.com/[email protected].59/dist/ccxt.browser.js
219+
* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].60/dist/ccxt.browser.js
220+
* unpkg: https://unpkg.com/[email protected].60/dist/ccxt.browser.js
221221

222222
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
223223

224224
```HTML
225-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].59/dist/ccxt.browser.js"></script>
225+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].60/dist/ccxt.browser.js"></script>
226226
```
227227

228228
Creates a global `ccxt` object:

python/ccxt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
# ----------------------------------------------------------------------------
2424

25-
__version__ = '1.60.59'
25+
__version__ = '1.60.60'
2626

2727
# ----------------------------------------------------------------------------
2828

python/ccxt/async_support/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# -----------------------------------------------------------------------------
66

7-
__version__ = '1.60.59'
7+
__version__ = '1.60.60'
88

99
# -----------------------------------------------------------------------------
1010

python/ccxt/async_support/base/exchange.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# -----------------------------------------------------------------------------
44

5-
__version__ = '1.60.59'
5+
__version__ = '1.60.60'
66

77
# -----------------------------------------------------------------------------
88

python/ccxt/async_support/okex3.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2110,24 +2110,24 @@ def parse_order(self, order, market=None):
21102110
if market is not None:
21112111
if symbol is None:
21122112
symbol = market['symbol']
2113-
amount = self.safe_number(order, 'size')
2114-
filled = self.safe_number_2(order, 'filled_size', 'filled_qty')
2113+
amount = self.safe_string(order, 'size')
2114+
filled = self.safe_string_2(order, 'filled_size', 'filled_qty')
21152115
remaining = None
21162116
if amount is not None:
21172117
if filled is not None:
2118-
amount = max(amount, filled)
2119-
remaining = max(0, amount - filled)
2118+
amount = Precise.string_max(amount, filled)
2119+
remaining = Precise.string_max(0, Precise.string_sub(amount, filled))
21202120
if type == 'market':
2121-
remaining = 0
2122-
cost = self.safe_number_2(order, 'filled_notional', 'funds')
2123-
price = self.safe_number(order, 'price')
2124-
average = self.safe_number(order, 'price_avg')
2121+
remaining = '0'
2122+
cost = self.safe_string_2(order, 'filled_notional', 'funds')
2123+
price = self.safe_string(order, 'price')
2124+
average = self.safe_string(order, 'price_avg')
21252125
if cost is None:
21262126
if filled is not None and average is not None:
2127-
cost = average * filled
2127+
cost = Precise.string_mul(average, filled)
21282128
else:
2129-
if (average is None) and (filled is not None) and (filled > 0):
2130-
average = cost / filled
2129+
if (average is None) and (filled is not None) and Precise.string_gt(filled, '0'):
2130+
average = Precise.string_div(cost, filled)
21312131
status = self.parse_order_status(self.safe_string(order, 'state'))
21322132
feeCost = self.safe_number(order, 'fee')
21332133
fee = None
@@ -2141,7 +2141,7 @@ def parse_order(self, order, market=None):
21412141
if (clientOrderId is not None) and (len(clientOrderId) < 1):
21422142
clientOrderId = None # fix empty clientOrderId string
21432143
stopPrice = self.safe_number(order, 'trigger_price')
2144-
return {
2144+
return self.safe_order2({
21452145
'info': order,
21462146
'id': id,
21472147
'clientOrderId': clientOrderId,
@@ -2163,7 +2163,7 @@ def parse_order(self, order, market=None):
21632163
'status': status,
21642164
'fee': fee,
21652165
'trades': None,
2166-
}
2166+
})
21672167

21682168
async def fetch_order(self, id, symbol=None, params={}):
21692169
if symbol is None:

python/ccxt/base/exchange.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# -----------------------------------------------------------------------------
66

7-
__version__ = '1.60.59'
7+
__version__ = '1.60.60'
88

99
# -----------------------------------------------------------------------------
1010

0 commit comments

Comments
 (0)