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
2 changes: 1 addition & 1 deletion dist/cjs/package.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "type": "commonjs" }
'{ "type": "commonjs" }'
4 changes: 2 additions & 2 deletions js/src/base/Exchange.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export default class Exchange {
outputLen: number;
blockLen: number;
create(): import("../static_dependencies/noble-hashes/utils.js").Hash<import("../static_dependencies/noble-hashes/utils.js").Hash<any>>;
}, digest?: "binary" | "hex" | "base64") => any;
}, digest?: "hex" | "base64" | "binary") => any;
arrayConcat: (a: any[], b: any[]) => any[];
encode: (str: string) => Uint8Array;
urlencode: (object: object, sort?: boolean) => string;
Expand All @@ -261,7 +261,7 @@ export default class Exchange {
outputLen: number;
blockLen: number;
create(): import("../static_dependencies/noble-hashes/utils.js").Hash<import("../static_dependencies/noble-hashes/utils.js").Hash<any>>;
}, digest?: "binary" | "hex" | "base64") => any;
}, digest?: "hex" | "base64" | "binary") => any;
numberToString: typeof functions.numberToString;
parseTimeframe: (timeframe: string) => number;
safeInteger2: (o: any, k1: IndexType, k2: IndexType, $default?: number) => number;
Expand Down
2 changes: 1 addition & 1 deletion js/src/coinbaseexchange.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ export default class coinbaseexchange extends Exchange {
* @returns {object[]} a list of [transaction structures]{@link https://docs.ccxt.com/#/?id=transaction-structure}
*/
fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
parseTransactionStatus(transaction: any): "pending" | "ok" | "failed" | "canceled";
parseTransactionStatus(transaction: any): "canceled" | "pending" | "ok" | "failed";
parseTransaction(transaction: Dict, currency?: Currency): Transaction;
/**
* @method
Expand Down
6 changes: 6 additions & 0 deletions js/src/protobuf/mexc/compiled.d.cts
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
// ----------------------------------------------------------------------------

// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
// EDIT THE CORRESPONDENT .ts FILE INSTEAD

export = $root;
declare var $root: {};
10 changes: 5 additions & 5 deletions js/src/static_dependencies/fflake/browser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export function deflate(data: any, opts: any, cb: any): () => void;
* @param opts The compression options
* @returns The deflated version of the data
*/
export function deflateSync(data: any, opts: any): Uint8Array | Uint32Array | Uint16Array;
export function deflateSync(data: any, opts: any): Uint8Array | Uint16Array | Uint32Array;
export function inflate(data: any, opts: any, cb: any): () => void;
/**
* Expands DEFLATE data with no wrapper
Expand All @@ -21,7 +21,7 @@ export function gzip(data: any, opts: any, cb: any): () => void;
* @param opts The compression options
* @returns The gzipped version of the data
*/
export function gzipSync(data: any, opts: any): Uint8Array | Uint32Array | Uint16Array;
export function gzipSync(data: any, opts: any): Uint8Array | Uint16Array | Uint32Array;
export function gunzip(data: any, opts: any, cb: any): () => void;
/**
* Expands GZIP data
Expand All @@ -37,7 +37,7 @@ export function zlib(data: any, opts: any, cb: any): () => void;
* @param opts The compression options
* @returns The zlib-compressed version of the data
*/
export function zlibSync(data: any, opts: any): Uint8Array | Uint32Array | Uint16Array;
export function zlibSync(data: any, opts: any): Uint8Array | Uint16Array | Uint32Array;
export function unzlib(data: any, opts: any, cb: any): () => void;
/**
* Expands Zlib data
Expand All @@ -61,15 +61,15 @@ export function decompressSync(data: any, out: any): any;
* not need to be true unless decoding a binary string.
* @returns The string encoded in UTF-8/Latin-1 binary
*/
export function strToU8(str: any, latin1: any): Uint8Array | Uint32Array | Uint16Array;
export function strToU8(str: any, latin1: any): Uint8Array | Uint16Array | Uint32Array;
/**
* Converts a Uint8Array to a string
* @param dat The data to decode to string
* @param latin1 Whether or not to interpret the data as Latin-1. This should
* not need to be true unless encoding to binary string.
* @returns The original UTF-8/Latin-1 string
*/
export function strFromU8(dat: any, latin1: any): string | Uint8Array | Uint32Array | Uint16Array;
export function strFromU8(dat: any, latin1: any): string | Uint8Array | Uint16Array | Uint32Array;
export function zip(data: any, opts: any, cb: any): () => void;
/**
* Synchronously creates a ZIP file. Prefer using `zip` for better performance
Expand Down
2 changes: 1 addition & 1 deletion js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export declare class BigInteger {
protected intValue(): number;
protected byteValue(): number;
protected shortValue(): number;
protected signum(): 1 | 0 | -1;
protected signum(): 0 | 1 | -1;
toByteArray(): number[];
protected equals(a: BigInteger): boolean;
protected min(a: BigInteger): BigInteger;
Expand Down
6 changes: 6 additions & 0 deletions js/src/static_dependencies/qs/formats.d.cts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// ----------------------------------------------------------------------------

// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
// EDIT THE CORRESPONDENT .ts FILE INSTEAD

declare const _default: string;
export declare namespace formatters {
function RFC1738(value: any): string;
Expand Down
6 changes: 6 additions & 0 deletions js/src/static_dependencies/qs/index.d.cts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// ----------------------------------------------------------------------------

// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
// EDIT THE CORRESPONDENT .ts FILE INSTEAD

import formats = require("./formats.cjs");
import parse = require("./parse.cjs");
import stringify = require("./stringify.cjs");
Expand Down
6 changes: 6 additions & 0 deletions js/src/static_dependencies/qs/parse.d.cts
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
// ----------------------------------------------------------------------------

// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
// EDIT THE CORRESPONDENT .ts FILE INSTEAD

declare function _exports(str: any, opts: any): any;
export = _exports;
6 changes: 6 additions & 0 deletions js/src/static_dependencies/qs/stringify.d.cts
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
// ----------------------------------------------------------------------------

// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
// EDIT THE CORRESPONDENT .ts FILE INSTEAD

declare function _exports(object: any, opts: any): string;
export = _exports;
6 changes: 6 additions & 0 deletions js/src/static_dependencies/qs/utils.d.cts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// ----------------------------------------------------------------------------

// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
// EDIT THE CORRESPONDENT .ts FILE INSTEAD

export function arrayToObject(source: any, options: any): any;
export function assign(target: any, source: any): any;
export function combine(a: any, b: any): any[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Abi, FunctionAbi, RawArgs } from '../../../types/index.js';
import { AbiParserInterface } from './interface.js';
export declare function createAbiParser(abi: Abi): AbiParserInterface;
export declare function getAbiVersion(abi: Abi): 1 | 0 | 2;
export declare function getAbiVersion(abi: Abi): 0 | 1 | 2;
export declare function isNoConstructorValid(method: string, argsCalldata: RawArgs, abiMethod?: FunctionAbi): boolean;
2 changes: 1 addition & 1 deletion python/ccxt_ir.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: ccxt-ir
Version: 4.9.27
Version: 4.9.28
Summary: A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges
Home-page: https://ccxt.com
Author: Igor Kroitor
Expand Down
38 changes: 19 additions & 19 deletions wiki/examples/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,6 @@

# [<-](Examples?id=javascript)

# CCXT JavaScript Examples

These examples might require the following super-useful high-quality Node.js modules by [xpl](https://github.com/xpl):

- [ansicolor](https://github.com/xpl/ansicolor): A quality JavaScript library for the ANSI color/style management ([ansicolor @ npm](https://npmjs.com/package/ansicolor))
- [as-table](https://github.com/xpl/as-table): A simple function that prints objects as ASCII tables ([as-table @ npm](https://npmjs.com/package/as-table))
- [ololog](https://github.com/xpl/ololog): Platform-agnostic logging with blackjack and hookers ([ololog @ npm](https://npmjs.com/package/ololog))

All of the modules above are installed with the ccxt library devDependencies by npm automatically.

To run the ccxt JavaScript examples from any folder type in console:

```shell
node path/to/example.js # substitute for actual filename here
```


- [Advanced Error Handling](./examples/js/advanced-error-handling.md)

- [Aggregate Orderbook](./examples/js/aggregate-orderbook.md)
Expand Down Expand Up @@ -249,6 +232,23 @@ node path/to/example.js # substitute for actual filename here

- [Proxy Usage](./examples/js/proxy-usage.md)

# CCXT JavaScript Examples

These examples might require the following super-useful high-quality Node.js modules by [xpl](https://github.com/xpl):

- [ansicolor](https://github.com/xpl/ansicolor): A quality JavaScript library for the ANSI color/style management ([ansicolor @ npm](https://npmjs.com/package/ansicolor))
- [as-table](https://github.com/xpl/as-table): A simple function that prints objects as ASCII tables ([as-table @ npm](https://npmjs.com/package/as-table))
- [ololog](https://github.com/xpl/ololog): Platform-agnostic logging with blackjack and hookers ([ololog @ npm](https://npmjs.com/package/ololog))

All of the modules above are installed with the ccxt library devDependencies by npm automatically.

To run the ccxt JavaScript examples from any folder type in console:

```shell
node path/to/example.js # substitute for actual filename here
```


- [Sample Local Proxy Server With Cors](./examples/js/sample-local-proxy-server-with-cors.md)

- [Search All Exchanges](./examples/js/search-all-exchanges.md)
Expand All @@ -271,10 +271,10 @@ node path/to/example.js # substitute for actual filename here

- [Watch Orderbook For Symbols](./examples/js/watch-OrderBook-For-Symbols.md)

- [Watch Trades For Symbols](./examples/js/watch-Trades-For-Symbols.md)

- [Watch Tickers](./examples/js/watch-tickers.md)

- [Watch Trades For Symbols](./examples/js/watch-Trades-For-Symbols.md)

- [Watchohlcvforsymbols](./examples/js/watchOHLCVForSymbols.md)

- [Watchorderbookforsymbols](./examples/js/watchOrderBookForSymbols.md)
Expand Down
20 changes: 10 additions & 10 deletions wiki/examples/php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@

# [<-](Examples?id=php)

# CCXT PHP Examples

To run PHP examples from any folder type in console:

```shell
php -f path/to/example.php # substitute for actual filename here
```

- [Arbitrage Pairs](./examples/php/arbitrage-pairs.md)

- [Async Await Fetch Multiple](./examples/php/async-await-fetch-multiple.md)
Expand Down Expand Up @@ -128,6 +120,14 @@ php -f path/to/example.php # substitute for actual filename here

- [React Eventloop With Rate Limiting](./examples/php/react-eventloop-with-rate-limiting.md)

# CCXT PHP Examples

To run PHP examples from any folder type in console:

```shell
php -f path/to/example.php # substitute for actual filename here
```

- [Sample Local Proxy Server With Cors](./examples/php/sample-local-proxy-server-with-cors.md)

- [Shared Markets](./examples/php/shared-markets.md)
Expand All @@ -142,10 +142,10 @@ php -f path/to/example.php # substitute for actual filename here

- [Watch Orderbook For Symbols](./examples/php/watch-OrderBook-For-Symbols.md)

- [Watch Trades For Symbols](./examples/php/watch-Trades-For-Symbols.md)

- [Watch Tickers](./examples/php/watch-tickers.md)

- [Watch Trades For Symbols](./examples/php/watch-Trades-For-Symbols.md)

- [Watchohlcvforsymbols](./examples/php/watchOHLCVForSymbols.md)

- [Watchorderbookforsymbols](./examples/php/watchOrderBookForSymbols.md)
Expand Down
46 changes: 23 additions & 23 deletions wiki/examples/py/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,6 @@

# [<-](Examples?id=python)

# CCXT Python Examples

To run Python examples from any folder, type in console:

```shell
python path/to/example.py # substitute for actual filename here
```

Example files starting with `async-` require Python 3.6 with `async`/`await` and async generators support.

![basic-chart](https://user-images.githubusercontent.com/1294454/29979754-6d62354c-8f4f-11e7-9e0a-22e87b4a093b.jpg)

## See Also

[co3k-crypto-currency-note](https://github.com/co3k/co3k-crypto-currency-note/blob/master/Untitled.ipynb) – an example of using ccxt to fetch OHLCV candles from Kraken and charting them with matplotlib in a Jupyter Notebook, made by [co3k](https://github.com/co3k).


- [Aiohttp Custom Session Connector](./examples/py/aiohttp-custom-session-connector.md)

- [All Exchanges](./examples/py/all-exchanges.md)
Expand Down Expand Up @@ -57,10 +40,10 @@ Example files starting with `async-` require Python 3.6 with `async`/`await` and

- [Async Binance Fetch Margin Balance With Params](./examples/py/async-binance-fetch-margin-balance-with-params.md)

- [Async Binance Fetch Option Ohlcv](./examples/py/async-binance-fetch-option-OHLCV.md)

- [Async Binance Fetch Option Details](./examples/py/async-binance-fetch-option-details.md)

- [Async Binance Fetch Option Ohlcv](./examples/py/async-binance-fetch-option-OHLCV.md)

- [Async Binance Fetch Option Order](./examples/py/async-binance-fetch-option-order.md)

- [Async Binance Fetch Option Orderbook](./examples/py/async-binance-fetch-option-orderbook.md)
Expand Down Expand Up @@ -243,8 +226,6 @@ Example files starting with `async-` require Python 3.6 with `async`/`await` and

- [Builtin Rate Limiting Long Poller](./examples/py/builtin-rate-limiting-long-poller.md)

- [Bybit Usdc Create Option Order](./examples/py/bybit-USDC-create-option-order.md)

- [Bybit Conditional Orders](./examples/py/bybit-conditional-orders.md)

- [Bybit Positions](./examples/py/bybit-positions.md)
Expand All @@ -253,6 +234,8 @@ Example files starting with `async-` require Python 3.6 with `async`/`await` and

- [Bybit Updated](./examples/py/bybit-updated.md)

- [Bybit Usdc Create Option Order](./examples/py/bybit-USDC-create-option-order.md)

- [Cli](./examples/py/cli.md)

- [Coinbase Cancel Order](./examples/py/coinbase-cancel-order.md)
Expand Down Expand Up @@ -439,6 +422,23 @@ Example files starting with `async-` require Python 3.6 with `async`/`await` and

- [Proxy Usage](./examples/py/proxy-usage.md)

# CCXT Python Examples

To run Python examples from any folder, type in console:

```shell
python path/to/example.py # substitute for actual filename here
```

Example files starting with `async-` require Python 3.6 with `async`/`await` and async generators support.

![basic-chart](https://user-images.githubusercontent.com/1294454/29979754-6d62354c-8f4f-11e7-9e0a-22e87b4a093b.jpg)

## See Also

[co3k-crypto-currency-note](https://github.com/co3k/co3k-crypto-currency-note/blob/master/Untitled.ipynb) – an example of using ccxt to fetch OHLCV candles from Kraken and charting them with matplotlib in a Jupyter Notebook, made by [co3k](https://github.com/co3k).


- [Rsi](./examples/py/rsi.md)

- [Rtt](./examples/py/rtt.md)
Expand All @@ -465,10 +465,10 @@ Example files starting with `async-` require Python 3.6 with `async`/`await` and

- [Watch Orderbook For Symbols](./examples/py/watch-OrderBook-For-Symbols.md)

- [Watch Trades For Symbols](./examples/py/watch-Trades-For-Symbols.md)

- [Watch Tickers](./examples/py/watch-tickers.md)

- [Watch Trades For Symbols](./examples/py/watch-Trades-For-Symbols.md)

- [Watchohlcvforsymbols](./examples/py/watchOHLCVForSymbols.md)

- [Watchorderbookforsymbols](./examples/py/watchOrderBookForSymbols.md)
Expand Down
4 changes: 2 additions & 2 deletions wiki/examples/ts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@

- [Watch Orderbook For Symbols](./examples/ts/watch-OrderBook-For-Symbols.md)

- [Watch Trades For Symbols](./examples/ts/watch-Trades-For-Symbols.md)

- [Watch Tickers](./examples/ts/watch-tickers.md)

- [Watch Trades For Symbols](./examples/ts/watch-Trades-For-Symbols.md)

- [Watchpositions Many Exchanges Continuosly](./examples/ts/watchPositions-many-exchanges-continuosly.md)

- [Watchpositions](./examples/ts/watchPositions.md)
Expand Down
6 changes: 2 additions & 4 deletions wiki/exchanges/binance.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,7 @@ binance.fetchOHLCV (symbol, timeframe[, since, limit, params])
<a name="fetchTrades" id="fetchtrades"></a>

### fetchTrades{docsify-ignore}
get the list of most recent trades for a particular symbol
Default fetchTradesMethod
get the list of most recent trades for a particular symbolDefault fetchTradesMethod

**Kind**: instance method of [<code>binance</code>](#binance)
**Returns**: <code>Array&lt;Trade&gt;</code> - a list of [trade structures](https://docs.ccxt.com/#/?id=public-trades)
Expand All @@ -519,8 +518,7 @@ Default fetchTradesMethod
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#compressedaggregate-trades-list // publicGetAggTrades (spot)
- https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List // fapiPublicGetAggTrades (swap)
- https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List // dapiPublicGetAggTrades (future)
- https://developers.binance.com/docs/derivatives/option/market-data/Recent-Trades-List // eapiPublicGetTrades (option)
Other fetchTradesMethod
- https://developers.binance.com/docs/derivatives/option/market-data/Recent-Trades-List // eapiPublicGetTrades (option)Other fetchTradesMethod
- https://developers.binance.com/docs/binance-spot-api-docs/rest-api/market-data-endpoints#recent-trades-list // publicGetTrades (spot)
- https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List // fapiPublicGetTrades (swap)
- https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Recent-Trades-List // dapiPublicGetTrades (future)
Expand Down
Loading
Loading