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
33.06k stars 7.55k forks source link

Timeframe for account type #16604

Open dawadam opened 1 year ago

dawadam commented 1 year ago

Preliminary Checks

Is your feature request related to a problem? Please describe

Some exchangers have several accounts and the timeframes are not the same.

Describe the solution you'd like

Add in market data or exchange data, a list of timeframes by account type.

Describe alternatives you've considered

No response

pcriadoperez commented 1 year ago

hi @dawadam , we tend to do this when exchanges have different timeframes for different account types. Is there an exchange in particular you are referring to?

dawadam commented 1 year ago

BitGet for exemple.

pcriadoperez commented 1 year ago

Hi @dawadam , in bitget we use the different timeframes for spot and swap markets. Is there any symbol or timeframe you are having trouble with? Also I opened this PR #16665 , so you can pass in both the unified ccxt timeframe or the timeframeId of the exchange.

dawadam commented 1 year ago

Ok, I understand that it is necessary to recover the time frame corresponding directly to the symbol. By the markets. Actualy, I'm getting the time frame from the exchanger, and I find it confusing, because there's no type precision.

    const exchange = new ccxt.bybit()
    console.log(exchange.timeframes)