fetches the current integer timestamp in milliseconds from the exchange server https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-endpoints#check-server-time # spot https://developers.binance.com/docs/derivatives/usds-margined-futures/market
(self, params={})
| 2939 | self.options['enableDemoTrading'] = enable |
| 2940 | |
| 2941 | def fetch_time(self, params={}) -> Int: |
| 2942 | """ |
| 2943 | fetches the current integer timestamp in milliseconds from the exchange server |
| 2944 | |
| 2945 | https://developers.binance.com/docs/binance-spot-api-docs/rest-api/general-endpoints#check-server-time # spot |
| 2946 | https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time # swap |
| 2947 | https://developers.binance.com/docs/derivatives/coin-margined-futures/market-data/rest-api/Check-Server-time # future |
| 2948 | |
| 2949 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 2950 | :param str [params.subType]: "linear" or "inverse" |
| 2951 | :returns int: the current integer timestamp in milliseconds from the exchange server |
| 2952 | """ |
| 2953 | defaultType = self.safe_string_2(self.options, 'fetchTime', 'defaultType', 'spot') |
| 2954 | type = self.safe_string(params, 'type', defaultType) |
| 2955 | query = self.omit(params, 'type') |
| 2956 | subType = None |
| 2957 | subType, params = self.handle_sub_type_and_params('fetchTime', None, params) |
| 2958 | response = None |
| 2959 | if self.is_linear(type, subType): |
| 2960 | response = self.fapiPublicGetTime(query) |
| 2961 | elif self.is_inverse(type, subType): |
| 2962 | response = self.dapiPublicGetTime(query) |
| 2963 | else: |
| 2964 | response = self.publicGetTime(query) |
| 2965 | return self.safe_integer(response, 'serverTime') |
| 2966 | |
| 2967 | def fetch_currencies(self, params={}) -> Currencies: |
| 2968 | """ |
nothing calls this directly
no test coverage detected