Browse Source

Test

etomic
jl777 8 years ago
parent
commit
4ece3f0834
  1. 4
      iguana/exchanges/LP_prices.c

4
iguana/exchanges/LP_prices.c

@ -322,13 +322,13 @@ char *LP_orderbook(char *base,char *rel)
retjson = cJSON_CreateObject();
array = cJSON_CreateArray();
if ( numbids > 1 )
qsort(bids,numbids,sizeof(*bids),_cmp_orderbook);
qsort(bids,numbids,sizeof(*bids),_cmp_orderbookrev);
for (i=0; i<numbids; i++)
jaddi(array,LP_orderbookjson(bids[i],-1));
jadd(retjson,"bids",array);
array = cJSON_CreateArray();
if ( numasks > 1 )
qsort(asks,numasks,sizeof(*asks),_cmp_orderbookrev);
qsort(asks,numasks,sizeof(*asks),_cmp_orderbook);
for (i=0; i<numasks; i++)
jaddi(array,LP_orderbookjson(asks[i],1));
jadd(retjson,"asks",array);

Loading…
Cancel
Save