tectonic has quit []
de_henne_ has joined #stellar-dev
de_henne has quit [Ping timeout: 246 seconds]
de_henne has joined #stellar-dev
de_henne_ has quit [Ping timeout: 260 seconds]
<stellar-slack> <sacarlson> first problem I've hit in my project above is that the memo data is not directly in the horizon event stream. I'll have to do some trick to pull the memo data from the tx link that is contained within it. I think I've heard someone complain about this before, now I know why.
<stellar-slack> <dzham> Is there any reason why a pathpayment wouldn't go through when all the inputs seem legit? `XLM -> AAA -> XLM`, and `XLM -> USD -> CNY -> XLM`
tectonic has joined #stellar-dev
<stellar-slack> <dzham> Oh, is it because it starts/ends w/ the same currency? I’m getting `op_over_source_max`no matter what sendMax I use
TheSeven has quit [Ping timeout: 240 seconds]
TheSeven has joined #stellar-dev
tectonic has quit []
tectonic has joined #stellar-dev
stellar-slack has quit [Remote host closed the connection]
stellar-slack has joined #stellar-dev
<stellar-slack> <dzham> BTW, Am I the only one who thinks everything related to offers and the order book is ass backwards?
<stellar-slack> <dzham> I’ve done stock trading for ten years, and this just doesn’t make any sense at all to me
<stellar-slack> <sacarlson> dzham I have to admit it seemed backwards to me also. I just created functions that would reverse base
tectonic has quit []
<stellar-slack> <dzham> yeah, it looks like reversing order of selling, buying fixes most of it.
<stellar-slack> <dzham> amounts are still not adjusted, but prices are
<stellar-slack> <sacarlson> not sure I want to look at that now as I had alot of trouble making the simple function that would calculate the preset market price of one block of assets to another. it must have taken me two days that should have taken 1 hour
<stellar-slack> <sacarlson> I'm still not totally sure I have it correct
<stellar-slack> <sacarlson> I'm just hopeing everyone just bases there trade on lumens so I don't have to look any deeper into path
pixelb has joined #stellar-dev
pixelb has quit [Ping timeout: 250 seconds]
pixelb has joined #stellar-dev
pixelb has quit [Ping timeout: 272 seconds]
pixelb has joined #stellar-dev
pixelb has quit [Ping timeout: 260 seconds]
<stellar-slack> <jed> Dzham you think price should be quoted the other way? Right now it is "I'm buying X. It will cost me 'price' Y."
<stellar-slack> <dzham> It's not so much the orders as the orderbooks. Let's say we have USD and AAPL. I want to buy AAPL, so I'm selling USD.
<stellar-slack> <dzham> The order book for (sell USD, buy AAPL) has USD as base asset, and AAPL as counter asset.
<stellar-slack> <dzham> This means that the prices quoted are in terms of selling one unit of USD, which is the total opposite of what you'd expect — I want to know how much each unit of AAPL is in USD, not the other way around.
<stellar-slack> <dzham> To get the expected order book I have to request (sell AAPL, buy USD).
<stellar-slack> <sacarlson> yes I think I might agree. we are more used to seeing: 35 baht for 1 dollar: or 100 usd to buy 1 baral of oil: or it will cost me 10X to buy 1Y That seems to be the way we are used to seeing it in markets.
<stellar-slack> <sacarlson> but I think we can create a reverse function as what I hope I did correctly. that is just the function {amount for sale = 1/amount, price = 1/price}. I think the buy and sell has to also be reversed but I forget
<stellar-slack> <dzham> The problem here is that the market can be either way, so there’s no canonical base asset.. )Commodities are always prices in USD. US Stocks in USD.)
<stellar-slack> <sacarlson> yes I think that's the confuseing part
<stellar-slack> <dzham> @sacarlson: yeah, you can just flip the order to switch the currency pair
<stellar-slack> <sacarlson> not sure what should be the base
<stellar-slack> <sacarlson> I think it was easy on the price but I was getting the amount reversed or something
<stellar-slack> <dzham> Either way.. the `amount`-field in `bids`also needs to be corrected,not just the `price`
<stellar-slack> <sacarlson> in any case we should be able to make a function or an envirnment that works the same as we are used to seeing
<stellar-slack> <sacarlson> maybe you should take a look at my order tools to see if I did it correctly http://sacarlson.github.io/order_tools.html
<stellar-slack> <dzham> I’m not even sure what *is* correct, apart from amount being wrong..
<stellar-slack> <sacarlson> my get_market_price should get the amount correct
<stellar-slack> <dzham> order books for stock are the way they are, because you don’t have fractional shares, so no point in knowing AAPL is 0.00929 shares per USD
<stellar-slack> <sacarlson> ya we should just add a button that swaps base so you see it from both sides if needed
<stellar-slack> <sacarlson> oh and dzham if you need any AAA or BBB or CCC I can issue you some to help you test with the test market that we created
pixelb has joined #stellar-dev
<stellar-slack> <dzham> PaymentResultCodePaymentSrcNoTrust?
<stellar-slack> <dzham> It’s not enough that the destination has trust for the asset i want to send using a path payment, the source needs to trust it too?
<stellar-slack> <dzham> Nvm, fixed *that*
<stellar-slack> <dzham> But still having problems with sendMax
pixelb has quit [Ping timeout: 245 seconds]
pixelb has joined #stellar-dev
pixelb has quit [Ping timeout: 260 seconds]
tectonic has joined #stellar-dev
tectonic has quit []
pixelbeat has joined #stellar-dev
pixelbeat has quit [Remote host closed the connection]
pixelbeat has joined #stellar-dev
de_henne_ has joined #stellar-dev
de_henne has quit [Quit: No Ping reply in 180 seconds.]
tectonic has joined #stellar-dev
pixelbeat has quit [Ping timeout: 260 seconds]