MCPcopy Create free account
hub / github.com/ccxt/ccxt / parse_ticker

Method parse_ticker

python/ccxt/async_support/bitmart.py:1424–1577  ·  view source on GitHub ↗
(self, ticker: dict, market: Market = None)

Source from the content-addressed store, hash-verified

1422 return self.parse_deposit_withdraw_fee(data)
1423
1424 def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
1425 #
1426 # spot(REST) fetchTickers
1427 #
1428 # {
1429 # 'result': [
1430 # "AFIN_USDT", # symbol
1431 # "0.001047", # last
1432 # "11110", # v_24h
1433 # "11.632170", # qv_24h
1434 # "0.001048", # open_24h
1435 # "0.001048", # high_24h
1436 # "0.001047", # low_24h
1437 # "-0.00095", # price_change_24h
1438 # "0.001029", # bid_px
1439 # "5555", # bid_sz
1440 # "0.001041", # ask_px
1441 # "5297", # ask_sz
1442 # "1717122550482" # timestamp
1443 # ]
1444 # }
1445 #
1446 # spot(REST) fetchTicker
1447 #
1448 # {
1449 # "symbol": "BTC_USDT",
1450 # "last": "68500.00",
1451 # "v_24h": "10491.65490",
1452 # "qv_24h": "717178990.42",
1453 # "open_24h": "68149.75",
1454 # "high_24h": "69499.99",
1455 # "low_24h": "67132.40",
1456 # "fluctuation": "0.00514",
1457 # "bid_px": "68500",
1458 # "bid_sz": "0.00162",
1459 # "ask_px": "68500.01",
1460 # "ask_sz": "0.01722",
1461 # "ts": "1717131391671"
1462 # }
1463 #
1464 # spot(WS)
1465 #
1466 # {
1467 # "symbol":"BTC_USDT",
1468 # "last_price":"146.24",
1469 # "open_24h":"147.17",
1470 # "high_24h":"147.48",
1471 # "low_24h":"143.88",
1472 # "base_volume_24h":"117387.58", # NOT base, but quote currencynot !!
1473 # "s_t": 1610936002
1474 # }
1475 #
1476 # swap
1477 #
1478 # {
1479 # "symbol": "BTCUSDT",
1480 # "product_type": 1,
1481 # "open_timestamp": 1645977600000,

Callers 3

fetch_tickerMethod · 0.95
fetch_tickersMethod · 0.95
handle_tickerMethod · 0.95

Calls 13

safe_listMethod · 0.80
safe_string_2Method · 0.80
safe_integer_2Method · 0.80
safe_stringMethod · 0.80
safe_string_nMethod · 0.80
safe_string_lower_nMethod · 0.80
safe_integerMethod · 0.80
safe_string_lowerMethod · 0.80
safe_integer_productMethod · 0.80
string_mulMethod · 0.80
safe_tickerMethod · 0.80
safe_marketMethod · 0.45

Tested by

no test coverage detected