Skip to content

Commit

Permalink
1.18.1175
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed Sep 21, 2019
1 parent 9c3895a commit f9854dd
Show file tree
Hide file tree
Showing 17 changed files with 207 additions and 29 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,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].1174/dist/ccxt.browser.js
* unpkg: https://unpkg.com/[email protected].1174/dist/ccxt.browser.js
* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].1175/dist/ccxt.browser.js
* unpkg: https://unpkg.com/[email protected].1175/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].1174/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].1175/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.18.1174'
const version = '1.18.1175'

Exchange.ccxtVersion = version

Expand Down
50 changes: 48 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.18.1174'
const version = '1.18.1175'

Exchange.ccxtVersion = version

Expand Down Expand Up @@ -39002,7 +39002,7 @@ module.exports = class crex24 extends Exchange {
'fetchDeposits': true,
'fetchFundingFees': false,
'fetchMyTrades': true,
'fetchOHLCV': false,
'fetchOHLCV': true,
'fetchOpenOrders': true,
'fetchOrder': true,
'fetchOrders': false,
Expand All @@ -39014,6 +39014,18 @@ module.exports = class crex24 extends Exchange {
'fetchWithdrawals': true,
'withdraw': true,
},
'timeframes': {
'1m': '1m',
'3m': '3m',
'5m': '5m',
'15m': '15m',
'30m': '30m',
'1h': '1h',
'4h': '4h',
'1d': '1d',
'1w': '1w',
'1M': '1mo',
},
'urls': {
'logo': 'https://user-images.githubusercontent.com/1294454/47813922-6f12cc00-dd5d-11e8-97c6-70f957712d47.jpg',
'api': 'https://api.crex24.com',
Expand All @@ -39030,6 +39042,7 @@ module.exports = class crex24 extends Exchange {
'tickers',
'recentTrades',
'orderBook',
'ohlcv',
],
},
'trading': {
Expand Down Expand Up @@ -39536,6 +39549,39 @@ module.exports = class crex24 extends Exchange {
return this.parseTrades (response, market, since, limit);
}

parseOHLCV (ohlcv, market = undefined, timeframe = '1m', since = undefined, limit = undefined) {
// { timestamp: '2019-09-21T10:36:00Z',
// open: 0.02152,
// high: 0.02156,
// low: 0.02152,
// close: 0.02156,
// volume: 0.01741259 }
const date = this.safeString (ohlcv, 'timestamp');
const timestamp = this.parse8601 (date);
return [
timestamp,
this.safeFloat (ohlcv, 'open'),
this.safeFloat (ohlcv, 'high'),
this.safeFloat (ohlcv, 'low'),
this.safeFloat (ohlcv, 'close'),
this.safeFloat (ohlcv, 'volume'),
];
}

async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
await this.loadMarkets ();
const market = this.market (symbol);
const request = {
'granularity': this.timeframes[timeframe],
'instrument': market['id'],
};
if (limit !== undefined) {
request['limit'] = limit; // Accepted values: 1 - 1000. If the parameter is not specified, the number of results is limited to 100
}
const response = await this.publicGetOhlcv (this.extend (request, params));
return this.parseOHLCVs (response, market, timeframe, since, limit);
}

parseOrderStatus (status) {
const statuses = {
'submitting': 'open', // A newly created limit order has a status "submitting" until it has been processed.
Expand Down
6 changes: 3 additions & 3 deletions doc/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,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].1174/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].1174/dist/ccxt.browser.js
- jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].1175/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].1175/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].1174/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].1175/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].1174/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].1174/dist/ccxt.browser.js
- jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].1175/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].1175/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].1174/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].1175/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.18.1174",
"version": "1.18.1175",
"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/Exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
use kornrunner\Solidity;
use Elliptic\EC;

$version = '1.18.1174';
$version = '1.18.1175';

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

class Exchange {

const VERSION = '1.18.1174';
const VERSION = '1.18.1175';

public static $eth_units = array (
'wei' => '1',
Expand Down
48 changes: 47 additions & 1 deletion php/crex24.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function describe () {
'fetchDeposits' => true,
'fetchFundingFees' => false,
'fetchMyTrades' => true,
'fetchOHLCV' => false,
'fetchOHLCV' => true,
'fetchOpenOrders' => true,
'fetchOrder' => true,
'fetchOrders' => false,
Expand All @@ -40,6 +40,18 @@ public function describe () {
'fetchWithdrawals' => true,
'withdraw' => true,
),
'timeframes' => array (
'1m' => '1m',
'3m' => '3m',
'5m' => '5m',
'15m' => '15m',
'30m' => '30m',
'1h' => '1h',
'4h' => '4h',
'1d' => '1d',
'1w' => '1w',
'1M' => '1mo',
),
'urls' => array (
'logo' => 'https://user-images.githubusercontent.com/1294454/47813922-6f12cc00-dd5d-11e8-97c6-70f957712d47.jpg',
'api' => 'https://api.crex24.com',
Expand All @@ -56,6 +68,7 @@ public function describe () {
'tickers',
'recentTrades',
'orderBook',
'ohlcv',
),
),
'trading' => array (
Expand Down Expand Up @@ -562,6 +575,39 @@ public function fetch_trades ($symbol, $since = null, $limit = null, $params = a
return $this->parse_trades($response, $market, $since, $limit);
}

public function parse_ohlcv ($ohlcv, $market = null, $timeframe = '1m', $since = null, $limit = null) {
// { $timestamp => '2019-09-21T10:36:00Z',
// open => 0.02152,
// high => 0.02156,
// low => 0.02152,
// close => 0.02156,
// volume => 0.01741259 }
$date = $this->safe_string($ohlcv, 'timestamp');
$timestamp = $this->parse8601 ($date);
return array (
$timestamp,
$this->safe_float($ohlcv, 'open'),
$this->safe_float($ohlcv, 'high'),
$this->safe_float($ohlcv, 'low'),
$this->safe_float($ohlcv, 'close'),
$this->safe_float($ohlcv, 'volume'),
);
}

public function fetch_ohlcv ($symbol, $timeframe = '1m', $since = null, $limit = null, $params = array ()) {
$this->load_markets();
$market = $this->market ($symbol);
$request = array (
'granularity' => $this->timeframes[$timeframe],
'instrument' => $market['id'],
);
if ($limit !== null) {
$request['limit'] = $limit; // Accepted values => 1 - 1000. If the parameter is not specified, the number of results is limited to 100
}
$response = $this->publicGetOhlcv (array_merge ($request, $params));
return $this->parse_ohlcvs($response, $market, $timeframe, $since, $limit);
}

public function parse_order_status ($status) {
$statuses = array (
'submitting' => 'open', // A newly created limit order has a $status "submitting" until it has been processed.
Expand Down
6 changes: 3 additions & 3 deletions python/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -371,14 +371,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].1174/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].1174/dist/ccxt.browser.js
- jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].1175/dist/ccxt.browser.js
- unpkg: https://unpkg.com/[email protected].1175/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].1174/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].1175/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.18.1174'
__version__ = '1.18.1175'

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

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.18.1174'
__version__ = '1.18.1175'

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

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.18.1174'
__version__ = '1.18.1175'

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

Expand Down
45 changes: 44 additions & 1 deletion python/ccxt/async_support/crex24.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def describe(self):
'fetchDeposits': True,
'fetchFundingFees': False,
'fetchMyTrades': True,
'fetchOHLCV': False,
'fetchOHLCV': True,
'fetchOpenOrders': True,
'fetchOrder': True,
'fetchOrders': False,
Expand All @@ -52,6 +52,18 @@ def describe(self):
'fetchWithdrawals': True,
'withdraw': True,
},
'timeframes': {
'1m': '1m',
'3m': '3m',
'5m': '5m',
'15m': '15m',
'30m': '30m',
'1h': '1h',
'4h': '4h',
'1d': '1d',
'1w': '1w',
'1M': '1mo',
},
'urls': {
'logo': 'https://user-images.githubusercontent.com/1294454/47813922-6f12cc00-dd5d-11e8-97c6-70f957712d47.jpg',
'api': 'https://api.crex24.com',
Expand All @@ -68,6 +80,7 @@ def describe(self):
'tickers',
'recentTrades',
'orderBook',
'ohlcv',
],
},
'trading': {
Expand Down Expand Up @@ -549,6 +562,36 @@ async def fetch_trades(self, symbol, since=None, limit=None, params={}):
#
return self.parse_trades(response, market, since, limit)

def parse_ohlcv(self, ohlcv, market=None, timeframe='1m', since=None, limit=None):
# {timestamp: '2019-09-21T10:36:00Z',
# open: 0.02152,
# high: 0.02156,
# low: 0.02152,
# close: 0.02156,
# volume: 0.01741259}
date = self.safe_string(ohlcv, 'timestamp')
timestamp = self.parse8601(date)
return [
timestamp,
self.safe_float(ohlcv, 'open'),
self.safe_float(ohlcv, 'high'),
self.safe_float(ohlcv, 'low'),
self.safe_float(ohlcv, 'close'),
self.safe_float(ohlcv, 'volume'),
]

async def fetch_ohlcv(self, symbol, timeframe='1m', since=None, limit=None, params={}):
await self.load_markets()
market = self.market(symbol)
request = {
'granularity': self.timeframes[timeframe],
'instrument': market['id'],
}
if limit is not None:
request['limit'] = limit # Accepted values: 1 - 1000. If the parameter is not specified, the number of results is limited to 100
response = await self.publicGetOhlcv(self.extend(request, params))
return self.parse_ohlcvs(response, market, timeframe, since, limit)

def parse_order_status(self, status):
statuses = {
'submitting': 'open', # A newly created limit order has a status "submitting" until it has been processed.
Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/base/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

__version__ = '1.18.1174'
__version__ = '1.18.1175'

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

Expand Down
Loading

0 comments on commit f9854dd

Please sign in to comment.