Skip to content
Permalink
Browse files
Merge branch 'master' of github.com:ccxt/ccxt
  • Loading branch information
kroitor committed Sep 12, 2018
2 parents a2326d3 + fbf8b5c commit ef9cf8ceca04105b256336cf00082b7d33dec4b5
@@ -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

@@ -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');
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
};
}

@@ -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,
@@ -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,
@@ -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

@@ -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
@@ -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
^^^^^^^^
@@ -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",
@@ -34,7 +34,7 @@
use kornrunner\Secp256k1;
use kornrunner\Solidity;

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

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

class Exchange {

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

public static $eth_units = array (
'wei' => '1',
@@ -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 }
@@ -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');
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
);
}

@@ -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,
@@ -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,
@@ -22,7 +22,7 @@

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

__version__ = '1.17.277'
__version__ = '1.17.278'

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

@@ -4,7 +4,7 @@

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

__version__ = '1.17.277'
__version__ = '1.17.278'

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

@@ -2,7 +2,7 @@

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

__version__ = '1.17.277'
__version__ = '1.17.278'

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

@@ -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')
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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={}):
@@ -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,
@@ -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,
@@ -4,7 +4,7 @@

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

__version__ = '1.17.277'
__version__ = '1.17.278'

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

@@ -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')
@@ -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,

0 comments on commit ef9cf8c

Please sign in to comment.