Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,13 @@ console.log(version, Object.keys(exchanges));

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

- jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.20.0/dist/ccxt.browser.min.js
- unpkg: https://unpkg.com/ccxt@4.20.0/dist/ccxt.browser.min.js
- jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.20.2/dist/ccxt.browser.min.js
- unpkg: https://unpkg.com/ccxt@4.20.2/dist/ccxt.browser.min.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/ccxt@4.20.0/dist/ccxt.browser.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.20.2/dist/ccxt.browser.min.js"></script>
console.log (ccxt.exchanges) // print all available exchanges
```

Expand Down
2 changes: 1 addition & 1 deletion cs/ccxt/base/Exchange.MetaData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace ccxt;
// file updated automatically by vss and export-exchanges
public partial class Exchange
{
public static string ccxtVersion = "4.20.0";
public static string ccxtVersion = "4.20.2";


public static List<string> exchanges = new List<string> { "abantether", "afratether", "alpaca", "apex", "arzinja", "arzplus", "asacoine", "ascendex", "asretether", "baazar", "bequant", "bidarz", "bigone", "binance", "binancecoinm", "binanceus", "binanceusdm", "bingx", "bit24", "bit2c", "bitbank", "bitbarg", "bitbns", "bitfinex", "bitflyer", "bitget", "bithumb", "bitimen", "bitir", "bitmart", "bitmex", "bitopro", "bitpin", "bitrue", "bitso", "bitstamp", "bitteam", "bittrade", "bitunix", "bitvavo", "bitwana", "blockchaincom", "blofin", "btcalpha", "btcbox", "btcmarkets", "btcturk", "bybit", "bydfi", "cafearz", "cex", "changefa", "coinbase", "coinbaseadvanced", "coinbaseexchange", "coinbaseinternational", "coincatch", "coincheck", "coinex", "coinmate", "coinmetro", "coinone", "coinsph", "coinspot", "cryptocom", "cryptomus", "daric", "defx", "delta", "deribit", "derive", "digifinex", "digikalagold", "ellipx", "eterex", "excoino", "exir", "exmo", "exnovin", "farhadexchange", "fmfwio", "foxbit", "gate", "gateio", "gemini", "gerami", "goldika", "goldis", "hamrahgold", "hamtapay", "hashkey", "hibachi", "hitbtc", "hitobit", "hollaex", "htx", "huobi", "hyperliquid", "independentreserve", "indodax", "iranexchange", "jibitex", "kcex", "kifpoolme", "kraken", "krakenfutures", "kucoin", "kucoinfutures", "latoken", "lbank", "luno", "mazdax", "melligold", "mercado", "mexc", "milligold", "modetrade", "myokx", "ndax", "nobitex", "novadax", "oceanex", "okcoin", "okexchange", "okx", "okxus", "ompfinex", "onetrading", "ourbit", "oxfun", "p2b", "paradex", "paymium", "phemex", "pingi", "poloniex", "pooleno", "probit", "raastin", "ramzinex", "saraf", "sarmayex", "sarrafex", "tabdeal", "talaavan", "talapp", "talasea", "technogold", "tehran_exchange", "tetherland", "timex", "tokocrypto", "toobit", "tradeogre", "twox", "ubitex", "upbit", "vertex", "wallex", "wallgold", "wavesexchange", "whitebit", "woo", "woofipro", "xt", "yobit", "zaif", "zarafza", "zarminex", "zarniv", "zarpin", "zonda" };
Expand Down
6 changes: 3 additions & 3 deletions cs/ccxt/ccxt.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<PropertyGroup>
<PackageId>ccxt</PackageId>
<Authors>Carlos, Kroitor, Carlo</Authors>
<PackageVersion>4.20.0</PackageVersion>
<AssemblyVersion>4.20.0</AssemblyVersion>
<FileVersion>4.20.0</FileVersion>
<PackageVersion>4.20.2</PackageVersion>
<AssemblyVersion>4.20.2</AssemblyVersion>
<FileVersion>4.20.2</FileVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
<Description>Cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges</Description>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
Expand Down
106 changes: 56 additions & 50 deletions dist/ccxt.browser.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions dist/ccxt.browser.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cjs/ccxt.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ var xt$1 = require('./src/pro/xt.js');

//-----------------------------------------------------------------------------
// this is updated by vss.js when building
const version = '4.20.0';
const version = '4.20.2';
Exchange["default"].ccxtVersion = version;
const exchanges = {
'abantether': abantether["default"],
Expand Down
4 changes: 2 additions & 2 deletions dist/cjs/src/arzplus.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ class arzplus extends arzplus$1["default"] {
*/
await this.loadMarkets(false, { 'type': 'otc' });
const market = this.market(symbol);
const endTime = Date.now();
const endTime = this.milliseconds();
const request = {
'symbol': market['id'],
'from': (endTime / 1000) - (24 * 60 * 60),
Expand Down Expand Up @@ -557,7 +557,7 @@ class arzplus extends arzplus$1["default"] {
'symbol': market['id'],
};
const orderBook = await this.publicGetApiV1MarketDepth(request);
const timestamp = Date.now();
const timestamp = this.milliseconds();
return this.parseOrderBook(orderBook, symbol, timestamp, 'bids', 'asks', 'price', 'amount');
}
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
Expand Down
4 changes: 2 additions & 2 deletions dist/cjs/src/bitimen.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ class bitimen extends bitimen$1["default"] {
*/
await this.loadMarkets();
const market = this.market(symbol);
const endTime = Date.now();
const endTime = this.milliseconds();
const request = {
'symbol': market['id'],
'from': (endTime / 1000) - (24 * 60 * 60),
Expand Down Expand Up @@ -405,7 +405,7 @@ class bitimen extends bitimen$1["default"] {
'symbol': market['id'],
};
const response = await this.publicGetApiOrderbookDepth(request);
const timestamp = Date.now();
const timestamp = this.milliseconds();
return this.parseOrderBook(response, symbol, timestamp, 'bids', 'asks');
}
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
Expand Down
4 changes: 2 additions & 2 deletions dist/cjs/src/bitir.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ class bitir extends bitir$1["default"] {
if (market['quote'] === 'IRT') {
symbol = market['base'] + 'IRR';
}
const endTime = Date.now();
const endTime = this.milliseconds();
const request = {
'symbol': symbol,
'from': (endTime / 1000) - (24 * 60 * 60),
Expand Down Expand Up @@ -499,7 +499,7 @@ class bitir extends bitir$1["default"] {
orberbook['bids'].push([price, amount]);
}
}
const timestamp = Date.now();
const timestamp = this.milliseconds();
return this.parseOrderBook(orberbook, symbol, timestamp);
}
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
Expand Down
6 changes: 3 additions & 3 deletions dist/cjs/src/bitpin.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ class bitpin extends bitpin$1["default"] {
*/
await this.loadMarkets();
const market = this.market(symbol);
const endTime = Date.now();
const endTime = this.milliseconds();
const request = {
'symbol': market['symbol'].replace('/', '_'),
'from': (endTime / 1000) - (24 * 60 * 60),
Expand Down Expand Up @@ -468,7 +468,7 @@ class bitpin extends bitpin$1["default"] {
askslist.push({ 'price': this.safeFloat(ask, 0), 'amount': this.safeFloat(ask, 1) });
}
const orderBook = { 'bid': bidlist, 'ask': askslist };
const timestamp = Date.now();
const timestamp = this.milliseconds();
return this.parseOrderBook(orderBook, symbol, timestamp, 'bid', 'ask', 'price', 'amount');
}
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
Expand All @@ -478,7 +478,7 @@ class bitpin extends bitpin$1["default"] {
url = this.urls['api']['OHLCV'] + '/' + path + '?' + this.urlencode(query);
}
if (path === 'v4/mth/orderbook/') {
url = url + params['symbol'] + '/?limit=' + params['limit'];
url = url + params['symbol'] + '/?limit=' + this.numberToString(params['limit']);
}
headers = { 'Content-Type': 'application/json' };
return { 'url': url, 'method': method, 'body': body, 'headers': headers };
Expand Down
4 changes: 2 additions & 2 deletions dist/cjs/src/excoino.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ class excoino extends excoino$1["default"] {
*/
await this.loadMarkets();
const market = this.market(symbol);
const endTime = Date.now();
const endTime = this.milliseconds();
const request = {
'symbol': market['id'],
'from': endTime - (24 * 60 * 60 * 1000),
Expand Down Expand Up @@ -410,7 +410,7 @@ class excoino extends excoino$1["default"] {
orderBook['bids'] = bids;
orderBook['asks'] = asks;
}
const timestamp = Date.now();
const timestamp = this.milliseconds();
return this.parseOrderBook(orderBook, symbol, timestamp, 'bids', 'asks', 'price', 'amount');
}
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
Expand Down
4 changes: 2 additions & 2 deletions dist/cjs/src/exir.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ class exir extends exir$1["default"] {
*/
await this.loadMarkets();
const market = this.market(symbol);
const endTime = Date.now();
const endTime = this.milliseconds();
const request = {
'symbol': market['id'],
'from': (endTime / 1000) - (24 * 60 * 60),
Expand Down Expand Up @@ -381,7 +381,7 @@ class exir extends exir$1["default"] {
'symbol': market['id'],
};
const response = await this.publicGetV2Orderbook(request);
const timestamp = this.safeTimestamp(response[market['id']], 'timestamp') / 1000;
const timestamp = this.safeTimestamp(response[market['id']], 'timestamp', 0) / 1000;
return this.parseOrderBook(response[market['id']], symbol, timestamp);
}
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
Expand Down
2 changes: 1 addition & 1 deletion dist/cjs/src/exnovin.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ class exnovin extends exnovin$1["default"] {
}
}
orderBook = { 'bids': bids, 'asks': asks };
const timestamp = Date.now();
const timestamp = this.milliseconds();
return this.parseOrderBook(orderBook, symbol, timestamp, 'bids', 'asks', 'price', 'amount');
}
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
Expand Down
7 changes: 5 additions & 2 deletions dist/cjs/src/gerami.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class gerami extends Exchange["default"] {
});
}
async fetchMarkets(params = {}) {
const marketIds = ['XAU750g_IRT', 'XAG999g_IRT'];
const marketIds = ['XAU750g_IRT', 'XAG999g_IRT', 'XCU9999g_IRT'];
const result = [];
for (let i = 0; i < marketIds.length; i++) {
const response = await this.publicGetPairsPair(this.extend({
Expand All @@ -69,6 +69,9 @@ class gerami extends Exchange["default"] {
if (baseId === 'XAU750g') {
base = 'XAU18';
}
if (baseId === 'XCU9999g') {
base = 'XCU-1G';
}
return {
'id': this.safeString(data, 'market'),
'symbol': base + '/' + quoteId,
Expand Down Expand Up @@ -123,7 +126,7 @@ class gerami extends Exchange["default"] {
if (symbols !== undefined) {
symbols = this.marketSymbols(symbols);
}
const marketSymbols = ['XAU18/IRT', 'XAG-1G/IRT'];
const marketSymbols = ['XAU18/IRT', 'XAG-1G/IRT', 'XCU-1G/IRT'];
const result = {};
for (let i = 0; i < marketSymbols.length; i++) {
const market = this.market(marketSymbols[i]);
Expand Down
4 changes: 2 additions & 2 deletions dist/cjs/src/hitobit.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ class hitobit extends hitobit$1["default"] {
*/
await this.loadMarkets();
const market = this.market(symbol);
const endTime = Date.now();
const endTime = this.milliseconds();
const request = {
'symbol': market['id'],
'from': this.iso8601((endTime) - (24 * 60 * 60)),
Expand Down Expand Up @@ -399,7 +399,7 @@ class hitobit extends hitobit$1["default"] {
'limit': 30,
};
const orderBook = await this.publicGetHapiExchangeV1PublicDepth(request);
const timestamp = Date.now();
const timestamp = this.milliseconds();
return this.parseOrderBook(orderBook, symbol, timestamp, 'bids', 'asks');
}
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
Expand Down
4 changes: 2 additions & 2 deletions dist/cjs/src/jibitex.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ class jibitex extends jibitex$1["default"] {
*/
await this.loadMarkets();
const market = this.market(symbol);
const endTime = Date.now();
const endTime = this.milliseconds();
const request = {
'market': market['id'],
'from': (endTime / 1000) - (24 * 60 * 60),
Expand Down Expand Up @@ -400,7 +400,7 @@ class jibitex extends jibitex$1["default"] {
};
const response = await this.publicGetApi1OrdersOrderBookMarket(request);
const orderBook = this.safeDict(response, 'content');
const timestamp = Date.now();
const timestamp = this.milliseconds();
return this.parseOrderBook(orderBook, symbol, timestamp, 'buys', 'sells', 'unitPrice', 'size');
}
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
Expand Down
2 changes: 1 addition & 1 deletion dist/cjs/src/kifpoolme.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class kifpoolme extends kifpoolme$1["default"] {
*/
await this.loadMarkets();
const market = this.market(symbol);
const endTime = Date.now();
const endTime = this.milliseconds();
const request = {
'symbol': market['baseId'],
'currency': market['quoteId'],
Expand Down
7 changes: 5 additions & 2 deletions dist/cjs/src/melligold.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class melligold extends Exchange["default"] {
});
}
async fetchMarkets(params = {}) {
const symbols = ['XAU18', 'XAG'];
const symbols = ['XAU18', 'XAG', 'XCU'];
const result = [];
for (let i = 0; i < symbols.length; i++) {
const response = await this.requestWithCookie(this.extend({
Expand Down Expand Up @@ -107,6 +107,9 @@ class melligold extends Exchange["default"] {
if (base === 'XAG') {
base = 'XAG-1G';
}
if (base === 'XCU') {
base = 'XCU-1G';
}
const quote = 'IRT';
return {
'id': base + quote,
Expand Down Expand Up @@ -164,7 +167,7 @@ class melligold extends Exchange["default"] {
symbols = this.marketSymbols(symbols);
}
const result = {};
const marketSymbols = ['XAU18/IRT', 'XAG-1G/IRT'];
const marketSymbols = ['XAU18/IRT', 'XAG-1G/IRT', 'XCU-1G/IRT'];
for (let i = 0; i < marketSymbols.length; i++) {
const market = this.market(marketSymbols[i]);
const response = await this.requestWithCookie(this.extend({
Expand Down
6 changes: 3 additions & 3 deletions dist/cjs/src/nobitex.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ class nobitex extends nobitex$1["default"] {
*/
await this.loadMarkets();
const market = this.market(symbol);
const endTime = Date.now();
const endTime = this.milliseconds();
if (market['quote'] === 'IRT') {
market['id'] = market['symbol'].replace('/', '');
}
Expand Down Expand Up @@ -424,10 +424,10 @@ class nobitex extends nobitex$1["default"] {
const bids = this.safeList(response, 'bids');
const asks = this.safeList(response, 'asks');
for (let i = 0; i < bids.length; i++) {
bids[i][0] = bids[i][0] ? bids[i][0] / 10 : 0;
bids[i][0] = bids[i][0] ? this.parseToNumeric(bids[i][0]) / 10 : 0;
}
for (let i = 0; i < asks.length; i++) {
asks[i][0] = asks[i][0] ? asks[i][0] / 10 : 0;
asks[i][0] = asks[i][0] ? this.parseToNumeric(asks[i][0]) / 10 : 0;
}
response['bids'] = bids;
response['asks'] = asks;
Expand Down
4 changes: 2 additions & 2 deletions dist/cjs/src/okexchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class okexchange extends okexchange$1["default"] {
*/
await this.loadMarkets();
const market = this.market(symbol);
const endTime = Date.now();
const endTime = this.milliseconds();
const request = {
'symbol': symbol.replace('/', ''),
'startTime': endTime - 24 * 60 * 60 * 1000,
Expand Down Expand Up @@ -354,7 +354,7 @@ class okexchange extends okexchange$1["default"] {
};
const response = await this.publicGetOapiV1MarketOrderbook(request);
const orderBook = this.safeDict(response, 'books', {});
const timestamp = Date.now();
const timestamp = this.milliseconds();
return this.parseOrderBook(orderBook, symbol, timestamp);
}
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
Expand Down
4 changes: 2 additions & 2 deletions dist/cjs/src/ompfinex.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ class ompfinex extends ompfinex$1["default"] {
if (market['quote'] === 'IRT') {
symbol = market['base'] + 'IRR';
}
const endTime = Date.now();
const endTime = this.milliseconds();
const request = {
'symbol': symbol.replace('/', ''),
'from': (endTime / 1000) - (24 * 60 * 60),
Expand Down Expand Up @@ -486,7 +486,7 @@ class ompfinex extends ompfinex$1["default"] {
else {
orderbook = this.safeDict(orderbook, market['base'] + market['quote']);
}
const timestamp = Date.now();
const timestamp = this.milliseconds();
return this.parseOrderBook(orderbook, symbol, timestamp, 'bids', 'asks', 'price', 'amount');
}
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
Expand Down
2 changes: 1 addition & 1 deletion dist/cjs/src/pingi.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ class pingi extends pingi$1["default"] {
*/
await this.loadMarkets();
const market = this.market(symbol);
const endTime = Date.now();
const endTime = this.milliseconds();
const request = {
'symbol': market['base'] + '/' + market['quote'],
'resolution': this.safeString(this.timeframes, timeframe, timeframe),
Expand Down
2 changes: 1 addition & 1 deletion dist/cjs/src/raastin.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ class raastin extends raastin$1["default"] {
// "bids": [{ "price": "164003", "amount": "19.99", "depth": "1", "total": "3278419" }],
// "asks": [{ "price": "166000", "amount": "47.79", "depth": "2", "total": "7933140" }]
// }
const timestamp = Date.now();
const timestamp = this.milliseconds();
return this.parseOrderBook(response, symbol, timestamp, 'bids', 'asks', 'price', 'amount');
}
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
Expand Down
Loading
Loading