Skip to content

Commit a899679

Browse files
author
Travis CI
committed
1.15.45
[ci skip]
1 parent 13306b1 commit a899679

23 files changed

Lines changed: 84 additions & 24 deletions

build/ccxt.browser.js

Lines changed: 23 additions & 7 deletions
Large diffs are not rendered by default.

ccxt.js

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

40-
const version = '1.15.44'
40+
const version = '1.15.45'
4141

4242
Exchange.ccxtVersion = version
4343

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.15.44",
3+
"version": "1.15.45",
44
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 100+ exchanges",
55
"main": "./ccxt.js",
66
"unpkg": "build/ccxt.browser.js",

php/Exchange.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
namespace ccxt;
3232

33-
$version = '1.15.44';
33+
$version = '1.15.45';
3434

3535
// rounding mode
3636
const TRUNCATE = 0;
@@ -46,7 +46,7 @@
4646

4747
class Exchange {
4848

49-
const VERSION = '1.15.44';
49+
const VERSION = '1.15.45';
5050

5151
public static $exchanges = array (
5252
'_1broker',

php/cobinhood.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public function describe () {
131131
),
132132
'exceptions' => array (
133133
'insufficient_balance' => '\\ccxt\\InsufficientFunds',
134+
'invalid_order_size' => '\\ccxt\\InvalidOrder',
134135
'invalid_nonce' => '\\ccxt\\InvalidNonce',
135136
'unauthorized_scope' => '\\ccxt\\PermissionDenied',
136137
),

php/cryptopia.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,9 @@ public function handle_errors ($code, $reason, $url, $method, $headers, $body) {
768768
$feedback = $this->id;
769769
if (gettype ($error) === 'string') {
770770
$feedback = $feedback . ' ' . $error;
771+
if (mb_strpos ($error, 'Invalid trade amount') !== false) {
772+
throw new InvalidOrder ($feedback);
773+
}
771774
if (mb_strpos ($error, 'does not exist') !== false) {
772775
throw new OrderNotFound ($feedback);
773776
}

php/huobipro.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ public function describe () {
113113
),
114114
'exceptions' => array (
115115
'account-frozen-balance-insufficient-error' => '\\ccxt\\InsufficientFunds', // array ("status":"error","err-code":"account-frozen-balance-insufficient-error","err-msg":"trade account balance is not enough, left => `0.0027`","data":null)
116+
'invalid-amount' => '\\ccxt\\InvalidOrder', // eg "Paramemter `amount` is invalid."
116117
'order-limitorder-amount-min-error' => '\\ccxt\\InvalidOrder', // limit order amount error, min => `0.001`
117118
'order-marketorder-amount-min-error' => '\\ccxt\\InvalidOrder', // market order amount error, min => `0.01`
118119
'order-limitorder-price-min-error' => '\\ccxt\\InvalidOrder', // limit order price error

php/livecoin.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -662,9 +662,17 @@ public function handle_errors ($code, $reason, $url, $method, $headers, $body) {
662662
// returns status $code 200 even if $success === false
663663
$success = $this->safe_value($response, 'success', true);
664664
if (!$success) {
665-
$message = $this->safe_string($response, 'message', '');
666-
if (mb_strpos ($message, 'Cannot find order') !== false) {
667-
throw new OrderNotFound ($this->id . ' ' . $body);
665+
$message = $this->safe_string($response, 'message');
666+
if ($message !== null) {
667+
if (mb_strpos ($message, 'Cannot find order') !== false) {
668+
throw new OrderNotFound ($this->id . ' ' . $body);
669+
}
670+
}
671+
$exception = $this->safe_string($response, 'exception');
672+
if ($exception !== null) {
673+
if (mb_strpos ($exception, 'Minimal amount is') !== false) {
674+
throw new InvalidOrder ($this->id . ' ' . $body);
675+
}
668676
}
669677
throw new ExchangeError ($this->id . ' ' . $body);
670678
}

php/yobit.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ public function handle_errors ($code, $reason, $url, $method, $headers, $body) {
241241
throw new DDoSProtection ($this->id . ' ' . $this->json ($response));
242242
} else if (($response['error_log'] === 'not available') || ($response['error_log'] === 'external service unavailable')) {
243243
throw new DDoSProtection ($this->id . ' ' . $this->json ($response));
244+
} else if ($response['error_log'] === 'Total transaction amount') {
245+
// eg array ("success":0,"error":"Total transaction amount is less than minimal total => 0.00010000")
246+
throw new InvalidOrder ($this->id . ' ' . $this->json ($response));
244247
}
245248
}
246249
throw new ExchangeError ($this->id . ' ' . $this->json ($response));

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.15.44'
25+
__version__ = '1.15.45'
2626

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

0 commit comments

Comments
 (0)