fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market https://developer-pro.bitmart.com/en/spot/#get-ticker-of-all-pairs-v3 https://developer-pro.bitmart.com/en/futuresv2/#get-contract-details :param s
(self, symbols: Strings = None, params={})
| 1671 | return self.parse_ticker(ticker, market) |
| 1672 | |
| 1673 | def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers: |
| 1674 | """ |
| 1675 | fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market |
| 1676 | |
| 1677 | https://developer-pro.bitmart.com/en/spot/#get-ticker-of-all-pairs-v3 |
| 1678 | https://developer-pro.bitmart.com/en/futuresv2/#get-contract-details |
| 1679 | |
| 1680 | :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned |
| 1681 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 1682 | :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/?id=ticker-structure>` |
| 1683 | """ |
| 1684 | self.load_markets() |
| 1685 | symbols = self.market_symbols(symbols) |
| 1686 | type = None |
| 1687 | market = None |
| 1688 | if symbols is not None: |
| 1689 | symbol = self.safe_string(symbols, 0) |
| 1690 | market = self.market(symbol) |
| 1691 | type, params = self.handle_market_type_and_params('fetchTickers', market, params) |
| 1692 | response = None |
| 1693 | if type == 'spot': |
| 1694 | response = self.publicGetSpotQuotationV3Tickers(params) |
| 1695 | # |
| 1696 | # { |
| 1697 | # "code": 1000, |
| 1698 | # "trace": "17c5e5d9ac49f9b71efca2bed55f1a.105.171225637482393", |
| 1699 | # "message": "success", |
| 1700 | # "data": [ |
| 1701 | # [ |
| 1702 | # "AFIN_USDT", |
| 1703 | # "0.001047", |
| 1704 | # "11110", |
| 1705 | # "11.632170", |
| 1706 | # "0.001048", |
| 1707 | # "0.001048", |
| 1708 | # "0.001047", |
| 1709 | # "-0.00095", |
| 1710 | # "0.001029", |
| 1711 | # "5555", |
| 1712 | # "0.001041", |
| 1713 | # "5297", |
| 1714 | # "1717122550482" |
| 1715 | # ], |
| 1716 | # ] |
| 1717 | # } |
| 1718 | # |
| 1719 | elif type == 'swap': |
| 1720 | response = self.publicGetContractPublicDetails(params) |
| 1721 | # |
| 1722 | # { |
| 1723 | # "code": 1000, |
| 1724 | # "message": "Ok", |
| 1725 | # "data": { |
| 1726 | # "symbols": [ |
| 1727 | # { |
| 1728 | # "symbol": "BTCUSDT", |
| 1729 | # "product_type": 1, |
| 1730 | # "open_timestamp": 1645977600000, |
nothing calls this directly
no test coverage detected