I am trying to create a Stellar Standalone network using my own network passphrase. I m able to set up stellar-core and horizon in my private network and it is working fine, I m able to get the root account balance through my nodejs code. But I m getting an tx_bad_seq when I m trying to create and fund an account. Here is my code

let kp = Stellar.Keypair.random();
let destinationId = kp.publicKey();
let sourceKeys = Stellar.Keypair.fromSecret("SDJ5AQWLIAYT22TCYSKOQALI3SNUMPAR63SEL73ASALDP6PYDN54FARM");

    var sourceAccount = await server.loadAccount(sourceId);
    var transaction = new Stellar.TransactionBuilder(sourceAccount)
                                destination: destinationId,
                                startingBalance: "100",
                                asset: Stellar.Asset.native()
                            .addMemo(Stellar.Memo.text('Creating account'))
    var result = await server.submitTransaction(transaction);


    res.send({'Msg': 'error'});
res.send({'Msg': 'Success'});

Here is the error what I am getting

Error: Request failed with status code 400
config:Object {adapter: , transformRequest: Object, transformResponse: Object, …}
message:"Request failed with status code 400"
request:ClientRequest {domain: null, _events: Object, _eventsCount: 6, …}
response:Object {status: 400, statusText: "Bad Request", headers: Object, …}
config:Object {adapter: , transformRequest: Object, transformResponse: Object, …}
data:Object {type: "https://stellar.org/horizon-errors/transaction_fai…", title: "Transaction Failed", status: 400, …}
detail:"The transaction failed when submitted to the stellar network. The `extras.result_codes` field on this response contains further details.  Descriptions of each code can be found at: https://www.stellar.org/developers/learn/concepts/list-of-operations.html"
extras:Object {envelope_xdr: "AAAAADI5YN09kKPH/l0f2RoBfi+BFoiPO51ZjjImbH0oWMXkAA…", result_codes: Object, result_xdr: "AAAAAAAAAGT////7AAAAAA=="}
result_codes:Object {transaction: "tx_bad_seq"}
__proto__:Object {constructor: , __defineGetter__: , __defineSetter__: , …}
__proto__:Object {constructor: , __defineGetter__: , __defineSetter__: , …}
title:"Transaction Failed"
__proto__:Object {constructor: , __defineGetter__: , __defineSetter__: , …}
headers:Object {content-type: "application/problem+json; charset=utf-8", x-ratelimit-limit: "3600", x-ratelimit-remaining: "3596", …}
request:ClientRequest {domain: null, _events: Object, _eventsCount: 6, …}
statusText:"Bad Request"
__proto__:Object {constructor: , __defineGetter__: , __defineSetter__: , …}
stack:"Error: Request failed with status code 400\n    at createError (/home/vijin/workspace/stellar/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/home/vijin/workspace/stellar/node_modules/axios/lib/core/settle.js:18:12)\n    at IncomingMessage.handleStreamEnd (/home/vijin/workspace/stellar/node_modules/axios/lib/adapters/http.js:201:11)\n    at emitNone (events.js:111:20)\n    at IncomingMessage.emit (events.js:208:7)\n    at endReadableNT (_stream_readable.js:1064:12)\n    at _combinedTickCallback (internal/process/next_tick.js:139:11)\n    at process._tickCallback (internal/process/next_tick.js:181:9)"
__proto__:Object {constructor: , name: "Error", message: "", …}

Please let me know why I am facing this issue. I followed this link to set up stellar-core and horizon servers


UPDATE: Here is the repley from http://$HORIZON

  "_links": {
    "account": {
      "href": "http://localhost:8000/accounts/{account_id}",
      "templated": true
    "account_transactions": {
      "href": "http://localhost:8000/accounts/{account_id}/transactions{?cursor,limit,order}",
      "templated": true
    "friendbot": {
      "href": "http://localhost:8000/friendbot{?addr}",
      "templated": true
    "metrics": {
      "href": "http://localhost:8000/metrics"
    "order_book": {
      "href": "http://localhost:8000/order_book{?selling_asset_type,selling_asset_code,selling_issuer,buying_asset_type,buying_asset_code,buying_issuer}",
      "templated": true
    "self": {
      "href": "http://localhost:8000/"
    "transaction": {
      "href": "http://localhost:8000/transactions/{hash}",
      "templated": true
    "transactions": {
      "href": "http://localhost:8000/transactions{?cursor,limit,order}",
      "templated": true
  "horizon_version": "v0.11.1-dirty",
  "core_version": "v10.2.0",
  "history_latest_ledger": 3138,
  "history_elder_ledger": 1,
  "core_latest_ledger": 1,
  "core_elder_ledger": 0,
  "network_passphrase": "Standalone Pramati Network ; Oct 2018",
  "protocol_version": 10

There is a huge difference from core_latest_leger to history_latest_ledger and I can see a lot of records in history_ledgers table in stellar_horizon database. I really wonder why this is happening because this is a newly installed setup. Please let me know why this is happening in this way. I am using Standalone Pramati Network ; Oct 2018 as my NETWORK_PASSPHRASE

  • Try fetching status from your local Horizon instance using / API endpoint (here is what SDF-maintained Horizon shows: horizon.stellar.org). history_latest_ledger should be equal to core_latest_ledger (±2 ledgers).
    – Orbit Lens
    Commented Mar 6, 2019 at 13:40
  • @OrbitLens: I have updated the question and included the result from http://$HORIZON. Your comment really makes sense, but please let me know why it is happening
    – Vijin
    Commented Mar 7, 2019 at 4:09

1 Answer 1


You are running an older version of the software. (It is reporting v0.11.1-dirty, so it's both old and not a release).

The best way to get started is with the quickstart docker image.

Try again with the most up-to-date software and see if you have the same issues.

  • 1
    Thanks for the great help, it worked. I downloaded the horizon version v0.17.3 and it worked nicely
    – Vijin
    Commented Mar 7, 2019 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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