liststreamitems count and start seem to be reversed from the documentation and start doesn't seem to work

0 votes
I have 9 items in the stream

The third parameter changes the number of items returned and if it is negative an error message of "Invalid Count" is thrown

The second parameter returns the same result whether positive or negative -99 and 99 return the same last 4 items if the count is 4 but there are on only 9 items

 rows have been deleted that added no value and caused me to exceed my line limit

{"method":"liststreamitems","params":["TEST STREAM 3"],"id":1,"chain_name":"digicert"}

[
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 1",
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 2",
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 3",
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 4",
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 5",
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 6",
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 7",
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 8",
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 9",
  }
]
{"method":"liststreamitems","params":["TEST STREAM 3",1,2],"id":1,"chain_name":"digicert"}

[
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 8",
    "blockindex" : 9,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 9",
    "blockindex" : 10,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  }
]
{"method":"liststreamitems","params":["TEST STREAM 3",-1,2],"id":1,"chain_name":"digicert"}

[
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 8",
    "blockindex" : 9,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 9",
    "blockindex" : 10,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  }
]
{"method":"liststreamitems","params":["TEST STREAM 3",8,2],"id":1,"chain_name":"digicert"}

[
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 8",
    "blockindex" : 9,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 9",
    "blockindex" : 10,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  }
]
{"method":"liststreamitems","params":["TEST STREAM 3",8,-2],"id":1,"chain_name":"digicert"}

error code: -8
error message:
Invalid count
{"method":"liststreamitems","params":["TEST STREAM 3",-8,2],"id":1,"chain_name":"digicert"}

[
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 8",
    "blockindex" : 9,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 9",
    "blockindex" : 10,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  }
]
{"method":"liststreamitems","params":["TEST STREAM 3",3,3],"id":1,"chain_name":"digicert"}

[
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 7",
    "blockindex" : 8,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 8",
    "blockindex" : 9,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 9",
    "blockindex" : 10,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  }
]
{"method":"liststreamitems","params":["TEST STREAM 3",-3,3],"id":1,"chain_name":"digicert"}

[
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 7",
    "blockindex" : 8,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 8",
    "blockindex" : 9,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 9",
    "blockindex" : 10,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  }
]
{"method":"liststreamitems","params":["TEST STREAM 3",3,2],"id":1,"chain_name":"digicert"}

[
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 8",
    "blockindex" : 9,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 9",
    "blockindex" : 10,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  }
]
{"method":"liststreamitems","params":["TEST STREAM 3",-3,2],"id":1,"chain_name":"digicert"}

[
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 8",
    "blockindex" : 9,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 9",
    "blockindex" : 10,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  }
]
{"method":"liststreamitems","params":["TEST STREAM 3",99,4],"id":1,"chain_name":"digicert"}

[
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 6",
    "blockindex" : 7,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 7",
    "blockindex" : 8,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 8",
    "blockindex" : 9,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 9",
    "blockindex" : 10,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  }
]
{"method":"liststreamitems","params":["TEST STREAM 3",-99,4],"id":1,"chain_name":"digicert"}

[
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 6",
    "blockindex" : 7,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 7",
    "blockindex" : 8,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 8",
    "blockindex" : 9,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  },
  {
    "publishers" : [
      "1NYktD7U6Dj3YfvFD5RXycUa61CKtRVjsLURLC"
    ],
    "key" : "Entry 9",
    "blockindex" : 10,
    "vout" : 0,
    "valid" : true,
    "time" : 1488240150,
  }
]
asked Feb 28, 2017 by Jim

1 Answer

0 votes

There's a verbose parameter before count and start that you're not taking account of.

answered Feb 28, 2017 by MultiChain
...