Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Oct 31, 2017
1 parent 2649f55 commit d9ebe84
Show file tree
Hide file tree
Showing 159 changed files with 655 additions and 386 deletions.
5 changes: 5 additions & 0 deletions ccxt.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,9 @@
include_once ('php/zaif.php');







?>
7 changes: 6 additions & 1 deletion export-exchanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ try {

[
{
file: './python/ccxt/base/exchange.py',
file: './python/ccxt/__init__.py',
regex: /exchanges \= \[[^\]]+\]/,
replacement: "exchanges = [\n" + " '" + ids.join ("',\n '") + "'," + "\n]",
},
{
file: './python/ccxt/async/__init__.py',
regex: /exchanges \= \[[^\]]+\]/,
replacement: "exchanges = [\n" + " '" + ids.join ("',\n '") + "'," + "\n]",
},
Expand Down
3 changes: 2 additions & 1 deletion js/base/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,14 @@ class ExchangeNotAvailable extends NetworkError {
}

module.exports = {

BaseError,
ExchangeError,
NotSupported,
AuthenticationError,
InsufficientFunds,
InvalidOrder,
OrderNotFound,
OrderNotCached,
NetworkError,
DDoSProtection,
Expand Down
4 changes: 2 additions & 2 deletions php/acx.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ public function parse_ticker ($ticker, $market = null) {
'change' => null,
'percentage' => null,
'average' => null,
'baseVolume' => null,
'quoteVolume' => $this->safe_float($ticker, 'vol', null),
'baseVolume' => $this->safe_float($ticker, 'vol', null),
'quoteVolume' => null,
'info' => $ticker,
);
}
Expand Down
8 changes: 4 additions & 4 deletions php/btctradeua.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ public function fetch_ticker ($symbol, $params = array ()) {
$result['high'] = $candle[2];
if (($result['low'] == null) || ($result['low'] > $candle[3]))
$result['low'] = $candle[3];
if ($result['quoteVolume'] == null)
$result['quoteVolume'] = -$candle[5];
if ($result['baseVolume'] == null)
$result['baseVolume'] = -$candle[5];
else
$result['quoteVolume'] -= $candle[5];
$result['baseVolume'] -= $candle[5];
}
$last = $tickerLength - 1;
$result['close'] = $ticker[$last][4];
$result['quoteVolume'] = -1 * $result['quoteVolume'];
$result['baseVolume'] = -1 * $result['baseVolume'];
}
return $result;
}
Expand Down
4 changes: 2 additions & 2 deletions php/gdax.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ public function fetch_ticker ($symbol, $params = array ()) {
'change' => null,
'percentage' => null,
'average' => null,
'baseVolume' => null,
'quoteVolume' => floatval ($ticker['volume']),
'baseVolume' => floatval ($ticker['volume']),
'quoteVolume' => null,
'info' => $ticker,
);
}
Expand Down
4 changes: 3 additions & 1 deletion python/ccxt/_1broker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-

from ccxt.base import Exchange
from ccxt.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationError


class _1broker (Exchange):
Expand Down
3 changes: 2 additions & 1 deletion python/ccxt/_1btcxe.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-

from ccxt.base import Exchange
from ccxt.base.exchange import Exchange
from ccxt.base.errors import ExchangeError


class _1btcxe (Exchange):
Expand Down
122 changes: 115 additions & 7 deletions python/ccxt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,127 @@

"""CCXT: CryptoCurrency eXchange Trading Library"""

from ccxt.base import Exchange # noqa: F401
from ccxt.base import errors
# ----------------------------------------------------------------------------

__version__ = '1.9.285'

base = [
'Exchange',
'exchanges',
]
# ----------------------------------------------------------------------------

from ccxt.base.exchange import Exchange # noqa: F401

from ccxt.base import errors # noqa: F401
from ccxt.base.errors import BaseError # noqa: F401
from ccxt.base.errors import ExchangeError # noqa: F401
from ccxt.base.errors import NotSupported # noqa: F401
from ccxt.base.errors import AuthenticationError # noqa: F401
from ccxt.base.errors import InsufficientFunds # noqa: F401
from ccxt.base.errors import InvalidOrder # noqa: F401
from ccxt.base.errors import OrderNotFound # noqa: F401
from ccxt.base.errors import OrderNotCached # noqa: F401
from ccxt.base.errors import NetworkError # noqa: F401
from ccxt.base.errors import DDoSProtection # noqa: F401
from ccxt.base.errors import RequestTimeout # noqa: F401
from ccxt.base.errors import ExchangeNotAvailable # noqa: F401

from ccxt._1broker import _1broker

exchanges = [
'_1broker',
'_1btcxe',
'acx',
'allcoin',
'anxpro',
'binance',
'bit2c',
'bitbay',
'bitcoincoid',
'bitfinex',
'bitfinex2',
'bitflyer',
'bithumb',
'bitlish',
'bitmarket',
'bitmex',
'bitso',
'bitstamp1',
'bitstamp',
'bittrex',
'bl3p',
'bleutrade',
'btcbox',
'btcchina',
'btcx',
'btcmarkets',
'btctradeua',
'btcturk',
'btcx',
'bter',
'bxinth',
'ccex',
'cex',
'chbtc',
'chilebit',
'coincheck',
'coinfloor',
'coingi',
'coinmarketcap',
'coinmate',
'coinsecure',
'coinspot',
'cryptopia',
'dsx',
'exmo',
'flowbtc',
'foxbit',
'fybse',
'fybsg',
'gatecoin',
'gateio',
'gdax',
'gemini',
'hitbtc',
'hitbtc2',
'huobi',
'huobicny',
'huobipro',
'independentreserve',
'itbit',
'jubi',
'kraken',
'kuna',
'lakebtc',
'livecoin',
'liqui',
'luno',
'mercado',
'mixcoins',
'nova',
'okcoincny',
'okcoinusd',
'okex',
'paymium',
'poloniex',
'quadrigacx',
'qryptos',
'quoine',
'southxchange',
'surbitcoin',
'tidex',
'therock',
'urdubit',
'vaultoro',
'vbtc',
'virwox',
'wex',
'xbtce',
'yobit',
'yunbi',
'zaif',
]

__all__ = base + errors + exchanges
base = [
'Exchange',
'exchanges',
]

__all__ = base + errors.__all__ + exchanges
7 changes: 4 additions & 3 deletions python/ccxt/acx.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-

from ccxt.base import Exchange
from ccxt.base.exchange import Exchange
from ccxt.base.errors import ExchangeError


class acx (Exchange):
Expand Down Expand Up @@ -145,8 +146,8 @@ def parse_ticker(self, ticker, market=None):
'change': None,
'percentage': None,
'average': None,
'baseVolume': None,
'quoteVolume': self.safe_float(ticker, 'vol', None),
'baseVolume': self.safe_float(ticker, 'vol', None),
'quoteVolume': None,
'info': ticker,
}

Expand Down
3 changes: 2 additions & 1 deletion python/ccxt/anxpro.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# -*- coding: utf-8 -*-

from ccxt.base import Exchange
from ccxt.base.exchange import Exchange
import base64
import hashlib
from ccxt.base.errors import ExchangeError


class anxpro (Exchange):
Expand Down
4 changes: 3 additions & 1 deletion python/ccxt/async/_1broker.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-

from ccxt.base import Exchange
from ccxt.base.exchange import Exchange
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import AuthenticationError


class _1broker (Exchange):
Expand Down
3 changes: 2 additions & 1 deletion python/ccxt/async/_1btcxe.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-

from ccxt.base import Exchange
from ccxt.base.exchange import Exchange
from ccxt.base.errors import ExchangeError


class _1btcxe (Exchange):
Expand Down
Loading

0 comments on commit d9ebe84

Please sign in to comment.