ccxt / ccxt

A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading API with support for more than 100 bitcoin/altcoin exchanges
https://docs.ccxt.com
MIT License
31.86k stars 7.36k forks source link

base - functionality for method retry on failure #22861

Open ttodua opened 1 week ago

ttodua commented 1 week ago
    ex.options['retryFailedRequests'] = 1 // default is 0
    ex.options['retryFailedRequestsDelay'] = 100 // default it 0
ttodua commented 1 week ago
System.AggregateException: 'One or more errors occurred. (Unable to cast object of type 'DelayPromise' to type 'System.Threading.Tasks.Task`1[System.Object]'.)'
ttodua commented 1 week ago

@carlosmiei PR passes actually.

carlosmiei commented 3 days ago

two things, we're missing the docs and maybe an example showcasing the feature second, don't we need to update the c# side?

ttodua commented 2 days ago

1) added docs 2) the c# does not need to be updated as the fetch2 method is transpiled (i've neither amended any method in py/php)

failedRequestRetries could have been some possible shorter name too, but as is, i've pushed with maxRetriesOnFailure,