3

Is there a way to know from the following response:

{
  "records": [
    {
      "_links": {
        "self": {
          "href": "https://horizon.stellar.org/offers/115426014"
        },
        "offer_maker": {
          "href": "https://horizon.stellar.org/accounts/GCOZPRHTQFTBEJSCCYX3T6JAUITJJPSXAABXUGFFTJY4HC4O75YZ4Y22"
        }
      },
      "id": 115426014,
      "paging_token": "115426014",
      "seller": "GCOZPRHTQFTBEJSCCYX3T6JAUITJJPSXAABXUGFFTJY4HC4O75YZ4Y22",
      "selling": {
        "asset_type": "native"
      },
      "buying": {
        "asset_type": "credit_alphanum4",
        "asset_code": "USD",
        "asset_issuer": "GDUKMGUGDZQK6YHYA5Z6AY2G4XDSZPSZ3SW5UN3ARVMO6QSRDWP5YLEX"
      },
      "amount": "0.1198350",
      "price_r": {
        "n": 10000000,
        "d": 119834963
      },
      "price": "0.0834481",
      "last_modified_ledger": 25891871,
      "last_modified_time": "2019-09-18T23:55:05Z"
    }
  ]
}
2

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 out which type of operation resulted in this particular offer creation.

You can analyze all seller account operations where ledger<=last_modified_ledger though if you really need this information, but that makes sense only if the offer was recently created, otherwise you will end up digging through thousands of operations.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.