I'm using python and i'm trying to exxtract only the 'ticker' and the 'last' fields.
page = requests.get('https://api.coinex.com/perpetual/v1/market/ticker/all')
print page.json
print a['ticker']['last']
{"code": 0, "data": {"date": 1654345634529, "ticker": {"KAVAUSDT": {"vol": "798288", "low": "2.3881", "open": "2.4666", "high": "2.5812", "last": "2.4625", "buy": "2.4640", "period": 86400, "funding_time": 212, "position_amount": "53008", "funding_rate_last": "-0.00018969", "funding_rate_next": "-0.00087790", "funding_rate_predict": "-0.00045043", "insurance": "17628475.33491688425550626390", "sign_price": "2.4666", "index_price": "2.4676", "sell_total": "54759", "buy_total": "50186", "buy_amount": "395", "sell": "2.4654", "sell_amount": "138"}, "ONTUSDT": {"vol": "1473187", "low": "0.2709", "open": "0.2773", "high": "0.2829", "last": "0.2750", "buy": "0.2749", "period": 86400, "funding_time": 212, "position_amount": "109416", "funding_rate_last": "-0.00053684", "funding_rate_next": "0.00017823", "funding_rate_predict": "-0.00062364", "insurance": "17628475.33491688425550626390", "sign_price": "0.2757", "index_price": "0.2757", "sell_total": "343448", "buy_total": "401166", "buy_amount": "2347", "sell": "0.2752", "sell_amount": "2347"}}}, "message": "OK"}
Expected output
KAVAUSDT 2.4625
ONTUSDT 0.2750