How is flip markets functionality dealt with in the RPC API?

Started by monsterer, October 08, 2014, 01:05:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

monsterer

Quote from: xeroc on October 08, 2014, 02:46:18 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.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

xeroc

Quote from: valzav on October 08, 2014, 03:37:46 PM
Valid API market pair should have asset with lower id on the right.
Aha .. learn sth. new every day :)

valzav

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.

xeroc

Quote from: monsterer on October 08, 2014, 02:06:49 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'!

monsterer

Quote from: xeroc on October 08, 2014, 01:34:03 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.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads

xeroc

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

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.
[url="https://metaexchange.info"]https://metaexchange.info[/url] | Bitcoin<->Altcoin exchange | Instant | Safe | Low spreads