(self, ticker: dict, market: Market = None)
| 3164 | return self.parse_order_book(data, market['symbol'], timestamp, bidsKey, asksKey) |
| 3165 | |
| 3166 | def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker: |
| 3167 | # |
| 3168 | # { |
| 3169 | # "symbol": "BTCUSDT", |
| 3170 | # "price": "26242", |
| 3171 | # "indexPrice": "34867", |
| 3172 | # "markPrice": "25555", |
| 3173 | # "ts": "1695793390482" |
| 3174 | # } |
| 3175 | # |
| 3176 | # spot |
| 3177 | # |
| 3178 | # { |
| 3179 | # "open": "37202.46", |
| 3180 | # "symbol": "BTCUSDT", |
| 3181 | # "high24h": "37744.75", |
| 3182 | # "low24h": "36666", |
| 3183 | # "lastPr": "37583.69", |
| 3184 | # "quoteVolume": "519127705.303", |
| 3185 | # "baseVolume": "13907.0386", |
| 3186 | # "usdtVolume": "519127705.302908", |
| 3187 | # "ts": "1700532903261", |
| 3188 | # "bidPr": "37583.68", |
| 3189 | # "askPr": "37583.69", |
| 3190 | # "bidSz": "0.0007", |
| 3191 | # "askSz": "0.0829", |
| 3192 | # "openUtc": "37449.4", |
| 3193 | # "changeUtc24h": "0.00359", |
| 3194 | # "change24h": "0.00321" |
| 3195 | # } |
| 3196 | # |
| 3197 | # swap and future |
| 3198 | # |
| 3199 | # { |
| 3200 | # "symbol": "BTCUSDT", |
| 3201 | # "lastPr": "104823.8", |
| 3202 | # "askPr": "104823.8", |
| 3203 | # "bidPr": "104823.5", |
| 3204 | # "bidSz": "0.703", |
| 3205 | # "askSz": "13.894", |
| 3206 | # "high24h": "105289.3", |
| 3207 | # "low24h": "103447.9", |
| 3208 | # "ts": "1750332210370", |
| 3209 | # "change24h": "0.00471", |
| 3210 | # "baseVolume": "79089.5675", |
| 3211 | # "quoteVolume": "8274870921.80485", |
| 3212 | # "usdtVolume": "8274870921.80485", |
| 3213 | # "openUtc": "104833", |
| 3214 | # "changeUtc24h": "-0.00009", |
| 3215 | # "indexPrice": "104881.953125", |
| 3216 | # "fundingRate": "-0.000014", |
| 3217 | # "holdingAmount": "7452.6421", |
| 3218 | # "deliveryStartTime": null, |
| 3219 | # "deliveryTime": null, |
| 3220 | # "deliveryStatus": "", |
| 3221 | # "open24h": "104332.3", |
| 3222 | # "markPrice": "104824.2" |
| 3223 | # } |
no test coverage detected