Search the Community
Showing results for tags 'book_offers'.
Found 2 results
Minimum search term is 4 characters long. Can't find what you want? Click here for the custom google search instead.
-
I am attempting to use the xrpl.js library to get the order book between two currencies. Using the xrpl websocket transaction example (no tx example in the xrpl.js library reference) https://xrpl.org/book_offers.html XRPL.js book_offers reference. https://js.xrpl.org/interfaces/BookOffersRequest.html When running the following code I get the error response "Uncaught (in promise) RippledError: Missing field 'account'." But according to both references "account" is not a required property. (async () => { await client.connect() ; let tx = { "id": 4, "command": "book_offers", "taker": "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", "taker_gets": { "currency": "XRP" }, "taker_pays": { "currency": "USD", "issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B" }, "limit": 10 } // Autofill the tx to see how flags actually look compared to the interface usage. let autofilledTx = await client.autofill(tx); let result = await client.submitAndWait(autofilledTx).catch(e => console.log(e)) ; console.log(result); client.disconnect(); })();
-
Hi, I run a rippled node. When I run the command 'rippled book_offers BTC/rJHygWcTLVpSXkowott6kzgZU6viQSVYM1 5852534849420000000000000000000000000000/rN3EeRSxh9tLHAUDmL7Chh3vYYoUafAyyM' (this is the XRSHIB currency) I get the following error: {'error': 'invalidParams', 'error_code': 31, 'error_message': "Invalidcurrency/issuer'5852534849420000000000000000000000000000/rN3EeRSxh9tLHAUDmL7Chh3vYYoUafAyyM'", 'rpc': {'method': 'book_offers', 'params': ['BTC/rJHygWcTLVpSXkowott6kzgZU6viQSVYM1', '5852534849420000000000000000000000000000/rN3EeRSxh9tLHAUDmL7Chh3vYYoUafAyyM']}, 'status': 'error'} I also tried to replace it with the currency code "XRSHIB". This does not work either. For other pairs it works perfectly fine. Anyone know what I am doing wrong? When I run it in the websocket-api-tool of xrpl.org it also works fine. Thanks!