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

Method parse_ticker

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

Source from the content-addressed store, hash-verified

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

Callers 2

fetch_tickerMethod · 0.95
fetch_tickersMethod · 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