ccxt 4.1.99 → 4.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ // ----------------------------------------------------------------------------
2
+
3
+ // PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
4
+ // https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
5
+ // EDIT THE CORRESPONDENT .ts FILE INSTEAD
6
+
7
+ // -------------------------------------------------------------------------------
8
+ import { Exchange as _Exchange } from '../base/Exchange.js';
9
+ class Exchange extends _Exchange {
10
+ }
11
+ export default Exchange;
@@ -24,6 +24,7 @@ export interface FeeInterface {
24
24
  export declare type Fee = FeeInterface | undefined;
25
25
  export interface MarketInterface {
26
26
  id: string;
27
+ numericId?: Num;
27
28
  uppercaseId?: string;
28
29
  lowercaseId?: string;
29
30
  symbol: string;
package/js/src/bequant.js CHANGED
@@ -27,7 +27,7 @@ export default class bequant extends hitbtc {
27
27
  'fees': [
28
28
  'https://bequant.io/fees-and-limits',
29
29
  ],
30
- 'referral': 'https://bequant.io',
30
+ 'referral': 'https://bequant.io/referral/dd104e3bee7634ec',
31
31
  },
32
32
  });
33
33
  }
package/js/src/bitget.js CHANGED
@@ -3224,14 +3224,13 @@ export default class bitget extends Exchange {
3224
3224
  // "1399132.341"
3225
3225
  // ]
3226
3226
  //
3227
- const volumeIndex = (market['inverse']) ? 6 : 5;
3228
3227
  return [
3229
3228
  this.safeInteger(ohlcv, 0),
3230
3229
  this.safeNumber(ohlcv, 1),
3231
3230
  this.safeNumber(ohlcv, 2),
3232
3231
  this.safeNumber(ohlcv, 3),
3233
3232
  this.safeNumber(ohlcv, 4),
3234
- this.safeNumber(ohlcv, volumeIndex),
3233
+ this.safeNumber(ohlcv, 5),
3235
3234
  ];
3236
3235
  }
3237
3236
  async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
@@ -3539,10 +3538,16 @@ export default class bitget extends Exchange {
3539
3538
  // Use transferable instead of available for swap and margin https://github.com/ccxt/ccxt/pull/19127
3540
3539
  const spotAccountFree = this.safeString(entry, 'available');
3541
3540
  const contractAccountFree = this.safeString(entry, 'maxTransferOut');
3542
- account['free'] = (contractAccountFree !== undefined) ? contractAccountFree : spotAccountFree;
3543
- const frozen = this.safeString(entry, 'frozen');
3544
- const locked = this.safeString(entry, 'locked');
3545
- account['used'] = Precise.stringAdd(frozen, locked);
3541
+ if (contractAccountFree !== undefined) {
3542
+ account['free'] = contractAccountFree;
3543
+ account['total'] = this.safeString(entry, 'accountEquity');
3544
+ }
3545
+ else {
3546
+ account['free'] = spotAccountFree;
3547
+ const frozen = this.safeString(entry, 'frozen');
3548
+ const locked = this.safeString(entry, 'locked');
3549
+ account['used'] = Precise.stringAdd(frozen, locked);
3550
+ }
3546
3551
  }
3547
3552
  result[code] = account;
3548
3553
  }
@@ -5020,6 +5025,9 @@ export default class bitget extends Exchange {
5020
5025
  // }
5021
5026
  // }
5022
5027
  //
5028
+ if (typeof response === 'string') {
5029
+ response = JSON.parse(response);
5030
+ }
5023
5031
  const data = this.safeValue(response, 'data');
5024
5032
  const first = this.safeValue(data, 0, data);
5025
5033
  return this.parseOrder(first, market);
@@ -0,0 +1,46 @@
1
+ import Exchange from './abstract/bitteam.js';
2
+ import { Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
+ /**
4
+ * @class bitteam
5
+ * @augments Exchange
6
+ */
7
+ export default class bitteam extends Exchange {
8
+ describe(): any;
9
+ fetchMarkets(params?: {}): Promise<import("./base/types.js").MarketInterface[]>;
10
+ parseMarket(market: any): Market;
11
+ fetchCurrencies(params?: {}): Promise<{}>;
12
+ fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
13
+ parseOHLCV(ohlcv: any, market?: Market): OHLCV;
14
+ fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
15
+ fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
16
+ fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
17
+ fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
18
+ fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
19
+ fetchCanceledOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
20
+ createOrder(symbol: string, type: OrderType, side: OrderSide, amount: any, price?: any, params?: {}): Promise<Order>;
21
+ cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
22
+ cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
23
+ parseOrder(order: any, market?: Market): Order;
24
+ parseOrderStatus(status: any): string;
25
+ parseOrderType(status: any): string;
26
+ parseValueToPricision(valueObject: any, valueKey: any, preciseObject: any, precisionKey: any): string;
27
+ fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
28
+ fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
29
+ parseTicker(ticker: any, market?: Market): Ticker;
30
+ fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
31
+ fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
32
+ parseTrade(trade: any, market?: Market): Trade;
33
+ fetchBalance(params?: {}): Promise<Balances>;
34
+ parseBalance(response: any): Balances;
35
+ fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
36
+ parseTransaction(transaction: any, currency?: Currency): Transaction;
37
+ parseTransactionType(type: any): string;
38
+ parseTransactionStatus(status: any): string;
39
+ sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
40
+ url: string;
41
+ method: string;
42
+ body: any;
43
+ headers: any;
44
+ };
45
+ handleErrors(code: any, reason: any, url: any, method: any, headers: any, body: any, response: any, requestHeaders: any, requestBody: any): any;
46
+ }