| line | true | false | branch | 
 
| 501 | 0 | 0 | if ($r->{'args'}{'usd_rates'} and $r->{'args'}{'usd_rates'}{$cur}) { } | 
 
| 506 | 0 | 0 | unless $fxres->[0] == 200 or $fxres->[0] == 304 | 
 
| 509 | 0 | 0 | if (not $rate_mem{$cur} or $rate_mem{$cur} != $fxres->[2]{'rate'}) | 
 
| 525 | 0 | 0 | if $r->{'_stash'}{'exchange_ids'}{$exchange} | 
 
| 529 | 0 | 0 | unless $rec | 
 
| 534 | 0 | 0 | unless ($eid) | 
 
| 548 | 0 | 0 | if $r->{'_stash'}{'account_ids'}{$exchange}{$account} | 
 
| 555 | 0 | 0 | unless ($aid) | 
 
| 585 | 0 | 0 | unless (defined $account) | 
 
| 587 | 0 | 0 | unless keys %$h | 
 
| 594 | 0 | 0 | if $r->{'_stash'}{'exchange_clients'}{$exchange}{$account} | 
 
| 601 | 0 | 0 | unless ($r->{'_cryp'}{'exchanges'}{$exchange}{$account}) | 
 
| 607 | 0 | 0 | unless ($client_args{'api_key'}) | 
 
| 629 | 0 | 0 | unless ($res->[0] == 200) | 
 
| 663 | 0 | 0 | if $r->{'_stash'}{'exchange_pairs'}{$exchange} | 
 
| 668 | 0 | 0 | if ($res->[0] == 200) { } | 
 
| 691 | 17 | 0 | $Locale::Codes::Data{'currency'}{'code2id'}{'alpha'}{uc $code} ? : | 
 
| 708 | 0 | 0 | unless exists $r->{'args'}{'accounts'} | 
 
| 713 | 0 | 0 | unless $r->{'args'}{'accounts'} and @{$r->{'args'}{'accounts'};} >= 2 | 
 
| 715 | 0 | 0 | unless m[(.+)/(.+)] | 
 
| 717 | 0 | 0 | unless (exists $account_exchanges{$xchg}) | 
 
| 718 | 0 | 0 | unless $xcat->by_safename($xchg) | 
 
| 723 | 0 | 0 | unless keys %account_exchanges >= 2 | 
 
| 734 | 0 | 0 | if $opts->{'skip_connect'} | 
 
| 749 | 0 | 0 | if $opts->{'skip_connect'} | 
 
| 755 | 0 | 0 | unless $res->[0] == 200 | 
 
| 782 | 0 | 0 | if (_is_fiat($quotecur)) { } | 
 
| 797 | 0 | 0 | if (grep {':fiat';} @possible_quotecurs) | 
 
| 802 | 0 | 0 | if (@quotecurs_arg) { } | 
 
| 805 | 0 | 0 | if (grep {$c eq $_;} @possible_quotecurs) { } | 
 
| 811 | 0 | 0 | if (@impossible_quotecurs) | 
 
| 838 | 0 | 0 | unless grep {$_ eq $quotecur;} @{$$r{'_stash'}{'quote_currencies'};} | 
 
| 848 | 0 | 0 | if (@basecurs_arg) { } | 
 
| 851 | 0 | 0 | if (grep {$c eq $_;} @possible_basecurs) { } | 
 
| 857 | 0 | 0 | if (@impossible_basecurs) | 
 
| 867 | 0 | 0 | unless @basecurs | 
 
| 893 | 0 | 0 | _is_fiat($buy_currency) ? : | 
 
| 911 | 0 | 0 | if (_is_fiat($buy_currency) and $buy_currency ne 'USD') | 
 
| 915 | 0 | 0 | if (_is_fiat($sell_currency) and $sell_currency ne 'USD') | 
 
| 984 | 0 | 0 | unless ($dbh->do("INSERT INTO order_pair (\n               ctime,\n               base_currency, base_size,\n               expected_net_profit_margin, expected_net_profit,\n\n               buy_exchange_id , buy_account_id , buy_quote_currency , buy_gross_price_orig , buy_gross_price , buy_status,\n               sell_exchange_id, sell_account_id, sell_quote_currency, sell_gross_price_orig, sell_gross_price, sell_status\n\n             ) VALUES (\n               ?,\n               ?, ?,\n               ?, ?,\n\n               ?, ?, ?, ?, ?, ?,\n               ?, ?, ?, ?, ?, ?\n             )", {}, $time, $op->{'base_currency'}, $op->{'base_size'}, $op->{'net_profit_margin'}, $op->{'net_profit'}, $buy_eid, $buy_aid, $buy_quotecur, $buy->{'gross_price_orig'}, $buy->{'gross_price'}, 'creating', $sell_eid, $sell_aid, $sell_quotecur, $sell->{'gross_price_orig'}, $sell->{'gross_price'}, 'creating')) | 
 
| 1000 | 0 | 0 | unless ($res->[0] == 200) | 
 
| 1012 | 0 | 0 | unless ($res2->[0] == 200) | 
 
| 1022 | 0 | 0 | unless ($dbh->do('UPDATE order_pair SET buy_ctime=?, buy_order_id=?, buy_actual_price=?, buy_actual_base_size=?, buy_status=? WHERE id=?', {}, $res2->[2]{'create_time'}, $buy_order_id, $res->[2]{'price'}, $res->[2]{'base_size'}, 'open', $pair_id)) | 
 
| 1037 | 0 | 0 | unless ($res->[0] == 200) | 
 
| 1049 | 0 | 0 | unless ($res2->[0] == 200) | 
 
| 1059 | 0 | 0 | unless ($dbh->do('UPDATE order_pair SET sell_ctime=?, sell_order_id=?, sell_actual_price=?, sell_actual_base_size=?, sell_status=? WHERE id=?', {}, $res2->[2]{'create_time'}, $sell_order_id, $res->[2]{'price'}, $res->[2]{'base_size'}, 'open', $pair_id)) | 
 
| 1066 | 0 | 0 | unless $is_err | 
 
| 1067 | 0 | 0 | if ($do_cancel_buy_order_on_err) | 
 
| 1074 | 0 | 0 | if ($res->[0] != 200) { } | 
 
| 1081 | 0 | 0 | if ($do_cancel_sell_order_on_err) | 
 
| 1088 | 0 | 0 | if ($res->[0] != 200) { } | 
 
| 1110 | 0 | 0 | unless $res->[0] == 200 | 
 
| 1149 | 0 | 0 | unless $res->[0] == 200 | 
 
| 1150 | 0 | 0 | unless $res->[0] == 200 | 
 
| 1157 | 0 | 0 | unless $res->[0] == 200 | 
 
| 1226 | 0 | 0 | unless $args{'min_net_profit_margin'} > 0 | 
 
| 1230 | 0 | 0 | unless $res->[0] == 200 | 
 
| 1231 | 0 | 0 | unless $res->[0] == 200 | 
 
| 1247 | 0 | 0 | if ($res->[0] == 200) { } | 
 
| 1257 | 0 | 0 | if ($args{'-dry_run'}) | 
 
| 1258 | 0 | 0 | if ($args{'rounds'} == 1) { } | 
 
| 1271 | 0 | 0 | if $args{'rounds'} > 0 and $round >= $args{'rounds'} | 
 
| 1306 | 0 | 0 | unless $res->[0] == 200 | 
 
| 1307 | 0 | 0 | unless $res->[0] == 200 | 
 
| 1322 | 0 | 0 | unless grep {$_ eq $basecur;} @{$$r{'_stash'}{'base_currencies'};} | 
 
| 1323 | 0 | 0 | unless grep {$_ eq $quotecur;} @{$$r{'_stash'}{'quote_currencies'};} | 
 
| 1326 | 0 | 0 | if (_is_fiat($quotecur)) { } | 
 
| 1330 | 0 | 0 | unless grep {$_ eq $quotecur;} @{$fiat_for{$exchange};} | 
 
| 1339 | 0 | 0 | unless grep {$_ eq $pair;} @{$pairs_for{$exchange};} | 
 
| 1356 | 0 | 0 | if ($quote_currency0 eq ':fiat') { } | 
 
| 1365 | 0 | 0 | unless grep {$_ eq $pair;} @{$pairs_for{$exchange};} | 
 
| 1370 | 0 | 0 | unless ($res->[0] == 200) | 
 
| 1380 | 0 | 0 | unless ($res->[2]{$type} and @{$res->[2]{$type};}) | 
 
| 1419 | 0 | 0 | unless ($dbh->do('UPDATE order_pair SET buy_status=? WHERE id=?', {}, $status, $id)) | 
 
| 1424 | 0 | 0 | $summary ? : | 
 
| 1439 | 0 | 0 | unless ($dbh->do('UPDATE order_pair SET sell_status=? WHERE id=?', {}, $status, $id)) | 
 
| 1444 | 0 | 0 | $summary ? : | 
 
| 1459 | 0 | 0 | unless ($dbh->do('UPDATE order_pair SET buy_filled_base_size=? WHERE id=?', {}, $size, $id)) | 
 
| 1464 | 0 | 0 | $summary ? : | 
 
| 1479 | 0 | 0 | unless ($dbh->do('UPDATE order_pair SET sell_filled_base_size=? WHERE id=?', {}, $size, $id)) | 
 
| 1484 | 0 | 0 | $summary ? : | 
 
| 1525 | 0 | 0 | if $op->{'buy_status'} =~ /\A(done|cancelled)\z/ | 
 
| 1528 | 0 | 0 | if ($res->[0] == 404) { } | 
 
|  | 0 | 0 | elsif ($res->[0] != 200) { } | 
 
| 1542 | 0 | 0 | if ($status eq 'open' and $time - $op->{'ctime'} > $r->{'args'}{'max_order_age'}) | 
 
| 1545 | 0 | 0 | if ($cancelres->[0] != 200) { } | 
 
| 1555 | 0 | 0 | if $op->{'sell_status'} =~ /\A(done|cancelled)\z/ | 
 
| 1558 | 0 | 0 | if ($res->[0] == 404) { } | 
 
|  | 0 | 0 | elsif ($res->[0] != 200) { } | 
 
| 1572 | 0 | 0 | if ($status eq 'open' and $time - $op->{'ctime'} > $r->{'args'}{'max_order_age'}) | 
 
| 1575 | 0 | 0 | if ($cancelres->[0] != 200) { } | 
 
| 1611 | 0 | 0 | unless $res->[0] == 200 | 
 
| 1646 | 0 | 0 | unless $res->[0] == 200 | 
 
| 1652 | 0 | 0 | if (defined $args{'open'}) | 
 
| 1653 | 0 | 0 | if ($args{'open'}) { } | 
 
| 1659 | 0 | 0 | if ($args{'time_start'}) | 
 
| 1663 | 0 | 0 | if ($args{'time_end'}) | 
 
| 1667 | 0 | 0 | @wheres ? : | 
 
| 1698 | 0 | 0 | defined $op->{'buy_filled_base_size'} ? : | 
 
|  | 0 | 0 | defined $op->{'sell_filled_base_size'} ? : | 
 
| 1741 | 0 | 0 | unless $res->[0] == 200 | 
 
| 1747 | 0 | 0 | if ($args{'time_start'}) | 
 
| 1751 | 0 | 0 | if ($args{'time_end'}) | 
 
| 1755 | 0 | 0 | @wheres ? : | 
 
| 1776 | 0 | 0 | unless defined $op->{'buy_filled_base_size'} and $op->{'buy_filled_base_size'} | 
 
| 1795 | 0 | 0 | $op->{'buy_account'} eq 'default' ? : | 
 
| 1798 | 0 | 0 | if $args{'detail'} | 
 
| 1801 | 0 | 0 | unless defined $op->{'sell_filled_base_size'} and $op->{'sell_filled_base_size'} | 
 
| 1820 | 0 | 0 | $op->{'sell_account'} eq 'default' ? : | 
 
| 1823 | 0 | 0 | if $args{'detail'} | 
 
| 1835 | 0 | 0 | $i++ ? : | 
 
| 1847 | 0 | 0 | $i++ ? : | 
 
| 1850 | 0 | 0 | if exists $per_currency_sums_usd{$cur} | 
 
| 1867 | 0 | 0 | if _is_fiat($cur) | 
 
| 1868 | 0 | 0 | if $per_currency_sums{$cur} == 0 |