Hot answers tagged

9 votes
Accepted

Is there a way to get a list of all asset pairs being traded on the distributed exchange, and the order book for each?

An asset on the stellar network is defined by its asset code (max 12 characters long code) and issuer. For example CNY and Ripplefox (GAREELUB43IRHWEASCFBLKHURCGMHE5IF6XSE7EXDLACYHGRHM43RFOX). If you ...
user avatar
  • 1,376
4 votes

Setting Expiration Time for Offers on Stellar?

Stellar does not support expiring offers. Time locks only specify the time window when a Stellar transaction is eligible to be submitted to the network but not it's validity. Therefore, sending a ...
user avatar
  • 1,070
4 votes

Is there a way to get a list of all asset pairs being traded on the distributed exchange, and the order book for each?

Agree with the other answer - looking into internal database is the easiest and most comprehensive way. But if you don't run your own node, then you could just query horizon: https://horizon.stellar....
user avatar
  • 938
4 votes
Accepted

Order of trade executions inside the last closed ledger

Taking a look at this with the assumption that the attacker controls some validators (as it makes it easier to exploit). So the way the network deals with transaction ordering is by making it as hard ...
user avatar
3 votes

DEX and settlement

When a user creates an order, the corresponding amount of the tokens to sell is automatically locked on her balance (the outstanding amount on orders is listed as selling_liabilities on the account ...
user avatar
  • 6,846
3 votes

ManageOfferOperation - Not taking the price I set

The price you set with manageOffer is the maximum price when buying and the minimum price when selling. So it will match the best available price in the orderbook. If you make an offer that has an ...
user avatar
3 votes
Accepted

How should I retrieve a BTC asset from NaoBTC?

That's right, you need to put it as <MY_WALLET_ADDRESS>*naobtc.com for amount there is a separate field in every wallet. But for amount like yours I don't recommend you doing this. Withdrawal ...
user avatar
  • 938
2 votes

Is there a way to get a list of all asset pairs being traded on the distributed exchange, and the order book for each?

StellarTerm maintains and uses a list of pairs in the stellarterm directory here.
user avatar
2 votes

Order of trade executions inside the last closed ledger

I asked the same question earlier. Jed mentioned that trades are applied in random (actually, pseudo-random) order, and transaction fees do not affect the order in which transactions are applied ...
user avatar
  • 6,846
2 votes

Can you view transactions that are queued up for the next ledger?

I suppose this is unlikely. At least there are no APIs to do so directly. The functionality that you mentioned could cause front-running, which is surely not a good idea for any financial-oriented ...
user avatar
  • 1,517
2 votes
Accepted

Do I need to create and back my own USD token, or are there more distributed approaches to bring USD into my Stellar based app?

One alternative could be to integrate with an existing USD anchor (e.g. AnchorUSD). Ecosystem standards like SEP-0024: Interactive Anchor/Wallet Asset Transfer Server (alongside SEP-0010 & SEP-...
user avatar
  • 498
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 ...
user avatar
  • 6,846
2 votes

How do I test out the DEX in a standalone network?

There is actually no difference to the public network. Create two assets Create an intermediary account that holds both of them Create an offer from that account with manage offer Make a path ...
user avatar
  • 2,514
1 vote

Which Horizon endpoint GETs current token prices on the DEX?

The current SDEX price can be retrieved from the order_book endpoint. You can also check the liquidity_pools/POOLID/trades endpoint to see the last price from the liquidity pool. Finally, to get the ...
user avatar
  • 101
1 vote
Accepted

How does Kelp's balanced strategy react to the account receiving funds?

When using the balanced strategy, if a malicious attacker sends some funds to your bot then the bot will set (what might be considered) an incorrect price for the tokens, since it will include these ...
user avatar
  • 1,070
1 vote

Bifrost for altcoins?

I'm operating anchor apay.io and half a year ago I was looking at Bifrost if it can be used for my anchor. Potentially yes, but: it requires some code changes you would still need to implement ...
user avatar
  • 938
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
user avatar
  • 1,070
1 vote

Is pathfinding implemented somewhere yet? Is it complicated to do? Why isn’t it universal?

You're confusing the different layers here. Path finding is implemented, and has been, since day one. It is only used for (path) payments, however. When you make a buy/sell order, it is applied to a ...
user avatar
  • 1,947
1 vote

Is pathfinding implemented somewhere yet? Is it complicated to do? Why isn’t it universal?

Based on the orderbooks for different asset pairs you could use some graph algorithm like Dijkstra for the best path. Pathfinding is implemented in Horizon. You can find the code on github: https://...
user avatar
  • 1,300
1 vote

Is there a way to get a list of all asset pairs being traded on the distributed exchange, and the order book for each?

There's a pretty good list here on StellarExpert.
user avatar
  • 133

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