Understanding Fill or Kill

Technical questions about the Ripple API, the protocol, etc.

Understanding Fill or Kill

Postby ramirocamino » Sun Jan 29, 2017 5:07 pm

Hello again.

I have more questions regarding the interpretation of transaction results.

The documentation of tfFillOrKill flag for offer create transactions says:
Treat the offer as a Fill or Kill order. Only try to match existing offers in the ledger, and only do so if the entire TakerPays quantity can be obtained.

From that I understand that the offer must be filled, that means, totally executed or nothing.
It cannot be partially executed, and no offer node will be created.

But in the transaction F33125DF84FAAD6316A7E749786B8CE3506CA3EE206E6E95C7E471EB127EC950 I see the following:
  • The transaction is an offer create with the flag tfFillOrKill on from account A, asking 42558698700 drops for 300 EUR from the issuer B.
  • There was just one offer modified from account C:
    • That offer was asking 75 EUR from issuer B for 10154225596 drops.
    • After the transaction, it ended asking 72.5625911950637 EUR from issuer B for 9824225611 drops.
    • So that offer was partially executed against the submitted order.
    • The partially executed value was 2.43740880494 EUR from issuer B for 329999985 drops.
  • And just to verify:
    • The balance of account A changed from 350000000 to 20000000, which is 330000000 = 329999985 (offer) + 15 (fee).
    • And A has now 2.437408804936305 EUR from issuer B.
  • Same check is consistent for account C.
  • The rest of the submitted order was not saved to the book.

Why a fill or kill order was partially executed? Maybe I don't understand the concept.

Thanks again.
Posts: 2
Joined: Wed Jan 25, 2017 10:25 am

Re: Understanding Fill or Kill

Postby JoelKatz » Sun Apr 02, 2017 9:50 pm

The offer was fully executed. The person who placed the transaction was left with precisely 20 XRP, the account minimum reserve. They sold all their tradable XRP.

You don't have to get the precise amount of funds in your account right when you place an offer. You can specify a larger amount than you have, and the offer is considered fully executed when you have no more funds.
User avatar
Posts: 1859
Joined: Sun Dec 23, 2012 3:45 pm
Location: Oakland, CA

Return to Developers

Who is online

Users browsing this forum: No registered users and 8 guests