Hot answers tagged

4 votes
Accepted

What happens to offers that are completely fulfilled and are no longer part of orderbook?

Yes, assuming that the offers are completely fulfilled (i.e. not partially fulfilled), they're removed from the account and reserve lowered.
0xfe's user avatar
  • 86
3 votes
Accepted

How to get the accurate amount of bids?

I think the confusion comes from the fact that Stellar offers amount is always quoted in the amount of the selling asset. When you are selling 10000 XLM for USD the ask offers shows 10000 as expected,...
Francesco's user avatar
  • 1,386
3 votes

op_cross_self - while making a new offer

It is the MANAGE_OFFER_CROSS_SELF error described in the guides and it prevents you from unintentionally fullfilling your own previous offer: The account has opposite offer of equal or lesser price ...
sui's user avatar
  • 2,534
3 votes
Accepted

Can anyone explain what passive offers achieve?

The link provides purpose in a nutshell: Passive offers allow market makers to have zero spread. If you want to trade EUR for USD at 1:1 price and USD for EUR also at 1:1, you can create two ...
Akuukis's user avatar
  • 416
2 votes
Accepted

How to know if an outstanding offer was a product of a buy or a sell offer?

The offer on the orderbook is always a sell offer regardless whether it was created as a result of ManageBuyOffer, ManageSellOffer, or ManagePassiveSellOffer operation. There is no easy way to find ...
Orbit Lens's user avatar
  • 6,886
2 votes
Accepted

Various errors in submitting offers

You have to provide buyAmount instead of amount in manageBuyOffer operations. The 400 error on the testnet may be cause by different reasons: no trustline, not enough funds, invalid signers, etc. ...
Orbit Lens's user avatar
  • 6,886
2 votes
Accepted

"Ae.sourceAccount is not a function" when deleting multiple offer operations in single transaction

It's difficult to test it out without a living test version of the issue but checking at the code I see this: // 2. create the transaction - ready to be built let tx = this.transactionBuilder([...
earrietadev's user avatar
1 vote

When multiple individuals place identically priced offers, how does Stellar decide who will make the sale?

In the Stellar network, when multiple individuals place identically priced offers, the network prioritizes the offer that was placed first. This is because the offers are ordered in a "book" ...
configbug's user avatar
  • 111
1 vote
Accepted

Use case: how to accept only one payment for an item

If each product you are selling is unique (say, art objects), all of them can be treated as non-fungible tokens. Take a look at my write-up on different Stellar-based NFT approaches here. SDF has no ...
Orbit Lens's user avatar
  • 6,886
1 vote

Use case: how to accept only one payment for an item

Or just post the product as an offer, given you've created an asset for it. Whoever takes the offer takes the product. If one wants to let the buyers bid, let them submit offers and the seller will ...
J R's user avatar
  • 157
1 vote

Use case: how to accept only one payment for an item

Don't know a good solution without drawbacks but here are some more ideas: Publishing the sequence number alone wouldn't be sufficient since the seller would also have to sign the transaction if they ...
sui's user avatar
  • 2,534
1 vote
Accepted

How to submit a buy offer that gets incorporated to a bid entry with the same price

I think the underlying problem is that the number 100/9 has infinite decimal digits and cannot be represented as string. The price you see, 11.1111111 is a truncation of 11.11111111.... = 100/9. When ...
Francesco's user avatar
  • 1,386
1 vote
Accepted

Which operations are required to accept an offer?

According to the Stellar developers' guide, a trade is effected when a second offer matching the first is posted.
Synesso's user avatar
  • 3,367
1 vote
Accepted

Python: Retrieve Offer_id from a manage offer operation?

It's contained in the horizon response which can be decoded like this: response = builder.submit() result_bytes = base64.b64decode(response['result_xdr']) tx_result = Xdr.StellarXDRUnpacker(...
sui's user avatar
  • 2,534
1 vote
Accepted

How to derive a number of open Offers for a transaction set that hasn't been fully submitted to the network yet

If you manage those "in-flight" transactions on your side, it won't be a problem. Call horizon.loadAccount('GD...QZ'). Check the subentry_count field. It shows the total number of trustlines/offers/...
Orbit Lens's user avatar
  • 6,886
1 vote
Accepted

Fill or Kill (FOK) offers on Stellar?

It is not something that is currently supported. If you want to suggest adding it to the protocol you can do that by creating a Pull Request here
nikhils's user avatar
  • 1,080
1 vote

Order doesn't match in Stellar

I think it is a feature with NodeJS. They don't go deep to reveal every detail down an object. Note the difference at console.log: offerResult.records VS offerResult server.offers('accounts', ...
cesarm's user avatar
  • 1,527
1 vote

Making offer gives error: TypeError: opts.selling.toXDRObject is not a function

I found the answer. I was not representing the Assets that I need to sell properly. Replacing MCoin with new StellarSdk.Asset('MCoin', 'GCKRPJXPGNHBPMRCXEX4MDH532BN5RLUJJOMVACA3CB7E2LWSTKTB5U2') ...
Prashant Prabhakar Singh's user avatar
1 vote

Best way to calculate exact offer price?

If you pass a string as a price in Operation.manageOffer JS SDK will use continued fraction approximation algorithm. I've just checked it and it approximates 41.5 to {n: 83, d: 2} which is fine. Not ...
Bartek Nowotarski's user avatar
1 vote

Bidding and asking price conversion on client or server?

The prices submitted to the blockchain must be in the format specified by the Stellar docs to actually reflect your intention. As for representing it on your client (or storing it on your server), ...
nikhils's user avatar
  • 1,080
1 vote

Bidding and asking price conversion on client or server?

Both would be fine. Caution: keep your price with at least 10 decimal places, because the system treats the bidding/asking price as fractions. Each price is stored as 2 integer variables: numerator ...
cesarm's user avatar
  • 1,527
1 vote
Accepted

How do folks keep offers in sync with market prices?

As far as I know, there is no other way at the moment. If you would do 1 operation with base fee per second (which is most probably huge overkill) for one day it would cost you less than 1XLM. Even ...
Qumeric's user avatar
  • 146

Only top scored, non community-wiki answers of a minimum length are eligible