Send EUR to XRP (the other way around) to another account with sell offer)
{
"TransactionType": "TrustSet",
"Account": "rpePPeRpC89vpCY3CDzhzMCs78nPoNnAKm",
"Fee": "12",
"Flags": 131072,
"LimitAmount": {
"currency": "USD",
"issuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq",
"value": "100000000"
}
}
-- BEST OFFER, ImmediateOrCancel, Sell (entire get amount)
655360:
- 131072 = ImmideateOrCancel
- 524288 = Sell (IMPORTANT! BEST OFFER instead of fixed XRP amount)
{
"TransactionType": "OfferCreate",
"Account": "rpePPeRpC89vpCY3CDzhzMCs78nPoNnAKm",
"Fee": "12",
"Flags": 655360,
"TakerGets": "1000000",
"TakerPays": {
"currency": "USD",
"issuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq",
"value": "0.50" // a bit under the market rate
}
}
- 131072 = ImmideateOrCancel - Fixed TakerPays (USD) amount (= default)
"I want to pay 1 USD for voor 10 XRP", the result is the best offer available, 1 USD voor (example) 1.88 XRP
https://bithomp.com/explorer/B86A0E8314ADC356BDC29E97D4A4C6464BE829E20F2F6896EF1C56B54FD3E3EC
{
"TransactionType": "OfferCreate",
"Account": "rpePPeRpC89vpCY3CDzhzMCs78nPoNnAKm",
"Fee": "12",
"Flags": 131072,
"TakerGets": "10000000",
"TakerPays": {
"currency": "USD",
"issuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq",
"value": "1"
}
}
(Check DeliveredAmount)
{
"TransactionType": "Payment",
"Account": "rpePPeRpC89vpCY3CDzhzMCs78nPoNnAKm",
"Destination": "rPEpPeRd6bp6tHxSVyNGVNiSaZK2KSsc68",
"Fee": "12",
"Flags": 131072,
"Amount": "1000000",
"SendMax": {
"currency": "USD",
"issuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq",
"value": "0.4"
}
}
(check DeliveredAmount)
The XRP amount is unrealistically high, but the PartialPayment flag (131072) and the sendmin + sendmax will match the best available amount of XRP to the USD amount.
(NL: Het XRP bedrag is veel te hoog en onrealistisch, maar met de PartialPayment flag 131072 en sendMin+sendMax fixed USD wordt de beste hoeveelheid XRP er bij gezocht.)
{
"TransactionType": "Payment",
"Account": "rpePPeRpC89vpCY3CDzhzMCs78nPoNnAKm",
"Destination": "rPEpPeRd6bp6tHxSVyNGVNiSaZK2KSsc68",
"Fee": "12",
"Flags": 131072,
"Amount": "100000000",
"SendMax": {
"currency": "USD",
"issuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq",
"value": "1"
}
}
Get all available offers for a certain currency on a certain trust line (XRPL order book)
{
"id": 4,
"command": "book_offers",
"taker_pays": {
"currency": "XRP"
},
"taker_gets": {
"currency": "USD",
"issuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq"
}
}