Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(binance): check 30 days interval in fetchConvertTradeHistory #22315

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sc0Vu
Copy link
Contributor

@sc0Vu sc0Vu commented Apr 28, 2024

fix: #22289

$ n binance fetchConvertTradeHistory BNB 1672527600000 200                         
CCXT v4.3.10
binance.fetchConvertTradeHistory (BNB, 1672527600000, 200)
BadRequest binance fetchConvertTradeHistory () the max interval between startTime and endTime is 30 days.

$ n binance fetchConvertTradeHistory BNB 1672527600000 200 '{"until":1675119600000}'
binance.fetchConvertTradeHistory (BNB, 1672527600000, 200, [object Object])
...
ResponseBody:
 {"list":[],"startTime":1672527600000,"endTime":1675119600000,"limit":200,"moreData":false} 

@@ -12718,6 +12718,9 @@ export default class binance extends Exchange {
// }
//
} else {
if ((request['endTime'] - request['startTime']) > msInThirtyDays) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the user provides endTIme we add it as a string to the request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

exchange.fetchConvertTradeHistory - no data if the period is longer than about half a year - on binance
2 participants