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

Errors on Bybit, OKX, Gate #18

Open
Chebakul opened this issue Mar 16, 2024 · 2 comments
Open

Errors on Bybit, OKX, Gate #18

Chebakul opened this issue Mar 16, 2024 · 2 comments

Comments

@Chebakul
Copy link

There are errors of this kind:

[22:32:58] ERROR    BTC/USDC:USDC-240405 is not perp.               frarb.py:51
                    ┌───── Traceback (most recent call last) ─────┐            
                    │ D:\Dwnld\pyProject\funding-rate-arbitrage-m │            
                    │ ain\funding_rate_arbitrage\frarb.py:49 in   │            
                    │ fetch_all_funding_rate                      │            
                    │                                             │            
                    │    46 │   │   fr_d = {}                     │            
                    │    47 │   │   for p in perp:                │            
                    │    48 │   │   │   try:                      │            
                    │ >  49 │   │   │   │   fr_d[p] = ex.fetch_fu │            
                    │    50 │   │   │   except ExchangeError:     │            
                    │    51 │   │   │   │   log.exception(f"{p} i │            
                    │    52 │   │   return fr_d                   │            
                    │                                             │            
                    │ D:\Dwnld\pyProject\funding-rate-arbitrage-m │            
                    │ ain\.venv\Lib\site-packages\ccxt\base\excha │            
                    │ nge.py:4798 in fetch_funding_rate           │            
                    │                                             │            
                    │   4795 │   │   │   symbol = market['symbol' │            
                    │   4796 │   │   │   if not market['contract' │            
                    │   4797 │   │   │   │   raise BadSymbol(self │            
                    │        only')                               │            
                    │ > 4798 │   │   │   rates = self.fetchFundin │            
                    │   4799 │   │   │   rate = self.safe_value(r │            
                    │   4800 │   │   │   if rate is None:         │            
                    │   4801 │   │   │   │   raise NullResponse(s │            
                    │        + symbol)                            │            
                    │                                             │            
                    │ D:\Dwnld\pyProject\funding-rate-arbitrage-m │            
                    │ ain\.venv\Lib\site-packages\ccxt\bybit.py:2 │            
                    │ 325 in fetch_funding_rates                  │            
                    │                                             │            
                    │   2322 │   │   type = None                  │            
                    │   2323 │   │   type, params = self.handle_m │            
                    │        params)                              │            
                    │   2324 │   │   if type != 'swap':           │            
                    │ > 2325 │   │   │   raise NotSupported(self. │            
                    │        + ' markets')                        │            
                    │   2326 │   │   else:                        │            
                    │   2327 │   │   │   subType = None           │            
                    │   2328 │   │   │   subType, params = self.h │            
                    │        market, params, 'linear')            │            
                    └─────────────────────────────────────────────┘            
                    NotSupported: bybit fetchFundingRates() does               
                    not support future markets

And on the OKX exchange:

ExchangeError: okx fetchFundingRate() is only              
                    valid for swap markets 

And on the GATE exchange

gate fetchFundingRate() supports                
                    swap contracts only 

I tried to figure it out myself, but my level of code writing is 0 :D

@aoki-h-jp
Copy link
Owner

@Chebakul
Thanks for report!
I'll check it.

@WangRu222
Copy link

hello, I have faced the same question. May I ask is there any solution?

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

No branches or pull requests

3 participants