Skip to main content
16 votes
Accepted

Offers have an amount and a price. Why not just two amounts?

Both representation have benefits. From what I remember, when we picked the amount + price, we considered the following properties compared to just having amount for sale & amount to buy: it ...
MonsieurNicolas's user avatar
13 votes
Accepted

Is there a way to unset home domain and inflation destination options?

No, you can't. If we look at the XDR definition of setOptionsOp, we can see all the fields are optional, if a field is not None then the corresponding value will be set. So what can you do? Home ...
Francesco's user avatar
  • 1,386
9 votes
Accepted

Does the ratio of number of transaction of number of operation mean something?

Each transaction can contain up to 100 operations (this number may be changed in the future). For the most basic operations (peer-to-peer funds transfer, orders on the Stellar exchange) it's almost ...
Orbit Lens's user avatar
  • 6,886
6 votes
Accepted

Why does my fully synced Horizon/Stellar Core node return different data from horizon.stellar.org?

You are using a different version of Horizon server. These fields were added in v0.12.0 which is now a pre-release but will be released later this week. Docker image latest tag will be updated once ...
Bartek Nowotarski's user avatar
6 votes

If one operation is wrong then the whole transaction is wrong

This is as per design. Operations are executed in order as one ACID transaction, meaning that either all operations are applied or none are. If any operation fails, the whole transaction fails. ...
Synesso's user avatar
  • 3,367
4 votes
Accepted

How much extra balance is needed per DataEntry

Each DataEntry increases the required minimum balance by the size of the base reserve (currently 0.5 XLM). The minimum balance for a basic account is 2 × base reserve. Each additional entry costs the ...
Orbit Lens's user avatar
  • 6,886
4 votes
Accepted

How to implement OTC trading of Stellar assets?

Your answer is correct, except that the thing you say is impossible is actually easy. A Stellar transaction can contain up to 100 operations, and each operation can have its own source account. So ...
user3188445's user avatar
  • 1,221
3 votes

How to implement OTC trading of Stellar assets?

If you have both asset (USD and EUR) on Stellar, there's no problem at all. const {Server, Network, Keypair, TransactionBuilder, Operation, Asset} = require('stellar-sdk') Network.useTestNetwork() ...
Orbit Lens's user avatar
  • 6,886
3 votes
Accepted

Relation between Operation, Payemnt and Effect

Payment is actually a result of the successful execution of a payment operation. A successful payment operation will yield two effects (Account Credited and Account Debited). If a transaction fails ...
Orbit Lens's user avatar
  • 6,886
3 votes
Accepted

How can I build a transaction with a dynamic list of mutators or operations using the Go SDK?

You could use the spread operator on an object of type []build.TransactionMutator that is passed into the build.Transaction method (on github.com/stellar/go/build). Here's a code sample: import ( ...
nikhils's user avatar
  • 1,080
3 votes

Stellar Bridge not POSTing callbacks with mac_key configured

I misunderstood the documentation. The mac_key should be any valid Stellar Private Key. After changing it, I'm getting the HMAC-SHA256 encoded string.
Ace Subido's user avatar
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
3 votes
Accepted

Threshold - Transaction processing meaning?

Transaction processing is not refering to a group of operations and also is not a operation itself. It is kind of creating the transaction itself. Let me explain it with an example: Account A (...
sui's user avatar
  • 2,534
3 votes
Accepted

Is Operation Id unique?

OperationId is unique within the network, so you need not to pair it with TransactionId. (TransactionId is also known as TransactionHash.) You may consider OperationId a better choice for primary key,...
cesarm's user avatar
  • 1,527
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

Transactions vs Operations

Stellar Transactions satisfy the ACID property: either all operations in the transaction are applied or none is. For example, you can have a transaction with two operations: in one Alice sends Bob ...
Francesco's user avatar
  • 1,386
2 votes
Accepted

Payment refund processing

I read the question as Is there a method where I can provide a txn id and automatically refund the payment I received The answer is no. You will have to issue a new payment to effect any refunds. ...
Synesso's user avatar
  • 3,367
2 votes
Accepted

Trustee vs trustor in allow trust operation

I'm not sure which SDK you are using but the trustor should be the account setting the trust line and in the python SDK the trustee is specified in the asset definition which is Asset(symbol, ...
AGitzes's user avatar
  • 440
2 votes

Monitor transactions of non-native asset

You could use the all effects endpoint in streaming mode, and programmatically filter trading and trustline effects that involve the target asset.
Synesso's user avatar
  • 3,367
2 votes

Stellar Ledger / Hash uniqueness

I've seen many transactions with the same hash. If transaction has the same hash as the other one it means they are identical. You can have two transactions that are doing the same thing (ex. ...
Bartek Nowotarski's user avatar
2 votes
Accepted

Why are some operations missing when I query operations by account?

Stellar expert is blocked by my adblocker, so I used Horizon to check the envelope XDR of your transaction. It decodes to these two operations. The operations do not specify a source account, so they ...
Synesso's user avatar
  • 3,367
2 votes

Stellar Java SDK: Retrieve Account Data

Yes you can use a CallBuilder to retrieve the account object: const server = new StellarSdk.Server('https://horizon.stellar.org') const callBuilder = server.accounts.accountId(${myPublicKey}) const ...
Mister Ticot's user avatar
2 votes

Retrieving operations for a transaction unexpectedly slow?

If you need all operations per ledger you can use the Operations for Ledger endpoint. It won't necessarily be more performant per request but should reduce the number of requests you make.
Tomer Weller's user avatar
2 votes

Retrieving operations for a transaction unexpectedly slow?

My best guess is that your PostgreSQL db works inefficiently with indexes on a large collection. Usually it means that your server has not enough RAM and is unable to keep indexes and cache in memory. ...
Orbit Lens's user avatar
  • 6,886
2 votes

Expected behavior of omitting path attribute in Path Payment

If you don't set path param then the path payment behavior is convert sendAsset to destAsset with default order book (between two assets). Unfortunately you have to "search" for path first and then "...
dolcalmi's user avatar
  • 143
2 votes

(Dup for different SDK) How can I build a transaction with a dynamic list of mutators or operations using the JS SDK?

If I understand you correctly, it should look like this: const horizon = new StellarSdk.Server('https://horizon-testnet.stellar.org/') /** * @param sourceAccountSecret {String} - account secret key * ...
Orbit Lens's user avatar
  • 6,886
2 votes
Accepted

Transaction, Operations, and Payments

The memo can be seen on the transaction. e.g. "memo_type": "text", "memo": "chp_290", You can then decode the envelope_xdr value to drill down on the details of the operations within the ...
Synesso's user avatar
  • 3,367
2 votes
Accepted

How to get Transaction amount from API?

In this particular case you should use server.payments().forAccount(destination2) (if you want to track only payments) or server.operations().forAccount(destination2) (for all operation types) because ...
Orbit Lens's user avatar
  • 6,886
2 votes
Accepted

Get the operation record of a payment

That is the object returned from a successful submitTransaction call, it is not the transaction record object that you get from calling server.transactions().transaction(hash). If you would like to ...
tracy's user avatar
  • 212
2 votes

Get the operation record of a payment

According to the Stellar docs and source code, what you get back is just a plain object, straight from Horizon. https://stellar.github.io/js-stellar-sdk/Server.html#submitTransaction https://github....
Johan Stén's user avatar
  • 1,947

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