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

Method parse_ticker

python/ccxt/delta.py:949–1093  ·  view source on GitHub ↗
(self, ticker: dict, market: Market = None)

Source from the content-addressed store, hash-verified

947 return result
948
949 def parse_ticker(self, ticker: dict, market: Market = None) -> Ticker:
950 #
951 # spot: fetchTicker, fetchTickers
952 #
953 # {
954 # "close": 30634.0,
955 # "contract_type": "spot",
956 # "greeks": null,
957 # "high": 30780.0,
958 # "low": 30340.5,
959 # "mark_price": "48000",
960 # "oi": "0.0000",
961 # "oi_change_usd_6h": "0.0000",
962 # "oi_contracts": "0",
963 # "oi_value": "0.0000",
964 # "oi_value_symbol": "BTC",
965 # "oi_value_usd": "0.0000",
966 # "open": 30464.0,
967 # "price_band": null,
968 # "product_id": 8320,
969 # "quotes": {},
970 # "size": 2.6816639999999996,
971 # "spot_price": "30637.91465121",
972 # "symbol": "BTC_USDT",
973 # "timestamp": 1689139767621299,
974 # "turnover": 2.6816639999999996,
975 # "turnover_symbol": "BTC",
976 # "turnover_usd": 81896.45613400004,
977 # "volume": 2.6816639999999996
978 # }
979 #
980 # swap: fetchTicker, fetchTickers
981 #
982 # {
983 # "close": 30600.5,
984 # "contract_type": "perpetual_futures",
985 # "funding_rate": "0.00602961",
986 # "greeks": null,
987 # "high": 30803.0,
988 # "low": 30265.5,
989 # "mark_basis": "-0.45601594",
990 # "mark_price": "30600.10481568",
991 # "oi": "469.9190",
992 # "oi_change_usd_6h": "2226314.9900",
993 # "oi_contracts": "469919",
994 # "oi_value": "469.9190",
995 # "oi_value_symbol": "BTC",
996 # "oi_value_usd": "14385640.6802",
997 # "open": 30458.5,
998 # "price_band": {
999 # "lower_limit": "29067.08312627",
1000 # "upper_limit": "32126.77608693"
1001 # },
1002 # "product_id": 139,
1003 # "quotes": {
1004 # "ask_iv": null,
1005 # "ask_size": "965",
1006 # "best_ask": "30600.5",

Callers 2

fetch_tickerMethod · 0.95
fetch_tickersMethod · 0.95

Calls 7

safe_integer_productMethod · 0.80
safe_stringMethod · 0.80
safe_symbolMethod · 0.80
safe_dictMethod · 0.80
safe_tickerMethod · 0.80
safe_numberMethod · 0.80
iso8601Method · 0.45

Tested by

no test coverage detected