fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market https://developers.bydfi.com/en/futures/market#24hr-price-change-statistics :param str symbol: unified symbol of the market to fetch the ticker fo
(self, symbol: str, params={})
| 925 | return self.parse_tickers(data, symbols) |
| 926 | |
| 927 | def fetch_ticker(self, symbol: str, params={}) -> Ticker: |
| 928 | """ |
| 929 | fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market |
| 930 | |
| 931 | https://developers.bydfi.com/en/futures/market#24hr-price-change-statistics |
| 932 | |
| 933 | :param str symbol: unified symbol of the market to fetch the ticker for |
| 934 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 935 | :returns dict: a `ticker structure <https://docs.ccxt.com/?id=ticker-structure>` |
| 936 | """ |
| 937 | self.load_markets() |
| 938 | market = self.market(symbol) |
| 939 | request = { |
| 940 | 'symbol': market['id'], |
| 941 | } |
| 942 | response = self.publicGetV1FapiMarketTicker24hr(self.extend(request, params)) |
| 943 | data = self.safe_list(response, 'data', []) |
| 944 | ticker = self.safe_dict(data, 0, {}) |
| 945 | return self.parse_ticker(ticker, market) |
| 946 | |
| 947 | def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker: |
| 948 | # |
nothing calls this directly
no test coverage detected