Skip to content

Commit

Permalink
1.27.41
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed May 8, 2020
1 parent 538f7da commit db0e203
Show file tree
Hide file tree
Showing 18 changed files with 281 additions and 31 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ console.log (ccxt.exchanges) // print all available exchanges

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

* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].40/dist/ccxt.browser.js
* unpkg: https://unpkg.com/[email protected].40/dist/ccxt.browser.js
* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].41/dist/ccxt.browser.js
* unpkg: https://unpkg.com/[email protected].41/dist/ccxt.browser.js

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.

```HTML
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].40/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].41/dist/ccxt.browser.js"></script>
```

Creates a global `ccxt` object:
Expand Down
2 changes: 1 addition & 1 deletion ccxt.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.27.40'
const version = '1.27.41'

Exchange.ccxtVersion = version

Expand Down
67 changes: 65 additions & 2 deletions dist/ccxt.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.27.40'
const version = '1.27.41'

Exchange.ccxtVersion = version

Expand Down Expand Up @@ -12433,8 +12433,60 @@ module.exports = class bitbay extends Exchange {
},
'fees': {
'trading': {
'maker': 0.0,
'taker': 0.1 / 100,
'percentage': true,
'tierBased': false,
},
'fiat': {
'maker': 0.30 / 100,
'taker': 0.43 / 100,
'percentage': true,
'tierBased': true,
'tiers': {
'taker': [
[ 0.0043, 0 ],
[ 0.0042, 1250 ],
[ 0.0041, 3750 ],
[ 0.0040, 7500 ],
[ 0.0039, 10000 ],
[ 0.0038, 15000 ],
[ 0.0037, 20000 ],
[ 0.0036, 25000 ],
[ 0.0035, 37500 ],
[ 0.0034, 50000 ],
[ 0.0033, 75000 ],
[ 0.0032, 100000 ],
[ 0.0031, 150000 ],
[ 0.0030, 200000 ],
[ 0.0029, 250000 ],
[ 0.0028, 375000 ],
[ 0.0027, 500000 ],
[ 0.0026, 625000 ],
[ 0.0025, 875000 ],
],
'maker': [
[ 0.0030, 0 ],
[ 0.0029, 1250 ],
[ 0.0028, 3750 ],
[ 0.0028, 7500 ],
[ 0.0027, 10000 ],
[ 0.0026, 15000 ],
[ 0.0025, 20000 ],
[ 0.0025, 25000 ],
[ 0.0024, 37500 ],
[ 0.0023, 50000 ],
[ 0.0023, 75000 ],
[ 0.0022, 100000 ],
[ 0.0021, 150000 ],
[ 0.0021, 200000 ],
[ 0.0020, 250000 ],
[ 0.0019, 375000 ],
[ 0.0018, 500000 ],
[ 0.0018, 625000 ],
[ 0.0017, 875000 ],
],
},
},
'funding': {
'withdraw': {
Expand All @@ -12451,6 +12503,9 @@ module.exports = class bitbay extends Exchange {
},
},
},
'options': {
'fiatCurrencies': [ 'EUR', 'USD', 'GBP', 'PLN' ],
},
'exceptions': {
'400': ExchangeError, // At least one parameter wasn't set
'401': InvalidOrder, // Invalid order type
Expand Down Expand Up @@ -12482,6 +12537,7 @@ module.exports = class bitbay extends Exchange {

async fetchMarkets (params = {}) {
const response = await this.v1_01PublicGetTradingTicker (params);
const fiatCurrencies = this.safeValue (this.options, 'fiatCurrencies', []);
//
// {
// status: 'Ok',
Expand Down Expand Up @@ -12520,6 +12576,12 @@ module.exports = class bitbay extends Exchange {
'amount': this.safeInteger (first, 'scale'),
'price': this.safeInteger (second, 'scale'),
};
let fees = this.safeValue (this.fees, 'trading', {});
if (this.inArray (base, fiatCurrencies) || this.inArray (quote, fiatCurrencies)) {
fees = this.safeValue (this.fees, 'fiat', {});
}
const maker = this.safeFloat (fees, 'maker');
const taker = this.safeFloat (fees, 'taker');
// todo: check that the limits have ben interpreted correctly
// todo: parse the fees page
result.push ({
Expand All @@ -12531,7 +12593,8 @@ module.exports = class bitbay extends Exchange {
'quoteId': quoteId,
'precision': precision,
'active': undefined,
'fee': undefined,
'maker': maker,
'taker': taker,
'limits': {
'amount': {
'min': this.safeFloat (first, 'minOffer'),
Expand Down
6 changes: 3 additions & 3 deletions doc/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,14 @@ JavaScript (for use with the ``<script>`` tag):

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

- jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].40/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].40/dist/ccxt.browser.js
- jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].41/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].41/dist/ccxt.browser.js

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.

.. code:: html

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].40/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].41/dist/ccxt.browser.js"></script>

Creates a global ``ccxt`` object:

Expand Down
6 changes: 3 additions & 3 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ JavaScript (for use with the ``<script>`` tag):

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

- jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].40/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].40/dist/ccxt.browser.js
- jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].41/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].41/dist/ccxt.browser.js

You can obtain a live-updated version of the bundle by removing the version number from the URL (the ``@a.b.c`` thing) — however, we do not recommend to do that, as it may break your app eventually. Also, please keep in mind that we are not responsible for the correct operation of those CDN servers.

.. code:: html

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].40/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].41/dist/ccxt.browser.js"></script>

Creates a global ``ccxt`` object:

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ccxt",
"version": "1.27.40",
"version": "1.27.41",
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 130+ exchanges",
"main": "./ccxt.js",
"unpkg": "dist/ccxt.browser.js",
Expand Down
4 changes: 2 additions & 2 deletions php/base/Exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
use Elliptic\EC;
use BN\BN;

$version = '1.27.40';
$version = '1.27.41';

// rounding mode
const TRUNCATE = 0;
Expand All @@ -54,7 +54,7 @@

class Exchange {

const VERSION = '1.27.40';
const VERSION = '1.27.41';

public static $exchanges = array(
'_1btcxe',
Expand Down
67 changes: 65 additions & 2 deletions php/bitbay.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,60 @@ public function describe() {
),
'fees' => array(
'trading' => array(
'maker' => 0.0,
'taker' => 0.1 / 100,
'percentage' => true,
'tierBased' => false,
),
'fiat' => array(
'maker' => 0.30 / 100,
'taker' => 0.43 / 100,
'percentage' => true,
'tierBased' => true,
'tiers' => array(
'taker' => array(
array( 0.0043, 0 ),
array( 0.0042, 1250 ),
array( 0.0041, 3750 ),
array( 0.0040, 7500 ),
array( 0.0039, 10000 ),
array( 0.0038, 15000 ),
array( 0.0037, 20000 ),
array( 0.0036, 25000 ),
array( 0.0035, 37500 ),
array( 0.0034, 50000 ),
array( 0.0033, 75000 ),
array( 0.0032, 100000 ),
array( 0.0031, 150000 ),
array( 0.0030, 200000 ),
array( 0.0029, 250000 ),
array( 0.0028, 375000 ),
array( 0.0027, 500000 ),
array( 0.0026, 625000 ),
array( 0.0025, 875000 ),
),
'maker' => array(
array( 0.0030, 0 ),
array( 0.0029, 1250 ),
array( 0.0028, 3750 ),
array( 0.0028, 7500 ),
array( 0.0027, 10000 ),
array( 0.0026, 15000 ),
array( 0.0025, 20000 ),
array( 0.0025, 25000 ),
array( 0.0024, 37500 ),
array( 0.0023, 50000 ),
array( 0.0023, 75000 ),
array( 0.0022, 100000 ),
array( 0.0021, 150000 ),
array( 0.0021, 200000 ),
array( 0.0020, 250000 ),
array( 0.0019, 375000 ),
array( 0.0018, 500000 ),
array( 0.0018, 625000 ),
array( 0.0017, 875000 ),
),
),
),
'funding' => array(
'withdraw' => array(
Expand All @@ -138,6 +190,9 @@ public function describe() {
),
),
),
'options' => array(
'fiatCurrencies' => array( 'EUR', 'USD', 'GBP', 'PLN' ),
),
'exceptions' => array(
'400' => '\\ccxt\\ExchangeError', // At least one parameter wasn't set
'401' => '\\ccxt\\InvalidOrder', // Invalid order type
Expand Down Expand Up @@ -169,6 +224,7 @@ public function describe() {

public function fetch_markets($params = array ()) {
$response = $this->v1_01PublicGetTradingTicker ($params);
$fiatCurrencies = $this->safe_value($this->options, 'fiatCurrencies', array());
//
// {
// status => 'Ok',
Expand Down Expand Up @@ -207,8 +263,14 @@ public function fetch_markets($params = array ()) {
'amount' => $this->safe_integer($first, 'scale'),
'price' => $this->safe_integer($second, 'scale'),
);
$fees = $this->safe_value($this->fees, 'trading', array());
if ($this->in_array($base, $fiatCurrencies) || $this->in_array($quote, $fiatCurrencies)) {
$fees = $this->safe_value($this->fees, 'fiat', array());
}
$maker = $this->safe_float($fees, 'maker');
$taker = $this->safe_float($fees, 'taker');
// todo => check that the limits have ben interpreted correctly
// todo => parse the fees page
// todo => parse the $fees page
$result[] = array(
'id' => $id,
'symbol' => $symbol,
Expand All @@ -218,7 +280,8 @@ public function fetch_markets($params = array ()) {
'quoteId' => $quoteId,
'precision' => $precision,
'active' => null,
'fee' => null,
'maker' => $maker,
'taker' => $taker,
'limits' => array(
'amount' => array(
'min' => $this->safe_float($first, 'minOffer'),
Expand Down
6 changes: 3 additions & 3 deletions python/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,14 @@ JavaScript (for use with the ``<script>`` tag):

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

- jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].40/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].40/dist/ccxt.browser.js
- jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].41/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].41/dist/ccxt.browser.js

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.

.. code:: html

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].40/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].41/dist/ccxt.browser.js"></script>

Creates a global ``ccxt`` object:

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

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

__version__ = '1.27.40'
__version__ = '1.27.41'

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

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/async_support/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

__version__ = '1.27.40'
__version__ = '1.27.41'

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

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/async_support/base/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

__version__ = '1.27.40'
__version__ = '1.27.41'

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

Expand Down
Loading

0 comments on commit db0e203

Please sign in to comment.