Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: How is flip markets functionality dealt with in the RPC API?  (Read 210 times)

0 Members and 1 Guest are viewing this topic.

Offline monsterer

How is flip markets functionality dealt with in the RPC API?
« on: October 08, 2014, 01:05:16 PM »

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

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12071
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BTS: xeroc
  • GitHub: xeroc
Re: How is flip markets functionality dealt with in the RPC API?
« Reply #1 on: October 08, 2014, 01:34:03 PM »
I can confirm that issue .. not sure why it is that way :-\
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline monsterer

Re: How is flip markets functionality dealt with in the RPC API?
« Reply #2 on: October 08, 2014, 02:06:49 PM »
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: 12071
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BTS: xeroc
  • GitHub: xeroc
Re: How is flip markets functionality dealt with in the RPC API?
« Reply #3 on: October 08, 2014, 02:46:18 PM »
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'!
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline valzav

  • Sr. Member
  • ****
  • Posts: 294
    • View Profile
Re: How is flip markets functionality dealt with in the RPC API?
« Reply #4 on: October 08, 2014, 03:37:46 PM »
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: 12071
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BTS: xeroc
  • GitHub: xeroc
Re: How is flip markets functionality dealt with in the RPC API?
« Reply #5 on: October 08, 2014, 03:57:39 PM »
Valid API market pair should have asset with lower id on the right.
Aha .. learn sth. new every day :)
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline monsterer

Re: How is flip markets functionality dealt with in the RPC API?
« Reply #6 on: October 08, 2014, 05:32:34 PM »
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

 

Google+