Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ccxt/ccxt
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed Sep 12, 2018
2 parents a2326d3 + fbf8b5c commit ef9cf8c
Show file tree
Hide file tree
Showing 30 changed files with 61 additions and 19 deletions.
16 changes: 13 additions & 3 deletions build/ccxt.browser.js
Expand Up @@ -45,7 +45,7 @@ const Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.17.277'
const version = '1.17.278'

Exchange.ccxtVersion = version

Expand Down Expand Up @@ -7065,9 +7065,9 @@ module.exports = class binance extends Exchange {
// applyTime: 1514488724000,
// status: 6 }
//
// let addressTag = this.safeString (transaction, 'addressTag'); // set but unused
let id = this.safeString (transaction, 'id');
let address = this.safeString (transaction, 'address');
let tag = this.safeString (transaction, 'addressTag'); // set but unused
let txid = this.safeValue (transaction, 'txId');
let code = undefined;
let currencyId = this.safeString (transaction, 'currency');
Expand Down Expand Up @@ -7102,6 +7102,7 @@ module.exports = class binance extends Exchange {
'timestamp': timestamp,
'datetime': this.iso8601 (timestamp),
'address': address,
'tag': tag,
'type': type,
'amount': amount,
'currency': code,
Expand Down Expand Up @@ -9383,6 +9384,7 @@ module.exports = class bitfinex extends Exchange {
'timestamp': timestamp,
'datetime': this.iso8601 (timestamp),
'address': this.safeString (transaction, 'address'),
'tag': this.safeString (transaction, 'description'), // refix it properly for the tag
'type': type,
'amount': this.safeFloat (transaction, 'amount'),
'currency': code,
Expand Down Expand Up @@ -14288,6 +14290,7 @@ module.exports = class bitstamp extends Exchange {
'timestamp': timestamp,
'datetime': this.iso8601 (timestamp),
'address': undefined,
'tag': undefined,
'type': type,
'amount': amount,
'currency': code,
Expand Down Expand Up @@ -22047,13 +22050,16 @@ module.exports = class cobinhood extends Exchange {
id = depositId;
address = this.safeString (transaction, 'from_address');
}
const additionalInfo = this.safeValue (transaction, 'additional_info', {});
const tag = this.safeString (additionalInfo, 'memo');
return {
'info': transaction,
'id': id,
'txid': this.safeString (transaction, 'txhash'),
'timestamp': timestamp,
'datetime': this.iso8601 (timestamp),
'address': address,
'tag': tag, // refix it properly
'type': type,
'amount': this.safeFloat (transaction, 'amount'),
'currency': code,
Expand Down Expand Up @@ -31233,17 +31239,19 @@ module.exports = class exmo extends Exchange {
}
}
return {
'info': transaction,
'id': undefined,
'currency': code,
'amount': amount,
'address': address,
'tag': undefined, // refix it properly
'status': status,
'type': type,
'updated': undefined,
'txid': txid,
'timestamp': timestamp,
'datetime': this.iso8601 (timestamp),
'fee': fee,
'info': transaction,
};
}

Expand Down Expand Up @@ -34976,6 +34984,7 @@ module.exports = class gdax extends Exchange {
'timestamp': timestamp,
'datetime': this.iso8601 (timestamp),
'address': undefined, // or is it defined?
'tag': undefined, // or is it defined?
'type': this.safeString (transaction, 'type'), // direction of the transaction, ('deposit' | 'withdraw')
'amount': this.safeFloat (transaction, 'amount'),
'currency': code,
Expand Down Expand Up @@ -35469,6 +35478,7 @@ module.exports = class gemini extends Exchange {
'timestamp': timestamp,
'datetime': this.iso8601 (timestamp),
'address': undefined, // or is it defined?
'tag': undefined, // or is it defined?
'type': type, // direction of the transaction, ('deposit' | 'withdraw')
'amount': this.safeFloat (transaction, 'amount'),
'currency': code,
Expand Down
2 changes: 1 addition & 1 deletion ccxt.js
Expand Up @@ -37,7 +37,7 @@ const Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.17.277'
const version = '1.17.278'

Exchange.ccxtVersion = version

Expand Down
2 changes: 2 additions & 0 deletions doc/manual.rst
Expand Up @@ -2769,6 +2769,7 @@ Transaction Structure
'timestamp': 1534081184515, // timestamp in milliseconds
'datetime': '2018-08-12T13:39:44.515Z', // ISO8601 string of the timestamp
'address': '0x02b0a9b7b4cDe774af0f8e47cb4f1c2ccdEa0806', // "from" or "to"
'tag': '0x0123456789' // "tag" or "memo" or "payment_id" associated with the address
'type': 'deposit', // or 'withdrawal', string
'amount': 1.2345, // float
'currency': 'ETH', // a common unified currency code, string
Expand All @@ -2786,6 +2787,7 @@ Notes On Transaction Structure
- The ``updated`` field is the UTC timestamp in milliseconds of the most recent change of status of that funding operation, be it ``withdrawal`` or ``deposit``. It is necessary if you want to track your changes in time, beyond a static snapshot. For example, if the exchange in question reports ``created_at`` and ``confirmed_at`` for a transaction, then the ``updated`` field will take the value of ``Math.max (created_at, confirmed_at)``, that is, the timestamp of the most recent change of the status.
- The ``updated`` field may be undefined in certain exchange-specific cases.
- The ``fee`` substructure may be missing, if not supplied within the reply coming from the exchange.
- Be careful when handling the ``tag`` and the ``address``. The ``tag`` is **NOT an arbitrary user-defined string** of your choice! You cannot send user messages and comments in the ``tag``. The purpose of the ``tag`` field is to address your wallet properly, so it must be correct. You should only use the ``tag`` received from the exchange you’re working with, otherwise your transaction might never arrive to its destination.

Deposits
^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "ccxt",
"version": "1.17.277",
"version": "1.17.278",
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 100+ exchanges",
"main": "./ccxt.js",
"unpkg": "build/ccxt.browser.js",
Expand Down
4 changes: 2 additions & 2 deletions php/Exchange.php
Expand Up @@ -34,7 +34,7 @@
use kornrunner\Secp256k1;
use kornrunner\Solidity;

$version = '1.17.277';
$version = '1.17.278';

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

class Exchange {

const VERSION = '1.17.277';
const VERSION = '1.17.278';

public static $eth_units = array (
'wei' => '1',
Expand Down
7 changes: 4 additions & 3 deletions php/binance.php
Expand Up @@ -919,7 +919,7 @@ public function parse_transaction ($transaction, $currency = null) {
// { $insertTime => 1517425007000,
// $amount => 0.3,
// $address => "0x0123456789abcdef",
// $addressTag => "",
// addressTag => "",
// txId => "0x0123456789abcdef",
// asset => "ETH",
// $status => 1 }
Expand All @@ -929,16 +929,16 @@ public function parse_transaction ($transaction, $currency = null) {
// { $amount => 14,
// $address => "0x0123456789abcdef...",
// successTime => 1514489710000,
// $addressTag => "",
// addressTag => "",
// txId => "0x0123456789abcdef...",
// $id => "0123456789abcdef...",
// asset => "ETH",
// $applyTime => 1514488724000,
// $status => 6 }
//
// $addressTag = $this->safe_string($transaction, 'addressTag'); // set but unused
$id = $this->safe_string($transaction, 'id');
$address = $this->safe_string($transaction, 'address');
$tag = $this->safe_string($transaction, 'addressTag'); // set but unused
$txid = $this->safe_value($transaction, 'txId');
$code = null;
$currencyId = $this->safe_string($transaction, 'currency');
Expand Down Expand Up @@ -973,6 +973,7 @@ public function parse_transaction ($transaction, $currency = null) {
'timestamp' => $timestamp,
'datetime' => $this->iso8601 ($timestamp),
'address' => $address,
'tag' => $tag,
'type' => $type,
'amount' => $amount,
'currency' => $code,
Expand Down
1 change: 1 addition & 0 deletions php/bitfinex.php
Expand Up @@ -881,6 +881,7 @@ public function parse_transaction ($transaction, $currency = null) {
'timestamp' => $timestamp,
'datetime' => $this->iso8601 ($timestamp),
'address' => $this->safe_string($transaction, 'address'),
'tag' => $this->safe_string($transaction, 'description'), // refix it properly for the tag
'type' => $type,
'amount' => $this->safe_float($transaction, 'amount'),
'currency' => $code,
Expand Down
1 change: 1 addition & 0 deletions php/bitstamp.php
Expand Up @@ -563,6 +563,7 @@ public function parse_transaction ($transaction, $currency = null) {
'timestamp' => $timestamp,
'datetime' => $this->iso8601 ($timestamp),
'address' => null,
'tag' => null,
'type' => $type,
'amount' => $amount,
'currency' => $code,
Expand Down
3 changes: 3 additions & 0 deletions php/cobinhood.php
Expand Up @@ -697,13 +697,16 @@ public function parse_transaction ($transaction, $currency = null) {
$id = $depositId;
$address = $this->safe_string($transaction, 'from_address');
}
$additionalInfo = $this->safe_value($transaction, 'additional_info', array ());
$tag = $this->safe_string($additionalInfo, 'memo');
return array (
'info' => $transaction,
'id' => $id,
'txid' => $this->safe_string($transaction, 'txhash'),
'timestamp' => $timestamp,
'datetime' => $this->iso8601 ($timestamp),
'address' => $address,
'tag' => $tag, // refix it properly
'type' => $type,
'amount' => $this->safe_float($transaction, 'amount'),
'currency' => $code,
Expand Down
4 changes: 3 additions & 1 deletion php/exmo.php
Expand Up @@ -923,17 +923,19 @@ public function parse_transaction ($transaction, $currency = null) {
}
}
return array (
'info' => $transaction,
'id' => null,
'currency' => $code,
'amount' => $amount,
'address' => $address,
'tag' => null, // refix it properly
'status' => $status,
'type' => $type,
'updated' => null,
'txid' => $txid,
'timestamp' => $timestamp,
'datetime' => $this->iso8601 ($timestamp),
'fee' => $fee,
'info' => $transaction,
);
}

Expand Down
1 change: 1 addition & 0 deletions php/gdax.php
Expand Up @@ -614,6 +614,7 @@ public function parse_transaction ($transaction, $currency = null) {
'timestamp' => $timestamp,
'datetime' => $this->iso8601 ($timestamp),
'address' => null, // or is it defined?
'tag' => null, // or is it defined?
'type' => $this->safe_string($transaction, 'type'), // direction of the $transaction, ('deposit' | 'withdraw')
'amount' => $this->safe_float($transaction, 'amount'),
'currency' => $code,
Expand Down
1 change: 1 addition & 0 deletions php/gemini.php
Expand Up @@ -387,6 +387,7 @@ public function parse_transaction ($transaction, $currency = null) {
'timestamp' => $timestamp,
'datetime' => $this->iso8601 ($timestamp),
'address' => null, // or is it defined?
'tag' => null, // or is it defined?
'type' => $type, // direction of the $transaction, ('deposit' | 'withdraw')
'amount' => $this->safe_float($transaction, 'amount'),
'currency' => $code,
Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/__init__.py
Expand Up @@ -22,7 +22,7 @@

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

__version__ = '1.17.277'
__version__ = '1.17.278'

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

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/async_support/__init__.py
Expand Up @@ -4,7 +4,7 @@

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

__version__ = '1.17.277'
__version__ = '1.17.278'

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

Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/async_support/base/exchange.py
Expand Up @@ -2,7 +2,7 @@

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

__version__ = '1.17.277'
__version__ = '1.17.278'

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

Expand Down
3 changes: 2 additions & 1 deletion python/ccxt/async_support/binance.py
Expand Up @@ -876,9 +876,9 @@ def parse_transaction(self, transaction, currency=None):
# applyTime: 1514488724000,
# status: 6 }
#
# addressTag = self.safe_string(transaction, 'addressTag') # set but unused
id = self.safe_string(transaction, 'id')
address = self.safe_string(transaction, 'address')
tag = self.safe_string(transaction, 'addressTag') # set but unused
txid = self.safe_value(transaction, 'txId')
code = None
currencyId = self.safe_string(transaction, 'currency')
Expand Down Expand Up @@ -909,6 +909,7 @@ def parse_transaction(self, transaction, currency=None):
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'address': address,
'tag': tag,
'type': type,
'amount': amount,
'currency': code,
Expand Down
1 change: 1 addition & 0 deletions python/ccxt/async_support/bitfinex.py
Expand Up @@ -843,6 +843,7 @@ def parse_transaction(self, transaction, currency=None):
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'address': self.safe_string(transaction, 'address'),
'tag': self.safe_string(transaction, 'description'), # refix it properly for the tag
'type': type,
'amount': self.safe_float(transaction, 'amount'),
'currency': code,
Expand Down
1 change: 1 addition & 0 deletions python/ccxt/async_support/bitstamp.py
Expand Up @@ -530,6 +530,7 @@ def parse_transaction(self, transaction, currency=None):
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'address': None,
'tag': None,
'type': type,
'amount': amount,
'currency': code,
Expand Down
3 changes: 3 additions & 0 deletions python/ccxt/async_support/cobinhood.py
Expand Up @@ -656,13 +656,16 @@ def parse_transaction(self, transaction, currency=None):
type = 'deposit'
id = depositId
address = self.safe_string(transaction, 'from_address')
additionalInfo = self.safe_value(transaction, 'additional_info', {})
tag = self.safe_string(additionalInfo, 'memo')
return {
'info': transaction,
'id': id,
'txid': self.safe_string(transaction, 'txhash'),
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'address': address,
'tag': tag, # refix it properly
'type': type,
'amount': self.safe_float(transaction, 'amount'),
'currency': code,
Expand Down
4 changes: 3 additions & 1 deletion python/ccxt/async_support/exmo.py
Expand Up @@ -854,17 +854,19 @@ def parse_transaction(self, transaction, currency=None):
'rate': None,
}
return {
'info': transaction,
'id': None,
'currency': code,
'amount': amount,
'address': address,
'tag': None, # refix it properly
'status': status,
'type': type,
'updated': None,
'txid': txid,
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'fee': fee,
'info': transaction,
}

async def fetch_transactions(self, code=None, since=None, limit=None, params={}):
Expand Down
1 change: 1 addition & 0 deletions python/ccxt/async_support/gdax.py
Expand Up @@ -575,6 +575,7 @@ def parse_transaction(self, transaction, currency=None):
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'address': None, # or is it defined?
'tag': None, # or is it defined?
'type': self.safe_string(transaction, 'type'), # direction of the transaction,('deposit' | 'withdraw')
'amount': self.safe_float(transaction, 'amount'),
'currency': code,
Expand Down
1 change: 1 addition & 0 deletions python/ccxt/async_support/gemini.py
Expand Up @@ -355,6 +355,7 @@ def parse_transaction(self, transaction, currency=None):
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'address': None, # or is it defined?
'tag': None, # or is it defined?
'type': type, # direction of the transaction,('deposit' | 'withdraw')
'amount': self.safe_float(transaction, 'amount'),
'currency': code,
Expand Down
2 changes: 1 addition & 1 deletion python/ccxt/base/exchange.py
Expand Up @@ -4,7 +4,7 @@

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

__version__ = '1.17.277'
__version__ = '1.17.278'

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

Expand Down
3 changes: 2 additions & 1 deletion python/ccxt/binance.py
Expand Up @@ -876,9 +876,9 @@ def parse_transaction(self, transaction, currency=None):
# applyTime: 1514488724000,
# status: 6 }
#
# addressTag = self.safe_string(transaction, 'addressTag') # set but unused
id = self.safe_string(transaction, 'id')
address = self.safe_string(transaction, 'address')
tag = self.safe_string(transaction, 'addressTag') # set but unused
txid = self.safe_value(transaction, 'txId')
code = None
currencyId = self.safe_string(transaction, 'currency')
Expand Down Expand Up @@ -909,6 +909,7 @@ def parse_transaction(self, transaction, currency=None):
'timestamp': timestamp,
'datetime': self.iso8601(timestamp),
'address': address,
'tag': tag,
'type': type,
'amount': amount,
'currency': code,
Expand Down

0 comments on commit ef9cf8c

Please sign in to comment.