Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

1Pcpxw6wJwXABhjCspe3CNf3gqSeh6eien and get_market_details issue #157

Open
droplister opened this issue Feb 18, 2017 · 3 comments
Open

1Pcpxw6wJwXABhjCspe3CNf3gqSeh6eien and get_market_details issue #157

droplister opened this issue Feb 18, 2017 · 3 comments

Comments

@droplister
Copy link
Contributor

droplister commented Feb 18, 2017

For a number of markets, when you call 'get_market_details', there is a 'last_trades' false positive which appears for many different asset pairs, some of them are listed below.

    $this->counterblock->execute('get_market_details', [
        'asset1' => 'WPPEPE',
        'asset2' => 'XCP'
    ]);
    $this->counterblock->execute('get_market_details', [
        'asset1' => 'PEPESUS',
        'asset2' => 'XCP'
    ]);
    $this->counterblock->execute('get_market_details', [
        'asset1' => 'MOONPEPE',
        'asset2' => 'XCP'
    ]);

The trade in question is:

    {
      "countersource": "1Pcpxw6wJwXABhjCspe3CNf3gqSeh6eien",
      "amount": 1000000000,
      "match_id": "514b1ef2d10bf67c2a635f65d99c05a0f18673b98a65f317cfe22206c6125071_df91e13d183e4513254b89f57116bd1e80fcc618cad5f6e87c2a37fc2ae9eb76",
      "total": 1000000000,
      "type": "BUY",
      "source": "1Pcpxw6wJwXABhjCspe3CNf3gqSeh6eien",
      "price": "1.00000000",
      "status": "completed",
      "block_time": 1401221942,
      "block_index": 302903
    }

Which is someone trading XCP for XCP, with themselves.

See: http://blockscan.com/orderInfo/14450


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@droplister
Copy link
Contributor Author

Maybe a solution is to check that trades occur after the most recent issuance block_index of the asset pairs.

@droplister
Copy link
Contributor Author

Another solution is checking that asset1 != asset2 while returning results. This XCP for XCP trade is unusual.

@unsystemizer
Copy link
Contributor

Another solution is checking that asset1 != asset2

@droplister that's what I do in yet-to-be submitted PR for counterparty-cli

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants