Skip to content

Commit

Permalink
1.10.303
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed Dec 6, 2017
1 parent 7062030 commit 0a5ccc6
Show file tree
Hide file tree
Showing 11 changed files with 183 additions and 9 deletions.
48 changes: 46 additions & 2 deletions build/ccxt.browser.js

Large diffs are not rendered by default.

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

const version = '1.10.302'
const version = '1.10.303'

Exchange.ccxtVersion = version

Expand Down
2 changes: 1 addition & 1 deletion ccxt.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

namespace ccxt;

$version = '1.10.302';
$version = '1.10.303';

const CLASSES_DIR = __DIR__ . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR;

Expand Down
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.10.302",
"version": "1.10.303",
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 90+ exchanges",
"main": "./ccxt.js",
"unpkg": "build/ccxt.browser.js",
Expand Down
44 changes: 44 additions & 0 deletions php/bleutrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,50 @@ public function describe () {
));
}

public function fetch_markets () {
$markets = $this->publicGetMarkets ();
$result = array ();
for ($p = 0; $p < count ($markets['result']); $p++) {
$market = $markets['result'][$p];
$id = $market['MarketName'];
$base = $market['MarketCurrency'];
$quote = $market['BaseCurrency'];
$base = $this->common_currency_code($base);
$quote = $this->common_currency_code($quote);
$symbol = $base . '/' . $quote;
$precision = array (
'amount' => 8,
'price' => 8,
);
$active = $market['IsActive'];
$result[] = array_merge ($this->fees['trading'], array (
'id' => $id,
'symbol' => $symbol,
'base' => $base,
'quote' => $quote,
'active' => $active,
'info' => $market,
'lot' => pow (10, -$precision['amount']),
'precision' => $precision,
'limits' => array (
'amount' => array (
'min' => $market['MinTradeSize'],
'max' => null,
),
'price' => array (
'min' => null,
'max' => null,
),
'cost' => array (
'min' => 0,
'max' => null,
),
),
));
}
return $result;
}

public function fetch_order_book ($symbol, $params = array ()) {
$this->load_markets();
$response = $this->publicGetOrderbook (array_merge (array (
Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

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

__version__ = '1.10.302'
__version__ = '1.10.303'

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

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

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

__version__ = '1.10.302'
__version__ = '1.10.303'

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

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

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

__version__ = '1.10.302'
__version__ = '1.10.303'

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

Expand Down
43 changes: 43 additions & 0 deletions python/ccxt/async/bleutrade.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-

from ccxt.async.bittrex import bittrex
import math


class bleutrade (bittrex):
Expand All @@ -27,6 +28,48 @@ def describe(self):
},
})

async def fetch_markets(self):
markets = await self.publicGetMarkets()
result = []
for p in range(0, len(markets['result'])):
market = markets['result'][p]
id = market['MarketName']
base = market['MarketCurrency']
quote = market['BaseCurrency']
base = self.common_currency_code(base)
quote = self.common_currency_code(quote)
symbol = base + '/' + quote
precision = {
'amount': 8,
'price': 8,
}
active = market['IsActive']
result.append(self.extend(self.fees['trading'], {
'id': id,
'symbol': symbol,
'base': base,
'quote': quote,
'active': active,
'info': market,
'lot': math.pow(10, -precision['amount']),
'precision': precision,
'limits': {
'amount': {
'min': market['MinTradeSize'],
'max': None,
},
'price': {
'min': None,
'max': None,
},
'cost': {
'min': 0,
'max': None,
},
},
}))
return result

async def fetch_order_book(self, symbol, params={}):
await self.load_markets()
response = await self.publicGetOrderbook(self.extend({
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.10.302'
__version__ = '1.10.303'

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

Expand Down
43 changes: 43 additions & 0 deletions python/ccxt/bleutrade.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-

from ccxt.bittrex import bittrex
import math


class bleutrade (bittrex):
Expand All @@ -27,6 +28,48 @@ def describe(self):
},
})

def fetch_markets(self):
markets = self.publicGetMarkets()
result = []
for p in range(0, len(markets['result'])):
market = markets['result'][p]
id = market['MarketName']
base = market['MarketCurrency']
quote = market['BaseCurrency']
base = self.common_currency_code(base)
quote = self.common_currency_code(quote)
symbol = base + '/' + quote
precision = {
'amount': 8,
'price': 8,
}
active = market['IsActive']
result.append(self.extend(self.fees['trading'], {
'id': id,
'symbol': symbol,
'base': base,
'quote': quote,
'active': active,
'info': market,
'lot': math.pow(10, -precision['amount']),
'precision': precision,
'limits': {
'amount': {
'min': market['MinTradeSize'],
'max': None,
},
'price': {
'min': None,
'max': None,
},
'cost': {
'min': 0,
'max': None,
},
},
}))
return result

def fetch_order_book(self, symbol, params={}):
self.load_markets()
response = self.publicGetOrderbook(self.extend({
Expand Down

0 comments on commit 0a5ccc6

Please sign in to comment.