Skip to content

Commit

Permalink
1.57.54
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Travis CI committed Oct 5, 2021
1 parent e27ea32 commit 9e4e93a
Show file tree
Hide file tree
Showing 19 changed files with 941 additions and 25 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,13 @@ console.log (ccxt.exchanges) // print all available exchanges

All-in-one browser bundle (dependencies included), served from a CDN of your choice:

* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].53/dist/ccxt.browser.js
* unpkg: https://unpkg.com/[email protected].53/dist/ccxt.browser.js
* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].54/dist/ccxt.browser.js
* unpkg: https://unpkg.com/[email protected].54/dist/ccxt.browser.js

CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.

```HTML
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].53/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].54/dist/ccxt.browser.js"></script>
```

Creates a global `ccxt` object:
Expand Down
2 changes: 1 addition & 1 deletion ccxt.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.57.53'
const version = '1.57.54'

Exchange.ccxtVersion = version

Expand Down
190 changes: 189 additions & 1 deletion dist/ccxt.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const Exchange = require ('./js/base/Exchange')
//-----------------------------------------------------------------------------
// this is updated by vss.js when building

const version = '1.57.53'
const version = '1.57.54'

Exchange.ccxtVersion = version

Expand Down Expand Up @@ -54212,6 +54212,7 @@ module.exports = class coinfalcon extends Exchange {
'cancelOrder': true,
'createOrder': true,
'fetchBalance': true,
'fetchDeposits': true,
'fetchMarkets': true,
'fetchMyTrades': true,
'fetchOpenOrders': true,
Expand All @@ -54220,6 +54221,8 @@ module.exports = class coinfalcon extends Exchange {
'fetchTicker': true,
'fetchTickers': true,
'fetchTrades': true,
'fetchWithdrawals': true,
'withdraw': true,
},
'urls': {
'logo': 'https://user-images.githubusercontent.com/1294454/41822275-ed982188-77f5-11e8-92bb-496bcd14ca52.jpg',
Expand Down Expand Up @@ -54593,6 +54596,191 @@ module.exports = class coinfalcon extends Exchange {
return this.parseOrders (orders, market, since, limit);
}

async fetchDeposits (code = undefined, since = undefined, limit = undefined, params = {}) {
await this.loadMarkets ();
const request = {
// currency: 'xrp', // optional: currency code in lowercase
// status: 'completed', // optional: withdrawal status
// since_time // datetime in ISO8601 format (2017-11-06T09:53:08.383210Z)
// end_time // datetime in ISO8601 format (2017-11-06T09:53:08.383210Z)
// start_time // datetime in ISO8601 format (2017-11-06T09:53:08.383210Z)
};
let currency = undefined;
if (code !== undefined) {
currency = this.currency (code);
request['currency'] = currency['id'].toLowerCase ();
}
if (since !== undefined) {
request['since_time'] = this.iso8601 (since);
}
const response = await this.privateGetAccountDeposits (this.extend (request, params));
//
// data: [
// {
// id: '6e2f18b5-f80e-xxx-xxx-xxx',
// amount: '0.1',
// status: 'completed',
// currency_code: 'eth',
// txid: '0xxxx',
// address: '0xxxx',
// tag: null,
// type: 'deposit'
// },
// ]
//
const transactions = this.safeValue (response, 'data', []);
transactions.reverse (); // no timestamp but in reversed order
return this.parseTransactions (transactions, currency, undefined, limit);
}

async fetchWithdrawals (code = undefined, since = undefined, limit = undefined, params = {}) {
await this.loadMarkets ();
const request = {
// currency: 'xrp', // optional: currency code in lowercase
// status: 'completed', // optional: withdrawal status
// since_time // datetime in ISO8601 format (2017-11-06T09:53:08.383210Z)
// end_time // datetime in ISO8601 format (2017-11-06T09:53:08.383210Z)
// start_time // datetime in ISO8601 format (2017-11-06T09:53:08.383210Z)
};
let currency = undefined;
if (code !== undefined) {
currency = this.currency (code);
request['currency'] = currency['id'].toLowerCase ();
}
if (since !== undefined) {
request['since_time'] = this.iso8601 (since);
}
const response = await this.privateGetAccountWithdrawals (this.extend (request, params));
//
// data: [
// {
// id: '25f6f144-3666-xxx-xxx-xxx',
// amount: '0.01',
// status: 'completed',
// fee: '0.0005',
// currency_code: 'btc',
// txid: '4xxx',
// address: 'bc1xxx',
// tag: null,
// type: 'withdraw'
// },
// ]
//
const transactions = this.safeValue (response, 'data', []);
transactions.reverse (); // no timestamp but in reversed order
return this.parseTransactions (transactions, currency, undefined, limit);
}

async withdraw (code, amount, address, tag = undefined, params = {}) {
[ tag, params ] = this.handleWithdrawTagAndParams (tag, params);
this.checkAddress (address);
await this.loadMarkets ();
const currency = this.currency (code);
const request = {
'currency': currency['id'].toLowerCase (),
'address': address,
'amount': amount,
// 'tag': 'string', // withdraw tag/memo
};
if (tag !== undefined) {
request['tag'] = tag;
}
const response = await this.privatePostAccountWithdraw (this.extend (request, params));
//
// data: [
// {
// id: '25f6f144-3666-xxx-xxx-xxx',
// amount: '0.01',
// status: 'approval_pending',
// fee: '0.0005',
// currency_code: 'btc',
// txid: null,
// address: 'bc1xxx',
// tag: null,
// type: 'withdraw'
// },
// ]
//
const transaction = this.safeValue (response, 'data', []);
return this.parseTransaction (transaction, currency);
}

parseTransactionStatus (status) {
const statuses = {
'completed': 'ok',
'denied': 'failed',
'approval_pending': 'pending',
};
return this.safeString (statuses, status, status);
}

parseTransaction (transaction, currency = undefined) {
//
// fetchWithdrawals, withdraw
//
// {
// id: '25f6f144-3666-xxx-xxx-xxx',
// amount: '0.01',
// status: 'completed',
// fee: '0.0005',
// currency_code: 'btc',
// txid: '4xxx',
// address: 'bc1xxx',
// tag: null,
// type: 'withdraw'
// },
//
// fetchDeposits
//
// {
// id: '6e2f18b5-f80e-xxx-xxx-xxx',
// amount: '0.1',
// status: 'completed',
// currency_code: 'eth',
// txid: '0xxxx',
// address: '0xxxx',
// tag: null,
// type: 'deposit'
// },
//
const id = this.safeString (transaction, 'id');
const address = this.safeString (transaction, 'address');
const tag = this.safeString (transaction, 'tag');
const txid = this.safeString (transaction, 'txid');
const currencyId = this.safeString (transaction, 'currency_code');
const code = this.safeCurrencyCode (currencyId, currency);
let type = this.safeString (transaction, 'type');
if (type === 'withdraw') {
type = 'withdrawal';
}
const status = this.parseTransactionStatus (this.safeString (transaction, 'status'));
const amountString = this.safeString (transaction, 'amount');
const amount = this.parseNumber (amountString);
const feeCostString = this.safeString (transaction, 'fee');
let feeCost = 0;
if (feeCostString !== undefined) {
feeCost = this.parseNumber (feeCostString);
}
return {
'info': transaction,
'id': id,
'txid': txid,
'timestamp': undefined,
'datetime': undefined,
'address': address,
'tag': tag,
'type': type,
'amount': amount,
'currency': code,
'status': status,
'updated': undefined,
'fee': {
'currency': code,
'cost': feeCost,
},
};
}

nonce () {
return this.milliseconds ();
}
Expand Down
6 changes: 3 additions & 3 deletions doc/readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1928,14 +1928,14 @@ JavaScript (for use with the ``<script>`` tag):
All-in-one browser bundle (dependencies included), served from a CDN of your choice:


* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].53/dist/ccxt.browser.js
* unpkg: https://unpkg.com/[email protected].53/dist/ccxt.browser.js
* jsDelivr: https://cdn.jsdelivr.net/npm/[email protected].54/dist/ccxt.browser.js
* unpkg: https://unpkg.com/[email protected].54/dist/ccxt.browser.js

CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.

.. code-block:: HTML

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].53/dist/ccxt.browser.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected].54/dist/ccxt.browser.js"></script>

Creates a global ``ccxt`` object:

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.57.53",
"version": "1.57.54",
"description": "A JavaScript / Python / PHP cryptocurrency trading library with support for 130+ exchanges",
"main": "./ccxt.js",
"unpkg": "dist/ccxt.browser.js",
Expand Down
4 changes: 2 additions & 2 deletions php/Exchange.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions php/async/Exchange.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@

include 'Throttle.php';

$version = '1.57.53';
$version = '1.57.54';

class Exchange extends \ccxt\Exchange {

const VERSION = '1.57.53';
const VERSION = '1.57.54';

public static $loop;
public static $kernel;
Expand Down
Loading

0 comments on commit 9e4e93a

Please sign in to comment.