Author Topic: How is flip markets functionality dealt with in the RPC API?  (Read 1583 times)

0 Members and 1 Guest are viewing this topic.

Offline monsterer

flipping is just a "different perspective" .. you can flip prices with 1/price and then flip ask<->bid .. that's it .. do not expect to be able to 'short BTSX'!

Is that why the price is always named 'ratio'?

I detect a problem with this idea:

buying BTSX with USD, priced 1.0001 USDs, ratio = 1.0001

flipping the market:

1 / ratio = 0.99990000999900009999000099990000 recurring which isn't going to fit in any amount of precision?

Wont this cause problems all over the place?

Cheers, Paul.
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Valid API market pair should have asset with lower id on the right.
Aha .. learn sth. new every day :)

Offline valzav

  • Sr. Member
  • ****
  • Posts: 294
    • View Profile
Valid API market pair should have asset with lower id on the right.
E.g. USD/BTSX is valid because USD's id is 22 and BTSX is 0, BTSX/USD is not valid (doesn't exist), so "blockchain_market_status BTSX USD" will return an exception.
Market flipping functionality is entirely implemented on a GUI side.

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Hmmm, so do these flipped markets actually exist as separate markets?
No they do not .. why should they

Quote
Right now, for example, there appears to be no market existing for USD/BTSX, which surely must be the default and the BTSX/USD market (which does appear to exist) must be the flipped market?
flipping is just a "different perspective" .. you can flip prices with 1/price and then flip ask<->bid .. that's it .. do not expect to be able to 'short BTSX'!

Offline monsterer

I can confirm that issue .. not sure why it is that way :-\

Hmmm, so do these flipped markets actually exist as separate markets?

Right now, for example, there appears to be no market existing for USD/BTSX, which surely must be the default and the BTSX/USD market (which does appear to exist) must be the flipped market?
My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
I can confirm that issue .. not sure why it is that way :-\

Offline monsterer

I notice there is a flip markets button in the GUI client, but in the RPC API I can't see any reference to it. In addition, calling blockchain_market_status with flipped base and quote just causes an assert for every market I've tried it with.

Any ideas?

Cheers, Paul.

My opinions do not represent those of metaexchange unless explicitly stated.
https://metaexchange.info | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads