Проблема в API, я чуть голову не сломал блин...
Почему возвращаются разные данные на запрос например
https://api.comkort.com/v1/public/order/list?market_alias=CGB_BTC ?
Один раз:
{"orders":{"sell":[{"price":"0.00240000","type":"sell","item":"CGB","total_price":"0.01192814","price_currency":"BTC","amount":"4.97005988"},{"price":"0.00250000","type":"sell","item":"CGB","total_price":"0.01250000","price_currency":"BTC","amount":"5.00000000"},{"price":"0.02500000","type":"sell","item":"CGB","total_price":"0.12500000","price_currency":"BTC","amount":"5.00000000"}],"buy":[{"price":"0.00200000","type":"buy","item":"CGB","total_price":"0.00011178","price_currency":"BTC","amount":"0.05588900"},{"price":"0.00000050","type":"buy","item":"CGB","total_price":"0.00025000","price_currency":"BTC","amount":"500.00000000"}],"last_update":"2014-07-04T16:47:40+00:00"}}
Второй раз:
{"orders":{"id":"264","alias":"cgb_btc","name":"CGB\/BTC","last_price":"0.00200000","last_trade_time":"2014-05-28T07:54:50+00:00","volume":"0.00000000","currency_volume":"0.00000000","item_code":"CGB","currency_code":"BTC","low":"0.00000000","high":"0.00000000","recent_trades":[{"id":"21036","amount":"2.94411100","price":"0.00200000","total":"0.00588822","time":"2014-05-28T07:54:50+00:00","type":"sell"},{"id":"7334","amount":"0.50612900","price":"0.00100000","total":"0.00050613","time":"2014-04-29T18:37:30+00:00","type":"sell"},{"id":"7333","amount":"1.00000000","price":"0.00100000","total":"0.00100000","time":"2014-04-29T18:35:26+00:00","type":"buy"}],"sell_orders":[{"price":"0.00240000","type":"sell","item":"CGB","total_price":"0.01192814","price_currency":"BTC","amount":"4.97005988"},{"price":"0.00250000","type":"sell","item":"CGB","total_price":"0.01250000","price_currency":"BTC","amount":"5.00000000"},{"price":"0.02500000","type":"sell","item":"CGB","total_price":"0.12500000","price_currency":"BTC","amount":"5.00000000"}],"buy_orders":[{"price":"0.00200000","type":"buy","item":"CGB","total_price":"0.00011178","price_currency":"BTC","amount":"0.05588900"},{"price":"0.00000050","type":"buy","item":"CGB","total_price":"0.00025000","price_currency":"BTC","amount":"500.00000000"}],"last_update":"2014-07-04T16:51:56+00:00"}}
массивы разные, обработка разная, ну нельзя так кодить.