Skip to content

Commit d524444

Browse files
author
Travis CI
committed
1.10.1171
[ci skip]
1 parent 2a53fd7 commit d524444

37 files changed

Lines changed: 377 additions & 244 deletions

build/ccxt.browser.js

Lines changed: 93 additions & 58 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.10.1170'
40+
const version = '1.10.1171'
4141

4242
Exchange.ccxtVersion = version
4343

doc/manual.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,17 +1193,16 @@ A price ticker contains statistics for a particular market/symbol for some perio
11931193
'datetime': ISO8601 datetime string with milliseconds
11941194
'high': float (highest price)
11951195
'low': float (lowest price)
1196-
'bid': float (current bid (buy) price)
1197-
'bidVolume': float (current bid (buy) amount)
1198-
'ask': float (current ask (sell) price)
1199-
'askVolume': float (current ask (sell) amount)
1196+
'bid': float (orderbook's current best bid (buy) price)
1197+
'bidVolume': float (orderbook's current best bid (buy) amount)
1198+
'ask': float (orderbook's current best ask (sell) price)
1199+
'askVolume': float (orderbook's current best ask (sell) amount)
12001200
'vwap': float (volume weighed average price)
12011201
'open': float (open price),
1202-
'first': float (price of first trade),
12031202
'last': float (price of last trade),
1204-
'change': float (absolute change, `close - open`),
1203+
'change': float (absolute change, `last - open`),
12051204
'percentage': float (relative change, `(change/open) * 100`),
1206-
'average': float (average),
1205+
'average': float (average price, `(last + open) / 2`),
12071206
'baseVolume': float (volume of base currency),
12081207
'quoteVolume': float (volume of quote currency),
12091208
}

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

php/Exchange.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
namespace ccxt;
3232

33-
$version = '1.10.1170';
33+
$version = '1.10.1171';
3434

3535
abstract class Exchange {
3636

php/_1broker.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -166,24 +166,24 @@ public function fetch_ticker ($symbol, $params = array ()) {
166166
'resolution' => 60,
167167
'limit' => 1,
168168
), $params));
169-
$orderbook = $this->fetch_order_book($symbol);
170169
$ticker = $result['response'][0];
171170
$timestamp = $this->parse8601 ($ticker['date']);
171+
$open = floatval ($ticker['o']);
172+
$last = floatval ($ticker['c']);
173+
$change = $last - $open;
172174
return array (
173175
'symbol' => $symbol,
174176
'timestamp' => $timestamp,
175177
'datetime' => $this->iso8601 ($timestamp),
176178
'high' => floatval ($ticker['h']),
177179
'low' => floatval ($ticker['l']),
178-
'bid' => $orderbook['bids'][0][0],
179-
'ask' => $orderbook['asks'][0][0],
180+
'bid' => null,
181+
'ask' => null,
180182
'vwap' => null,
181-
'open' => floatval ($ticker['o']),
182-
'close' => floatval ($ticker['c']),
183-
'first' => null,
184-
'last' => null,
185-
'change' => null,
186-
'percentage' => null,
183+
'open' => $open,
184+
'last' => $last,
185+
'change' => $change,
186+
'percentage' => $change / $open * 100,
187187
'average' => null,
188188
'baseVolume' => null,
189189
'quoteVolume' => null,

php/binance.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,6 @@ public function parse_ticker ($ticker, $market = null) {
478478
'askVolume' => $this->safe_float($ticker, 'askQty'),
479479
'vwap' => $this->safe_float($ticker, 'weightedAvgPrice'),
480480
'open' => $this->safe_float($ticker, 'openPrice'),
481-
'close' => $this->safe_float($ticker, 'prevClosePrice'),
482-
'first' => null,
483481
'last' => $this->safe_float($ticker, 'lastPrice'),
484482
'change' => $this->safe_float($ticker, 'priceChange'),
485483
'percentage' => $this->safe_float($ticker, 'priceChangePercent'),

php/bitfinex2.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,21 @@ public function withdraw ($currency, $amount, $address, $tag = null, $params = a
389389
throw new NotSupported ($this->id . ' withdraw not implemented yet');
390390
}
391391

392+
public function fetch_my_trades ($symbol = null, $since = null, $limit = 25, $params = array ()) {
393+
$this->load_markets();
394+
$market = $this->market ($symbol);
395+
$request = array (
396+
'symbol' => $market['id'],
397+
'limit' => $limit,
398+
'end' => $this->seconds (),
399+
);
400+
if ($since !== null)
401+
$request['start'] = intval ($since / 1000);
402+
$response = $this->privatePostAuthRTradesSymbolHist (array_merge ($request, $params));
403+
// return $this->parse_trades($response, $market, $since, $limit); // not implemented yet for bitfinex v2
404+
return $response;
405+
}
406+
392407
public function nonce () {
393408
return $this->milliseconds ();
394409
}

php/bithumb.php

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ public function parse_ticker ($ticker, $market = null) {
148148
$symbol = null;
149149
if ($market)
150150
$symbol = $market['symbol'];
151+
$open = $this->safe_float($ticker, 'opening_price');
152+
$last = $this->safe_float($ticker, 'closing_price');
153+
$change = $last - $open;
154+
$vwap = $this->safe_float($ticker, 'average_price');
155+
$baseVolume = $this->safe_float($ticker, 'volume_1day');
151156
return array (
152157
'symbol' => $symbol,
153158
'timestamp' => $timestamp,
@@ -156,16 +161,14 @@ public function parse_ticker ($ticker, $market = null) {
156161
'low' => $this->safe_float($ticker, 'min_price'),
157162
'bid' => $this->safe_float($ticker, 'buy_price'),
158163
'ask' => $this->safe_float($ticker, 'sell_price'),
159-
'vwap' => null,
160-
'open' => $this->safe_float($ticker, 'opening_price'),
161-
'close' => $this->safe_float($ticker, 'closing_price'),
162-
'first' => null,
163-
'last' => $this->safe_float($ticker, 'last_trade'),
164-
'change' => null,
165-
'percentage' => null,
166-
'average' => $this->safe_float($ticker, 'average_price'),
167-
'baseVolume' => $this->safe_float($ticker, 'volume_1day'),
168-
'quoteVolume' => null,
164+
'vwap' => $vwap,
165+
'open' => $open,
166+
'last' => $last,
167+
'change' => $change,
168+
'percentage' => $change / $open * 100,
169+
'average' => ($open . $last) / 2,
170+
'baseVolume' => $baseVolume,
171+
'quoteVolume' => $baseVolume * $vwap,
169172
'info' => $ticker,
170173
);
171174
}

php/bitlish.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,10 @@ public function parse_ticker ($ticker, $market) {
167167
'bid' => null,
168168
'ask' => null,
169169
'vwap' => null,
170-
'open' => null,
171-
'close' => null,
172-
'first' => $this->safe_float($ticker, 'first'),
170+
'open' => $this->safe_float($ticker, 'first'),
173171
'last' => $this->safe_float($ticker, 'last'),
174172
'change' => null,
175-
'percentage' => $this->safe_float($ticker, 'prc'),
173+
'percentage' => $this->safe_float($ticker, 'prc') * 100,
176174
'average' => null,
177175
'baseVolume' => $this->safe_float($ticker, 'sum'),
178176
'quoteVolume' => null,

0 commit comments

Comments
 (0)